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