From 7ee00dbb22d98859f09770884d1d18d7cfab0451 Mon Sep 17 00:00:00 2001 From: dbv Date: Fri, 10 Feb 2017 11:34:48 +0300 Subject: [PATCH] Fix for dumping Sketch. Use standardPlane only when context name is same as plane name. --- src/SketchAPI/SketchAPI_Sketch.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SketchAPI/SketchAPI_Sketch.cpp b/src/SketchAPI/SketchAPI_Sketch.cpp index 930828a68..bacc3c147 100644 --- a/src/SketchAPI/SketchAPI_Sketch.cpp +++ b/src/SketchAPI/SketchAPI_Sketch.cpp @@ -719,8 +719,10 @@ void SketchAPI_Sketch::dump(ModelHighAPI_Dumper& theDumper) const // Check the plane is coordinate plane std::string aPlaneName = defaultPlane(anOrigin, aNormal, aDirX); - if (anExternal->context()) { // checking for selected planes - if (!aPlaneName.empty()) { + if(anExternal->context()) { // checking for selected planes + if (!aPlaneName.empty() + && anExternal->context()->data() + && anExternal->context()->data()->name() == aPlaneName) { // dump sketch based on coordinate plane theDumper << aBase << " = model.addSketch(" << aDocName << ", model.standardPlane(\"" << aPlaneName << "\"))" << std::endl; -- 2.39.2