#include <GeomAlgoAPI_Symmetry.h>
+class GeomAPI_Trsf;
+
/** \class FeaturesPlugin_Symmetry
* \ingroup Plugins
* \brief Feature that performs reflection with respect to a point, axis, or plane.
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()
{
FeaturesPlugin_Symmetry();
private:
+ /// Obtain list of source objects of the mirror
+ bool collectSourceObjects(ListOfShape& theSourceShapes,
+ std::list<std::shared_ptr<ModelAPI_Result>>& theSourceResults);
+
/// Perform symmetry with respect to a point.
void performSymmetryByPoint();
void loadNamingDS(GeomAlgoAPI_Symmetry& theSymmetryAlgo,
std::shared_ptr<ModelAPI_ResultBody> theResultBody,
std::shared_ptr<GeomAPI_Shape> theBaseShape);
+
+ /// Create new result on given shapes and the index of result
+ void buildResult(GeomAlgoAPI_Symmetry& theSymmetryAlgo,
+ std::shared_ptr<GeomAPI_Shape> theBaseShape,
+ int theResultIndex);
+
+ /// Create new result for the given part and transformation
+ void buildResult(std::shared_ptr<ModelAPI_ResultPart> theOriginal,
+ std::shared_ptr<GeomAPI_Trsf> theTrsf,
+ int& theResultIndex);
};
#endif // FEATURESPLUGIN_SYMMETRY_H_