Salome HOME
Copyright update 2022
[modules/shaper.git] / src / Model / Model_Tools.h
index b1d79a50c199649d373719195203bbc22fb0c69f..6d1cb73fbaf0081a3a5cfd5737d1d18c043a2c54 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-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 <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
 
+#include <memory>
+#include <set>
+
 /// A collection of methods useful for different parts of data model.
-namespace Model_Tools
+class Model_Tools
 {
+public:
   /// makes copy of label and all its sub-labels without copying the attributes;
   /// and feel the relocation table
-  void copyLabels(TDF_Label theSource, TDF_Label theDestination,
-                  Handle(TDF_RelocationTable) theRelocTable);
+  static void copyLabels(TDF_Label theSource, TDF_Label theDestination,
+                         Handle(TDF_RelocationTable) theRelocTable);
 
   /// makes copy of all attributes on the given label and all sub-labels
-  void copyAttrs(TDF_Label theSource, TDF_Label theDestination,
-                 Handle(TDF_RelocationTable) theRelocTable = Handle(TDF_RelocationTable)());
+  static void copyAttrs(TDF_Label theSource, TDF_Label theDestination,
+                        Handle(TDF_RelocationTable) theRelocTable = Handle(TDF_RelocationTable)());
+
+  /// makes copy of all attributes on the given label and all sub-labels,
+  /// but keep references to the Origin, coordinate axes and coordinate planes
+  static void copyAttrsAndKeepRefsToCoordinates(TDF_Label theSource, TDF_Label theDestination,
+      const std::set<TCollection_AsciiString>& theCoordinateLabels,
+      Handle(TDF_RelocationTable) theRelocTable);
+
+  /// collect labels of coordinate planes, axes, and origin
+  static void labelsOfCoordinates(
+      std::set<TCollection_AsciiString>& theCoordinateLabels,
+      Handle(TDF_RelocationTable) theRelocTable);
 };
 
 #endif