]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchAPI/SketchAPI_Offset.cpp
Salome HOME
Merge branch 'V9_11_BR'
[modules/shaper.git] / src / SketchAPI / SketchAPI_Offset.cpp
index c7dc082de3fbb09da9076a0fd00a128dd1c37c45..6f8088f7040991869b984659a1cf926c0531a86f 100644 (file)
@@ -35,7 +35,8 @@ SketchAPI_Offset::SketchAPI_Offset (const std::shared_ptr<ModelAPI_Feature> & th
                                     const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects,
                                     const ModelHighAPI_Double & theOffsetValue,
                                     const bool theIsReversed,
-                                    const std::string & theJointType)
+                                    const std::string & theJointType,
+                                    const bool theIsApprox)
   : ModelHighAPI_Interface(theFeature)
 {
   if (initialize()) {
@@ -43,6 +44,7 @@ SketchAPI_Offset::SketchAPI_Offset (const std::shared_ptr<ModelAPI_Feature> & th
     fillAttribute(theOffsetValue, value());
     fillAttribute(theIsReversed, reversed());
     fillAttribute(theJointType, joint());
+    fillAttribute(theIsApprox, approx());
 
     execute();
   }
@@ -75,6 +77,7 @@ void SketchAPI_Offset::dump (ModelHighAPI_Dumper& theDumper) const
   AttributeDoublePtr aValue = value();
   AttributeBooleanPtr aReversed = reversed();
   AttributeStringPtr aJoint = joint();
+  AttributeBooleanPtr anApprox = approx();
 
   // Check all attributes are already dumped. If not, store the feature as postponed.
   if (!theDumper.isDumped(aOffsetObjects)) {
@@ -83,7 +86,7 @@ void SketchAPI_Offset::dump (ModelHighAPI_Dumper& theDumper) const
   }
 
   theDumper << aBase << " = " << aSketchName << ".addOffset(" << aOffsetObjects << ", "
-            << aValue << ", " << aReversed  << ", " << aJoint << ")" << std::endl;
+            << aValue << ", " << aReversed  << ", " << aJoint << ", " << anApprox << ")" << std::endl;
 
   // Dump variables for a list of created features
   theDumper << "[";