0032954: Tool for applying transformation to OCAF document
[occt.git] / src / XCAFDoc / XCAFDoc_Editor.hxx
index 89ac8ac..dffc46b 100644 (file)
@@ -44,7 +44,6 @@ public:
 
   //! Converts all compounds shapes in the document to assembly
   //! @param[in] theDoc input document
-  //! @param[in] theShape input shape label
   //! @param[in] theRecursively recursively expand a compound subshape
   //! @return True if shape successfully expanded
   Standard_EXPORT static Standard_Boolean Expand(const TDF_Label& theDoc,
@@ -98,6 +97,23 @@ public:
                                             const Standard_Boolean theToCopyVisMaterial = Standard_True,
                                             const Standard_Boolean theToCopyAttributes = Standard_True);
 
+  //! Applies geometrical scaling to the following assembly components:
+  //! - part geometry
+  //! - sub-assembly/part occurrence location
+  //! - part's centroid, area and volume attributes
+  //! - PMIs (warnings and errors are reported if it is impossible to make changes)
+  //! Normally, should start from a root sub-assembly, but if theForceIfNotRoot true
+  //! scaling will be applied forcibly. If theLabel corresponds to the shape tool
+  //! scaling is applied to the whole assembly.
+  //! @param[in] theLabel starting label
+  //! @param[in] theScaleFactor scale factor, should be positive
+  //! @param[in] theForceIfNotRoot allows scaling of a non root assembly if true,
+  //!                              otherwise - returns false
+  //! @return true in case of success, otherwise - false.
+  Standard_EXPORT static Standard_Boolean RescaleGeometry(const TDF_Label& theLabel,
+                                                          const Standard_Real theScaleFactor,
+                                                          const Standard_Boolean theForceIfNotRoot = Standard_False);
+
 };
 
 #endif // _XCAFDoc_Editor_HeaderFile