From: dbv Date: Fri, 10 Feb 2017 08:34:48 +0000 (+0300) Subject: Fix for dumping Sketch. Use standardPlane only when context name is same as plane... X-Git-Tag: V_2.7.0~284^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7ee00dbb22d98859f09770884d1d18d7cfab0451;p=modules%2Fshaper.git Fix for dumping Sketch. Use standardPlane only when context name is same as plane name. --- 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;