]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchPlugin/SketchPlugin_Sketch.cpp
Salome HOME
Import of edges participating to the result of the sketch
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Sketch.cpp
index ada1bdf5dddb919a5a902f1be2f1917820a55030..b0660a958229009b031b28166fe51419621a8db7 100755 (executable)
@@ -14,7 +14,8 @@
 // License along with this library; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 //
 
 #include <Config_PropManager.h>
@@ -42,6 +43,7 @@
 
 #include <SketchPlugin_Sketch.h>
 #include <SketchPlugin_Feature.h>
+#include <SketchPlugin_Projection.h>
 #include <SketchPlugin_SketchEntity.h>
 #include <SketchPlugin_Tools.h>
 
@@ -101,10 +103,14 @@ void SketchPlugin_Sketch::execute()
     if (aFeature) {
       if (!aFeature->sketch()) // on load document the back references are missed
         aFeature->setSketch(this);
-      // do not include the external edges into the result
+      // do not include into the result the external edges with disabled flag "Include into result"
       if (aFeature->data()->attribute(SketchPlugin_SketchEntity::EXTERNAL_ID())) {
-        if (aFeature->data()->selection(SketchPlugin_SketchEntity::EXTERNAL_ID())->context())
-          continue;
+        if (aFeature->data()->selection(SketchPlugin_SketchEntity::EXTERNAL_ID())->context()) {
+          AttributeBooleanPtr aKeepResult =
+              aFeature->boolean(SketchPlugin_Projection::INCLUDE_INTO_RESULT());
+          if (!aKeepResult || !aKeepResult->value())
+            continue;
+        }
       }
       // do not include the construction entities in the result
       if (aFeature->data()->attribute(SketchPlugin_SketchEntity::AUXILIARY_ID())) {