Salome HOME
Fix compilation error on Linux
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Trim.cpp
index ec57b93934eac4c2986db93b30e25b247c036657..387f3a8b4e9edaf2ccfcffc9263c3f0b0066b81d 100644 (file)
@@ -359,8 +359,9 @@ void SketchPlugin_Trim::execute()
     const std::list<ObjectPtr>& anObjects = anInfo.second;
     for (std::list<ObjectPtr>::const_iterator anObjectIt = anObjects.begin();
       anObjectIt != anObjects.end(); anObjectIt++) {
-      SketchPlugin_Tools::createConstraint(sketch(), SketchPlugin_ConstraintCoincidence::ID(),
-                                           aPointAttribute, *anObjectIt);
+      SketchPlugin_Tools::createConstraintAttrObject(sketch(),
+            SketchPlugin_ConstraintCoincidence::ID(),
+            aPointAttribute, *anObjectIt);
     }
   }
 
@@ -550,8 +551,9 @@ bool SketchPlugin_Trim::setCoincidenceToAttribute(const AttributePtr& theAttribu
     std::shared_ptr<GeomAPI_Pnt2d> aPoint2d = aPointAttribute->pnt();
     if (aPoint2d->isEqual(aRefPnt2d)) {
       // create new coincidence and then remove the old one
-      SketchPlugin_Tools::createConstraint(sketch(), SketchPlugin_ConstraintCoincidence::ID(),
-                                           aRefPointAttr, aPointAttribute);
+      SketchPlugin_Tools::createConstraintAttrAttr(sketch(),
+          SketchPlugin_ConstraintCoincidence::ID(),
+          aRefPointAttr, aPointAttribute);
       theFeaturesToDelete.insert(aFeature);
     }
   }
@@ -962,7 +964,8 @@ FeaturePtr SketchPlugin_Trim::trimLine(const std::shared_ptr<GeomAPI_Pnt2d>& the
                                (aBaseFeature->attribute(aModifiedAttribute)));
 
     // Collinear constraint for lines
-    SketchPlugin_Tools::createConstraint(sketch(), SketchPlugin_ConstraintCollinear::ID(),
+    SketchPlugin_Tools::createConstraintObjectObject(sketch(),
+                                         SketchPlugin_ConstraintCollinear::ID(),
                                          getFeatureResult(aBaseFeature),
                                          getFeatureResult(anNewFeature));
   }
@@ -1046,11 +1049,13 @@ FeaturePtr SketchPlugin_Trim::trimArc(const std::shared_ptr<GeomAPI_Pnt2d>& theS
                                (aBaseFeature->attribute(aModifiedAttribute)));
 
     // equal Radius constraint for arcs
-    SketchPlugin_Tools::createConstraint(sketch(), SketchPlugin_ConstraintEqual::ID(),
+    SketchPlugin_Tools::createConstraintObjectObject(sketch(),
+                                         SketchPlugin_ConstraintEqual::ID(),
                                          getFeatureResult(aBaseFeature),
                                          getFeatureResult(anNewFeature));
     // coincident centers constraint
-    SketchPlugin_Tools::createConstraint(sketch(), SketchPlugin_ConstraintCoincidence::ID(),
+    SketchPlugin_Tools::createConstraintAttrAttr(sketch(),
+                                         SketchPlugin_ConstraintCoincidence::ID(),
                                          aBaseFeature->attribute(SketchPlugin_Arc::CENTER_ID()),
                                          anNewFeature->attribute(SketchPlugin_Arc::CENTER_ID()));