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