myExtraCoincidence[aNewConstr] = theConstraint;
}
+void SketchSolver_ConstraintCoincidence::process()
+{
+ SketchSolver_Constraint::process();
+
+ // Fill the list of coincident points
+ std::list<AttributePtr> anAttrList =
+ myBaseConstraint->data()->attributes(ModelAPI_AttributeRefAttr::typeId());
+ std::list<AttributePtr>::iterator anIt = anAttrList.begin();
+ for (; anIt != anAttrList.end(); anIt++) {
+ AttributeRefAttrPtr aRefAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(*anIt);
+ if (!aRefAttr || aRefAttr->isObject())
+ continue;
+ myCoincidentPoints.insert(aRefAttr->attr());
+ }
+}
+
bool SketchSolver_ConstraintCoincidence::remove(ConstraintPtr theConstraint)
{
cleanErrorMsg();
/// \brief Append all data of coincidence constaint to the current
void attach(std::shared_ptr<SketchSolver_ConstraintCoincidence> theConstraint);
+protected:
+ /// \brief Converts SketchPlugin constraint to a list of SolveSpace constraints
+ virtual void process();
+
private:
/// \brief Creates new coincidence constraint
Slvs_hConstraint addConstraint(Slvs_hEntity thePoint1, Slvs_hEntity thePoint2);