Salome HOME
[bos #37570] [CEA] SHAPER hdf tests are failing. Fix Sphere feature attributes order.
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_CurveFitting.cpp
index 9c16a6eb65521c73d00bf4560b322278e133b73a..11d9ebafe0c84f805615552b4c6353acb081e1b0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2020  CEA/DEN, EDF R&D
+// Copyright (C) 2020-2023  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -52,11 +52,11 @@ static void convertTo3D(SketchPlugin_Sketch* theSketch,
                         std::list<GeomPointPtr>& thePoints);
 
 static GeomEdgePtr buildInterpolationCurve(SketchPlugin_Sketch* theSketch,
-                                           AttributeRefAttrListPtr& thePoints,
+                                           AttributeRefAttrListPtr thePoints,
                                            bool thePeriodic,
                                            bool theClosed);
 static GeomEdgePtr buildApproximationCurve(SketchPlugin_Sketch* theSketch,
-                                           AttributeRefAttrListPtr& thePoints,
+                                           AttributeRefAttrListPtr thePoints,
                                            double thePrecision,
                                            bool thePeriodic,
                                            bool theClosed);
@@ -262,7 +262,7 @@ void SketchPlugin_CurveFitting::reorderPoints()
   // to keep mapping between points and attributes
   std::map<GeomPointPtr, std::pair<ObjectPtr, AttributePtr> > aMap;
   std::list<std::pair<ObjectPtr, AttributePtr> > aPointsList = aPointsAttr->list();
-  bool isPointAdded = aCoordinates.size() != aPointsList.size();
+
   std::list<GeomPointPtr>::iterator aCoordIt = aCoordinates.begin();
   std::list<std::pair<ObjectPtr, AttributePtr> >::iterator anAttrIt = aPointsList.begin();
   for (; aCoordIt != aCoordinates.end() && anAttrIt != aPointsList.end(); ++aCoordIt, ++anAttrIt)
@@ -353,7 +353,7 @@ void convertTo3D(SketchPlugin_Sketch* theSketch,
 }
 
 GeomEdgePtr buildInterpolationCurve(SketchPlugin_Sketch* theSketch,
-                                    AttributeRefAttrListPtr& thePoints,
+                                    AttributeRefAttrListPtr thePoints,
                                     bool thePeriodic,
                                     bool theClosed)
 {
@@ -371,7 +371,7 @@ GeomEdgePtr buildInterpolationCurve(SketchPlugin_Sketch* theSketch,
 }
 
 GeomEdgePtr buildApproximationCurve(SketchPlugin_Sketch* theSketch,
-                                    AttributeRefAttrListPtr& thePoints,
+                                    AttributeRefAttrListPtr thePoints,
                                     double thePrecision,
                                     bool thePeriodic,
                                     bool theClosed)