1 // Copyright (C) 2007-2008 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 GEOM::ListOfGO* MakeExplode (GEOM::GEOM_Object_ptr theShape,
79 CORBA::Long theShapeType,
80 CORBA::Boolean isSorted);
82 GEOM::ListOfLong* SubShapeAllIDs (GEOM::GEOM_Object_ptr theShape,
83 CORBA::Long theShapeType,
84 CORBA::Boolean isSorted);
86 GEOM::GEOM_Object_ptr GetSubShape (GEOM::GEOM_Object_ptr theMainShape,
89 CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theMainShape,
90 GEOM::GEOM_Object_ptr theSubShape);
92 CORBA::Long GetTopologyIndex (GEOM::GEOM_Object_ptr theMainShape,
93 GEOM::GEOM_Object_ptr theSubShape);
95 char* GetShapeTypeString (GEOM::GEOM_Object_ptr theShape);
97 CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape);
98 CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape);
99 CORBA::Long NumberOfSubShapes (GEOM::GEOM_Object_ptr theShape,
100 const CORBA::Long theShapeType);
102 GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape);
104 GEOM::ListOfLong* GetFreeFacesIDs (GEOM::GEOM_Object_ptr theShape);
106 GEOM::ListOfGO* GetSharedShapes (GEOM::GEOM_Object_ptr theShape1,
107 GEOM::GEOM_Object_ptr theShape2,
108 CORBA::Long theShapeType);
110 GEOM::ListOfGO* GetShapesOnPlane (GEOM::GEOM_Object_ptr theShape,
111 CORBA::Long theShapeType,
112 GEOM::GEOM_Object_ptr theAx1,
113 GEOM::shape_state theState);
115 GEOM::ListOfGO* GetShapesOnPlaneWithLocation(GEOM::GEOM_Object_ptr theShape,
116 CORBA::Long theShapeType,
117 GEOM::GEOM_Object_ptr theAx1,
118 GEOM::GEOM_Object_ptr thePnt,
119 GEOM::shape_state theState);
121 GEOM::ListOfGO* GetShapesOnCylinder (GEOM::GEOM_Object_ptr theShape,
122 CORBA::Long theShapeType,
123 GEOM::GEOM_Object_ptr theAxis,
124 CORBA::Double theRadius,
125 GEOM::shape_state theState);
127 GEOM::ListOfGO* GetShapesOnCylinderWithLocation (GEOM::GEOM_Object_ptr theShape,
128 CORBA::Long theShapeType,
129 GEOM::GEOM_Object_ptr theAxis,
130 GEOM::GEOM_Object_ptr thePnt,
131 CORBA::Double theRadius,
132 GEOM::shape_state theState);
134 GEOM::ListOfGO* GetShapesOnSphere (GEOM::GEOM_Object_ptr theShape,
135 CORBA::Long theShapeType,
136 GEOM::GEOM_Object_ptr theCenter,
137 CORBA::Double theRadius,
138 GEOM::shape_state theState);
140 GEOM::ListOfGO* GetShapesOnQuadrangle (GEOM::GEOM_Object_ptr theShape,
141 CORBA::Long theShapeType,
142 GEOM::GEOM_Object_ptr theTopLeftPoint,
143 GEOM::GEOM_Object_ptr theTopRigthPoint,
144 GEOM::GEOM_Object_ptr theBottomLeftPoint,
145 GEOM::GEOM_Object_ptr theBottomRigthPoint,
146 GEOM::shape_state theState);
148 GEOM::ListOfLong* GetShapesOnPlaneIDs (GEOM::GEOM_Object_ptr theShape,
149 CORBA::Long theShapeType,
150 GEOM::GEOM_Object_ptr theAx1,
151 GEOM::shape_state theState);
153 GEOM::ListOfLong* GetShapesOnPlaneWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
154 CORBA::Long theShapeType,
155 GEOM::GEOM_Object_ptr theAx1,
156 GEOM::GEOM_Object_ptr thePnt,
157 GEOM::shape_state theState);
159 GEOM::ListOfLong* GetShapesOnCylinderIDs (GEOM::GEOM_Object_ptr theShape,
160 CORBA::Long theShapeType,
161 GEOM::GEOM_Object_ptr theAxis,
162 CORBA::Double theRadius,
163 GEOM::shape_state theState);
165 GEOM::ListOfLong* GetShapesOnCylinderWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
166 CORBA::Long theShapeType,
167 GEOM::GEOM_Object_ptr theAxis,
168 GEOM::GEOM_Object_ptr thePnt,
169 CORBA::Double theRadius,
170 GEOM::shape_state theState);
172 GEOM::ListOfLong* GetShapesOnSphereIDs (GEOM::GEOM_Object_ptr theShape,
173 CORBA::Long theShapeType,
174 GEOM::GEOM_Object_ptr theCenter,
175 CORBA::Double theRadius,
176 GEOM::shape_state theState);
178 GEOM::ListOfLong* GetShapesOnQuadrangleIDs (GEOM::GEOM_Object_ptr theShape,
179 CORBA::Long theShapeType,
180 GEOM::GEOM_Object_ptr theTopLeftPoint,
181 GEOM::GEOM_Object_ptr theTopRigthPoint,
182 GEOM::GEOM_Object_ptr theBottomLeftPoint,
183 GEOM::GEOM_Object_ptr theBottomRigthPoint,
184 GEOM::shape_state theState);
186 GEOM::ListOfGO* GetShapesOnBox (GEOM::GEOM_Object_ptr theBox,
187 GEOM::GEOM_Object_ptr theShape,
188 CORBA::Long theShapeType,
189 GEOM::shape_state theState);
191 GEOM::ListOfLong* GetShapesOnBoxIDs (GEOM::GEOM_Object_ptr theBox,
192 GEOM::GEOM_Object_ptr theShape,
193 CORBA::Long theShapeType,
194 GEOM::shape_state theState);
196 GEOM::ListOfGO* GetShapesOnShape (GEOM::GEOM_Object_ptr theSheckShape,
197 GEOM::GEOM_Object_ptr theShape,
198 CORBA::Short theShapeType,
199 GEOM::shape_state theState);
201 GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound
202 (GEOM::GEOM_Object_ptr theSheckShape,
203 GEOM::GEOM_Object_ptr theShape,
204 CORBA::Short theShapeType,
205 GEOM::shape_state theState);
207 GEOM::ListOfLong* GetShapesOnShapeIDs (GEOM::GEOM_Object_ptr theCheckShape,
208 GEOM::GEOM_Object_ptr theShape,
209 CORBA::Short theShapeType,
210 GEOM::shape_state theState);
212 GEOM::GEOM_Object_ptr GetInPlace (GEOM::GEOM_Object_ptr theShapeWhere,
213 GEOM::GEOM_Object_ptr theShapeWhat);
215 GEOM::GEOM_Object_ptr GetInPlaceByHistory (GEOM::GEOM_Object_ptr theShapeWhere,
216 GEOM::GEOM_Object_ptr theShapeWhat);
218 GEOM::GEOM_Object_ptr GetSame (GEOM::GEOM_Object_ptr theShapeWhere,
219 GEOM::GEOM_Object_ptr theShapeWhat);
221 ::GEOMImpl_IShapesOperations* GetOperations()
222 { return (::GEOMImpl_IShapesOperations*)GetImpl(); }