]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge branch 'master' of newgeom:newgeom
authormpv <mikhail.ponikarov@opencascade.com>
Tue, 18 Nov 2014 07:04:50 +0000 (10:04 +0300)
committermpv <mikhail.ponikarov@opencascade.com>
Tue, 18 Nov 2014 07:04:50 +0000 (10:04 +0300)
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

14 files changed:
1  2 
src/GeomAPI/GeomAPI_PlanarEdges.cpp
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_Feature.h
src/ModelAPI/ModelAPI_Result.h
src/ModelAPI/ModelAPI_ResultBody.h
src/ModelAPI/ModelAPI_ResultConstruction.h
src/ModelAPI/ModelAPI_ResultGroup.h
src/ModelAPI/ModelAPI_Tools.cpp
src/SketchPlugin/SketchPlugin_Feature.h
src/XGUI/XGUI_Workshop.h

index 912e9cd6950e277269baf7e2c21d00b8aafefbab,fc09a74b32c148e910d850357a2840f308ad0b2f..3b17174c066a19033849328c6dd65a03a1baf2e5
@@@ -48,41 -48,3 +48,41 @@@ std::list<std::shared_ptr<GeomAPI_Shape
    }
    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;
 +}
index 2b94de9b358ede3e77e990d64fdfdc7d5cba15d4,1521d5addae1d5cc1004c43f12bf2381bde9c0e9..1cb638530404779baacb5d608c3601277282af7c
@@@ -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<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
index 749c90211d92a0cefec5a5cf75d78df8e231a478,30a1cd467c063854bc8381c20c64e830eb2a8243..750d0e27d370443ddff3abd629cdf2e96570a482
@@@ -9,7 -9,7 +9,7 @@@ void Model_ResultConstruction::setShape
    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;
  }
index a9683cdcf52d3f7ce3287b6e253405c6edc308dc,f2581f3df275326ecbf6d2ce2c7fcce9386a7079..a1e395c5ed13919c8ae3cbc23f4074f43ae7819b
@@@ -28,9 -28,9 +28,9 @@@ class Model_ResultConstruction : publi
    }
  
    /// 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);
index 5c90173934e13f62952db75a5b60d0a05d6fd271,fbfe1d923d5b6ecfd34ffd794da6e36e82bfd131..e9c6e8c8b9cbb185ea348d8c36221173c142e163
@@@ -12,9 -12,9 +12,9 @@@ Model_ResultGroup::Model_ResultGroup(st
    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) {
index 7703dd4360c6f90bcdfccb3ce1c6fa9e1eeefdc7,17d7b9da9a3d0a6681a45b8250aad5cb613856de..0dc35bdcfb25cf1bb685daa339fc326f543a9501
   */
  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() {}
index 7e79f12fb6d4d2e6bc3c130d3167d6b42a7136e6,a01adf4b13834cf56bf12265d6f885c9f0ca45ff..431b065b77f2d76d26d696ba16bbd75b6f9191da
@@@ -7,10 -7,21 +7,10 @@@
  
  #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>
index c702ba25a85c5c476469d77b57eee3c5bc928e5b,fe674e308403e2de4ff9163ebbf5d340a867d932..91304744e457755086d2b4a93fb78722b0a24b76
@@@ -31,8 -30,6 +31,8 @@@ class ModelAPI_Result : public ModelAPI
    {
    }
  
-   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
index 86e368ef37cf6a1ce1c503cbe04363e35c3008fa,2a213f25b2e50afc478d4a2ae90e6c088fc4c648..98350ce37d57e9335c1272ed5eb41b06eb68c2b3
@@@ -37,16 -37,19 +37,16 @@@ public
    }
  
    /// 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(
index 8f040209ff666763269d5c8b94a169e3513786e2,4ff1a01891dede1434255710081dea20bb8fc9bd..a431c8472370683f6482e11ef7f265469a4ac11b
@@@ -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<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;
Simple merge
index d765e77026544c089a45c76f28e4e2295b970c28,bc086953b28a56926ceb5172e9c138f84331a8cc..8f91a914a817017d52e46bd453eba7a8627e1d47
@@@ -9,10 -9,10 +9,10 @@@
  
  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();
    }
  }
index 5542006a1586e97e103122470946abd17dfe0c73,43751c0dd17154f22097769b8a595f7126402529..400465898930d63a3d93ddfdb40b55c46e9e2314
@@@ -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<ModelAPI_ResultPart> theFeature);
 -  void activatePart(ResultPartPtr theFeature);
++  void activatePart(std::shared_ptr<ModelAPI_ResultPart> theFeature);
  
    //! Delete features
    void deleteObjects(const QList<ObjectPtr>& theList);