]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Dump Python in the High Level Parameterized Geometry API (issue #1648)
authorazv <azv@opencascade.com>
Tue, 16 Aug 2016 11:30:35 +0000 (14:30 +0300)
committerazv <azv@opencascade.com>
Tue, 16 Aug 2016 11:30:35 +0000 (14:30 +0300)
Do not dump same sketch twice

src/SketchAPI/SketchAPI_Sketch.cpp

index 9d82de1aeb2d15a85a434de8dad4b19e32ec4da1..5690ddfd711f66d5e6dd6117809c863195f950c5 100644 (file)
@@ -679,9 +679,11 @@ void SketchAPI_Sketch::dump(ModelHighAPI_Dumper& theDumper) const
         std::string anOriginName = aSketchName + "_origin";
         std::string aNormalName  = aSketchName + "_norm";
         std::string aDirXName    = aSketchName + "_dirx";
-        theDumper << anOriginName << " = " << anOrigin << std::endl
-                  << aNormalName  << " = " << aNormal  << std::endl
-                  << aDirXName    << " = " << aDirX    << std::endl;
+        // use "\n" instead of std::endl to avoid automatic dumping sketch here
+        // and then dumplicate dumping it in the next line
+        theDumper << anOriginName << " = " << anOrigin << "\n"
+                  << aNormalName  << " = " << aNormal  << "\n"
+                  << aDirXName    << " = " << aDirX    << "\n";
         // dump sketch based on arbitrary plane
         theDumper << aBase << " = model.addSketch(" << aDocName << ", GeomAPI_Ax3("
                   << anOriginName << ", " << aDirXName << ", " << aNormalName << "))" << std::endl;