1 // Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #ifndef _GEOM_IShapesOperations_i_HeaderFile
23 #define _GEOM_IShapesOperations_i_HeaderFile
25 #include "GEOMImpl_Gen.hxx"
27 #include <SALOMEconfig.h>
29 #include CORBA_SERVER_HEADER(GEOM_Gen)
30 #include "GEOM_IOperations_i.hh"
31 #include "GEOM_Object_i.hh"
33 #include "GEOMImpl_IShapesOperations.hxx"
35 class GEOM_I_EXPORT GEOM_IShapesOperations_i :
36 public virtual POA_GEOM::GEOM_IShapesOperations,
37 public virtual GEOM_IOperations_i
40 GEOM_IShapesOperations_i (PortableServer::POA_ptr thePOA,
41 GEOM::GEOM_Gen_ptr theEngine,
42 ::GEOMImpl_IShapesOperations* theImpl);
43 ~GEOM_IShapesOperations_i();
45 GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
46 GEOM::GEOM_Object_ptr thePnt2);
48 GEOM::GEOM_Object_ptr MakeWire (const GEOM::ListOfGO& theEdgesAndWires,
49 const CORBA::Double theTolerance);
51 GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire,
52 CORBA::Boolean isPlanarWanted);
54 GEOM::GEOM_Object_ptr MakeFaceWires (const GEOM::ListOfGO& theWires,
55 CORBA::Boolean isPlanarWanted);
57 GEOM::GEOM_Object_ptr MakeShell (const GEOM::ListOfGO& theFacesAndShells);
59 GEOM::GEOM_Object_ptr MakeSolidShell (GEOM::GEOM_Object_ptr theShell);
61 GEOM::GEOM_Object_ptr MakeSolidShells (const GEOM::ListOfGO& theShells);
63 GEOM::GEOM_Object_ptr MakeCompound (const GEOM::ListOfGO& theShapes);
65 GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
66 CORBA::Double theTolerance,
67 CORBA::Boolean doKeepNonSolids);
69 GEOM::ListOfGO* GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
70 CORBA::Double theTolerance);
72 GEOM::GEOM_Object_ptr MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
73 CORBA::Double theTolerance,
74 const GEOM::ListOfGO& theFaces,
75 CORBA::Boolean doKeepNonSolids);
78 // For old SubShapeAll()
79 // Deprecated, use MakeAllSubShapes() instead
80 GEOM::ListOfGO* MakeExplode (GEOM::GEOM_Object_ptr theShape,
81 CORBA::Long theShapeType,
82 CORBA::Boolean isSorted);
84 GEOM::ListOfGO* MakeAllSubShapes (GEOM::GEOM_Object_ptr theShape,
85 CORBA::Long theShapeType,
86 CORBA::Boolean isSorted);
88 // Deprecated, use GetAllSubShapesIDs() instead
89 GEOM::ListOfLong* SubShapeAllIDs (GEOM::GEOM_Object_ptr theShape,
90 CORBA::Long theShapeType,
91 CORBA::Boolean isSorted);
93 GEOM::ListOfLong* GetAllSubShapesIDs (GEOM::GEOM_Object_ptr theShape,
94 CORBA::Long theShapeType,
95 CORBA::Boolean isSorted);
97 GEOM::GEOM_Object_ptr GetSubShape (GEOM::GEOM_Object_ptr theMainShape,
100 CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theMainShape,
101 GEOM::GEOM_Object_ptr theSubShape);
103 CORBA::Long GetTopologyIndex (GEOM::GEOM_Object_ptr theMainShape,
104 GEOM::GEOM_Object_ptr theSubShape);
106 char* GetShapeTypeString (GEOM::GEOM_Object_ptr theShape);
108 CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape);
109 CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape);
110 CORBA::Long NumberOfSubShapes (GEOM::GEOM_Object_ptr theShape,
111 const CORBA::Long theShapeType);
113 GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape);
115 GEOM::ListOfLong* GetFreeFacesIDs (GEOM::GEOM_Object_ptr theShape);
117 GEOM::ListOfGO* GetSharedShapes (GEOM::GEOM_Object_ptr theShape1,
118 GEOM::GEOM_Object_ptr theShape2,
119 CORBA::Long theShapeType);
121 GEOM::ListOfGO* GetSharedShapesMulti (const GEOM::ListOfGO& theShapes,
122 CORBA::Long theShapeType);
124 GEOM::ListOfGO* GetShapesOnPlane (GEOM::GEOM_Object_ptr theShape,
125 CORBA::Long theShapeType,
126 GEOM::GEOM_Object_ptr theAx1,
127 GEOM::shape_state theState);
129 GEOM::ListOfGO* GetShapesOnPlaneWithLocation(GEOM::GEOM_Object_ptr theShape,
130 CORBA::Long theShapeType,
131 GEOM::GEOM_Object_ptr theAx1,
132 GEOM::GEOM_Object_ptr thePnt,
133 GEOM::shape_state theState);
135 GEOM::ListOfGO* GetShapesOnCylinder (GEOM::GEOM_Object_ptr theShape,
136 CORBA::Long theShapeType,
137 GEOM::GEOM_Object_ptr theAxis,
138 CORBA::Double theRadius,
139 GEOM::shape_state theState);
141 GEOM::ListOfGO* GetShapesOnCylinderWithLocation (GEOM::GEOM_Object_ptr theShape,
142 CORBA::Long theShapeType,
143 GEOM::GEOM_Object_ptr theAxis,
144 GEOM::GEOM_Object_ptr thePnt,
145 CORBA::Double theRadius,
146 GEOM::shape_state theState);
148 GEOM::ListOfGO* GetShapesOnSphere (GEOM::GEOM_Object_ptr theShape,
149 CORBA::Long theShapeType,
150 GEOM::GEOM_Object_ptr theCenter,
151 CORBA::Double theRadius,
152 GEOM::shape_state theState);
154 GEOM::ListOfGO* GetShapesOnQuadrangle (GEOM::GEOM_Object_ptr theShape,
155 CORBA::Long theShapeType,
156 GEOM::GEOM_Object_ptr theTopLeftPoint,
157 GEOM::GEOM_Object_ptr theTopRigthPoint,
158 GEOM::GEOM_Object_ptr theBottomLeftPoint,
159 GEOM::GEOM_Object_ptr theBottomRigthPoint,
160 GEOM::shape_state theState);
162 GEOM::ListOfLong* GetShapesOnPlaneIDs (GEOM::GEOM_Object_ptr theShape,
163 CORBA::Long theShapeType,
164 GEOM::GEOM_Object_ptr theAx1,
165 GEOM::shape_state theState);
167 GEOM::ListOfLong* GetShapesOnPlaneWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
168 CORBA::Long theShapeType,
169 GEOM::GEOM_Object_ptr theAx1,
170 GEOM::GEOM_Object_ptr thePnt,
171 GEOM::shape_state theState);
173 GEOM::ListOfLong* GetShapesOnCylinderIDs (GEOM::GEOM_Object_ptr theShape,
174 CORBA::Long theShapeType,
175 GEOM::GEOM_Object_ptr theAxis,
176 CORBA::Double theRadius,
177 GEOM::shape_state theState);
179 GEOM::ListOfLong* GetShapesOnCylinderWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
180 CORBA::Long theShapeType,
181 GEOM::GEOM_Object_ptr theAxis,
182 GEOM::GEOM_Object_ptr thePnt,
183 CORBA::Double theRadius,
184 GEOM::shape_state theState);
186 GEOM::ListOfLong* GetShapesOnSphereIDs (GEOM::GEOM_Object_ptr theShape,
187 CORBA::Long theShapeType,
188 GEOM::GEOM_Object_ptr theCenter,
189 CORBA::Double theRadius,
190 GEOM::shape_state theState);
192 GEOM::ListOfLong* GetShapesOnQuadrangleIDs (GEOM::GEOM_Object_ptr theShape,
193 CORBA::Long theShapeType,
194 GEOM::GEOM_Object_ptr theTopLeftPoint,
195 GEOM::GEOM_Object_ptr theTopRigthPoint,
196 GEOM::GEOM_Object_ptr theBottomLeftPoint,
197 GEOM::GEOM_Object_ptr theBottomRigthPoint,
198 GEOM::shape_state theState);
200 GEOM::ListOfGO* GetShapesOnBox (GEOM::GEOM_Object_ptr theBox,
201 GEOM::GEOM_Object_ptr theShape,
202 CORBA::Long theShapeType,
203 GEOM::shape_state theState);
205 GEOM::ListOfLong* GetShapesOnBoxIDs (GEOM::GEOM_Object_ptr theBox,
206 GEOM::GEOM_Object_ptr theShape,
207 CORBA::Long theShapeType,
208 GEOM::shape_state theState);
210 GEOM::ListOfGO* GetShapesOnShape (GEOM::GEOM_Object_ptr theSheckShape,
211 GEOM::GEOM_Object_ptr theShape,
212 CORBA::Short theShapeType,
213 GEOM::shape_state theState);
215 GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound
216 (GEOM::GEOM_Object_ptr theSheckShape,
217 GEOM::GEOM_Object_ptr theShape,
218 CORBA::Short theShapeType,
219 GEOM::shape_state theState);
221 GEOM::ListOfLong* GetShapesOnShapeIDs (GEOM::GEOM_Object_ptr theCheckShape,
222 GEOM::GEOM_Object_ptr theShape,
223 CORBA::Short theShapeType,
224 GEOM::shape_state theState);
226 GEOM::GEOM_Object_ptr GetInPlace (GEOM::GEOM_Object_ptr theShapeWhere,
227 GEOM::GEOM_Object_ptr theShapeWhat);
229 GEOM::GEOM_Object_ptr GetInPlaceByHistory (GEOM::GEOM_Object_ptr theShapeWhere,
230 GEOM::GEOM_Object_ptr theShapeWhat);
232 GEOM::GEOM_Object_ptr GetSame (GEOM::GEOM_Object_ptr theShapeWhere,
233 GEOM::GEOM_Object_ptr theShapeWhat);
235 ::GEOMImpl_IShapesOperations* GetOperations()
236 { return (::GEOMImpl_IShapesOperations*)GetImpl(); }