-// Copyright (C) 2014-2022 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
bool SketchPlugin_FilletVertexValidator::isValid(const AttributePtr& theAttribute,
const std::list<std::string>& theArguments,
Events_InfoMessage& theError) const
+{
+ FeaturePtr anEdge1, anEdge2;
+ return isValidVertex(theAttribute, theError, anEdge1, anEdge2);
+}
+
+bool SketchPlugin_FilletVertexValidator::isValidVertex(const AttributePtr& theAttribute,
+ Events_InfoMessage& theError,
+ FeaturePtr& theEdge1,
+ FeaturePtr& theEdge2)
{
AttributeRefAttrPtr aPointRefAttr =
std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
// Get coincides from constraint.
std::set<FeaturePtr> aCoinsides;
SketchPlugin_Tools::findCoincidences(aConstraintCoincidence,
- SketchPlugin_ConstraintCoincidence::ENTITY_A(),
- aCoinsides,
- true);
+ SketchPlugin_ConstraintCoincidence::ENTITY_A(),
+ aCoinsides,
+ true);
SketchPlugin_Tools::findCoincidences(aConstraintCoincidence,
- SketchPlugin_ConstraintCoincidence::ENTITY_B(),
- aCoinsides,
- true);
+ SketchPlugin_ConstraintCoincidence::ENTITY_B(),
+ aCoinsides,
+ true);
// Remove points and external lines from set of coincides.
std::set<FeaturePtr> aNewSetOfCoincides;
return false;
}
+ // output edges
+ std::set<FeaturePtr>::iterator aFIt = aCoinsides.begin();
+ theEdge1 = *aFIt;
+ theEdge2 = *(++aFIt);
+
// Check that selected edges don't have tangent constraint.
std::set<FeaturePtr>::iterator anIt = aCoinsides.begin();
FeaturePtr aFirstFeature = *anIt++;