From: azv Date: Tue, 16 Aug 2016 11:30:35 +0000 (+0300) Subject: Dump Python in the High Level Parameterized Geometry API (issue #1648) X-Git-Tag: V_2.5.0~137^2~39 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=29f723ee327aab8cab780b9f1fd8688d1577e680;p=modules%2Fshaper.git Dump Python in the High Level Parameterized Geometry API (issue #1648) Do not dump same sketch twice --- diff --git a/src/SketchAPI/SketchAPI_Sketch.cpp b/src/SketchAPI/SketchAPI_Sketch.cpp index 9d82de1ae..5690ddfd7 100644 --- a/src/SketchAPI/SketchAPI_Sketch.cpp +++ b/src/SketchAPI/SketchAPI_Sketch.cpp @@ -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;