]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for dumping Sketch. Use standardPlane only when context name is same as plane...
authordbv <dbv@opencascade.com>
Fri, 10 Feb 2017 08:34:48 +0000 (11:34 +0300)
committerdbv <dbv@opencascade.com>
Fri, 10 Feb 2017 08:34:48 +0000 (11:34 +0300)
src/SketchAPI/SketchAPI_Sketch.cpp

index 930828a68d9c3173996620db04c1b182738a9237..bacc3c147ddb1bd9e69923130166f5638927a665 100644 (file)
@@ -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;