]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModelAPI/ModelAPI_Tools.cpp
Salome HOME
Show ISO lines only on bodies and with highlighting also
[modules/shaper.git] / src / ModelAPI / ModelAPI_Tools.cpp
index 3d293492e517645cf583bdf62eb22a8c7fdea2d4..0c312f3955c162af9e8bbc0ddeb993efa422d02e 100644 (file)
@@ -30,6 +30,7 @@
 #include <ModelAPI_AttributeDocRef.h>
 #include <ModelAPI_Validator.h>
 #include <ModelAPI_AttributeIntArray.h>
+#include <ModelAPI_ResultConstruction.h>
 #include <list>
 #include <map>
 #include <iostream>
@@ -852,13 +853,19 @@ void getColor(const std::shared_ptr<ModelAPI_Result>& theResult, std::vector<int
 void getIsoLines(const std::shared_ptr<ModelAPI_Result>& theResult, std::vector<int>& theNbLines)
 {
   theNbLines.clear();
-  // get color from the attribute of the result
-  if (theResult.get() != NULL &&
-    theResult->data()->attribute(ModelAPI_Result::ISO_LINES_ID()).get() != NULL) {
-    AttributeIntArrayPtr aAttr = theResult->data()->intArray(ModelAPI_Result::ISO_LINES_ID());
-    if (aAttr.get() && aAttr->size()) {
-      theNbLines.push_back(aAttr->value(0));
-      theNbLines.push_back(aAttr->value(1));
+  if (theResult->groupName() == ModelAPI_ResultConstruction::group()) {
+    theNbLines.push_back(0);
+    theNbLines.push_back(0);
+  }
+  else {
+    // get color from the attribute of the result
+    if (theResult.get() != NULL &&
+      theResult->data()->attribute(ModelAPI_Result::ISO_LINES_ID()).get() != NULL) {
+      AttributeIntArrayPtr aAttr = theResult->data()->intArray(ModelAPI_Result::ISO_LINES_ID());
+      if (aAttr.get() && aAttr->size()) {
+        theNbLines.push_back(aAttr->value(0));
+        theNbLines.push_back(aAttr->value(1));
+      }
     }
   }
 }