X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchSolver%2FSketchSolver_Constraint.cpp;h=18bd68e2b4bffc73bdd0cc0264d44c91f3364619;hb=5d9f5c6e19b94b5b2c4bf8d314b7f7f1c6f49897;hp=67a177038088fffb546b35af925fa8483aab67e6;hpb=0b2198f0640fcbd74365265ed8c65936823a75d6;p=modules%2Fshaper.git diff --git a/src/SketchSolver/SketchSolver_Constraint.cpp b/src/SketchSolver/SketchSolver_Constraint.cpp index 67a177038..18bd68e2b 100644 --- a/src/SketchSolver/SketchSolver_Constraint.cpp +++ b/src/SketchSolver/SketchSolver_Constraint.cpp @@ -60,7 +60,7 @@ const int& SketchSolver_Constraint::getType(boost::shared_ptr anAttr = boost::dynamic_pointer_cast( - theConstraint->data()->attribute(CONSTRAINT_ATTRIBUTES[indAttr]) + theConstraint->data()->attribute(SketchPlugin_Constraint::ATTRIBUTE(indAttr)) ); if (!anAttr) continue; // Verify the attribute is a 2D point @@ -69,7 +69,7 @@ const int& SketchSolver_Constraint::getType(boost::shared_ptr anAttr = boost::dynamic_pointer_cast( - theConstraint->data()->attribute(CONSTRAINT_ATTRIBUTES[indAttr]) + theConstraint->data()->attribute(SketchPlugin_Constraint::ATTRIBUTE(indAttr)) ); if (!anAttr) continue; if (anAttr->isFeature() && anAttr->feature()) { // verify posiible entities const std::string& aKind = anAttr->feature()->getKind(); - if (aKind.compare(SKETCH_POINT_KIND) == 0) + if (aKind.compare(SketchPlugin_Point::ID()) == 0) { - myAttributesList[aNbPoints++] = CONSTRAINT_ATTRIBUTES[indAttr]; + myAttributesList[aNbPoints++] = SketchPlugin_Constraint::ATTRIBUTE(indAttr); continue; } - else if(aKind.compare(SKETCH_LINE_KIND) == 0) + else if(aKind.compare(SketchPlugin_Line::ID()) == 0) { - // entities are placed starting from CONSTRAINT_ATTR_ENTITY_C attribute - myAttributesList[2 + aNbEntities++] = CONSTRAINT_ATTRIBUTES[indAttr]; + // entities are placed starting from SketchPlugin_Constraint::ENTITY_C() attribute + myAttributesList[2 + aNbEntities++] = SketchPlugin_Constraint::ATTRIBUTE(indAttr); myType = SLVS_C_PT_LINE_DISTANCE; continue; } @@ -127,7 +127,7 @@ const int& SketchSolver_Constraint::getType(boost::shared_ptr(anAttr->attr()); if (aPoint2D) { - myAttributesList[aNbPoints++] = CONSTRAINT_ATTRIBUTES[indAttr]; + myAttributesList[aNbPoints++] = SketchPlugin_Constraint::ATTRIBUTE(indAttr); continue; } // Verify the attribute is a 3D point @@ -135,7 +135,7 @@ const int& SketchSolver_Constraint::getType(boost::shared_ptr(anAttr->attr()); if (aPoint3D) { - myAttributesList[aNbPoints++] = CONSTRAINT_ATTRIBUTES[indAttr]; + myAttributesList[aNbPoints++] = SketchPlugin_Constraint::ATTRIBUTE(indAttr); continue; } } @@ -149,20 +149,20 @@ const int& SketchSolver_Constraint::getType(boost::shared_ptr anAttr = boost::dynamic_pointer_cast( - theConstraint->data()->attribute(CONSTRAINT_ATTRIBUTES[indAttr]) + theConstraint->data()->attribute(SketchPlugin_Constraint::ATTRIBUTE(indAttr)) ); if (!anAttr) continue; if (anAttr->isFeature() && anAttr->feature() && - anAttr->feature()->getKind().compare(SKETCH_LINE_KIND) == 0) + anAttr->feature()->getKind().compare(SketchPlugin_Line::ID()) == 0) { - myAttributesList[aNbLines++] = CONSTRAINT_ATTRIBUTES[indAttr]; + myAttributesList[aNbLines++] = SketchPlugin_Constraint::ATTRIBUTE(indAttr); break; } } @@ -172,22 +172,22 @@ const int& SketchSolver_Constraint::getType(boost::shared_ptr anAttr = boost::dynamic_pointer_cast( - theConstraint->data()->attribute(CONSTRAINT_ATTRIBUTES[indAttr]) + theConstraint->data()->attribute(SketchPlugin_Constraint::ATTRIBUTE(indAttr)) ); if (!anAttr || !anAttr->isFeature() || !anAttr->feature()) continue; const std::string& aKind = anAttr->feature()->getKind(); - if (aKind.compare(SKETCH_LINE_KIND) == 0) + if (aKind.compare(SketchPlugin_Line::ID()) == 0) { - myAttributesList[aNbEntities++] = CONSTRAINT_ATTRIBUTES[indAttr]; + myAttributesList[aNbEntities++] = SketchPlugin_Constraint::ATTRIBUTE(indAttr); continue; } } @@ -197,20 +197,20 @@ const int& SketchSolver_Constraint::getType(boost::shared_ptr anAttr = boost::dynamic_pointer_cast( - theConstraint->data()->attribute(CONSTRAINT_ATTRIBUTES[indAttr]) + theConstraint->data()->attribute(SketchPlugin_Constraint::ATTRIBUTE(indAttr)) ); if (!anAttr || !anAttr->isFeature() || !anAttr->feature()) continue; const std::string& aKind = anAttr->feature()->getKind(); - if (aKind.compare(SKETCH_CIRCLE_KIND) == 0 || aKind.compare(SKETCH_ARC_KIND) == 0) + if (aKind.compare(SketchPlugin_Circle::ID()) == 0 || aKind.compare(SketchPlugin_Arc::ID()) == 0) { - myAttributesList[aNbEntities++] = CONSTRAINT_ATTRIBUTES[indAttr]; + myAttributesList[aNbEntities++] = SketchPlugin_Constraint::ATTRIBUTE(indAttr); continue; } }