- cleanErrorMsg();
- if (!myBaseConstraint || !myStorage || myGroup == 0) {
- /// TODO: Put error message here
- return;
- }
- if (!mySlvsConstraints.empty()) // some data is changed, update constraint
- update(myBaseConstraint);
-
- double aValue;
- std::vector<Slvs_hEntity> anEntities;
- getAttributes(aValue, anEntities);
- if (!myErrorMsg.empty())
- return;
-
- // Check the entity is a line
- Slvs_Entity aLine = myStorage->getEntity(anEntities[2]);
- if (aLine.type != SLVS_E_LINE_SEGMENT){
- myErrorMsg = SketchSolver_Error::INCORRECT_ATTRIBUTE();
+ SketchSolver_Constraint::getAttributes(theValue, theAttributes);
+ if (!myErrorMsg.empty() || !theAttributes[2] ||
+ theAttributes[2]->type() != ENTITY_LINE) {
+ theAttributes.clear();