From: mpv Date: Tue, 18 Nov 2014 07:04:50 +0000 (+0300) Subject: Merge branch 'master' of newgeom:newgeom X-Git-Tag: V_0.5.2~2^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4783f146b71a48c651523fcf0e12367bcf3d1fa8;p=modules%2Fshaper.git Merge branch 'master' of newgeom:newgeom Conflicts: src/GeomAPI/GeomAPI_PlanarEdges.h src/Model/Model_ResultConstruction.cpp src/Model/Model_ResultConstruction.h src/Model/Model_ResultGroup.cpp src/Model/Model_ResultGroup.h src/ModelAPI/ModelAPI_ResultBody.h src/ModelAPI/ModelAPI_ResultConstruction.h src/ModelAPI/ModelAPI_ResultGroup.h src/ModelAPI/ModelAPI_Tools.cpp --- 4783f146b71a48c651523fcf0e12367bcf3d1fa8 diff --cc src/GeomAPI/GeomAPI_PlanarEdges.cpp index 912e9cd69,fc09a74b3..3b17174c0 --- a/src/GeomAPI/GeomAPI_PlanarEdges.cpp +++ b/src/GeomAPI/GeomAPI_PlanarEdges.cpp @@@ -48,41 -48,3 +48,41 @@@ std::list& theOrigin) ++void GeomAPI_PlanarEdges::setOrigin(const std::shared_ptr& theOrigin) +{ + myOrigin = theOrigin; +} - boost::shared_ptr GeomAPI_PlanarEdges::origin() const { ++std::shared_ptr GeomAPI_PlanarEdges::origin() const { + return myOrigin; +} - void GeomAPI_PlanarEdges::setDirX(const boost::shared_ptr& theDirX) { ++void GeomAPI_PlanarEdges::setDirX(const std::shared_ptr& theDirX) { + myDirX = theDirX; +} - boost::shared_ptr GeomAPI_PlanarEdges::dirX() const { ++std::shared_ptr GeomAPI_PlanarEdges::dirX() const { + return myDirX; +} - void GeomAPI_PlanarEdges::setDirY(const boost::shared_ptr& theDirY) { ++void GeomAPI_PlanarEdges::setDirY(const std::shared_ptr& theDirY) { + myDirY = theDirY; +} - boost::shared_ptr GeomAPI_PlanarEdges::dirY() const { ++std::shared_ptr GeomAPI_PlanarEdges::dirY() const { + return myDirY; +} - void GeomAPI_PlanarEdges::setNorm(const boost::shared_ptr& theNorm) { ++void GeomAPI_PlanarEdges::setNorm(const std::shared_ptr& theNorm) { + myNorm = theNorm; +} - boost::shared_ptr GeomAPI_PlanarEdges::norm() const { ++std::shared_ptr GeomAPI_PlanarEdges::norm() const { + return myNorm; +} diff --cc src/GeomAPI/GeomAPI_PlanarEdges.h index 2b94de9b3,1521d5add..1cb638530 --- a/src/GeomAPI/GeomAPI_PlanarEdges.h +++ b/src/GeomAPI/GeomAPI_PlanarEdges.h @@@ -25,38 -25,45 +25,39 @@@ class GeomAPI_PlanarEdges : public Geom /// 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 theEdge); - GEOMAPI_EXPORT std::list > getEdges(); + GEOMAPI_EXPORT void addEdge(std::shared_ptr theEdge); + GEOMAPI_EXPORT std::list > 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& theOrigin); - GEOMAPI_EXPORT boost::shared_ptr origin() const; - GEOMAPI_EXPORT void setOrigin(const std::shared_ptr& theOrigin) - { myOrigin = theOrigin; } - GEOMAPI_EXPORT std::shared_ptr origin() const { return myOrigin; } ++ GEOMAPI_EXPORT void setOrigin(const std::shared_ptr& theOrigin); ++ ++ GEOMAPI_EXPORT std::shared_ptr origin() const; /// Set/Get X direction vector - GEOMAPI_EXPORT void setDirX(const boost::shared_ptr& theDirX); - GEOMAPI_EXPORT boost::shared_ptr dirX() const; - GEOMAPI_EXPORT void setDirX(const std::shared_ptr& theDirX) { myDirX = theDirX; } - GEOMAPI_EXPORT std::shared_ptr dirX() const { return myDirX; } ++ GEOMAPI_EXPORT void setDirX(const std::shared_ptr& theDirX); ++ GEOMAPI_EXPORT std::shared_ptr dirX() const; /// Set/Get Y direction vector - GEOMAPI_EXPORT void setDirY(const boost::shared_ptr& theDirY); - GEOMAPI_EXPORT boost::shared_ptr dirY() const; - GEOMAPI_EXPORT void setDirY(const std::shared_ptr& theDirY) { myDirY = theDirY; } - GEOMAPI_EXPORT std::shared_ptr dirY() const { return myDirY; } ++ GEOMAPI_EXPORT void setDirY(const std::shared_ptr& theDirY); ++ GEOMAPI_EXPORT std::shared_ptr dirY() const; /// Set/Get Normal direction vector - GEOMAPI_EXPORT void setNorm(const boost::shared_ptr& theNorm); - GEOMAPI_EXPORT boost::shared_ptr norm() const; - GEOMAPI_EXPORT void setNorm(const std::shared_ptr& theNorm) { myNorm = theNorm; } - GEOMAPI_EXPORT std::shared_ptr norm() const { return myNorm; } ++ GEOMAPI_EXPORT void setNorm(const std::shared_ptr& theNorm); ++ GEOMAPI_EXPORT std::shared_ptr norm() const; private: - boost::shared_ptr myOrigin; - boost::shared_ptr myDirX; - boost::shared_ptr myDirY; - boost::shared_ptr myNorm; + std::shared_ptr myOrigin; + std::shared_ptr myDirX; + std::shared_ptr myDirY; + std::shared_ptr myNorm; }; #endif diff --cc src/Model/Model_ResultConstruction.cpp index 749c90211,30a1cd467..750d0e27d --- a/src/Model/Model_ResultConstruction.cpp +++ b/src/Model/Model_ResultConstruction.cpp @@@ -9,7 -9,7 +9,7 @@@ void Model_ResultConstruction::setShape myShape = theShape; } - boost::shared_ptr Model_ResultConstruction::shape() -std::shared_ptr& Model_ResultConstruction::shape() ++std::shared_ptr Model_ResultConstruction::shape() { return myShape; } diff --cc src/Model/Model_ResultConstruction.h index a9683cdcf,f2581f3df..a1e395c5e --- a/src/Model/Model_ResultConstruction.h +++ b/src/Model/Model_ResultConstruction.h @@@ -28,9 -28,9 +28,9 @@@ class Model_ResultConstruction : publi } /// Sets the result - MODEL_EXPORT virtual void setShape(boost::shared_ptr theShape); + MODEL_EXPORT virtual void setShape(std::shared_ptr theShape); /// Returns the shape-result produced by this feature - MODEL_EXPORT virtual boost::shared_ptr shape(); - MODEL_EXPORT virtual std::shared_ptr& shape(); ++ MODEL_EXPORT virtual std::shared_ptr shape(); /// Sets the flag that it must be displayed in history (default is true) MODEL_EXPORT virtual void setIsInHistory(const bool myIsInHistory); diff --cc src/Model/Model_ResultGroup.cpp index 5c9017393,fbfe1d923..e9c6e8c8b --- a/src/Model/Model_ResultGroup.cpp +++ b/src/Model/Model_ResultGroup.cpp @@@ -12,9 -12,9 +12,9 @@@ Model_ResultGroup::Model_ResultGroup(st myOwnerData = theOwnerData; } - boost::shared_ptr Model_ResultGroup::shape() -std::shared_ptr Model_ResultGroup::shape() const ++std::shared_ptr Model_ResultGroup::shape() { - boost::shared_ptr aResult; + std::shared_ptr aResult; if (myOwnerData) { AttributeSelectionListPtr aList = myOwnerData->selectionList("group_list"); if (aList) { diff --cc src/Model/Model_ResultGroup.h index 7703dd436,17d7b9da9..0dc35bdcf --- a/src/Model/Model_ResultGroup.h +++ b/src/Model/Model_ResultGroup.h @@@ -16,10 -16,10 +16,10 @@@ */ class Model_ResultGroup : public ModelAPI_ResultGroup { - boost::shared_ptr myOwnerData; ///< data of owner of this result + std::shared_ptr myOwnerData; ///< data of owner of this result public: /// Returns the compound of selected entities - MODEL_EXPORT virtual boost::shared_ptr shape(); - MODEL_EXPORT virtual std::shared_ptr shape() const; ++ MODEL_EXPORT virtual std::shared_ptr shape(); /// Removes the stored builders MODEL_EXPORT virtual ~Model_ResultGroup() {} diff --cc src/ModelAPI/ModelAPI_Feature.h index 7e79f12fb,a01adf4b1..431b065b7 --- a/src/ModelAPI/ModelAPI_Feature.h +++ b/src/ModelAPI/ModelAPI_Feature.h @@@ -7,10 -7,21 +7,10 @@@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include - #include + #include #include #include diff --cc src/ModelAPI/ModelAPI_Result.h index c702ba25a,fe674e308..91304744e --- a/src/ModelAPI/ModelAPI_Result.h +++ b/src/ModelAPI/ModelAPI_Result.h @@@ -31,8 -30,6 +31,8 @@@ class ModelAPI_Result : public ModelAPI { } + /// Returns the shape-result produced by this feature (or null if no shapes) - virtual boost::shared_ptr shape() {return boost::shared_ptr();} ++ virtual std::shared_ptr shape() {return std::shared_ptr();} }; //! Pointer on feature object diff --cc src/ModelAPI/ModelAPI_ResultBody.h index 86e368ef3,2a213f25b..98350ce37 --- a/src/ModelAPI/ModelAPI_ResultBody.h +++ b/src/ModelAPI/ModelAPI_ResultBody.h @@@ -37,16 -37,19 +37,16 @@@ public } /// Stores the shape (called by the execution method). - virtual void store(const boost::shared_ptr& theShape) = 0; + virtual void store(const std::shared_ptr& theShape) = 0; /// Stores the generated shape (called by the execution method). - virtual void storeGenerated(const boost::shared_ptr& theFromShape, - const boost::shared_ptr& theToShape) = 0; + virtual void storeGenerated(const std::shared_ptr& theFromShape, + const std::shared_ptr& theToShape) = 0; /// Stores the modified shape (called by the execution method). - virtual void storeModified(const boost::shared_ptr& theOldShape, - const boost::shared_ptr& theNewShape) = 0; + virtual void storeModified(const std::shared_ptr& theOldShape, + const std::shared_ptr& theNewShape) = 0; - /// Returns the shape-result produced by this feature - virtual std::shared_ptr 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( diff --cc src/ModelAPI/ModelAPI_ResultConstruction.h index 8f040209f,4ff1a0189..a431c8472 --- a/src/ModelAPI/ModelAPI_ResultConstruction.h +++ b/src/ModelAPI/ModelAPI_ResultConstruction.h @@@ -33,8 -33,11 +33,8 @@@ class ModelAPI_ResultConstruction : pub return MY_GROUP; } - /// Returns the shape-result produced by this feature - virtual std::shared_ptr& shape() = 0; - /// Sets the result - virtual void setShape(boost::shared_ptr theShape) = 0; + virtual void setShape(std::shared_ptr theShape) = 0; /// Sets the flag that it must be displayed in history (default is true) virtual void setIsInHistory(const bool isInHistory) = 0; diff --cc src/ModelAPI/ModelAPI_Tools.cpp index d765e7702,bc086953b..8f91a914a --- a/src/ModelAPI/ModelAPI_Tools.cpp +++ b/src/ModelAPI/ModelAPI_Tools.cpp @@@ -9,10 -9,10 +9,10 @@@ namespace ModelAPI_Tools { - boost::shared_ptr shape(const ResultPtr& theResult) + std::shared_ptr shape(const ResultPtr& theResult) { - +/* - ResultBodyPtr aBody = boost::dynamic_pointer_cast(theResult); + ResultBodyPtr aBody = std::dynamic_pointer_cast(theResult); if (aBody) return aBody->shape(); @@@ -21,11 -21,9 +21,11 @@@ if (aConstruct) return aConstruct->shape(); - ResultGroupPtr aGroup = boost::dynamic_pointer_cast(theResult); + ResultGroupPtr aGroup = std::dynamic_pointer_cast(theResult); if (aGroup) return aGroup->shape(); - return boost::shared_ptr(); + return std::shared_ptr(); + */ + return theResult->shape(); } } diff --cc src/XGUI/XGUI_Workshop.h index 5542006a1,43751c0dd..400465898 --- a/src/XGUI/XGUI_Workshop.h +++ b/src/XGUI/XGUI_Workshop.h @@@ -147,7 -147,7 +147,7 @@@ Q_OBJEC //! Activates or deactivates a part //! If PartPtr is Null pointer then PartSet will be activated - void activatePart(boost::shared_ptr theFeature); - void activatePart(ResultPartPtr theFeature); ++ void activatePart(std::shared_ptr theFeature); //! Delete features void deleteObjects(const QList& theList);