]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/GeomData/GeomData_Point.cpp
Salome HOME
Issue #718 - Translation with parameters - wrong coordinates
[modules/shaper.git] / src / GeomData / GeomData_Point.cpp
index 7ae96b859bb5ddf46a17392e669e785868ff625a..4fcf2735b7c9ed0c1f400ec2c581e0d266529f8f 100644 (file)
@@ -12,7 +12,7 @@
 
 using namespace std;
 
-void GeomData_Point::setValue(const double theX, const double theY, const double theZ)
+void GeomData_Point::setCalculatedValue(const double theX, const double theY, const double theZ)
 {
   if (!myIsInitialized || myCoords->Value(0) != theX || myCoords->Value(1) != theY
       || myCoords->Value(2) != theZ) {
@@ -23,6 +23,13 @@ void GeomData_Point::setValue(const double theX, const double theY, const double
   }
 }
 
+void GeomData_Point::setValue(const double theX, const double theY, const double theZ)
+{
+  setCalculatedValue(textX().empty() ? theX : x(),
+                     textY().empty() ? theY : y(),
+                     textZ().empty() ? theZ : z());
+}
+
 void GeomData_Point::setValue(const std::shared_ptr<GeomAPI_Pnt>& thePoint)
 {
   setValue(thePoint->x(), thePoint->y(), thePoint->z());