Salome HOME
0c8f57395061dbbb1580e0e7686e8b5dc01de45d
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IShapesOperations.hxx
1
2 #ifndef _GEOMImpl_IShapesOperations_HXX_
3 #define _GEOMImpl_IShapesOperations_HXX_
4
5 #include "GEOM_IOperations.hxx"
6
7 #include "GEOMAlgo_State.hxx"
8
9 #include <TopTools_ListOfShape.hxx>
10 #include <TColStd_HSequenceOfTransient.hxx>
11 #include <TColStd_HSequenceOfInteger.hxx>
12
13 #include <list>
14
15 class GEOM_Engine;
16 class Handle(GEOM_Object);
17 class Handle(TColStd_HArray1OfInteger);
18
19 class GEOMImpl_IShapesOperations : public GEOM_IOperations {
20  public:
21   GEOMImpl_IShapesOperations(GEOM_Engine* theEngine, int theDocID);
22   ~GEOMImpl_IShapesOperations();
23
24   Handle(GEOM_Object) MakeEdge (Handle(GEOM_Object) thePoint1,
25                                 Handle(GEOM_Object) thePoint2);
26
27   Handle(GEOM_Object) MakeWire (list<Handle(GEOM_Object)> theEdgesAndWires);
28
29   Handle(GEOM_Object) MakeFace (Handle(GEOM_Object) theWire, const bool isPlanarWanted);
30
31   Handle(GEOM_Object) MakeFaceWires (list<Handle(GEOM_Object)> theWires,
32                                      const bool isPlanarWanted);
33
34   Handle(GEOM_Object) MakeShell (list<Handle(GEOM_Object)> theShapes);
35
36   Handle(GEOM_Object) MakeSolidShell (Handle(GEOM_Object) theShell);
37
38   Handle(GEOM_Object) MakeSolidShells (list<Handle(GEOM_Object)> theShells);
39
40   Handle(GEOM_Object) MakeCompound (list<Handle(GEOM_Object)> theShapes);
41
42   Handle(GEOM_Object) MakeGlueFaces (Handle(GEOM_Object) theShape,
43                                      const Standard_Real theTolerance);
44
45   Handle(TColStd_HSequenceOfTransient) MakeExplode (Handle(GEOM_Object)    theShape,
46                                                     const Standard_Integer theShapeType,
47                                                     const Standard_Boolean isSorted);
48
49   Handle(TColStd_HSequenceOfInteger) SubShapeAllIDs (Handle(GEOM_Object)    theShape,
50                                                      const Standard_Integer theShapeType,
51                                                      const Standard_Boolean isSorted);
52
53   Handle(GEOM_Object) GetSubShape (Handle(GEOM_Object)    theMainShape,
54                                    const Standard_Integer theID);
55
56   Standard_Integer NumberOfFaces (Handle(GEOM_Object) theShape);
57   Standard_Integer NumberOfEdges (Handle(GEOM_Object) theShape);
58
59   Handle(GEOM_Object) ReverseShape(Handle(GEOM_Object) theShapes);
60
61   Handle(TColStd_HSequenceOfInteger) GetFreeFacesIDs (Handle(GEOM_Object) theShape);
62
63   Handle(TColStd_HSequenceOfTransient) GetSharedShapes (Handle(GEOM_Object)    theShape1,
64                                                         Handle(GEOM_Object)    theShape2,
65                                                         const Standard_Integer theShapeType);
66
67   Handle(TColStd_HSequenceOfTransient) GetShapesOnPlane (const Handle(GEOM_Object)& theShape,
68                                                          const Standard_Integer     theShapeType,
69                                                          const Handle(GEOM_Object)& theAx1,
70                                                          const GEOMAlgo_State       theState);
71
72   Handle(TColStd_HSequenceOfTransient) GetShapesOnCylinder (const Handle(GEOM_Object)& theShape,
73                                                             const Standard_Integer     theShapeType,
74                                                             const Handle(GEOM_Object)& theAxis,
75                                                             const Standard_Real        theRadius,
76                                                             const GEOMAlgo_State       theState);
77
78   Handle(TColStd_HSequenceOfTransient) GetShapesOnSphere (const Handle(GEOM_Object)& theShape,
79                                                           const Standard_Integer     theShapeType,
80                                                           const Handle(GEOM_Object)& theCenter,
81                                                           const Standard_Real        theRadius,
82                                                           const GEOMAlgo_State       theState);
83
84   Handle(TColStd_HSequenceOfInteger) GetShapesOnPlaneIDs (const Handle(GEOM_Object)& theShape,
85                                                           const Standard_Integer     theShapeType,
86                                                           const Handle(GEOM_Object)& theAx1,
87                                                           const GEOMAlgo_State       theState);
88
89   Handle(TColStd_HSequenceOfInteger) GetShapesOnCylinderIDs (const Handle(GEOM_Object)& theShape,
90                                                              const Standard_Integer     theShapeType,
91                                                              const Handle(GEOM_Object)& theAxis,
92                                                              const Standard_Real        theRadius,
93                                                              const GEOMAlgo_State       theState);
94
95   Handle(TColStd_HSequenceOfInteger) GetShapesOnSphereIDs (const Handle(GEOM_Object)& theShape,
96                                                            const Standard_Integer     theShapeType,
97                                                            const Handle(GEOM_Object)& theCenter,
98                                                            const Standard_Real        theRadius,
99                                                            const GEOMAlgo_State       theState);
100
101   Handle(GEOM_Object) GetShapesOnCylinderOld (Handle(GEOM_Object)    theShape,
102                                               const Standard_Integer theShapeType,
103                                               Handle(GEOM_Object)    theAxis,
104                                               const Standard_Real    theRadius);
105
106   Handle(GEOM_Object) GetShapesOnSphereOld (Handle(GEOM_Object)    theShape,
107                                             const Standard_Integer theShapeType,
108                                             Handle(GEOM_Object)    theCenter,
109                                             const Standard_Real    theRadius);
110
111   Handle(GEOM_Object) GetInPlace (Handle(GEOM_Object) theShapeWhere,
112                                   Handle(GEOM_Object) theShapeWhat);
113
114   static void SortShapes (TopTools_ListOfShape& SL);
115
116  private:
117   Handle(GEOM_Object) MakeShape (list<Handle(GEOM_Object)>     theShapes,
118                                  const Standard_Integer        theObjectType,
119                                  const Standard_Integer        theFunctionType,
120                                  const TCollection_AsciiString theMethodName);
121
122   bool CheckTriangulation (const TopoDS_Shape& aShape);
123 };
124
125 #endif