Salome HOME
Fix for the issue #3195 : The groups built by "Group Addtion" are not in ShaperResults
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Fillet.cpp
index e076f47c2454d2b1ba6081c6dc91f7fb6e9b8f43..2e55f8c0c2ae6e4b4975098b8a7af3c6bb5005f2 100644 (file)
@@ -193,6 +193,11 @@ AISObjectPtr SketchPlugin_Fillet::getAISObject(AISObjectPtr thePrevious)
     anAISObject = AISObjectPtr(new GeomAPI_AISObject);
   }
   anAISObject->createShape(anArcShape);
+  bool isAxiliary = false;
+  AttributeBooleanPtr aAttr = boolean(AUXILIARY_ID());
+  if (aAttr.get())
+    isAxiliary = aAttr->value();
+  SketchPlugin_Tools::customizeFeaturePrs(anAISObject, isAxiliary);
   return anAISObject;
 }
 
@@ -218,6 +223,18 @@ bool SketchPlugin_Fillet::calculateFilletParameters()
     if (anOwner && !anOwner->isExternal())
       aFilletFeatures.insert(anOwner);
   }
+  // remove auxilary entities from set of coincident features
+  if (aFilletFeatures.size() > 2) {
+    std::set<FeaturePtr>::iterator anIt = aFilletFeatures.begin();
+    while (anIt != aFilletFeatures.end()) {
+      if ((*anIt)->boolean(SketchPlugin_SketchEntity::AUXILIARY_ID())->value()) {
+        std::set<FeaturePtr>::iterator aRemoveIt = anIt++;
+        aFilletFeatures.erase(aRemoveIt);
+      }
+      else
+        ++anIt;
+    }
+  }
   if (aFilletFeatures.size() != 2) {
     setError("Error: Selected point does not have two suitable edges for fillet.");
     return false;