}
return aResult;
}
- void GeomAPI_PlanarEdges::setOrigin(const boost::shared_ptr<GeomAPI_Pnt>& theOrigin)
+
+bool GeomAPI_PlanarEdges::hasPlane() const {
+ return myOrigin && myNorm && myDirX && myDirY;
+}
+
+bool GeomAPI_PlanarEdges::isVertex() const {
+ return false;
+}
+
+bool GeomAPI_PlanarEdges::isEdge() const {
+ return false;
+}
+
- boost::shared_ptr<GeomAPI_Pnt> GeomAPI_PlanarEdges::origin() const {
++void GeomAPI_PlanarEdges::setOrigin(const std::shared_ptr<GeomAPI_Pnt>& theOrigin)
+{
+ myOrigin = theOrigin;
+}
- void GeomAPI_PlanarEdges::setDirX(const boost::shared_ptr<GeomAPI_Dir>& theDirX) {
++std::shared_ptr<GeomAPI_Pnt> GeomAPI_PlanarEdges::origin() const {
+ return myOrigin;
+}
- boost::shared_ptr<GeomAPI_Dir> GeomAPI_PlanarEdges::dirX() const {
++void GeomAPI_PlanarEdges::setDirX(const std::shared_ptr<GeomAPI_Dir>& theDirX) {
+ myDirX = theDirX;
+}
- void GeomAPI_PlanarEdges::setDirY(const boost::shared_ptr<GeomAPI_Dir>& theDirY) {
++std::shared_ptr<GeomAPI_Dir> GeomAPI_PlanarEdges::dirX() const {
+ return myDirX;
+}
- boost::shared_ptr<GeomAPI_Dir> GeomAPI_PlanarEdges::dirY() const {
++void GeomAPI_PlanarEdges::setDirY(const std::shared_ptr<GeomAPI_Dir>& theDirY) {
+ myDirY = theDirY;
+}
- void GeomAPI_PlanarEdges::setNorm(const boost::shared_ptr<GeomAPI_Dir>& theNorm) {
++std::shared_ptr<GeomAPI_Dir> GeomAPI_PlanarEdges::dirY() const {
+ return myDirY;
+}
- boost::shared_ptr<GeomAPI_Dir> GeomAPI_PlanarEdges::norm() const {
++void GeomAPI_PlanarEdges::setNorm(const std::shared_ptr<GeomAPI_Dir>& theNorm) {
+ myNorm = theNorm;
+}
++std::shared_ptr<GeomAPI_Dir> GeomAPI_PlanarEdges::norm() const {
+ return myNorm;
+}
/// Creation of empty (null) shape
GEOMAPI_EXPORT GeomAPI_PlanarEdges();
- GEOMAPI_EXPORT virtual bool isVertex() const
- {
- return false;
- }
+ GEOMAPI_EXPORT virtual bool isVertex() const;
/// Returns whether the shape is an edge
- GEOMAPI_EXPORT virtual bool isEdge() const
- {
- return false;
- }
+ GEOMAPI_EXPORT virtual bool isEdge() const;
- GEOMAPI_EXPORT void addEdge(boost::shared_ptr<GeomAPI_Shape> theEdge);
- GEOMAPI_EXPORT std::list<boost::shared_ptr<GeomAPI_Shape> > getEdges();
+ GEOMAPI_EXPORT void addEdge(std::shared_ptr<GeomAPI_Shape> theEdge);
+ GEOMAPI_EXPORT std::list<std::shared_ptr<GeomAPI_Shape> > getEdges();
/// Returns True if the wire is defined in a plane
- GEOMAPI_EXPORT bool hasPlane() const { return myOrigin && myNorm && myDirX && myDirY; }
+ GEOMAPI_EXPORT bool hasPlane() const;
/// Set/Get origin point
- GEOMAPI_EXPORT void setOrigin(const boost::shared_ptr<GeomAPI_Pnt>& theOrigin);
- GEOMAPI_EXPORT boost::shared_ptr<GeomAPI_Pnt> origin() const;
- GEOMAPI_EXPORT void setOrigin(const std::shared_ptr<GeomAPI_Pnt>& theOrigin)
- { myOrigin = theOrigin; }
- GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt> origin() const { return myOrigin; }
++ GEOMAPI_EXPORT void setOrigin(const std::shared_ptr<GeomAPI_Pnt>& theOrigin);
++
++ GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt> origin() const;
/// Set/Get X direction vector
- GEOMAPI_EXPORT void setDirX(const boost::shared_ptr<GeomAPI_Dir>& theDirX);
- GEOMAPI_EXPORT boost::shared_ptr<GeomAPI_Dir> dirX() const;
- GEOMAPI_EXPORT void setDirX(const std::shared_ptr<GeomAPI_Dir>& theDirX) { myDirX = theDirX; }
- GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> dirX() const { return myDirX; }
++ GEOMAPI_EXPORT void setDirX(const std::shared_ptr<GeomAPI_Dir>& theDirX);
++ GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> dirX() const;
/// Set/Get Y direction vector
- GEOMAPI_EXPORT void setDirY(const boost::shared_ptr<GeomAPI_Dir>& theDirY);
- GEOMAPI_EXPORT boost::shared_ptr<GeomAPI_Dir> dirY() const;
- GEOMAPI_EXPORT void setDirY(const std::shared_ptr<GeomAPI_Dir>& theDirY) { myDirY = theDirY; }
- GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> dirY() const { return myDirY; }
++ GEOMAPI_EXPORT void setDirY(const std::shared_ptr<GeomAPI_Dir>& theDirY);
++ GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> dirY() const;
/// Set/Get Normal direction vector
- GEOMAPI_EXPORT void setNorm(const boost::shared_ptr<GeomAPI_Dir>& theNorm);
- GEOMAPI_EXPORT boost::shared_ptr<GeomAPI_Dir> norm() const;
- GEOMAPI_EXPORT void setNorm(const std::shared_ptr<GeomAPI_Dir>& theNorm) { myNorm = theNorm; }
- GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> norm() const { return myNorm; }
++ GEOMAPI_EXPORT void setNorm(const std::shared_ptr<GeomAPI_Dir>& theNorm);
++ GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> norm() const;
private:
- boost::shared_ptr<GeomAPI_Pnt> myOrigin;
- boost::shared_ptr<GeomAPI_Dir> myDirX;
- boost::shared_ptr<GeomAPI_Dir> myDirY;
- boost::shared_ptr<GeomAPI_Dir> myNorm;
+ std::shared_ptr<GeomAPI_Pnt> myOrigin;
+ std::shared_ptr<GeomAPI_Dir> myDirX;
+ std::shared_ptr<GeomAPI_Dir> myDirY;
+ std::shared_ptr<GeomAPI_Dir> myNorm;
};
#endif
myShape = theShape;
}
- boost::shared_ptr<GeomAPI_Shape> Model_ResultConstruction::shape()
-std::shared_ptr<GeomAPI_Shape>& Model_ResultConstruction::shape()
++std::shared_ptr<GeomAPI_Shape> Model_ResultConstruction::shape()
{
return myShape;
}
}
/// Sets the result
- MODEL_EXPORT virtual void setShape(boost::shared_ptr<GeomAPI_Shape> theShape);
+ MODEL_EXPORT virtual void setShape(std::shared_ptr<GeomAPI_Shape> theShape);
/// Returns the shape-result produced by this feature
- MODEL_EXPORT virtual boost::shared_ptr<GeomAPI_Shape> shape();
- MODEL_EXPORT virtual std::shared_ptr<GeomAPI_Shape>& shape();
++ MODEL_EXPORT virtual std::shared_ptr<GeomAPI_Shape> shape();
/// Sets the flag that it must be displayed in history (default is true)
MODEL_EXPORT virtual void setIsInHistory(const bool myIsInHistory);
myOwnerData = theOwnerData;
}
- boost::shared_ptr<GeomAPI_Shape> Model_ResultGroup::shape()
-std::shared_ptr<GeomAPI_Shape> Model_ResultGroup::shape() const
++std::shared_ptr<GeomAPI_Shape> Model_ResultGroup::shape()
{
- boost::shared_ptr<GeomAPI_Shape> aResult;
+ std::shared_ptr<GeomAPI_Shape> aResult;
if (myOwnerData) {
AttributeSelectionListPtr aList = myOwnerData->selectionList("group_list");
if (aList) {
*/
class Model_ResultGroup : public ModelAPI_ResultGroup
{
- boost::shared_ptr<ModelAPI_Data> myOwnerData; ///< data of owner of this result
+ std::shared_ptr<ModelAPI_Data> myOwnerData; ///< data of owner of this result
public:
/// Returns the compound of selected entities
- MODEL_EXPORT virtual boost::shared_ptr<GeomAPI_Shape> shape();
- MODEL_EXPORT virtual std::shared_ptr<GeomAPI_Shape> shape() const;
++ MODEL_EXPORT virtual std::shared_ptr<GeomAPI_Shape> shape();
/// Removes the stored builders
MODEL_EXPORT virtual ~Model_ResultGroup() {}
#include <ModelAPI.h>
#include <ModelAPI_Object.h>
-#include <ModelAPI_AttributeBoolean.h>
-#include <ModelAPI_AttributeDocRef.h>
-#include <ModelAPI_AttributeDouble.h>
-#include <ModelAPI_AttributeInteger.h>
-#include <ModelAPI_AttributeRefAttr.h>
-#include <ModelAPI_AttributeReference.h>
-#include <ModelAPI_AttributeSelection.h>
-#include <ModelAPI_AttributeSelectionList.h>
-#include <ModelAPI_AttributeString.h>
-#include <ModelAPI_AttributeRefList.h>
#include <ModelAPI_Data.h>
#include <ModelAPI_Document.h>
-#include <ModelAPI_Result.h>
- #include <boost/shared_ptr.hpp>
+ #include <memory>
#include <list>
#include <string>
{
}
- virtual boost::shared_ptr<GeomAPI_Shape> shape() {return boost::shared_ptr<GeomAPI_Shape>();}
+ /// Returns the shape-result produced by this feature (or null if no shapes)
++ virtual std::shared_ptr<GeomAPI_Shape> shape() {return std::shared_ptr<GeomAPI_Shape>();}
};
//! Pointer on feature object
}
/// Stores the shape (called by the execution method).
- virtual void store(const boost::shared_ptr<GeomAPI_Shape>& theShape) = 0;
+ virtual void store(const std::shared_ptr<GeomAPI_Shape>& theShape) = 0;
/// Stores the generated shape (called by the execution method).
- virtual void storeGenerated(const boost::shared_ptr<GeomAPI_Shape>& theFromShape,
- const boost::shared_ptr<GeomAPI_Shape>& theToShape) = 0;
+ virtual void storeGenerated(const std::shared_ptr<GeomAPI_Shape>& theFromShape,
+ const std::shared_ptr<GeomAPI_Shape>& theToShape) = 0;
/// Stores the modified shape (called by the execution method).
- virtual void storeModified(const boost::shared_ptr<GeomAPI_Shape>& theOldShape,
- const boost::shared_ptr<GeomAPI_Shape>& theNewShape) = 0;
+ virtual void storeModified(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
+ const std::shared_ptr<GeomAPI_Shape>& theNewShape) = 0;
- /// Returns the shape-result produced by this feature
- virtual std::shared_ptr<GeomAPI_Shape> shape() = 0;
-
/// Records the subshape newShape which was generated during a topological construction.
/// As an example, consider the case of a face generated in construction of a box.
virtual void generated(
return MY_GROUP;
}
- /// Returns the shape-result produced by this feature
- virtual std::shared_ptr<GeomAPI_Shape>& shape() = 0;
-
/// Sets the result
- virtual void setShape(boost::shared_ptr<GeomAPI_Shape> theShape) = 0;
+ virtual void setShape(std::shared_ptr<GeomAPI_Shape> theShape) = 0;
/// Sets the flag that it must be displayed in history (default is true)
virtual void setIsInHistory(const bool isInHistory) = 0;
namespace ModelAPI_Tools {
- boost::shared_ptr<GeomAPI_Shape> shape(const ResultPtr& theResult)
+ std::shared_ptr<GeomAPI_Shape> shape(const ResultPtr& theResult)
{
-
+/*
- ResultBodyPtr aBody = boost::dynamic_pointer_cast<ModelAPI_ResultBody>(theResult);
+ ResultBodyPtr aBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(theResult);
if (aBody)
return aBody->shape();
if (aConstruct)
return aConstruct->shape();
- ResultGroupPtr aGroup = boost::dynamic_pointer_cast<ModelAPI_ResultGroup>(theResult);
+ ResultGroupPtr aGroup = std::dynamic_pointer_cast<ModelAPI_ResultGroup>(theResult);
if (aGroup)
return aGroup->shape();
- return boost::shared_ptr<GeomAPI_Shape>();
+ return std::shared_ptr<GeomAPI_Shape>();
+ */
+ return theResult->shape();
}
}
//! Activates or deactivates a part
//! If PartPtr is Null pointer then PartSet will be activated
- void activatePart(boost::shared_ptr<ModelAPI_ResultPart> theFeature);
- void activatePart(ResultPartPtr theFeature);
++ void activatePart(std::shared_ptr<ModelAPI_ResultPart> theFeature);
//! Delete features
void deleteObjects(const QList<ObjectPtr>& theList);