Salome HOME
Compsolids: initial implementation of sub-results of results on the data model level.
[modules/shaper.git] / src / ModelAPI / ModelAPI_ResultBody.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModelAPI_ResultBody.cpp
4 // Created:     07 Jul 2014
5 // Author:      Mikhail PONIKAROV
6
7 #include "ModelAPI_ResultBody.h"
8 #include <ModelAPI_BodyBuilder.h>
9
10 ModelAPI_ResultBody::ModelAPI_ResultBody()
11 : myBuilder(0)
12 {
13 }
14
15 ModelAPI_ResultBody::~ModelAPI_ResultBody()
16 {
17   if (myBuilder)
18   delete myBuilder;
19 }
20
21 std::string ModelAPI_ResultBody::groupName()
22 {
23   return group();
24 }
25
26 void ModelAPI_ResultBody::store(const std::shared_ptr<GeomAPI_Shape>& theShape)
27 {
28   myBuilder->store(theShape);
29 }
30
31 void ModelAPI_ResultBody::storeGenerated(const std::shared_ptr<GeomAPI_Shape>& theFromShape,
32                                   const std::shared_ptr<GeomAPI_Shape>& theToShape)
33 {
34   myBuilder->storeGenerated(theFromShape, theToShape);
35 }
36
37 void ModelAPI_ResultBody::storeModified(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
38                                   const std::shared_ptr<GeomAPI_Shape>& theNewShape,
39                             const int theDecomposeSolidsTag)
40 {
41   myBuilder->storeModified(theOldShape, theNewShape, theDecomposeSolidsTag);
42 }
43
44 std::shared_ptr<GeomAPI_Shape> ModelAPI_ResultBody::shape()
45 {
46   return myBuilder->shape();
47 }
48
49 void ModelAPI_ResultBody::generated(const std::shared_ptr<GeomAPI_Shape>& theNewShape,
50     const std::string& theName, const int theTag)
51 {
52   myBuilder->generated(theNewShape, theName, theTag);
53 }
54
55 void ModelAPI_ResultBody::generated(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
56     const std::shared_ptr<GeomAPI_Shape>& theNewShape, const std::string& theName, 
57     const int theTag)
58 {
59   myBuilder->generated(theOldShape, theNewShape, theName, theTag);
60 }
61
62 void ModelAPI_ResultBody::modified(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
63     const std::shared_ptr<GeomAPI_Shape>& theNewShape, const std::string& theName,
64     const int theTag)
65 {
66   myBuilder->modified(theOldShape, theNewShape, theName, theTag);
67 }
68
69
70 void ModelAPI_ResultBody::deleted(
71     const std::shared_ptr<GeomAPI_Shape>& theOldShape, const int theTag)
72 {
73   myBuilder->deleted(theOldShape, theTag);
74 }
75   
76 void ModelAPI_ResultBody::loadDeletedShapes (GeomAlgoAPI_MakeShape* theMS,
77                                   std::shared_ptr<GeomAPI_Shape>  theShapeIn,
78                                   const int  theKindOfShape,
79                                   const int  theTag)
80 {
81   myBuilder->loadDeletedShapes(theMS, theShapeIn, theKindOfShape, theTag);
82 }
83
84 void ModelAPI_ResultBody::loadAndOrientModifiedShapes (GeomAlgoAPI_MakeShape* theMS,
85     std::shared_ptr<GeomAPI_Shape>  theShapeIn, const int  theKindOfShape, const int  theTag,
86     const std::string& theName, GeomAPI_DataMapOfShapeShape& theSubShapes)
87 {
88   myBuilder->loadAndOrientModifiedShapes(
89     theMS, theShapeIn, theKindOfShape, theTag, theName, theSubShapes);
90 }
91
92 void ModelAPI_ResultBody::loadAndOrientGeneratedShapes (GeomAlgoAPI_MakeShape* theMS,
93     std::shared_ptr<GeomAPI_Shape>  theShapeIn, const int  theKindOfShape,
94     const int  theTag, const std::string& theName, GeomAPI_DataMapOfShapeShape& theSubShapes)
95 {
96   myBuilder->loadAndOrientGeneratedShapes(
97     theMS, theShapeIn, theKindOfShape, theTag, theName, theSubShapes);
98 }
99
100 void ModelAPI_ResultBody::loadFirstLevel(std::shared_ptr<GeomAPI_Shape> theShape, 
101     const std::string& theName, int&  theTag)
102 {
103   myBuilder->loadFirstLevel(theShape, theName, theTag);
104 }
105
106 void ModelAPI_ResultBody::loadDisconnectedEdges(std::shared_ptr<GeomAPI_Shape> theShape,
107     const std::string& theName, int&  theTag)
108 {
109   myBuilder->loadDisconnectedEdges(theShape, theName, theTag);
110 }
111
112 void ModelAPI_ResultBody::loadDisconnectedVertexes(std::shared_ptr<GeomAPI_Shape> theShape,
113     const std::string& theName,int&  theTag)
114 {
115   myBuilder->loadDisconnectedVertexes(theShape, theName, theTag);
116 }