1 // Copyright (C) 2007-2012 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
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_SERVER_HEADER(GEOM_Superv)
33 #include "SALOME_Component_i.hxx"
34 #include "SALOME_NamingService.hxx"
36 #include "GEOM_List_i.hh"
38 class GEOM_I_SUPERV_EXPORT GEOM_Superv_i : public virtual POA_GEOM::GEOM_Superv,
39 public Engines_Component_i
42 GEOM_Superv_i(CORBA::ORB_ptr orb,
43 PortableServer::POA_ptr poa,
44 PortableServer::ObjectId * contId,
45 const char *instanceName,
46 const char *interfaceName);
49 // generic method to be put in a super class
50 void register_name(char * name);
64 void getImportExportOp();
66 PortableServer::ServantBase_var GetServant(CORBA::Object_ptr theObject,
67 PortableServer::POA_ptr thePOA);
69 //-----------------------------------------------------------------------//
70 // Set current stydy ID //
71 //-----------------------------------------------------------------------//
72 void SetStudyID( CORBA::Long theId );
74 //-----------------------------------------------------------//
75 // Create ListOfGO and add items to it //
76 //-----------------------------------------------------------//
77 GEOM::GEOM_List_ptr CreateListOfGO();
78 void AddItemToListOfGO(GEOM::GEOM_List_ptr& theList,
79 GEOM::GEOM_Object_ptr theObject);
81 //-----------------------------------------------------------//
82 // Create ListOfLong and add items to it //
83 //-----------------------------------------------------------//
84 GEOM::GEOM_List_ptr CreateListOfLong();
85 void AddItemToListOfLong(GEOM::GEOM_List_ptr& theList,
86 CORBA::Long theObject);
88 //-----------------------------------------------------------//
89 // Create ListOfDouble and add items to it //
90 //-----------------------------------------------------------//
91 GEOM::GEOM_List_ptr CreateListOfDouble();
92 void AddItemToListOfDouble(GEOM::GEOM_List_ptr& theList,
93 CORBA::Double theObject);
95 //-----------------------------------------------------------------------//
96 // Inherited methods from SALOMEDS::Driver //
97 //-----------------------------------------------------------------------//
99 SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
101 CORBA::Boolean isMultiFile);
103 SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
105 CORBA::Boolean isMultiFile);
107 CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent,
108 const SALOMEDS::TMPFile& theStream,
110 CORBA::Boolean isMultiFile);
112 CORBA::Boolean LoadASCII(SALOMEDS::SComponent_ptr theComponent,
113 const SALOMEDS::TMPFile& theStream,
115 CORBA::Boolean isMultiFile);
117 void Close(SALOMEDS::SComponent_ptr theComponent);
118 char* ComponentDataType();
121 char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
122 const char* IORString,
123 CORBA::Boolean isMultiFile,
124 CORBA::Boolean isASCII);
125 char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
126 const char* aLocalPersistentID,
127 CORBA::Boolean isMultiFile,
128 CORBA::Boolean isASCII);
130 CORBA::Boolean CanPublishInStudy(CORBA::Object_ptr theIOR);
131 SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
132 SALOMEDS::SObject_ptr theSObject,
133 CORBA::Object_ptr theObject,
134 const char* theName) throw (SALOME::SALOME_Exception) ;
136 GEOM::ListOfGO* PublishNamedShapesInStudy(SALOMEDS::Study_ptr theStudy,
137 //SALOMEDS::SObject_ptr theSObject,
138 CORBA::Object_ptr theObject);
140 CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
141 SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
142 CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID);
143 SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
144 CORBA::Long theObjectID,
145 SALOMEDS::SObject_ptr theObject);
147 //-----------------------------------------------------------//
148 // Primitives Construction : BasicOperations //
149 //-----------------------------------------------------------//
150 GEOM::GEOM_Object_ptr MakePointXYZ (CORBA::Double theX,
153 GEOM::GEOM_Object_ptr MakePointWithReference (GEOM::GEOM_Object_ptr theReference,
157 GEOM::GEOM_Object_ptr MakePointOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
158 CORBA::Double theParameter);
159 GEOM::GEOM_Object_ptr MakePointOnCurveByLength (GEOM::GEOM_Object_ptr theRefCurve,
160 CORBA::Double theLength,
161 GEOM::GEOM_Object_ptr theStartPoint);
162 GEOM::GEOM_Object_ptr MakePointOnCurveByCoord (GEOM::GEOM_Object_ptr theRefCurve,
163 CORBA::Double theXParameter,
164 CORBA::Double theYParameter,
165 CORBA::Double theZParameter);
166 GEOM::GEOM_Object_ptr MakePointOnSurface (GEOM::GEOM_Object_ptr theRefSurface,
167 CORBA::Double theUParameter,
168 CORBA::Double theVParameter);
169 GEOM::GEOM_Object_ptr MakePointOnSurfaceByCoord (GEOM::GEOM_Object_ptr theRefSurface,
170 CORBA::Double theXParameter,
171 CORBA::Double theYParameter,
172 CORBA::Double theZParameter);
173 GEOM::GEOM_Object_ptr MakePointOnLinesIntersection (GEOM::GEOM_Object_ptr theRefLine1,
174 GEOM::GEOM_Object_ptr theRefLine2);
175 GEOM::GEOM_Object_ptr MakeTangentOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
176 CORBA::Double theParameter);
177 GEOM::GEOM_Object_ptr MakeVectorDXDYDZ (CORBA::Double theDX,
179 CORBA::Double theDZ);
180 GEOM::GEOM_Object_ptr MakeVectorTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
181 GEOM::GEOM_Object_ptr thePnt2);
182 GEOM::GEOM_Object_ptr MakeLineTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
183 GEOM::GEOM_Object_ptr thePnt2);
184 GEOM::GEOM_Object_ptr MakeLineTwoFaces (GEOM::GEOM_Object_ptr theFace1,
185 GEOM::GEOM_Object_ptr theFace2);
186 GEOM::GEOM_Object_ptr MakePlaneThreePnt (GEOM::GEOM_Object_ptr thePnt1,
187 GEOM::GEOM_Object_ptr thePnt2,
188 GEOM::GEOM_Object_ptr thePnt3,
189 CORBA::Double theTrimSize);
190 GEOM::GEOM_Object_ptr MakePlanePntVec (GEOM::GEOM_Object_ptr thePnt,
191 GEOM::GEOM_Object_ptr theVec,
192 CORBA::Double theTrimSize);
193 GEOM::GEOM_Object_ptr MakePlaneFace (GEOM::GEOM_Object_ptr theFace,
194 CORBA::Double theTrimSize);
195 GEOM::GEOM_Object_ptr MakePlane2Vec (GEOM::GEOM_Object_ptr theVec1,
196 GEOM::GEOM_Object_ptr theVec2,
197 CORBA::Double theTrimSize);
198 GEOM::GEOM_Object_ptr MakePlaneLCS (GEOM::GEOM_Object_ptr theLCS,
199 CORBA::Double theTrimSize,
200 CORBA::Double theOrientation);
201 GEOM::GEOM_Object_ptr MakeMarker (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ,
202 CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ,
203 CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ);
205 GEOM::GEOM_Object_ptr MakeMarkerFromShape (GEOM::GEOM_Object_ptr theShape);
207 GEOM::GEOM_Object_ptr MakeMarkerPntTwoVec (GEOM::GEOM_Object_ptr theOrigin,
208 GEOM::GEOM_Object_ptr theXVec,
209 GEOM::GEOM_Object_ptr theYVec);
211 GEOM::GEOM_Object_ptr MakeTangentPlaneOnFace (GEOM::GEOM_Object_ptr theFace,
212 CORBA::Double theParameterU,
213 CORBA::Double theParameterV,
214 CORBA::Double theTrimSize);
216 //-----------------------------------------------------------//
217 // Primitives Construction : 3DPrimOperations //
218 //-----------------------------------------------------------//
219 GEOM::GEOM_Object_ptr MakeBox (CORBA::Double theX1,
224 CORBA::Double theZ2);
225 GEOM::GEOM_Object_ptr MakeBoxDXDYDZ (CORBA::Double theDX,
227 CORBA::Double theDZ);
228 GEOM::GEOM_Object_ptr MakeBoxTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
229 GEOM::GEOM_Object_ptr thePnt2);
230 GEOM::GEOM_Object_ptr MakeFaceHW (CORBA::Double theH,
232 CORBA::Short theOrientation);
233 GEOM::GEOM_Object_ptr MakeFaceObjHW (GEOM::GEOM_Object_ptr theObj,
236 GEOM::GEOM_Object_ptr MakeDiskPntVecR (GEOM::GEOM_Object_ptr theCenter,
237 GEOM::GEOM_Object_ptr theVector,
239 GEOM::GEOM_Object_ptr MakeDiskThreePnt (GEOM::GEOM_Object_ptr thePnt1,
240 GEOM::GEOM_Object_ptr thePnt2,
241 GEOM::GEOM_Object_ptr thePnt3);
242 GEOM::GEOM_Object_ptr MakeDiskR (CORBA::Double theR,
243 CORBA::Short theOrientation);
244 GEOM::GEOM_Object_ptr MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt,
245 GEOM::GEOM_Object_ptr theAxis,
246 CORBA::Double theRadius,
247 CORBA::Double theHeight);
248 GEOM::GEOM_Object_ptr MakeCylinderRH (CORBA::Double theR,
250 GEOM::GEOM_Object_ptr MakeSphere (CORBA::Double theX,
253 CORBA::Double theRadius);
254 GEOM::GEOM_Object_ptr MakeSphereR (CORBA::Double theR);
255 GEOM::GEOM_Object_ptr MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt,
257 GEOM::GEOM_Object_ptr MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
258 GEOM::GEOM_Object_ptr theVec,
259 CORBA::Double theRMajor,
260 CORBA::Double theRMinor);
261 GEOM::GEOM_Object_ptr MakeTorusRR (CORBA::Double theRMajor,
262 CORBA::Double theRMinor);
263 GEOM::GEOM_Object_ptr MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
264 GEOM::GEOM_Object_ptr theAxis,
267 CORBA::Double theHeight);
268 GEOM::GEOM_Object_ptr MakeConeR1R2H (CORBA::Double theR1,
270 CORBA::Double theHeight);
271 GEOM::GEOM_Object_ptr MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
272 GEOM::GEOM_Object_ptr theVec,
274 GEOM::GEOM_Object_ptr MakePrismVecH2Ways (GEOM::GEOM_Object_ptr theBase,
275 GEOM::GEOM_Object_ptr theVec,
277 GEOM::GEOM_Object_ptr MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
278 GEOM::GEOM_Object_ptr thePoint1,
279 GEOM::GEOM_Object_ptr thePoint2);
280 GEOM::GEOM_Object_ptr MakePrismTwoPnt2Ways (GEOM::GEOM_Object_ptr theBase,
281 GEOM::GEOM_Object_ptr thePoint1,
282 GEOM::GEOM_Object_ptr thePoint2);
283 GEOM::GEOM_Object_ptr MakePrismDXDYDZ (GEOM::GEOM_Object_ptr theBase,
286 CORBA::Double theDZ);
287 GEOM::GEOM_Object_ptr MakePrismDXDYDZ2Ways (GEOM::GEOM_Object_ptr theBase,
290 CORBA::Double theDZ);
291 GEOM::GEOM_Object_ptr MakePipe (GEOM::GEOM_Object_ptr theBase,
292 GEOM::GEOM_Object_ptr thePath);
293 GEOM::GEOM_Object_ptr MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
294 GEOM::GEOM_Object_ptr theAxis,
295 CORBA::Double theAngle);
296 GEOM::GEOM_Object_ptr MakeRevolutionAxisAngle2Ways (GEOM::GEOM_Object_ptr theBase,
297 GEOM::GEOM_Object_ptr theAxis,
298 CORBA::Double theAngle);
299 GEOM::GEOM_Object_ptr MakeFilling (GEOM::GEOM_Object_ptr theShape,
300 CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
301 CORBA::Double theTol2D, CORBA::Double theTol3D,
302 CORBA::Long theNbIter,
303 GEOM::filling_oper_method theMethod,
304 CORBA::Boolean theApprox);
306 GEOM::GEOM_Object_ptr MakeThruSections(const GEOM::ListOfGO& theSeqSections,
307 CORBA::Boolean theModeSolid,
308 CORBA::Double thePreci,
309 CORBA::Boolean theRuled);
311 GEOM::GEOM_Object_ptr MakePipeWithDifferentSections(const GEOM::ListOfGO& theBases,
312 const GEOM::ListOfGO& theLocations,
313 GEOM::GEOM_Object_ptr thePath,
314 CORBA::Boolean theWithContact,
315 CORBA::Boolean theWithCorrections);
317 GEOM::GEOM_Object_ptr MakePipeWithShellSections(const GEOM::ListOfGO& theBases,
318 const GEOM::ListOfGO& theSubBases,
319 const GEOM::ListOfGO& theLocations,
320 GEOM::GEOM_Object_ptr thePath,
321 CORBA::Boolean theWithContact,
322 CORBA::Boolean theWithCorrections);
324 GEOM::GEOM_Object_ptr MakePipeShellsWithoutPath(const GEOM::ListOfGO& theBases,
325 const GEOM::ListOfGO& theLocations);
327 GEOM::GEOM_Object_ptr MakePipeBiNormalAlongVector (GEOM::GEOM_Object_ptr theBase,
328 GEOM::GEOM_Object_ptr thePath,
329 GEOM::GEOM_Object_ptr theVec);
331 //-----------------------------------------------------------//
332 // BooleanOperations //
333 //-----------------------------------------------------------//
334 GEOM::GEOM_Object_ptr MakeBoolean (GEOM::GEOM_Object_ptr theShape1,
335 GEOM::GEOM_Object_ptr theShape2,
336 CORBA::Long theOperation);
337 GEOM::GEOM_Object_ptr MakeFuse (GEOM::GEOM_Object_ptr theShape1,
338 GEOM::GEOM_Object_ptr theShape2);
339 GEOM::GEOM_Object_ptr MakePartition (GEOM::GEOM_List_ptr theShapes,
340 GEOM::GEOM_List_ptr theTools,
341 GEOM::GEOM_List_ptr theKeepInside,
342 GEOM::GEOM_List_ptr theRemoveInside,
343 CORBA::Short theLimit,
344 CORBA::Boolean theRemoveWebs,
345 GEOM::GEOM_List_ptr theMaterials,
346 CORBA::Short theKeepNonlimitShapes);
347 GEOM::GEOM_Object_ptr MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
348 GEOM::GEOM_Object_ptr thePlane);
350 //-----------------------------------------------------------//
351 // InsertOperations //
352 //-----------------------------------------------------------//
353 GEOM::GEOM_Object_ptr MakeCopy (GEOM::GEOM_Object_ptr theOriginal);
354 void Export (GEOM::GEOM_Object_ptr theObject,
355 const char* theFileName,
356 const char* theFormatName);
357 GEOM::GEOM_Object_ptr ImportFile (const char* theFileName,
358 const char* theFormatName);
359 void ImportTranslators (GEOM::string_array_out theFormats,
360 GEOM::string_array_out thePatterns);
361 void ExportTranslators (GEOM::string_array_out theFormats,
362 GEOM::string_array_out thePatterns);
364 //-----------------------------------------------------------//
365 // TransformOperations //
366 //-----------------------------------------------------------//
367 GEOM::GEOM_Object_ptr TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
368 GEOM::GEOM_Object_ptr thePoint1,
369 GEOM::GEOM_Object_ptr thePoint2);
370 GEOM::GEOM_Object_ptr TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
371 GEOM::GEOM_Object_ptr thePoint1,
372 GEOM::GEOM_Object_ptr thePoint2);
373 GEOM::GEOM_Object_ptr TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
376 CORBA::Double theDZ);
377 GEOM::GEOM_Object_ptr TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
380 CORBA::Double theDZ);
381 GEOM::GEOM_Object_ptr TranslateVector (GEOM::GEOM_Object_ptr theObject,
382 GEOM::GEOM_Object_ptr theVector);
383 GEOM::GEOM_Object_ptr TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
384 GEOM::GEOM_Object_ptr theVector);
385 GEOM::GEOM_Object_ptr TranslateVectorDistance (GEOM::GEOM_Object_ptr theObject,
386 GEOM::GEOM_Object_ptr theVector,
387 CORBA::Double theDistance,
388 CORBA::Boolean theCopy);
389 GEOM::GEOM_Object_ptr MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
390 GEOM::GEOM_Object_ptr theVector,
391 CORBA::Double theStep,
392 CORBA::Long theNbTimes);
393 GEOM::GEOM_Object_ptr MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
394 GEOM::GEOM_Object_ptr theVector1,
395 CORBA::Double theStep1,
396 CORBA::Long theNbTimes1,
397 GEOM::GEOM_Object_ptr theVector2,
398 CORBA::Double theStep2,
399 CORBA::Long theNbTimes2);
400 GEOM::GEOM_Object_ptr Rotate (GEOM::GEOM_Object_ptr theObject,
401 GEOM::GEOM_Object_ptr theAxis,
402 CORBA::Double theAngle);
403 GEOM::GEOM_Object_ptr RotateCopy (GEOM::GEOM_Object_ptr theObject,
404 GEOM::GEOM_Object_ptr theAxis,
405 CORBA::Double theAngle);
407 GEOM::GEOM_Object_ptr RotateThreePoints (GEOM::GEOM_Object_ptr theObject,
408 GEOM::GEOM_Object_ptr theCentPoint,
409 GEOM::GEOM_Object_ptr thePoint1,
410 GEOM::GEOM_Object_ptr thePoint2);
412 GEOM::GEOM_Object_ptr RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject,
413 GEOM::GEOM_Object_ptr theCentPoint,
414 GEOM::GEOM_Object_ptr thePoint1,
415 GEOM::GEOM_Object_ptr thePoint2);
417 GEOM::GEOM_Object_ptr MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
418 GEOM::GEOM_Object_ptr theAxis,
419 CORBA::Long theNbTimes);
420 GEOM::GEOM_Object_ptr MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
421 GEOM::GEOM_Object_ptr theAxis,
422 CORBA::Double theAngle,
423 CORBA::Long theNbTimes1,
424 CORBA::Double theStep,
425 CORBA::Long theNbTimes2);
426 GEOM::GEOM_Object_ptr MirrorPlane (GEOM::GEOM_Object_ptr theObject,
427 GEOM::GEOM_Object_ptr thePlane);
428 GEOM::GEOM_Object_ptr MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject,
429 GEOM::GEOM_Object_ptr thePlane);
430 GEOM::GEOM_Object_ptr MirrorAxis (GEOM::GEOM_Object_ptr theObject,
431 GEOM::GEOM_Object_ptr theAxis);
432 GEOM::GEOM_Object_ptr MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject,
433 GEOM::GEOM_Object_ptr theAxis);
434 GEOM::GEOM_Object_ptr MirrorPoint (GEOM::GEOM_Object_ptr theObject,
435 GEOM::GEOM_Object_ptr thePoint);
436 GEOM::GEOM_Object_ptr MirrorPointCopy (GEOM::GEOM_Object_ptr theObject,
437 GEOM::GEOM_Object_ptr thePoint);
438 GEOM::GEOM_Object_ptr OffsetShape (GEOM::GEOM_Object_ptr theObject,
439 CORBA::Double theOffset);
440 GEOM::GEOM_Object_ptr OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
441 CORBA::Double theOffset);
442 GEOM::GEOM_Object_ptr ScaleShape (GEOM::GEOM_Object_ptr theObject,
443 GEOM::GEOM_Object_ptr thePoint,
444 CORBA::Double theFactor);
445 GEOM::GEOM_Object_ptr ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject,
446 GEOM::GEOM_Object_ptr thePoint,
447 CORBA::Double theFactor);
448 GEOM::GEOM_Object_ptr ScaleShapeAlongAxes (GEOM::GEOM_Object_ptr theObject,
449 GEOM::GEOM_Object_ptr thePoint,
450 CORBA::Double theFactorX,
451 CORBA::Double theFactorY,
452 CORBA::Double theFactorZ);
453 GEOM::GEOM_Object_ptr ScaleShapeAlongAxesCopy (GEOM::GEOM_Object_ptr theObject,
454 GEOM::GEOM_Object_ptr thePoint,
455 CORBA::Double theFactorX,
456 CORBA::Double theFactorY,
457 CORBA::Double theFactorZ);
458 GEOM::GEOM_Object_ptr PositionShape (GEOM::GEOM_Object_ptr theObject,
459 GEOM::GEOM_Object_ptr theStartLCS,
460 GEOM::GEOM_Object_ptr theEndLCS);
461 GEOM::GEOM_Object_ptr PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
462 GEOM::GEOM_Object_ptr theStartLCS,
463 GEOM::GEOM_Object_ptr theEndLCS);
464 GEOM::GEOM_Object_ptr PositionAlongPath (GEOM::GEOM_Object_ptr theObject,
465 GEOM::GEOM_Object_ptr thePath,
466 CORBA::Double theDistance,
467 CORBA::Boolean theCopy,
468 CORBA::Boolean theReverse);
470 //-----------------------------------------------------------//
471 // ShapesOperations //
472 //-----------------------------------------------------------//
473 GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
474 GEOM::GEOM_Object_ptr thePnt2);
475 GEOM::GEOM_Object_ptr MakeEdgeOnCurveByLength (GEOM::GEOM_Object_ptr theRefCurve,
476 CORBA::Double theLength,
477 GEOM::GEOM_Object_ptr theStartPoint);
478 GEOM::GEOM_Object_ptr MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires,
479 CORBA::Double theTolerance);
480 GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire,
481 CORBA::Boolean isPlanarWanted);
482 GEOM::GEOM_Object_ptr MakeFaceWires (GEOM::GEOM_List_ptr theWires,
483 CORBA::Boolean isPlanarWanted);
484 GEOM::GEOM_Object_ptr MakeShell (GEOM::GEOM_List_ptr theFacesAndShells);
485 GEOM::GEOM_Object_ptr MakeSolidShell (GEOM::GEOM_Object_ptr theShell);
486 GEOM::GEOM_Object_ptr MakeSolidShells (GEOM::GEOM_List_ptr theShells);
487 GEOM::GEOM_Object_ptr MakeCompound (GEOM::GEOM_List_ptr theShapes);
488 GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
489 CORBA::Double theTolerance,
490 CORBA::Boolean doKeepNonSolids);
491 GEOM::GEOM_List_ptr GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
492 CORBA::Double theTolerance);
493 GEOM::GEOM_Object_ptr MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
494 CORBA::Double theTolerance,
495 const GEOM::ListOfGO& theFaces,
496 CORBA::Boolean doKeepNonSolids,
497 CORBA::Boolean doGlueAllEdges);
498 GEOM::GEOM_List_ptr MakeExplode (GEOM::GEOM_Object_ptr theShape,
499 CORBA::Long theShapeType,
500 CORBA::Boolean isSorted);
501 CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape);
502 CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape);
503 GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape);
505 GEOM::GEOM_List_ptr GetShapesOnShape (GEOM::GEOM_Object_ptr theCheckShape,
506 GEOM::GEOM_Object_ptr theShape,
507 CORBA::Short theShapeType,
508 GEOM::shape_state theState);
509 GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound
510 (GEOM::GEOM_Object_ptr theCheckShape,
511 GEOM::GEOM_Object_ptr theShape,
512 CORBA::Short theShapeType,
513 GEOM::shape_state theState);
516 //-----------------------------------------------------------//
517 // BlocksOperations //
518 //-----------------------------------------------------------//
519 GEOM::GEOM_Object_ptr MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
520 GEOM::GEOM_Object_ptr thePnt2,
521 GEOM::GEOM_Object_ptr thePnt3,
522 GEOM::GEOM_Object_ptr thePnt4);
523 GEOM::GEOM_Object_ptr MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
524 GEOM::GEOM_Object_ptr theEdge2,
525 GEOM::GEOM_Object_ptr theEdge3,
526 GEOM::GEOM_Object_ptr theEdge4);
527 GEOM::GEOM_Object_ptr MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
528 GEOM::GEOM_Object_ptr theEdge2);
529 GEOM::GEOM_Object_ptr MakeHexa (GEOM::GEOM_Object_ptr theFace1,
530 GEOM::GEOM_Object_ptr theFace2,
531 GEOM::GEOM_Object_ptr theFace3,
532 GEOM::GEOM_Object_ptr theFace4,
533 GEOM::GEOM_Object_ptr theFace5,
534 GEOM::GEOM_Object_ptr theFace6);
535 GEOM::GEOM_Object_ptr MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
536 GEOM::GEOM_Object_ptr theFace2);
537 GEOM::GEOM_Object_ptr GetPoint (GEOM::GEOM_Object_ptr theShape,
541 CORBA::Double theEpsilon);
542 GEOM::GEOM_Object_ptr GetEdge (GEOM::GEOM_Object_ptr theShape,
543 GEOM::GEOM_Object_ptr thePoint1,
544 GEOM::GEOM_Object_ptr thePoint2);
545 GEOM::GEOM_Object_ptr GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
546 GEOM::GEOM_Object_ptr thePoint);
547 GEOM::GEOM_Object_ptr GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
548 GEOM::GEOM_Object_ptr thePoint1,
549 GEOM::GEOM_Object_ptr thePoint2,
550 GEOM::GEOM_Object_ptr thePoint3,
551 GEOM::GEOM_Object_ptr thePoint4);
552 GEOM::GEOM_Object_ptr GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
553 GEOM::GEOM_Object_ptr theEdge1,
554 GEOM::GEOM_Object_ptr theEdge2);
555 GEOM::GEOM_Object_ptr GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
556 GEOM::GEOM_Object_ptr theFace);
557 GEOM::GEOM_Object_ptr GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
558 GEOM::GEOM_Object_ptr thePoint);
559 GEOM::GEOM_Object_ptr GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
560 GEOM::GEOM_Object_ptr theVector);
561 CORBA::Boolean IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
562 CORBA::Long theMinNbFaces,
563 CORBA::Long theMaxNbFaces,
564 CORBA::Long& theNbBlocks);
565 CORBA::Boolean CheckCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
566 GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors);
567 char* PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
568 const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors);
569 GEOM::GEOM_List_ptr ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
570 CORBA::Long theMinNbFaces,
571 CORBA::Long theMaxNbFaces);
572 GEOM::GEOM_Object_ptr GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
573 GEOM::GEOM_Object_ptr thePoint);
574 GEOM::GEOM_Object_ptr GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
575 GEOM::GEOM_List_ptr theParts);
576 GEOM::GEOM_List_ptr GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
577 GEOM::GEOM_List_ptr theParts);
578 GEOM::GEOM_Object_ptr MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
579 CORBA::Long theDirFace1,
580 CORBA::Long theDirFace2,
581 CORBA::Long theNbTimes);
582 GEOM::GEOM_Object_ptr MakeMultiTransformation2D (GEOM::GEOM_Object_ptr theBlock,
583 CORBA::Long theDirFace1U,
584 CORBA::Long theDirFace2U,
585 CORBA::Long theNbTimesU,
586 CORBA::Long theDirFace1V,
587 CORBA::Long theDirFace2V,
588 CORBA::Long theNbTimesV);
590 //-----------------------------------------------------------//
591 // CurvesOperations //
592 //-----------------------------------------------------------//
593 GEOM::GEOM_Object_ptr MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
594 GEOM::GEOM_Object_ptr theVector,
596 GEOM::GEOM_Object_ptr MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
597 GEOM::GEOM_Object_ptr thePnt2,
598 GEOM::GEOM_Object_ptr thePnt3);
599 GEOM::GEOM_Object_ptr MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
600 GEOM::GEOM_Object_ptr thePnt2,
601 GEOM::GEOM_Object_ptr thePnt3);
602 GEOM::GEOM_Object_ptr MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
603 GEOM::GEOM_Object_ptr theVector,
604 CORBA::Double theRMajor, CORBA::Double theRMinor);
605 GEOM::GEOM_Object_ptr MakeEllipseVec (GEOM::GEOM_Object_ptr theCenter,
606 GEOM::GEOM_Object_ptr theVector,
607 CORBA::Double theRMajor, CORBA::Double theRMinor,
608 GEOM::GEOM_Object_ptr theVectorMajor);
609 GEOM::GEOM_Object_ptr MakeArc (GEOM::GEOM_Object_ptr thePnt1,
610 GEOM::GEOM_Object_ptr thePnt2,
611 GEOM::GEOM_Object_ptr thePnt3);
612 GEOM::GEOM_Object_ptr MakeArcCenter (GEOM::GEOM_Object_ptr theCenter,
613 GEOM::GEOM_Object_ptr thePnt1,
614 GEOM::GEOM_Object_ptr thePnt2,
615 CORBA::Boolean theSense);
616 GEOM::GEOM_Object_ptr MakeArcOfEllipse (GEOM::GEOM_Object_ptr thePnt1,
617 GEOM::GEOM_Object_ptr thePnt2,
618 GEOM::GEOM_Object_ptr thePnt3);
619 GEOM::GEOM_Object_ptr MakePolyline (GEOM::GEOM_List_ptr thePoints,
620 CORBA::Boolean theIsClosed);
621 GEOM::GEOM_Object_ptr MakeSplineBezier (GEOM::GEOM_List_ptr thePoints,
622 CORBA::Boolean theIsClosed);
623 GEOM::GEOM_Object_ptr MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints,
624 CORBA::Boolean theIsClosed,
625 CORBA::Boolean theDoReordering);
626 GEOM::GEOM_Object_ptr MakeSketcher (const char* theCommand,
627 GEOM::GEOM_List_ptr theWorkingPlane);
628 GEOM::GEOM_Object_ptr Make3DSketcher (GEOM::GEOM_List_ptr theCoordinates);
630 //-----------------------------------------------------------//
631 // LocalOperations //
632 //-----------------------------------------------------------//
633 GEOM::GEOM_Object_ptr MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
635 GEOM::GEOM_Object_ptr MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
636 GEOM::GEOM_List_ptr theEdges);
637 GEOM::GEOM_Object_ptr MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
638 CORBA::Double theR2, GEOM::GEOM_List_ptr theEdges);
639 GEOM::GEOM_Object_ptr MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
640 GEOM::GEOM_List_ptr theFaces);
641 GEOM::GEOM_Object_ptr MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
642 CORBA::Double theR2, GEOM::GEOM_List_ptr theFaces);
643 GEOM::GEOM_Object_ptr MakeFillet2D (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
644 GEOM::GEOM_List_ptr theVertexes);
645 GEOM::GEOM_Object_ptr MakeFillet1D (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
646 GEOM::GEOM_List_ptr theVertexes, CORBA::Boolean doIgnoreSecantVertices);
647 GEOM::GEOM_Object_ptr MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD);
648 GEOM::GEOM_Object_ptr MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
649 CORBA::Double theD1, CORBA::Double theD2,
650 CORBA::Long theFace1, CORBA::Long theFace2);
651 GEOM::GEOM_Object_ptr MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
652 CORBA::Double theD, CORBA::Double theAngle,
653 CORBA::Long theFace1, CORBA::Long theFace2);
654 GEOM::GEOM_Object_ptr MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
655 CORBA::Double theD1, CORBA::Double theD2,
656 GEOM::GEOM_List_ptr theFaces);
657 GEOM::GEOM_Object_ptr MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
658 CORBA::Double theD, CORBA::Double theAngle,
659 GEOM::GEOM_List_ptr theFaces);
660 GEOM::GEOM_Object_ptr MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
661 CORBA::Double theD1, CORBA::Double theD2,
662 GEOM::GEOM_List_ptr theEdges);
663 GEOM::GEOM_Object_ptr MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
664 CORBA::Double theD, CORBA::Double theAngle,
665 GEOM::GEOM_List_ptr theEdges);
666 GEOM::GEOM_Object_ptr MakeArchimede (GEOM::GEOM_Object_ptr theShape,
667 CORBA::Double theWeight,
668 CORBA::Double theWaterDensity,
669 CORBA::Double theMeshingDeflection);
670 CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
671 GEOM::GEOM_Object_ptr theSubShape);
673 //-----------------------------------------------------------//
674 // GroupOperations //
675 //-----------------------------------------------------------//
676 GEOM::GEOM_Object_ptr CreateGroup (GEOM::GEOM_Object_ptr theMainShape,
677 CORBA::Long theShapeType);
678 void AddObject (GEOM::GEOM_Object_ptr theGroup,
679 CORBA::Long theSubShapeId);
680 void RemoveObject (GEOM::GEOM_Object_ptr theGroup,
681 CORBA::Long theSubShapeId);
682 CORBA::Long GetType (GEOM::GEOM_Object_ptr theGroup);
683 GEOM::GEOM_Object_ptr GetMainShape (GEOM::GEOM_Object_ptr theGroup);
684 GEOM::GEOM_List_ptr GetObjects (GEOM::GEOM_Object_ptr theGroup);
686 //-----------------------------------------------------------//
687 // Advanced Operations //
688 //-----------------------------------------------------------//
689 GEOM::GEOM_List_ptr MakePipeTShape (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
690 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
691 CORBA::Boolean theHexMesh);
692 GEOM::GEOM_List_ptr MakePipeTShapeWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
693 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
694 CORBA::Boolean theHexMesh,
695 GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
696 GEOM::GEOM_List_ptr MakePipeTShapeChamfer (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
697 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
698 CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh);
699 GEOM::GEOM_List_ptr MakePipeTShapeChamferWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
700 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
701 CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
702 GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
703 GEOM::GEOM_List_ptr MakePipeTShapeFillet (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
704 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
705 CORBA::Double theRF, CORBA::Boolean theHexMesh);
706 GEOM::GEOM_List_ptr MakePipeTShapeFilletWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
707 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
708 CORBA::Double theRF, CORBA::Boolean theHexMesh,
709 GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
710 GEOM::GEOM_Object_ptr MakeDividedDisk (CORBA::Double theR, CORBA::Double theRatio,
711 CORBA::Short theOrientation, GEOM::pattern thePattern);
712 GEOM::GEOM_Object_ptr MakeDividedCylinder (CORBA::Double theR,
714 GEOM::pattern thePattern);
715 //-----------------------------------------------------------//
716 // ImportExport Operations //
717 //-----------------------------------------------------------//
718 CORBA::Boolean ExportXAO (GEOM::GEOM_Object_ptr theExportingShape, const char* theFileName, GEOM::GEOM_List_ptr thelGroups, GEOM::GEOM_List_ptr thelFields);
719 /*@@ insert new functions before this line @@ do not remove this line @@*/
722 SALOME_NamingService * name_service;
723 GEOM::GEOM_Gen_var myGeomEngine;
724 CORBA::Long myStudyID;
725 CORBA::Long myLastStudyID; // mkr : PAL10770
726 PortableServer::POA_var myPOA;
728 GEOM::GEOM_IBasicOperations_var myBasicOp;
729 GEOM::GEOM_I3DPrimOperations_var my3DPrimOp;
730 GEOM::GEOM_IBooleanOperations_var myBoolOp;
731 GEOM::GEOM_IInsertOperations_var myInsOp;
732 GEOM::GEOM_ITransformOperations_var myTransfOp;
733 GEOM::GEOM_IShapesOperations_var myShapesOp;
734 GEOM::GEOM_IBlocksOperations_var myBlocksOp;
735 GEOM::GEOM_ICurvesOperations_var myCurvesOp;
736 GEOM::GEOM_ILocalOperations_var myLocalOp;
737 GEOM::GEOM_IGroupOperations_var myGroupOp;
738 GEOM::GEOM_IAdvancedOperations_var myAdvancedOp;