1 // Name : ModelHighAPI_Services.h
5 // 17/06/16 - Sergey POKHODENKO - Creation of the file
7 #ifndef SRC_MODELHIGHAPI_MODELHIGHAPI_SERVICES_H_
8 #define SRC_MODELHIGHAPI_MODELHIGHAPI_SERVICES_H_
10 //--------------------------------------------------------------------------------------
11 #include "ModelHighAPI.h"
15 //--------------------------------------------------------------------------------------
19 class ModelAPI_Document;
20 class ModelAPI_Result;
21 //--------------------------------------------------------------------------------------
22 /// Return the main document (the Partset) created or open from the Modeler.
24 std::shared_ptr<ModelAPI_Document> moduleDocument();
26 /** Return the active document.
28 * This document can be either the main application document (i.e. the Partset) or one of documents
29 * referred to by the main document (a Part).
32 std::shared_ptr<ModelAPI_Document> activeDocument();
34 /** Return one of the three planes defined by the global coordinate system.
36 * These planes are respectively referred to by name "XOY" (Z=0), "XOZ" (Y=0) or "YOZ" (X=0).
39 std::shared_ptr<GeomAPI_Ax3> defaultPlane(const std::string & theName);
41 /// Return name of coordinate plane ("XOY", "XOZ" or "YOZ") or empty string for other planes.
43 std::string defaultPlane(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
44 const std::shared_ptr<GeomAPI_Dir>& theNormal,
45 const std::shared_ptr<GeomAPI_Dir>& theDirX);
47 /** Return one of the three standard results defined in PartSet document.
49 * These planes are respectively referred to by name "XOY" (Z=0), "XOZ" (Y=0) or "YOZ" (X=0).
52 std::shared_ptr<ModelAPI_Result> standardPlane(const std::string & theName);
54 /** Start a data structure transaction.
56 * Make a control point for being able to discard or undo
57 * all operations done during this transaction.
62 /** Commit the data structure transaction.
64 * Make all operations done since the last control point undo-able.
69 /** Commit the data structure transaction and start the new one.
71 * Make all operations done since the last control point undo-able
72 * and continue with the new transaction.
77 /// Roll-back the data structure to the previous control point.
81 /// Restore the data structure rolled-back by the last undo.
85 /// Reset the data structure to initial state.
89 //--------------------------------------------------------------------------------------
90 //--------------------------------------------------------------------------------------
91 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_SERVICES_H_ */