protected:
/// \brief Converts SketchPlugin constraint to a list of SolveSpace constraints
virtual void process();
+
+ /// \brief This method is used in derived objects to check consistence of constraint.
+ /// E.g. the distance between line and point may be signed.
+ virtual void adjustConstraint();
};
#endif
if (anEntIter->distance == theEntityID)
return false;
}
- std::set<Slvs_hEntity> anEntAndSubs;
- anEntAndSubs.insert(theEntityID);
- for (int i = 0; i < 4; i++)
- if (myEntities[aPos].point[i] != SLVS_E_UNKNOWN)
- anEntAndSubs.insert(myEntities[aPos].point[i]);
-
std::vector<Slvs_Constraint>::const_iterator aConstrIter = myConstraints.begin();
for (; aConstrIter != myConstraints.end(); aConstrIter++) {
Slvs_hEntity anEntIDs[6] = {aConstrIter->ptA, aConstrIter->ptB,
aConstrIter->entityA, aConstrIter->entityB,
aConstrIter->entityC, aConstrIter->entityD};
for (int i = 0; i < 6; i++)
- if (anEntAndSubs.find(anEntIDs[i]) != anEntAndSubs.end())
+ if (anEntIDs[i] == theEntityID)
return false;
}
// The entity is not used, remove it and its parameters