1 // Name : SketchAPI_Mirror.cpp
5 // 16/06/16 - Sergey POKHODENKO - Creation of the file
7 //--------------------------------------------------------------------------------------
8 #include "SketchAPI_Mirror.h"
9 //--------------------------------------------------------------------------------------
10 #include <ModelHighAPI_Dumper.h>
11 #include <ModelHighAPI_Selection.h>
12 #include <ModelHighAPI_Tools.h>
13 //--------------------------------------------------------------------------------------
14 SketchAPI_Mirror::SketchAPI_Mirror(
15 const std::shared_ptr<ModelAPI_Feature> & theFeature)
16 : ModelHighAPI_Interface(theFeature)
21 SketchAPI_Mirror::SketchAPI_Mirror(
22 const std::shared_ptr<ModelAPI_Feature> & theFeature,
23 const ModelHighAPI_RefAttr & theMirrorLine,
24 const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects)
25 : ModelHighAPI_Interface(theFeature)
28 fillAttribute(theMirrorLine, mirrorLine());
29 fillAttribute(theObjects, mirrorList());
35 SketchAPI_Mirror::~SketchAPI_Mirror()
40 //--------------------------------------------------------------------------------------
42 void SketchAPI_Mirror::dump(ModelHighAPI_Dumper& theDumper) const
44 FeaturePtr aBase = feature();
45 const std::string& aSketchName = theDumper.parentName(aBase);
47 AttributeRefAttrPtr aMirrorLine = mirrorLine();
48 AttributeRefListPtr aMirrorObjects = mirrorList();
49 theDumper << aBase << " = " << aSketchName << ".addMirror(" << aMirrorLine << ", "
50 << aMirrorObjects << ")" << std::endl;