Salome HOME
oubli
[modules/shaper.git] / src / SketchAPI / SketchAPI_BSpline.cpp
index c89abac78a995dcfba4af40eacc465f5e4c5638d..971591e0a30ded40c271661de727a0c8f3f2f77f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2019-2022  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 
 #include <GeomAlgoAPI_EdgeBuilder.h>
 
+#include <Locale_Convert.h>
+
 #include <ModelHighAPI_Double.h>
 #include <ModelHighAPI_Dumper.h>
 #include <ModelHighAPI_Integer.h>
 #include <ModelHighAPI_Selection.h>
 #include <ModelHighAPI_Tools.h>
 
+#include <ModelAPI_Tools.h>
+
 #include <SketchPlugin_ConstraintCoincidenceInternal.h>
 #include <SketchPlugin_Line.h>
 #include <SketchPlugin_Point.h>
@@ -152,8 +156,9 @@ static void createPole(const CompositeFeaturePtr& theSketch,
   aPointFeature->reference(SketchPlugin_Point::PARENT_ID())->setValue(theBSpline);
   aPointFeature->execute();
 
-  std::ostringstream aName;
-  aName << theBSpline->name() << "_" << thePoles->id() << "_" << thePoleIndex;
+  std::wostringstream aName;
+  aName << theBSpline->name() << "_" << Locale::Convert::toWString(thePoles->id())
+                              << "_" << thePoleIndex;
   aPointFeature->data()->setName(aName.str());
   aPointFeature->lastResult()->data()->setName(aName.str());
 
@@ -185,7 +190,7 @@ static void createSegment(const CompositeFeaturePtr& theSketch,
   aLineFeature->reference(SketchPlugin_Point::PARENT_ID())->setValue(theBSpline);
   aLineFeature->execute();
 
-  std::ostringstream aName;
+  std::wostringstream aName;
   aName << theBSpline->name() << "_segment_" << theStartPoleIndex << "_" << aEndPoleIndex;
   aLineFeature->data()->setName(aName.str());
   aLineFeature->lastResult()->data()->setName(aName.str());