+SketchSolver_ConstraintType SketchSolver_Constraint::TYPE(ConstraintPtr theConstraint)
+{
+ const std::string& aType = theConstraint->getKind();
+ if (aType == SketchPlugin_ConstraintCoincidence::ID())
+ return CONSTRAINT_COINCIDENCE;
+ else if (aType == SketchPlugin_ConstraintRigid::ID())
+ return CONSTRAINT_FIXED;
+ else if (aType == SketchPlugin_ConstraintHorizontal::ID())
+ return CONSTRAINT_HORIZONTAL;
+ else if (aType == SketchPlugin_ConstraintVertical::ID())
+ return CONSTRAINT_VERTICAL;
+ else if (aType == SketchPlugin_ConstraintAngle::ID())
+ return CONSTRAINT_ANGLE;
+ else if (aType == SketchPlugin_ConstraintDistance::ID())
+ return CONSTRAINT_DISTANCE;
+ else if (aType == SketchPlugin_ConstraintEqual::ID())
+ return CONSTRAINT_EQUAL;
+ else if (aType == SketchPlugin_ConstraintLength::ID())
+ return CONSTRAINT_PT_PT_DISTANCE;
+ else if (aType == SketchPlugin_ConstraintMirror::ID())
+ return CONSTRAINT_SYMMETRIC;
+ else if (aType == SketchPlugin_ConstraintParallel::ID())
+ return CONSTRAINT_PARALLEL;
+ else if (aType == SketchPlugin_ConstraintPerpendicular::ID())
+ return CONSTRAINT_PERPENDICULAR;
+ else if (aType == SketchPlugin_ConstraintRadius::ID())
+ return CONSTRAINT_RADIUS;
+ else if (aType == SketchPlugin_ConstraintTangent::ID())
+ return CONSTRAINT_TANGENT;
+ return CONSTRAINT_UNKNOWN;
+}