- std::set<FeaturePtr> aFilletFeatures =
- SketchPlugin_Tools::findFeaturesCoincidentToPoint(aFilletPoint2D);
+ std::set<AttributePoint2DPtr> aCoincidentPoints =
+ SketchPlugin_Tools::findPointsCoincidentToPoint(aFilletPoint2D);
+ std::set<FeaturePtr> aFilletFeatures;
+ for (std::set<AttributePoint2DPtr>::iterator aCPIt = aCoincidentPoints.begin();
+ aCPIt != aCoincidentPoints.end(); ++aCPIt) {
+ std::shared_ptr<SketchPlugin_Feature> anOwner =
+ std::dynamic_pointer_cast<SketchPlugin_Feature>(
+ ModelAPI_Feature::feature((*aCPIt)->owner()));
+ 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;
+ }
+ }