From 29f723ee327aab8cab780b9f1fd8688d1577e680 Mon Sep 17 00:00:00 2001 From: azv Date: Tue, 16 Aug 2016 14:30:35 +0300 Subject: [PATCH] Dump Python in the High Level Parameterized Geometry API (issue #1648) Do not dump same sketch twice --- src/SketchAPI/SketchAPI_Sketch.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; -- 2.39.2