]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/GeomData/GeomData_Dir.cpp
Salome HOME
Added the system of reinitialization of attributes instead of re-creation of them...
[modules/shaper.git] / src / GeomData / GeomData_Dir.cpp
index d5272dda21f432786c2ca04ff8e983b99a7a5108..477a89c2079691ee5196b6a9142306fa3e814f96 100644 (file)
@@ -58,9 +58,15 @@ std::shared_ptr<GeomAPI_XYZ> GeomData_Dir::xyz()
 
 GeomData_Dir::GeomData_Dir(TDF_Label& theLabel)
 {
-  myIsInitialized = theLabel.FindAttribute(TDataStd_RealArray::GetID(), myCoords) == Standard_True;
+  myLab = theLabel;
+  reinit();
+}
+
+void GeomData_Dir::reinit()
+{
+  myIsInitialized = myLab.FindAttribute(TDataStd_RealArray::GetID(), myCoords) == Standard_True;
   if (!myIsInitialized) {
     // create attribute: not initialized by value yet, just zero
-    myCoords = TDataStd_RealArray::Set(theLabel, 0, 2);
+    myCoords = TDataStd_RealArray::Set(myLab, 0, 2);
   }
 }