1 // Copyright (C) 2007-2016 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, or (at your option) any later version.
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
23 #ifndef __GEOM_SUPERV_I_H__
24 #define __GEOM_SUPERV_I_H__
26 #include "GEOM_I_Superv.hxx"
29 #include <SALOMEconfig.h>
30 #include CORBA_CLIENT_HEADER(GEOM_Gen)
31 #include CORBA_CLIENT_HEADER(AdvancedGEOM)
32 #include CORBA_CLIENT_HEADER(STLPlugin)
33 #include CORBA_CLIENT_HEADER(BREPPlugin)
34 #include CORBA_CLIENT_HEADER(STEPPlugin)
35 #include CORBA_CLIENT_HEADER(IGESPlugin)
36 #include CORBA_CLIENT_HEADER(XAOPlugin)
38 #include CORBA_CLIENT_HEADER(VTKPlugin)
40 #include CORBA_SERVER_HEADER(GEOM_Superv)
42 #include "SALOME_Component_i.hxx"
43 #include "SALOME_NamingService.hxx"
45 #include "GEOM_List_i.hh"
47 class GEOM_I_SUPERV_EXPORT GEOM_Superv_i : public virtual POA_GEOM::GEOM_Superv,
48 public Engines_Component_i
51 GEOM_Superv_i(CORBA::ORB_ptr orb,
52 PortableServer::POA_ptr poa,
53 PortableServer::ObjectId * contId,
54 const char *instanceName,
55 const char *interfaceName);
58 // generic method to be put in a super class
59 void register_name(char * name);
73 void getSTLPluginOp();
74 void getBREPPluginOp();
75 void getSTEPPluginOp();
76 void getIGESPluginOp();
77 void getXAOPluginOp();
79 void getVTKPluginOp();
81 PortableServer::ServantBase_var GetServant(CORBA::Object_ptr theObject,
82 PortableServer::POA_ptr thePOA);
84 //-----------------------------------------------------------//
85 // Create ListOfGO and add items to it //
86 //-----------------------------------------------------------//
87 GEOM::GEOM_List_ptr CreateListOfGO();
88 void AddItemToListOfGO(GEOM::GEOM_List_ptr& theList,
89 GEOM::GEOM_Object_ptr theObject);
91 //-----------------------------------------------------------//
92 // Create ListOfLong and add items to it //
93 //-----------------------------------------------------------//
94 GEOM::GEOM_List_ptr CreateListOfLong();
95 void AddItemToListOfLong(GEOM::GEOM_List_ptr& theList,
96 CORBA::Long theObject);
98 //-----------------------------------------------------------//
99 // Create ListOfDouble and add items to it //
100 //-----------------------------------------------------------//
101 GEOM::GEOM_List_ptr CreateListOfDouble();
102 void AddItemToListOfDouble(GEOM::GEOM_List_ptr& theList,
103 CORBA::Double theObject);
105 //-----------------------------------------------------------------------//
106 // Inherited methods from SALOMEDS::Driver //
107 //-----------------------------------------------------------------------//
109 SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
111 CORBA::Boolean isMultiFile);
113 SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
115 CORBA::Boolean isMultiFile);
117 CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent,
118 const SALOMEDS::TMPFile& theStream,
120 CORBA::Boolean isMultiFile);
122 CORBA::Boolean LoadASCII(SALOMEDS::SComponent_ptr theComponent,
123 const SALOMEDS::TMPFile& theStream,
125 CORBA::Boolean isMultiFile);
127 void Close(SALOMEDS::SComponent_ptr theComponent);
128 char* ComponentDataType();
131 char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
132 const char* IORString,
133 CORBA::Boolean isMultiFile,
134 CORBA::Boolean isASCII);
135 char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
136 const char* aLocalPersistentID,
137 CORBA::Boolean isMultiFile,
138 CORBA::Boolean isASCII);
140 CORBA::Boolean CanPublishInStudy(CORBA::Object_ptr theIOR);
141 SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::SObject_ptr theSObject,
142 CORBA::Object_ptr theObject,
143 const char* theName) throw (SALOME::SALOME_Exception) ;
145 GEOM::ListOfGO* PublishNamedShapesInStudy(//SALOMEDS::SObject_ptr theSObject,
146 CORBA::Object_ptr theObject);
148 CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
149 SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
150 CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID);
151 SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
152 CORBA::Long theObjectID,
153 SALOMEDS::SObject_ptr theObject);
155 //-----------------------------------------------------------//
156 // Primitives Construction : BasicOperations //
157 //-----------------------------------------------------------//
158 GEOM::GEOM_Object_ptr MakePointXYZ (CORBA::Double theX,
161 GEOM::GEOM_Object_ptr MakePointWithReference (GEOM::GEOM_Object_ptr theReference,
165 GEOM::GEOM_Object_ptr MakePointOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
166 CORBA::Double theParameter);
167 GEOM::GEOM_Object_ptr MakePointOnCurveByLength (GEOM::GEOM_Object_ptr theRefCurve,
168 CORBA::Double theLength,
169 GEOM::GEOM_Object_ptr theStartPoint);
170 GEOM::GEOM_Object_ptr MakePointOnCurveByCoord (GEOM::GEOM_Object_ptr theRefCurve,
171 CORBA::Double theXParameter,
172 CORBA::Double theYParameter,
173 CORBA::Double theZParameter);
174 GEOM::GEOM_Object_ptr MakePointOnSurface (GEOM::GEOM_Object_ptr theRefSurface,
175 CORBA::Double theUParameter,
176 CORBA::Double theVParameter);
177 GEOM::GEOM_Object_ptr MakePointOnSurfaceByCoord (GEOM::GEOM_Object_ptr theRefSurface,
178 CORBA::Double theXParameter,
179 CORBA::Double theYParameter,
180 CORBA::Double theZParameter);
181 GEOM::GEOM_Object_ptr MakePointOnLinesIntersection (GEOM::GEOM_Object_ptr theRefLine1,
182 GEOM::GEOM_Object_ptr theRefLine2);
183 GEOM::GEOM_Object_ptr MakeTangentOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
184 CORBA::Double theParameter);
185 GEOM::GEOM_Object_ptr MakeVectorDXDYDZ (CORBA::Double theDX,
187 CORBA::Double theDZ);
188 GEOM::GEOM_Object_ptr MakeVectorTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
189 GEOM::GEOM_Object_ptr thePnt2);
190 GEOM::GEOM_Object_ptr MakeLineTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
191 GEOM::GEOM_Object_ptr thePnt2);
192 GEOM::GEOM_Object_ptr MakeLineTwoFaces (GEOM::GEOM_Object_ptr theFace1,
193 GEOM::GEOM_Object_ptr theFace2);
194 GEOM::GEOM_Object_ptr MakePlaneThreePnt (GEOM::GEOM_Object_ptr thePnt1,
195 GEOM::GEOM_Object_ptr thePnt2,
196 GEOM::GEOM_Object_ptr thePnt3,
197 CORBA::Double theTrimSize);
198 GEOM::GEOM_Object_ptr MakePlanePntVec (GEOM::GEOM_Object_ptr thePnt,
199 GEOM::GEOM_Object_ptr theVec,
200 CORBA::Double theTrimSize);
201 GEOM::GEOM_Object_ptr MakePlaneFace (GEOM::GEOM_Object_ptr theFace,
202 CORBA::Double theTrimSize);
203 GEOM::GEOM_Object_ptr MakePlane2Vec (GEOM::GEOM_Object_ptr theVec1,
204 GEOM::GEOM_Object_ptr theVec2,
205 CORBA::Double theTrimSize);
206 GEOM::GEOM_Object_ptr MakePlaneLCS (GEOM::GEOM_Object_ptr theLCS,
207 CORBA::Double theTrimSize,
208 CORBA::Double theOrientation);
209 GEOM::GEOM_Object_ptr MakeMarker (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ,
210 CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ,
211 CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ);
213 GEOM::GEOM_Object_ptr MakeMarkerFromShape (GEOM::GEOM_Object_ptr theShape);
215 GEOM::GEOM_Object_ptr MakeMarkerPntTwoVec (GEOM::GEOM_Object_ptr theOrigin,
216 GEOM::GEOM_Object_ptr theXVec,
217 GEOM::GEOM_Object_ptr theYVec);
219 GEOM::GEOM_Object_ptr MakeTangentPlaneOnFace (GEOM::GEOM_Object_ptr theFace,
220 CORBA::Double theParameterU,
221 CORBA::Double theParameterV,
222 CORBA::Double theTrimSize);
224 //-----------------------------------------------------------//
225 // Primitives Construction : 3DPrimOperations //
226 //-----------------------------------------------------------//
227 GEOM::GEOM_Object_ptr MakeBox (CORBA::Double theX1,
232 CORBA::Double theZ2);
233 GEOM::GEOM_Object_ptr MakeBoxDXDYDZ (CORBA::Double theDX,
235 CORBA::Double theDZ);
236 GEOM::GEOM_Object_ptr MakeBoxTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
237 GEOM::GEOM_Object_ptr thePnt2);
238 GEOM::GEOM_Object_ptr MakeFaceHW (CORBA::Double theH,
240 CORBA::Short theOrientation);
241 GEOM::GEOM_Object_ptr MakeFaceObjHW (GEOM::GEOM_Object_ptr theObj,
244 GEOM::GEOM_Object_ptr MakeDiskPntVecR (GEOM::GEOM_Object_ptr theCenter,
245 GEOM::GEOM_Object_ptr theVector,
247 GEOM::GEOM_Object_ptr MakeDiskThreePnt (GEOM::GEOM_Object_ptr thePnt1,
248 GEOM::GEOM_Object_ptr thePnt2,
249 GEOM::GEOM_Object_ptr thePnt3);
250 GEOM::GEOM_Object_ptr MakeDiskR (CORBA::Double theR,
251 CORBA::Short theOrientation);
252 GEOM::GEOM_Object_ptr MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt,
253 GEOM::GEOM_Object_ptr theAxis,
254 CORBA::Double theRadius,
255 CORBA::Double theHeight);
256 GEOM::GEOM_Object_ptr MakeCylinderRH (CORBA::Double theR,
258 GEOM::GEOM_Object_ptr MakeCylinderPntVecRHA (GEOM::GEOM_Object_ptr thePnt,
259 GEOM::GEOM_Object_ptr theAxis,
260 CORBA::Double theRadius,
261 CORBA::Double theHeight,
262 CORBA::Double theAngle);
263 GEOM::GEOM_Object_ptr MakeCylinderRHA (CORBA::Double theR,
266 GEOM::GEOM_Object_ptr MakeSphere (CORBA::Double theX,
269 CORBA::Double theRadius);
270 GEOM::GEOM_Object_ptr MakeSphereR (CORBA::Double theR);
271 GEOM::GEOM_Object_ptr MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt,
273 GEOM::GEOM_Object_ptr MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
274 GEOM::GEOM_Object_ptr theVec,
275 CORBA::Double theRMajor,
276 CORBA::Double theRMinor);
277 GEOM::GEOM_Object_ptr MakeTorusRR (CORBA::Double theRMajor,
278 CORBA::Double theRMinor);
279 GEOM::GEOM_Object_ptr MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
280 GEOM::GEOM_Object_ptr theAxis,
283 CORBA::Double theHeight);
284 GEOM::GEOM_Object_ptr MakeConeR1R2H (CORBA::Double theR1,
286 CORBA::Double theHeight);
287 GEOM::GEOM_Object_ptr MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
288 GEOM::GEOM_Object_ptr theVec,
290 GEOM::GEOM_Object_ptr MakePrismVecH2Ways (GEOM::GEOM_Object_ptr theBase,
291 GEOM::GEOM_Object_ptr theVec,
293 GEOM::GEOM_Object_ptr MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
294 GEOM::GEOM_Object_ptr thePoint1,
295 GEOM::GEOM_Object_ptr thePoint2);
296 GEOM::GEOM_Object_ptr MakePrismTwoPnt2Ways (GEOM::GEOM_Object_ptr theBase,
297 GEOM::GEOM_Object_ptr thePoint1,
298 GEOM::GEOM_Object_ptr thePoint2);
299 GEOM::GEOM_Object_ptr MakePrismDXDYDZ (GEOM::GEOM_Object_ptr theBase,
302 CORBA::Double theDZ);
303 GEOM::GEOM_Object_ptr MakePrismDXDYDZ2Ways (GEOM::GEOM_Object_ptr theBase,
306 CORBA::Double theDZ);
307 GEOM::GEOM_Object_ptr MakePipe (GEOM::GEOM_Object_ptr theBase,
308 GEOM::GEOM_Object_ptr thePath);
309 GEOM::GEOM_Object_ptr MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
310 GEOM::GEOM_Object_ptr theAxis,
311 CORBA::Double theAngle);
312 GEOM::GEOM_Object_ptr MakeRevolutionAxisAngle2Ways (GEOM::GEOM_Object_ptr theBase,
313 GEOM::GEOM_Object_ptr theAxis,
314 CORBA::Double theAngle);
315 GEOM::GEOM_Object_ptr MakeFilling (GEOM::GEOM_Object_ptr theShape,
316 CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
317 CORBA::Double theTol2D, CORBA::Double theTol3D,
318 CORBA::Long theNbIter,
319 GEOM::filling_oper_method theMethod,
320 CORBA::Boolean theApprox);
322 GEOM::GEOM_Object_ptr MakeThruSections(const GEOM::ListOfGO& theSeqSections,
323 CORBA::Boolean theModeSolid,
324 CORBA::Double thePreci,
325 CORBA::Boolean theRuled);
327 GEOM::GEOM_Object_ptr MakePipeWithDifferentSections(const GEOM::ListOfGO& theBases,
328 const GEOM::ListOfGO& theLocations,
329 GEOM::GEOM_Object_ptr thePath,
330 CORBA::Boolean theWithContact,
331 CORBA::Boolean theWithCorrections);
333 GEOM::GEOM_Object_ptr MakePipeWithShellSections(const GEOM::ListOfGO& theBases,
334 const GEOM::ListOfGO& theSubBases,
335 const GEOM::ListOfGO& theLocations,
336 GEOM::GEOM_Object_ptr thePath,
337 CORBA::Boolean theWithContact,
338 CORBA::Boolean theWithCorrections);
340 GEOM::GEOM_Object_ptr MakePipeShellsWithoutPath(const GEOM::ListOfGO& theBases,
341 const GEOM::ListOfGO& theLocations);
343 GEOM::GEOM_Object_ptr MakePipeBiNormalAlongVector (GEOM::GEOM_Object_ptr theBase,
344 GEOM::GEOM_Object_ptr thePath,
345 GEOM::GEOM_Object_ptr theVec);
347 //-----------------------------------------------------------//
348 // BooleanOperations //
349 //-----------------------------------------------------------//
350 GEOM::GEOM_Object_ptr MakeBoolean (GEOM::GEOM_Object_ptr theShape1,
351 GEOM::GEOM_Object_ptr theShape2,
352 CORBA::Long theOperation);
353 GEOM::GEOM_Object_ptr MakeFuse (GEOM::GEOM_Object_ptr theShape1,
354 GEOM::GEOM_Object_ptr theShape2);
355 GEOM::GEOM_Object_ptr MakeCommon (GEOM::GEOM_Object_ptr theShape1,
356 GEOM::GEOM_Object_ptr theShape2);
357 GEOM::GEOM_Object_ptr MakeCut (GEOM::GEOM_Object_ptr theShape1,
358 GEOM::GEOM_Object_ptr theShape2);
359 GEOM::GEOM_Object_ptr MakeSection (GEOM::GEOM_Object_ptr theShape1,
360 GEOM::GEOM_Object_ptr theShape2);
361 GEOM::GEOM_Object_ptr MakePartition (GEOM::GEOM_List_ptr theShapes,
362 GEOM::GEOM_List_ptr theTools,
363 GEOM::GEOM_List_ptr theKeepInside,
364 GEOM::GEOM_List_ptr theRemoveInside,
365 CORBA::Short theLimit,
366 CORBA::Boolean theRemoveWebs,
367 GEOM::GEOM_List_ptr theMaterials,
368 CORBA::Short theKeepNonlimitShapes);
369 GEOM::GEOM_Object_ptr MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
370 GEOM::GEOM_Object_ptr thePlane);
372 //-----------------------------------------------------------//
373 // InsertOperations //
374 //-----------------------------------------------------------//
375 GEOM::GEOM_Object_ptr MakeCopy (GEOM::GEOM_Object_ptr theOriginal);
376 void Export (GEOM::GEOM_Object_ptr theObject,
377 const char* theFileName,
378 const char* theFormatName);
379 GEOM::GEOM_Object_ptr ImportFile (const char* theFileName,
380 const char* theFormatName);
382 //-----------------------------------------------------------//
383 // TransformOperations //
384 //-----------------------------------------------------------//
385 GEOM::GEOM_Object_ptr TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
386 GEOM::GEOM_Object_ptr thePoint1,
387 GEOM::GEOM_Object_ptr thePoint2);
388 GEOM::GEOM_Object_ptr TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
389 GEOM::GEOM_Object_ptr thePoint1,
390 GEOM::GEOM_Object_ptr thePoint2);
391 GEOM::GEOM_Object_ptr TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
394 CORBA::Double theDZ);
395 GEOM::GEOM_Object_ptr TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
398 CORBA::Double theDZ);
399 GEOM::GEOM_Object_ptr TranslateVector (GEOM::GEOM_Object_ptr theObject,
400 GEOM::GEOM_Object_ptr theVector);
401 GEOM::GEOM_Object_ptr TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
402 GEOM::GEOM_Object_ptr theVector);
403 GEOM::GEOM_Object_ptr TranslateVectorDistance (GEOM::GEOM_Object_ptr theObject,
404 GEOM::GEOM_Object_ptr theVector,
405 CORBA::Double theDistance,
406 CORBA::Boolean theCopy);
407 GEOM::GEOM_Object_ptr MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
408 GEOM::GEOM_Object_ptr theVector,
409 CORBA::Double theStep,
410 CORBA::Long theNbTimes);
411 GEOM::GEOM_Object_ptr MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
412 GEOM::GEOM_Object_ptr theVector1,
413 CORBA::Double theStep1,
414 CORBA::Long theNbTimes1,
415 GEOM::GEOM_Object_ptr theVector2,
416 CORBA::Double theStep2,
417 CORBA::Long theNbTimes2);
418 GEOM::GEOM_Object_ptr Rotate (GEOM::GEOM_Object_ptr theObject,
419 GEOM::GEOM_Object_ptr theAxis,
420 CORBA::Double theAngle);
421 GEOM::GEOM_Object_ptr RotateCopy (GEOM::GEOM_Object_ptr theObject,
422 GEOM::GEOM_Object_ptr theAxis,
423 CORBA::Double theAngle);
425 GEOM::GEOM_Object_ptr RotateThreePoints (GEOM::GEOM_Object_ptr theObject,
426 GEOM::GEOM_Object_ptr theCentPoint,
427 GEOM::GEOM_Object_ptr thePoint1,
428 GEOM::GEOM_Object_ptr thePoint2);
430 GEOM::GEOM_Object_ptr RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject,
431 GEOM::GEOM_Object_ptr theCentPoint,
432 GEOM::GEOM_Object_ptr thePoint1,
433 GEOM::GEOM_Object_ptr thePoint2);
435 GEOM::GEOM_Object_ptr MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
436 GEOM::GEOM_Object_ptr theAxis,
437 CORBA::Long theNbTimes);
438 GEOM::GEOM_Object_ptr MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
439 GEOM::GEOM_Object_ptr theAxis,
440 CORBA::Double theAngle,
441 CORBA::Long theNbTimes1,
442 CORBA::Double theStep,
443 CORBA::Long theNbTimes2);
444 GEOM::GEOM_Object_ptr MirrorPlane (GEOM::GEOM_Object_ptr theObject,
445 GEOM::GEOM_Object_ptr thePlane);
446 GEOM::GEOM_Object_ptr MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject,
447 GEOM::GEOM_Object_ptr thePlane);
448 GEOM::GEOM_Object_ptr MirrorAxis (GEOM::GEOM_Object_ptr theObject,
449 GEOM::GEOM_Object_ptr theAxis);
450 GEOM::GEOM_Object_ptr MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject,
451 GEOM::GEOM_Object_ptr theAxis);
452 GEOM::GEOM_Object_ptr MirrorPoint (GEOM::GEOM_Object_ptr theObject,
453 GEOM::GEOM_Object_ptr thePoint);
454 GEOM::GEOM_Object_ptr MirrorPointCopy (GEOM::GEOM_Object_ptr theObject,
455 GEOM::GEOM_Object_ptr thePoint);
456 GEOM::GEOM_Object_ptr OffsetShape (GEOM::GEOM_Object_ptr theObject,
457 CORBA::Double theOffset);
458 GEOM::GEOM_Object_ptr OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
459 CORBA::Double theOffset);
460 GEOM::GEOM_Object_ptr ScaleShape (GEOM::GEOM_Object_ptr theObject,
461 GEOM::GEOM_Object_ptr thePoint,
462 CORBA::Double theFactor);
463 GEOM::GEOM_Object_ptr ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject,
464 GEOM::GEOM_Object_ptr thePoint,
465 CORBA::Double theFactor);
466 GEOM::GEOM_Object_ptr ScaleShapeAlongAxes (GEOM::GEOM_Object_ptr theObject,
467 GEOM::GEOM_Object_ptr thePoint,
468 CORBA::Double theFactorX,
469 CORBA::Double theFactorY,
470 CORBA::Double theFactorZ);
471 GEOM::GEOM_Object_ptr ScaleShapeAlongAxesCopy (GEOM::GEOM_Object_ptr theObject,
472 GEOM::GEOM_Object_ptr thePoint,
473 CORBA::Double theFactorX,
474 CORBA::Double theFactorY,
475 CORBA::Double theFactorZ);
476 GEOM::GEOM_Object_ptr PositionShape (GEOM::GEOM_Object_ptr theObject,
477 GEOM::GEOM_Object_ptr theStartLCS,
478 GEOM::GEOM_Object_ptr theEndLCS);
479 GEOM::GEOM_Object_ptr PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
480 GEOM::GEOM_Object_ptr theStartLCS,
481 GEOM::GEOM_Object_ptr theEndLCS);
482 GEOM::GEOM_Object_ptr PositionAlongPath (GEOM::GEOM_Object_ptr theObject,
483 GEOM::GEOM_Object_ptr thePath,
484 CORBA::Double theDistance,
485 CORBA::Boolean theCopy,
486 CORBA::Boolean theReverse);
488 //-----------------------------------------------------------//
489 // ShapesOperations //
490 //-----------------------------------------------------------//
491 GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
492 GEOM::GEOM_Object_ptr thePnt2);
493 GEOM::GEOM_Object_ptr MakeEdgeOnCurveByLength (GEOM::GEOM_Object_ptr theRefCurve,
494 CORBA::Double theLength,
495 GEOM::GEOM_Object_ptr theStartPoint);
496 GEOM::GEOM_Object_ptr MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires,
497 CORBA::Double theTolerance);
498 GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire,
499 CORBA::Boolean isPlanarWanted);
500 GEOM::GEOM_Object_ptr MakeFaceWires (GEOM::GEOM_List_ptr theWires,
501 CORBA::Boolean isPlanarWanted);
502 GEOM::GEOM_Object_ptr MakeFaceWithConstraints (GEOM::GEOM_List_ptr theConstraints);
503 GEOM::GEOM_Object_ptr MakeShell (GEOM::GEOM_List_ptr theFacesAndShells);
504 GEOM::GEOM_Object_ptr MakeSolidShell (GEOM::GEOM_Object_ptr theShell);
505 GEOM::GEOM_Object_ptr MakeSolidShells (GEOM::GEOM_List_ptr theShells);
506 GEOM::GEOM_Object_ptr MakeCompound (GEOM::GEOM_List_ptr theShapes);
507 GEOM::GEOM_Object_ptr MakeSolidFromConnectedFaces (GEOM::GEOM_List_ptr theFacesOrShells,
508 CORBA::Boolean isIntersect);
509 GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
510 CORBA::Double theTolerance,
511 CORBA::Boolean doKeepNonSolids);
512 GEOM::GEOM_List_ptr GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
513 CORBA::Double theTolerance);
514 GEOM::GEOM_Object_ptr MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
515 CORBA::Double theTolerance,
516 const GEOM::ListOfGO& theFaces,
517 CORBA::Boolean doKeepNonSolids,
518 CORBA::Boolean doGlueAllEdges);
519 GEOM::GEOM_List_ptr MakeExplode (GEOM::GEOM_Object_ptr theShape,
520 CORBA::Long theShapeType,
521 CORBA::Boolean isSorted);
522 CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape);
523 CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape);
524 GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape);
526 GEOM::GEOM_List_ptr GetShapesOnShape (GEOM::GEOM_Object_ptr theCheckShape,
527 GEOM::GEOM_Object_ptr theShape,
528 CORBA::Short theShapeType,
529 GEOM::shape_state theState);
530 GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound
531 (GEOM::GEOM_Object_ptr theCheckShape,
532 GEOM::GEOM_Object_ptr theShape,
533 CORBA::Short theShapeType,
534 GEOM::shape_state theState);
536 //-----------------------------------------------------------//
537 // BlocksOperations //
538 //-----------------------------------------------------------//
539 GEOM::GEOM_Object_ptr MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
540 GEOM::GEOM_Object_ptr thePnt2,
541 GEOM::GEOM_Object_ptr thePnt3,
542 GEOM::GEOM_Object_ptr thePnt4);
543 GEOM::GEOM_Object_ptr MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
544 GEOM::GEOM_Object_ptr theEdge2,
545 GEOM::GEOM_Object_ptr theEdge3,
546 GEOM::GEOM_Object_ptr theEdge4);
547 GEOM::GEOM_Object_ptr MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
548 GEOM::GEOM_Object_ptr theEdge2);
549 GEOM::GEOM_Object_ptr MakeHexa (GEOM::GEOM_Object_ptr theFace1,
550 GEOM::GEOM_Object_ptr theFace2,
551 GEOM::GEOM_Object_ptr theFace3,
552 GEOM::GEOM_Object_ptr theFace4,
553 GEOM::GEOM_Object_ptr theFace5,
554 GEOM::GEOM_Object_ptr theFace6);
555 GEOM::GEOM_Object_ptr MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
556 GEOM::GEOM_Object_ptr theFace2);
557 GEOM::GEOM_Object_ptr GetPoint (GEOM::GEOM_Object_ptr theShape,
561 CORBA::Double theEpsilon);
562 GEOM::GEOM_Object_ptr GetEdge (GEOM::GEOM_Object_ptr theShape,
563 GEOM::GEOM_Object_ptr thePoint1,
564 GEOM::GEOM_Object_ptr thePoint2);
565 GEOM::GEOM_Object_ptr GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
566 GEOM::GEOM_Object_ptr thePoint);
567 GEOM::GEOM_Object_ptr GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
568 GEOM::GEOM_Object_ptr thePoint1,
569 GEOM::GEOM_Object_ptr thePoint2,
570 GEOM::GEOM_Object_ptr thePoint3,
571 GEOM::GEOM_Object_ptr thePoint4);
572 GEOM::GEOM_Object_ptr GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
573 GEOM::GEOM_Object_ptr theEdge1,
574 GEOM::GEOM_Object_ptr theEdge2);
575 GEOM::GEOM_Object_ptr GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
576 GEOM::GEOM_Object_ptr theFace);
577 GEOM::GEOM_Object_ptr GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
578 GEOM::GEOM_Object_ptr thePoint);
579 GEOM::GEOM_Object_ptr GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
580 GEOM::GEOM_Object_ptr theVector);
581 CORBA::Boolean IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
582 CORBA::Long theMinNbFaces,
583 CORBA::Long theMaxNbFaces,
584 CORBA::Long& theNbBlocks);
585 CORBA::Boolean CheckCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
586 GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors);
587 char* PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
588 const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors);
589 GEOM::GEOM_List_ptr ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
590 CORBA::Long theMinNbFaces,
591 CORBA::Long theMaxNbFaces);
592 GEOM::GEOM_Object_ptr GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
593 GEOM::GEOM_Object_ptr thePoint);
594 GEOM::GEOM_Object_ptr GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
595 GEOM::GEOM_List_ptr theParts);
596 GEOM::GEOM_List_ptr GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
597 GEOM::GEOM_List_ptr theParts);
598 GEOM::GEOM_Object_ptr MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
599 CORBA::Long theDirFace1,
600 CORBA::Long theDirFace2,
601 CORBA::Long theNbTimes);
602 GEOM::GEOM_Object_ptr MakeMultiTransformation2D (GEOM::GEOM_Object_ptr theBlock,
603 CORBA::Long theDirFace1U,
604 CORBA::Long theDirFace2U,
605 CORBA::Long theNbTimesU,
606 CORBA::Long theDirFace1V,
607 CORBA::Long theDirFace2V,
608 CORBA::Long theNbTimesV);
610 //-----------------------------------------------------------//
611 // CurvesOperations //
612 //-----------------------------------------------------------//
613 GEOM::GEOM_Object_ptr MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
614 GEOM::GEOM_Object_ptr theVector,
616 GEOM::GEOM_Object_ptr MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
617 GEOM::GEOM_Object_ptr thePnt2,
618 GEOM::GEOM_Object_ptr thePnt3);
619 GEOM::GEOM_Object_ptr MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
620 GEOM::GEOM_Object_ptr thePnt2,
621 GEOM::GEOM_Object_ptr thePnt3);
622 GEOM::GEOM_Object_ptr MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
623 GEOM::GEOM_Object_ptr theVector,
624 CORBA::Double theRMajor, CORBA::Double theRMinor);
625 GEOM::GEOM_Object_ptr MakeEllipseVec (GEOM::GEOM_Object_ptr theCenter,
626 GEOM::GEOM_Object_ptr theVector,
627 CORBA::Double theRMajor, CORBA::Double theRMinor,
628 GEOM::GEOM_Object_ptr theVectorMajor);
629 GEOM::GEOM_Object_ptr MakeArc (GEOM::GEOM_Object_ptr thePnt1,
630 GEOM::GEOM_Object_ptr thePnt2,
631 GEOM::GEOM_Object_ptr thePnt3);
632 GEOM::GEOM_Object_ptr MakeArcCenter (GEOM::GEOM_Object_ptr theCenter,
633 GEOM::GEOM_Object_ptr thePnt1,
634 GEOM::GEOM_Object_ptr thePnt2,
635 CORBA::Boolean theSense);
636 GEOM::GEOM_Object_ptr MakeArcOfEllipse (GEOM::GEOM_Object_ptr thePnt1,
637 GEOM::GEOM_Object_ptr thePnt2,
638 GEOM::GEOM_Object_ptr thePnt3);
639 GEOM::GEOM_Object_ptr MakePolyline (GEOM::GEOM_List_ptr thePoints,
640 CORBA::Boolean theIsClosed);
641 GEOM::GEOM_Object_ptr MakeSplineBezier (GEOM::GEOM_List_ptr thePoints,
642 CORBA::Boolean theIsClosed);
643 GEOM::GEOM_Object_ptr MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints,
644 CORBA::Boolean theIsClosed,
645 CORBA::Boolean theDoReordering);
646 GEOM::GEOM_Object_ptr MakeSketcher (const char* theCommand,
647 GEOM::GEOM_List_ptr theWorkingPlane);
648 GEOM::GEOM_Object_ptr Make3DSketcher (GEOM::GEOM_List_ptr theCoordinates);
650 //-----------------------------------------------------------//
651 // LocalOperations //
652 //-----------------------------------------------------------//
653 GEOM::GEOM_Object_ptr MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
655 GEOM::GEOM_Object_ptr MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
656 GEOM::GEOM_List_ptr theEdges);
657 GEOM::GEOM_Object_ptr MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
658 CORBA::Double theR2, GEOM::GEOM_List_ptr theEdges);
659 GEOM::GEOM_Object_ptr MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
660 GEOM::GEOM_List_ptr theFaces);
661 GEOM::GEOM_Object_ptr MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
662 CORBA::Double theR2, GEOM::GEOM_List_ptr theFaces);
663 GEOM::GEOM_Object_ptr MakeFillet2D (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
664 GEOM::GEOM_List_ptr theVertexes);
665 GEOM::GEOM_Object_ptr MakeFillet1D (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
666 GEOM::GEOM_List_ptr theVertexes, CORBA::Boolean doIgnoreSecantVertices);
667 GEOM::GEOM_Object_ptr MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD);
668 GEOM::GEOM_Object_ptr MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
669 CORBA::Double theD1, CORBA::Double theD2,
670 CORBA::Long theFace1, CORBA::Long theFace2);
671 GEOM::GEOM_Object_ptr MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
672 CORBA::Double theD, CORBA::Double theAngle,
673 CORBA::Long theFace1, CORBA::Long theFace2);
674 GEOM::GEOM_Object_ptr MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
675 CORBA::Double theD1, CORBA::Double theD2,
676 GEOM::GEOM_List_ptr theFaces);
677 GEOM::GEOM_Object_ptr MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
678 CORBA::Double theD, CORBA::Double theAngle,
679 GEOM::GEOM_List_ptr theFaces);
680 GEOM::GEOM_Object_ptr MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
681 CORBA::Double theD1, CORBA::Double theD2,
682 GEOM::GEOM_List_ptr theEdges);
683 GEOM::GEOM_Object_ptr MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
684 CORBA::Double theD, CORBA::Double theAngle,
685 GEOM::GEOM_List_ptr theEdges);
686 GEOM::GEOM_Object_ptr MakeArchimede (GEOM::GEOM_Object_ptr theShape,
687 CORBA::Double theWeight,
688 CORBA::Double theWaterDensity,
689 CORBA::Double theMeshingDeflection);
690 CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
691 GEOM::GEOM_Object_ptr theSubShape);
693 //-----------------------------------------------------------//
694 // GroupOperations //
695 //-----------------------------------------------------------//
696 GEOM::GEOM_Object_ptr CreateGroup (GEOM::GEOM_Object_ptr theMainShape,
697 CORBA::Long theShapeType);
698 void AddObject (GEOM::GEOM_Object_ptr theGroup,
699 CORBA::Long theSubShapeId);
700 void RemoveObject (GEOM::GEOM_Object_ptr theGroup,
701 CORBA::Long theSubShapeId);
702 CORBA::Long GetType (GEOM::GEOM_Object_ptr theGroup);
703 GEOM::GEOM_Object_ptr GetMainShape (GEOM::GEOM_Object_ptr theGroup);
704 GEOM::GEOM_List_ptr GetObjects (GEOM::GEOM_Object_ptr theGroup);
706 //-----------------------------------------------------------//
707 // ImportExport Operations //
708 //-----------------------------------------------------------//
710 void ExportSTL( GEOM::GEOM_Object_ptr theObject,
711 const char* theFileName,
712 const bool theIsASCII,
713 CORBA::Double theDeflection,
714 const bool theIsRelative );
716 GEOM::GEOM_Object_ptr ImportSTL( const char* theFileName );
718 void ExportBREP( GEOM::GEOM_Object_ptr theObject,
719 const char* theFileName );
721 GEOM::GEOM_Object_ptr ImportBREP( const char* theFileName );
723 void ExportSTEP( GEOM::GEOM_Object_ptr theObject,
724 const char* theFileName );
726 GEOM::GEOM_Object_ptr ImportSTEP( const char* theFileName,
727 const bool theIsIgnoreUnits );
729 void ExportIGES( GEOM::GEOM_Object_ptr theObject,
730 const char* theFileName,
731 const char* theVersion );
733 GEOM::GEOM_Object_ptr ImportIGES( const char* theFileName,
734 const bool theIsIgnoreUnits );
736 CORBA::Boolean ExportXAO( GEOM::GEOM_Object_ptr shape,
737 const GEOM::ListOfGO& groups,
738 const GEOM::ListOfFields& fields,
740 const char* fileName,
741 const char* shapeFileName);
742 CORBA::Boolean ImportXAO( const char* fileName,
743 GEOM::GEOM_Object_out shape,
744 GEOM::ListOfGO_out subShapes,
745 GEOM::ListOfGO_out groups,
746 GEOM::ListOfFields_out fields );
748 void ExportVTK( GEOM::GEOM_Object_ptr theObject,
749 const char* theFileName,
750 CORBA::Double theDeflection );
752 //-----------------------------------------------------------//
753 // Advanced Operations //
754 //-----------------------------------------------------------//
755 GEOM::GEOM_List_ptr MakePipeTShape (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
756 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
757 CORBA::Boolean theHexMesh);
758 GEOM::GEOM_List_ptr MakePipeTShapeWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
759 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
760 CORBA::Boolean theHexMesh,
761 GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
762 GEOM::GEOM_List_ptr MakePipeTShapeChamfer (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
763 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
764 CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh);
765 GEOM::GEOM_List_ptr MakePipeTShapeChamferWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
766 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
767 CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
768 GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
769 GEOM::GEOM_List_ptr MakePipeTShapeFillet (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
770 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
771 CORBA::Double theRF, CORBA::Boolean theHexMesh);
772 GEOM::GEOM_List_ptr MakePipeTShapeFilletWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
773 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
774 CORBA::Double theRF, CORBA::Boolean theHexMesh,
775 GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
776 GEOM::GEOM_Object_ptr MakeDividedDisk (CORBA::Double theR, CORBA::Double theRatio,
777 CORBA::Short theOrientation, GEOM::pattern thePattern);
778 GEOM::GEOM_Object_ptr MakeDividedCylinder (CORBA::Double theR,
780 GEOM::pattern thePattern);
781 GEOM::GEOM_Object_ptr MakeSmoothingSurface (GEOM::GEOM_List_ptr thelPoints);
782 /*@@ insert new functions before this line @@ do not remove this line @@*/
785 SALOME_NamingService * name_service;
786 GEOM::GEOM_Gen_var myGeomEngine;
787 PortableServer::POA_var myPOA;
789 GEOM::GEOM_IBasicOperations_var myBasicOp;
790 GEOM::GEOM_I3DPrimOperations_var my3DPrimOp;
791 GEOM::GEOM_IBooleanOperations_var myBoolOp;
792 GEOM::GEOM_IInsertOperations_var myInsOp;
793 GEOM::GEOM_ITransformOperations_var myTransfOp;
794 GEOM::GEOM_IShapesOperations_var myShapesOp;
795 GEOM::GEOM_IBlocksOperations_var myBlocksOp;
796 GEOM::GEOM_ICurvesOperations_var myCurvesOp;
797 GEOM::GEOM_ILocalOperations_var myLocalOp;
798 GEOM::GEOM_IGroupOperations_var myGroupOp;
799 GEOM::IAdvancedOperations_var myAdvancedOp;
800 GEOM::ISTLOperations_var mySTLOp;
801 GEOM::IBREPOperations_var myBREPOp;
802 GEOM::ISTEPOperations_var mySTEPOp;
803 GEOM::IIGESOperations_var myIGESOp;
804 GEOM::IXAOOperations_var myXAOOp;
806 GEOM::IVTKOperations_var myVTKOp;