X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesPlugin%2FFeaturesPlugin_Symmetry.h;h=a19d143cfa73448e098563a67d761957e3560310;hb=7e2ec169c8e3729e15be8a4ed4e2c9975d992c32;hp=aa67bd79b72580d9c245a18f0bb0bfbf8e38c668;hpb=a94fc319f2aa64b43c9a73b5ff7063923648faec;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/FeaturesPlugin_Symmetry.h b/src/FeaturesPlugin/FeaturesPlugin_Symmetry.h index aa67bd79b..a19d143cf 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Symmetry.h +++ b/src/FeaturesPlugin/FeaturesPlugin_Symmetry.h @@ -26,6 +26,9 @@ #include #include +#include + +class GeomAPI_Trsf; /** \class FeaturesPlugin_Symmetry * \ingroup Plugins @@ -97,6 +100,13 @@ class FeaturesPlugin_Symmetry : public ModelAPI_Feature return MY_PLANE_OBJECT_ID; } + /// Attribute name of keeping original shape. + inline static const std::string& KEEP_ORIGINAL_RESULT() + { + static const std::string MY_KEEP_ORIGINAL_RESULT_ID("keep_original"); + return MY_KEEP_ORIGINAL_RESULT_ID; + } + /// \return the kind of a feature. FEATURESPLUGIN_EXPORT virtual const std::string& getKind() { @@ -114,6 +124,10 @@ class FeaturesPlugin_Symmetry : public ModelAPI_Feature FeaturesPlugin_Symmetry(); private: + /// Obtain list of source objects of the mirror + bool collectSourceObjects(ListOfShape& theSourceShapes, + std::list>& theSourceResults); + /// Perform symmetry with respect to a point. void performSymmetryByPoint(); @@ -124,9 +138,19 @@ private: void performSymmetryByPlane(); /// Perform the naming - void loadNamingDS(GeomAlgoAPI_Symmetry& theSymmetryAlgo, + void loadNamingDS(GeomAlgoAPI_MakeShapeList& theSymmetryAlgo, std::shared_ptr theResultBody, std::shared_ptr theBaseShape); + + /// Create new result on given shapes and the index of result + void buildResult(std::shared_ptr& theSymmetryAlgo, + std::shared_ptr theBaseShape, + int theResultIndex); + + /// Create new result for the given part and transformation + void buildResult(std::shared_ptr theOriginal, + std::shared_ptr theTrsf, + int& theResultIndex); }; #endif // FEATURESPLUGIN_SYMMETRY_H_