]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Correct processing of parametric update of filters arguments
authormpv <mpv@opencascade.com>
Tue, 18 Jun 2019 13:50:37 +0000 (16:50 +0300)
committermpv <mpv@opencascade.com>
Tue, 18 Jun 2019 13:50:37 +0000 (16:50 +0300)
src/FiltersPlugin/FiltersPlugin_OnPlane.cpp
src/Model/Model_AttributeSelection.cpp

index 3bb1019a2b9972b877444424c6cb2ba69ec10a5f..c86a33474cade21da6c83288d94bb40677f3266e 100644 (file)
@@ -99,11 +99,9 @@ bool FiltersPlugin_OnPlane::isOk(const GeomShapePtr& theShape,
       for (int i = 0; i < aList->size(); i++) {
         AttributeSelectionPtr aAttr = aList->value(i);
         GeomShapePtr aGeom = aAttr->value();
-        if (!aGeom->isSame(theShape)) {
-          GeomPlanePtr aPlane = getPlane(aAttr);
-          if (aPlane->isCoincident(aPln))
-            return true;
-        }
+        GeomPlanePtr aPlane = getPlane(aAttr);
+        if (aPlane->isCoincident(aPln))
+          return true;
       }
     }
   }
index 8ae93763d5f4d51ea4c4b7c979102f24d4f0c023..88a1610d5cb0844ae14fbb9c998705e6ee34a818 100644 (file)
@@ -730,6 +730,22 @@ std::string Model_AttributeSelection::namingName(const std::string& theDefaultNa
   if(!this->isInitialized())
     return !theDefaultName.empty() ? theDefaultName : aName;
 
+  // not argument has not parametric name (filters)
+  if (!this->isArgument() || (myParent && !myParent->isArgument())) {
+    GeomShapePtr aShape = value();
+    if (!aShape.get() && context().get())
+      aShape = context()->shape();
+    std::string aName;
+    if (aShape.get()) {
+      aName = aShape->shapeTypeStr();
+      if (myParent) {
+        aName += std::string("_") +
+          TCollection_AsciiString(selectionLabel().Father().Tag()).ToCString();
+      }
+    }
+    return aName;
+  }
+
   CenterType aCenterType = NOT_CENTER;
   std::shared_ptr<GeomAPI_Shape> aSubSh = internalValue(aCenterType);
   ResultPtr aCont = context();