//==================================================================================================
FeaturesAPI_Symmetry::FeaturesAPI_Symmetry(const std::shared_ptr<ModelAPI_Feature>& theFeature,
const std::list<ModelHighAPI_Selection>& theMainObjects,
- const ModelHighAPI_Selection& theObject)
+ const ModelHighAPI_Selection& theObject,
+ bool theKeepOriginal)
: ModelHighAPI_Interface(theFeature)
{
if(initialize()) {
fillAttribute(theMainObjects, mainObjects());
+ fillAttribute(theKeepOriginal, keepOriginal());
GeomAPI_Shape::ShapeType aType = getShapeType(theObject);
if(aType == GeomAPI_Shape::VERTEX) {
setPoint(theObject);
AttributeSelectionListPtr anAttrObjects =
aBase->selectionList(FeaturesPlugin_Symmetry::OBJECTS_LIST_ID());
- theDumper << aBase << " = model.addMirror(" << aDocName << ", " << anAttrObjects;
+ theDumper << aBase << " = model.addSymmetry(" << aDocName << ", " << anAttrObjects;
std::string aCreationMethod =
aBase->string(FeaturesPlugin_Symmetry::CREATION_METHOD())->value();
theDumper << ", " << anAttrPlane;
}
- theDumper << ")" << std::endl;
+ theDumper << ", " << keepOriginal() << ")" << std::endl;
}
//==================================================================================================
-SymmetryPtr addMirror(const std::shared_ptr<ModelAPI_Document>& thePart,
- const std::list<ModelHighAPI_Selection>& theMainObjects,
- const ModelHighAPI_Selection& theObject)
+SymmetryPtr addSymmetry(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theMainObjects,
+ const ModelHighAPI_Selection& theObject,
+ bool theKeepOriginal)
{
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_Symmetry::ID());
- return SymmetryPtr(new FeaturesAPI_Symmetry(aFeature, theMainObjects, theObject));
+ return SymmetryPtr(new FeaturesAPI_Symmetry(aFeature, theMainObjects, theObject, theKeepOriginal));
}