1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
22 // File : GEOM_Gen.idl
23 // Author : Lucien PIGNOLONI
28 #include "SALOME_Exception.idl"
29 #include "SALOME_Component.idl"
30 #include "SALOMEDS.idl"
31 #include "GEOM_Shape.idl"
35 interface GEOM_Gen : Engines::Component,SALOMEDS::Driver
37 typedef sequence<string> ListOfIOR ;
38 typedef sequence<GEOM_Shape> ListOfGeomShapes ;
40 //--------------------------------------------------------------//
41 // Studies Management //
42 //--------------------------------------------------------------//
43 void GetCurrentStudy(in long StudyID) ;
47 //--------------------------------------------------------------//
48 // Shapes Management //
49 //--------------------------------------------------------------//
50 GEOM_Shape GetIORFromString (in string ior);
51 ListOfIOR GetReferencedObjects(in GEOM_Shape shape);
52 ListOfIOR GetObjects (in GEOM_Shape shape);
54 //--------------------------------------------------------------//
56 //--------------------------------------------------------------//
57 PointStruct MakePointStruct(in double x,
60 DirStruct MakeDirection (in PointStruct p) ;
61 AxisStruct MakeAxisStruct(in double x,
68 //------------------------------------------------------------//
69 // Boolean Operations //
70 //------------------------------------------------------------//
71 GEOM_Shape MakeBoolean (in GEOM_Shape shape1,
73 in long operation) raises (SALOME::SALOME_Exception) ;
75 GEOM_Shape MakeFuse( in GEOM_Shape shape1,
76 in GEOM_Shape shape2) raises (SALOME::SALOME_Exception) ;
78 //-----------------------------------------------------------//
79 // Advanced Operations //
80 //-----------------------------------------------------------//
81 GEOM_Shape Partition (in ListOfIOR ListShapes,
82 in ListOfIOR ListTools,
83 in ListOfIOR ListKeepInside,
84 in ListOfIOR ListRemoveInside,
86 raises (SALOME::SALOME_Exception) ;
89 GEOM_Shape MakeFilling(in GEOM_Shape shape,
94 in short nbiter) raises (SALOME::SALOME_Exception) ;
95 GEOM_Shape MakeSewing (in ListOfIOR ListShape,
96 in double precision) raises (SALOME::SALOME_Exception) ;
97 GEOM_Shape MakeSewingShape( in GEOM_Shape aShape,
98 in double precision ) raises (SALOME::SALOME_Exception);
100 GEOM_Shape OrientationChange(in GEOM_Shape shape) raises (SALOME::SALOME_Exception) ;
102 GEOM_Shape MakePlacedBox(in double x1, in double y1, in double z1,
103 in double delta1, in double delta2, in double delta3) raises (SALOME::SALOME_Exception) ;
104 GEOM_Shape MakePanel(in GEOM_Shape shape,
105 in short directiontype,
106 in double delta) raises (SALOME::SALOME_Exception) ;
107 GEOM_Shape MakeGlueFaces(in GEOM_Shape shape,
108 in double tol3d) raises (SALOME::SALOME_Exception) ;
110 //-----------------------------------------------------------//
111 // Transformations Operations //
112 //-----------------------------------------------------------//
113 GEOM_Shape MakeCopy(in GEOM_Shape shape) raises (SALOME::SALOME_Exception) ;
115 GEOM_Shape MakeTranslation(in GEOM_Shape shape,
118 in double z) raises (SALOME::SALOME_Exception) ;
119 GEOM_Shape MakeRotation(in GEOM_Shape shape,
121 in double angle) raises (SALOME::SALOME_Exception) ;
122 GEOM_Shape MakeScaleTransform(in GEOM_Shape shape,
123 in PointStruct theCenterofScale,
124 in double factor) raises (SALOME::SALOME_Exception) ;
125 GEOM_Shape MakeMirrorByPlane(in GEOM_Shape shape,
126 in GEOM_Shape shapePlane) raises (SALOME::SALOME_Exception) ;
127 GEOM_Shape MakeRevolution(in GEOM_Shape shape,
129 in double angle) raises (SALOME::SALOME_Exception) ;
130 GEOM_Shape MakePrism(in GEOM_Shape baseShape,
132 in PointStruct P2) raises (SALOME::SALOME_Exception) ;
133 GEOM_Shape MakePipe(in GEOM_Shape pathShape,
134 in GEOM_Shape baseShape) raises (SALOME::SALOME_Exception) ;
136 //-----------------------------------------------------------//
137 // Patterns Construction //
138 //-----------------------------------------------------------//
139 GEOM_Shape MakeMultiTranslation1D(in GEOM_Shape shape,
142 in short nbtimes) raises (SALOME::SALOME_Exception) ;
143 GEOM_Shape MakeMultiTranslation2D(in GEOM_Shape shape,
149 in short nbtimes2) raises (SALOME::SALOME_Exception) ;
150 GEOM_Shape MakeMultiRotation1D(in GEOM_Shape shape,
153 in short nbtimes) raises (SALOME::SALOME_Exception) ;
154 GEOM_Shape MakeMultiRotation2D(in GEOM_Shape shape,
160 in short nbtimes2) raises (SALOME::SALOME_Exception) ;
162 //-----------------------------------------------------------//
163 // Mesures Construction //
164 //-----------------------------------------------------------//
165 GEOM_Shape MakeCDG(in GEOM_Shape shape) raises (SALOME::SALOME_Exception) ;
168 //-----------------------------------------------------------//
169 // Primitives Construction //
170 //-----------------------------------------------------------//
172 GEOM_Shape MakeVertex(in double x,
174 in double z) raises (SALOME::SALOME_Exception) ;
175 GEOM_Shape MakeVector (in PointStruct pstruct1,
176 in PointStruct pstruct2) raises (SALOME::SALOME_Exception) ;
177 GEOM_Shape MakeLine (in PointStruct pstruct,
178 in DirStruct dstruct) raises (SALOME::SALOME_Exception) ;
179 GEOM_Shape MakePlane (in PointStruct pstruct,
180 in DirStruct dstruct,
181 in double trimsize) raises (SALOME::SALOME_Exception) ;
182 GEOM_Shape MakeCircle(in PointStruct pstruct,
183 in DirStruct dstruct,
184 in double radius) raises (SALOME::SALOME_Exception) ;
185 GEOM_Shape MakeArc(in PointStruct pInit,
186 in PointStruct pCircle,
187 in PointStruct pEnd) raises (SALOME::SALOME_Exception) ;
189 GEOM_Shape MakeEllipse(in PointStruct pstruct,
190 in DirStruct dstruct,
191 in double major_radius,
192 in double minor_radius) raises (SALOME::SALOME_Exception) ;
194 //-----------------------------------------------------------//
195 // Primitives Construction //
196 //-----------------------------------------------------------//
197 GEOM_Shape MakeBox (in double x1,
202 in double z2) raises (SALOME::SALOME_Exception) ;
203 GEOM_Shape MakeCylinder(in PointStruct pstruct,
204 in DirStruct dstruct,
206 in double height) raises (SALOME::SALOME_Exception) ;
208 GEOM_Shape MakeSphere (in double x1,
211 in double radius) raises (SALOME::SALOME_Exception) ;
213 GEOM_Shape MakeTorus(in PointStruct pstruct,
214 in DirStruct dstruct,
215 in double major_radius,
216 in double minor_radius) raises (SALOME::SALOME_Exception) ;
218 GEOM_Shape MakeCone(in PointStruct pstruct,
219 in DirStruct dstruct,
222 in double height) raises (SALOME::SALOME_Exception) ;
224 //-----------------------------------------------------------//
226 //-----------------------------------------------------------//
227 GEOM_Shape Archimede(in GEOM_Shape shape,
229 in double WaterDensity,
230 in double MeshingDeflection) raises (SALOME::SALOME_Exception);
233 //-----------------------------------------------------------//
235 //-----------------------------------------------------------//
236 GEOM_Shape MakeEdge (in PointStruct pstruct1,
237 in PointStruct pstruct2) raises (SALOME::SALOME_Exception) ;
238 GEOM_Shape MakeWire (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ;
239 GEOM_Shape MakeCompound (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ;
240 GEOM_Shape MakeFace (in GEOM_Shape shapeWire,
241 in boolean wantplanarface) raises (SALOME::SALOME_Exception) ;
242 GEOM_Shape MakeFaces (in ListOfIOR ListShape,
243 in boolean wantplanarface) raises (SALOME::SALOME_Exception) ;
244 GEOM_Shape MakeShell (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ;
245 GEOM_Shape MakeSolid (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ;
248 //-----------------------------------------------------------//
249 // Subshapes Construction for GUI only //
250 //-----------------------------------------------------------//
251 GEOM_Shape SubShape(in GEOM_Shape shape,
253 in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ;
255 //-----------------------------------------------------------//
256 // Subshapes Construction for TUI or GUI //
257 //-----------------------------------------------------------//
258 ListOfGeomShapes SubShapeAll(in GEOM_Shape shape,
259 in short ShapeType) raises (SALOME::SALOME_Exception) ;
261 //-----------------------------------------------------------//
262 // Subshapes Construction
263 // Use it to have the same order of subshapes if their
264 // order may change as a result of <shape> reconstruction using
265 // boolean operations, fillet etc.
266 //-----------------------------------------------------------//
267 GEOM_Shape SubShapeSorted(in GEOM_Shape shape,
269 in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ;
271 ListOfGeomShapes SubShapeAllSorted(in GEOM_Shape shape,
272 in short ShapeType) raises (SALOME::SALOME_Exception) ;
274 //-----------------------------------------------------------//
275 // Fillet and Chamfer construction //
276 //-----------------------------------------------------------//
277 GEOM_Shape MakeFillet(in GEOM_Shape shape,
280 in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ;
282 GEOM_Shape MakeChamfer(in GEOM_Shape shape,
286 in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ;
288 //-----------------------------------------------------------//
289 // Suppress faces in a shape //
290 //-----------------------------------------------------------//
291 ListOfGeomShapes SuppressFaces(in GEOM_Shape shape,
292 in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ;
294 //-----------------------------------------------------------//
295 // Suppress a single hole in topology (face) shell or solid //
296 // : ListOfIdEndFace may be an empty list //
297 // : used only when hole traverses the topology //
298 //-----------------------------------------------------------//
299 GEOM_Shape SuppressHole(in GEOM_Shape shape,
300 in GEOM_Shape::ListOfSubShapeID ListOfIdFace,
301 in GEOM_Shape::ListOfSubShapeID ListOfIdWire,
302 in GEOM_Shape::ListOfSubShapeID ListOfIdEndFace ) raises (SALOME::SALOME_Exception) ;
304 //-----------------------------------------------------------//
305 // Suppress one or more holes in a face or a shell //
306 //-----------------------------------------------------------//
307 GEOM_Shape SuppressHolesInFaceOrShell(in GEOM_Shape shapeFaceShell,
308 in GEOM_Shape::ListOfSubShapeID ListOfIdWires ) raises (SALOME::SALOME_Exception) ;
310 //-----------------------------------------------------------//
312 //-----------------------------------------------------------//
313 GEOM_Shape ImportIGES(in string filename) raises (SALOME::SALOME_Exception) ;
314 GEOM_Shape ImportBREP(in string filename) raises (SALOME::SALOME_Exception) ;
315 GEOM_Shape ImportSTEP(in string filename) raises (SALOME::SALOME_Exception) ;
317 void ExportIGES(in string filename,in GEOM_Shape theShape) raises (SALOME::SALOME_Exception) ;
318 void ExportBREP(in string filename,in GEOM_Shape theShape) raises (SALOME::SALOME_Exception) ;
319 void ExportSTEP(in string filename,in GEOM_Shape theShape) raises (SALOME::SALOME_Exception) ;
320 //-----------------------------------------------------------//
322 //-----------------------------------------------------------//
323 boolean CheckShape(in GEOM_Shape shape) raises (SALOME::SALOME_Exception) ;