20 #ifndef Model_ResultPart_H_
21 #define Model_ResultPart_H_
24 #include <ModelAPI_ResultPart.h>
25 #include <TopoDS_Shape.hxx>
26 #include <gp_Trsf.hxx>
40 std::shared_ptr<gp_Trsf> myTrsf;
47 static const std::string MY_BASE_REF(
"BaseReference");
53 MODEL_EXPORT
virtual std::shared_ptr<ModelAPI_Document>
partDoc();
57 MODEL_EXPORT
virtual std::shared_ptr<ModelAPI_ResultPart>
original();
60 MODEL_EXPORT
virtual void activate();
63 MODEL_EXPORT
virtual bool setDisabled(std::shared_ptr<ModelAPI_Result> theThis,
67 MODEL_EXPORT
virtual std::shared_ptr<GeomAPI_Shape>
shape();
73 MODEL_EXPORT
virtual std::wstring
nameInPart(
const std::shared_ptr<GeomAPI_Shape>& theShape,
77 MODEL_EXPORT
virtual bool updateInPart(
const int theIndex);
79 MODEL_EXPORT
virtual std::shared_ptr<GeomAPI_Shape>
shapeInPart(
80 const std::wstring& theName,
const std::string& theType,
int& theIndex);
82 MODEL_EXPORT
virtual bool combineGeometrical(
const int theIndex, std::wstring& theNewName);
86 MODEL_EXPORT
virtual void setTrsf(std::shared_ptr<ModelAPI_Result> theThis,
87 const std::shared_ptr<GeomAPI_Trsf>& theTransformation);
89 MODEL_EXPORT
virtual std::shared_ptr<GeomAPI_Trsf>
summaryTrsf();
92 MODEL_EXPORT
virtual void colorConfigInfo(std::string& theSection, std::string& theName,
93 std::string& theDefault);
96 MODEL_EXPORT
virtual std::shared_ptr<GeomAPI_Shape>
selectionValue(
const int theIndex);
99 MODEL_EXPORT
virtual void loadPart();
The Part document, result of a creation of new part feature.
Definition: ModelAPI_ResultPart.h:36
Manager of objects of the document.
Definition: Model_Objects.h:46
The Part document, result of a creation of new part feature.
Definition: Model_ResultPart.h:36
virtual std::shared_ptr< GeomAPI_Shape > shape()
Result shape of part document is compound of bodies inside of this part.
Definition: Model_ResultPart.cpp:219
virtual void loadPart()
Loading the part from file.
Definition: Model_ResultPart.cpp:127
virtual std::shared_ptr< ModelAPI_ResultPart > original()
Returns the original part result: for transformation features results this is the original Part featu...
Definition: Model_ResultPart.cpp:142
virtual std::shared_ptr< GeomAPI_Shape > selectionValue(const int theIndex)
Returns the shape selected in the selection index.
Definition: Model_ResultPart.cpp:433
static const std::string & BASE_REF_ID()
the reference to the base result document, may be null if this is the root, others make sequence of r...
Definition: Model_ResultPart.h:45
virtual std::shared_ptr< GeomAPI_Trsf > summaryTrsf()
Returns the summary transformations of all references to the origin.
Definition: Model_ResultPart.cpp:481
virtual void activate()
Sets this document as current and if it is not loaded yet, loads it.
Definition: Model_ResultPart.cpp:87
virtual void setTrsf(std::shared_ptr< ModelAPI_Result > theThis, const std::shared_ptr< GeomAPI_Trsf > &theTransformation)
Applies the additional transformation of the part.
Definition: Model_ResultPart.cpp:468
virtual bool isActivated()
Returns true if document is activated (loaded into the memory)
Definition: Model_ResultPart.cpp:150
virtual std::shared_ptr< GeomAPI_Shape > shapeInPart(const std::wstring &theName, const std::string &theType, int &theIndex)
Returns the shape by the name in the part.
Definition: Model_ResultPart.cpp:399
virtual void colorConfigInfo(std::string &theSection, std::string &theName, std::string &theDefault)
Returns the parameters of color definition in the resources config manager.
Definition: Model_ResultPart.cpp:454
virtual void initAttributes()
Request for initialization of data model of the result: adding all attributes.
Definition: Model_ResultPart.cpp:56
virtual void updateShape()
Updates the shape-result of the part (called on Part feature execution)
Definition: Model_ResultPart.cpp:462
virtual bool combineGeometrical(const int theIndex, std::wstring &theNewName)
Updates the selection inside of the part as a geometrical selection.
Definition: Model_ResultPart.cpp:381
virtual std::shared_ptr< ModelAPI_Document > partDoc()
Returns the part-document of this result.
Definition: Model_ResultPart.cpp:72
virtual std::wstring nameInPart(const std::shared_ptr< GeomAPI_Shape > &theShape, int &theIndex)
Returns the name of the shape inside of the part.
Definition: Model_ResultPart.cpp:284
virtual bool setDisabled(std::shared_ptr< ModelAPI_Result > theThis, const bool theFlag)
disable all feature of the part on disable of the part result
Definition: Model_ResultPart.cpp:162
gp_Trsf sumTrsf()
returns sum of transformations of the whole sequence of transformation-parts
Definition: Model_ResultPart.cpp:372
Model_ResultPart()
makes a result on a temporary feature (an action)
Definition: Model_ResultPart.cpp:83
virtual bool updateInPart(const int theIndex)
Updates the selection inside of the part by the selection index.
Definition: Model_ResultPart.cpp:355