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 MakePointOnCurveByLength (GEOM::GEOM_Object_ptr theRefCurve,
154 CORBA::Double theLength,
155 CORBA::Double theDirection);
156 GEOM::GEOM_Object_ptr MakePointOnCurveByCoord (GEOM::GEOM_Object_ptr theRefCurve,
157 CORBA::Double theXParameter,
158 CORBA::Double theYParameter,
159 CORBA::Double theZParameter);
160 GEOM::GEOM_Object_ptr MakePointOnSurface (GEOM::GEOM_Object_ptr theRefSurface,
161 CORBA::Double theUParameter,
162 CORBA::Double theVParameter);
163 GEOM::GEOM_Object_ptr MakePointOnSurfaceByCoord (GEOM::GEOM_Object_ptr theRefSurface,
164 CORBA::Double theXParameter,
165 CORBA::Double theYParameter,
166 CORBA::Double theZParameter);
167 GEOM::GEOM_Object_ptr MakePointOnLinesIntersection (GEOM::GEOM_Object_ptr theRefLine1,
168 GEOM::GEOM_Object_ptr theRefLine2);
169 GEOM::GEOM_Object_ptr MakeTangentOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
170 CORBA::Double theParameter);
171 GEOM::GEOM_Object_ptr MakeVectorDXDYDZ (CORBA::Double theDX,
173 CORBA::Double theDZ);
174 GEOM::GEOM_Object_ptr MakeVectorTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
175 GEOM::GEOM_Object_ptr thePnt2);
176 GEOM::GEOM_Object_ptr MakeLineTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
177 GEOM::GEOM_Object_ptr thePnt2);
178 GEOM::GEOM_Object_ptr MakeLineTwoFaces (GEOM::GEOM_Object_ptr theFace1,
179 GEOM::GEOM_Object_ptr theFace2);
180 GEOM::GEOM_Object_ptr MakePlaneThreePnt (GEOM::GEOM_Object_ptr thePnt1,
181 GEOM::GEOM_Object_ptr thePnt2,
182 GEOM::GEOM_Object_ptr thePnt3,
183 CORBA::Double theTrimSize);
184 GEOM::GEOM_Object_ptr MakePlanePntVec (GEOM::GEOM_Object_ptr thePnt,
185 GEOM::GEOM_Object_ptr theVec,
186 CORBA::Double theTrimSize);
187 GEOM::GEOM_Object_ptr MakePlaneFace (GEOM::GEOM_Object_ptr theFace,
188 CORBA::Double theTrimSize);
189 GEOM::GEOM_Object_ptr MakePlane2Vec (GEOM::GEOM_Object_ptr theVec1,
190 GEOM::GEOM_Object_ptr theVec2,
191 CORBA::Double theTrimSize);
192 GEOM::GEOM_Object_ptr MakePlaneLCS (GEOM::GEOM_Object_ptr theLCS,
193 CORBA::Double theTrimSize,
194 CORBA::Double theOrientation);
195 GEOM::GEOM_Object_ptr MakeMarker (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ,
196 CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ,
197 CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ);
199 GEOM::GEOM_Object_ptr MakeMarkerFromShape (GEOM::GEOM_Object_ptr theShape);
201 GEOM::GEOM_Object_ptr MakeMarkerPntTwoVec (GEOM::GEOM_Object_ptr theOrigin,
202 GEOM::GEOM_Object_ptr theXVec,
203 GEOM::GEOM_Object_ptr theYVec);
205 GEOM::GEOM_Object_ptr MakeTangentPlaneOnFace (GEOM::GEOM_Object_ptr theFace,
206 CORBA::Double theParameterU,
207 CORBA::Double theParameterV,
208 CORBA::Double theTrimSize);
210 //-----------------------------------------------------------//
211 // Primitives Construction : 3DPrimOperations //
212 //-----------------------------------------------------------//
213 GEOM::GEOM_Object_ptr MakeBox (CORBA::Double theX1,
218 CORBA::Double theZ2);
219 GEOM::GEOM_Object_ptr MakeBoxDXDYDZ (CORBA::Double theDX,
221 CORBA::Double theDZ);
222 GEOM::GEOM_Object_ptr MakeBoxTwoPnt (GEOM::GEOM_Object_ptr thePnt1,
223 GEOM::GEOM_Object_ptr thePnt2);
224 GEOM::GEOM_Object_ptr MakeFaceHW (CORBA::Double theH,
226 CORBA::Short theOrientation);
227 GEOM::GEOM_Object_ptr MakeFaceObjHW (GEOM::GEOM_Object_ptr theObj,
230 GEOM::GEOM_Object_ptr MakeDiskPntVecR (GEOM::GEOM_Object_ptr theCenter,
231 GEOM::GEOM_Object_ptr theVector,
233 GEOM::GEOM_Object_ptr MakeDiskThreePnt (GEOM::GEOM_Object_ptr thePnt1,
234 GEOM::GEOM_Object_ptr thePnt2,
235 GEOM::GEOM_Object_ptr thePnt3);
236 GEOM::GEOM_Object_ptr MakeDiskR (CORBA::Double theR,
237 CORBA::Short theOrientation);
238 GEOM::GEOM_Object_ptr MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt,
239 GEOM::GEOM_Object_ptr theAxis,
240 CORBA::Double theRadius,
241 CORBA::Double theHeight);
242 GEOM::GEOM_Object_ptr MakeCylinderRH (CORBA::Double theR,
244 GEOM::GEOM_Object_ptr MakeSphere (CORBA::Double theX,
247 CORBA::Double theRadius);
248 GEOM::GEOM_Object_ptr MakeSphereR (CORBA::Double theR);
249 GEOM::GEOM_Object_ptr MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt,
251 GEOM::GEOM_Object_ptr MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
252 GEOM::GEOM_Object_ptr theVec,
253 CORBA::Double theRMajor,
254 CORBA::Double theRMinor);
255 GEOM::GEOM_Object_ptr MakeTorusRR (CORBA::Double theRMajor,
256 CORBA::Double theRMinor);
257 GEOM::GEOM_Object_ptr MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
258 GEOM::GEOM_Object_ptr theAxis,
261 CORBA::Double theHeight);
262 GEOM::GEOM_Object_ptr MakeConeR1R2H (CORBA::Double theR1,
264 CORBA::Double theHeight);
265 GEOM::GEOM_Object_ptr MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
266 GEOM::GEOM_Object_ptr theVec,
268 GEOM::GEOM_Object_ptr MakePrismVecH2Ways (GEOM::GEOM_Object_ptr theBase,
269 GEOM::GEOM_Object_ptr theVec,
271 GEOM::GEOM_Object_ptr MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
272 GEOM::GEOM_Object_ptr thePoint1,
273 GEOM::GEOM_Object_ptr thePoint2);
274 GEOM::GEOM_Object_ptr MakePrismTwoPnt2Ways (GEOM::GEOM_Object_ptr theBase,
275 GEOM::GEOM_Object_ptr thePoint1,
276 GEOM::GEOM_Object_ptr thePoint2);
277 GEOM::GEOM_Object_ptr MakePrismDXDYDZ (GEOM::GEOM_Object_ptr theBase,
280 CORBA::Double theDZ);
281 GEOM::GEOM_Object_ptr MakePrismDXDYDZ2Ways (GEOM::GEOM_Object_ptr theBase,
284 CORBA::Double theDZ);
285 GEOM::GEOM_Object_ptr MakePipe (GEOM::GEOM_Object_ptr theBase,
286 GEOM::GEOM_Object_ptr thePath);
287 GEOM::GEOM_Object_ptr MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
288 GEOM::GEOM_Object_ptr theAxis,
289 CORBA::Double theAngle);
290 GEOM::GEOM_Object_ptr MakeRevolutionAxisAngle2Ways (GEOM::GEOM_Object_ptr theBase,
291 GEOM::GEOM_Object_ptr theAxis,
292 CORBA::Double theAngle);
293 GEOM::GEOM_Object_ptr MakeFilling (GEOM::GEOM_Object_ptr theShape,
294 CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
295 CORBA::Double theTol2D, CORBA::Double theTol3D,
296 CORBA::Long theNbIter,
297 GEOM::filling_oper_method theMethod,
298 CORBA::Boolean theApprox);
300 GEOM::GEOM_Object_ptr MakeThruSections(const GEOM::ListOfGO& theSeqSections,
301 CORBA::Boolean theModeSolid,
302 CORBA::Double thePreci,
303 CORBA::Boolean theRuled);
305 GEOM::GEOM_Object_ptr MakePipeWithDifferentSections(const GEOM::ListOfGO& theBases,
306 const GEOM::ListOfGO& theLocations,
307 GEOM::GEOM_Object_ptr thePath,
308 CORBA::Boolean theWithContact,
309 CORBA::Boolean theWithCorrections);
311 GEOM::GEOM_Object_ptr MakePipeWithShellSections(const GEOM::ListOfGO& theBases,
312 const GEOM::ListOfGO& theSubBases,
313 const GEOM::ListOfGO& theLocations,
314 GEOM::GEOM_Object_ptr thePath,
315 CORBA::Boolean theWithContact,
316 CORBA::Boolean theWithCorrections);
318 GEOM::GEOM_Object_ptr MakePipeShellsWithoutPath(const GEOM::ListOfGO& theBases,
319 const GEOM::ListOfGO& theLocations);
321 GEOM::GEOM_Object_ptr MakePipeBiNormalAlongVector (GEOM::GEOM_Object_ptr theBase,
322 GEOM::GEOM_Object_ptr thePath,
323 GEOM::GEOM_Object_ptr theVec);
325 //-----------------------------------------------------------//
326 // BooleanOperations //
327 //-----------------------------------------------------------//
328 GEOM::GEOM_Object_ptr MakeBoolean (GEOM::GEOM_Object_ptr theShape1,
329 GEOM::GEOM_Object_ptr theShape2,
330 CORBA::Long theOperation);
331 GEOM::GEOM_Object_ptr MakeFuse (GEOM::GEOM_Object_ptr theShape1,
332 GEOM::GEOM_Object_ptr theShape2);
333 GEOM::GEOM_Object_ptr MakePartition (GEOM::GEOM_List_ptr theShapes,
334 GEOM::GEOM_List_ptr theTools,
335 GEOM::GEOM_List_ptr theKeepInside,
336 GEOM::GEOM_List_ptr theRemoveInside,
337 CORBA::Short theLimit,
338 CORBA::Boolean theRemoveWebs,
339 GEOM::GEOM_List_ptr theMaterials,
340 CORBA::Short theKeepNonlimitShapes);
341 GEOM::GEOM_Object_ptr MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
342 GEOM::GEOM_Object_ptr thePlane);
344 //-----------------------------------------------------------//
345 // InsertOperations //
346 //-----------------------------------------------------------//
347 GEOM::GEOM_Object_ptr MakeCopy (GEOM::GEOM_Object_ptr theOriginal);
348 void Export (GEOM::GEOM_Object_ptr theObject,
349 const char* theFileName,
350 const char* theFormatName);
351 GEOM::GEOM_Object_ptr Import (const char* theFileName,
352 const char* theFormatName);
353 void ImportTranslators (GEOM::string_array_out theFormats,
354 GEOM::string_array_out thePatterns);
355 void ExportTranslators (GEOM::string_array_out theFormats,
356 GEOM::string_array_out thePatterns);
358 //-----------------------------------------------------------//
359 // TransformOperations //
360 //-----------------------------------------------------------//
361 GEOM::GEOM_Object_ptr TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
362 GEOM::GEOM_Object_ptr thePoint1,
363 GEOM::GEOM_Object_ptr thePoint2);
364 GEOM::GEOM_Object_ptr TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
365 GEOM::GEOM_Object_ptr thePoint1,
366 GEOM::GEOM_Object_ptr thePoint2);
367 GEOM::GEOM_Object_ptr TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
370 CORBA::Double theDZ);
371 GEOM::GEOM_Object_ptr TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
374 CORBA::Double theDZ);
375 GEOM::GEOM_Object_ptr TranslateVector (GEOM::GEOM_Object_ptr theObject,
376 GEOM::GEOM_Object_ptr theVector);
377 GEOM::GEOM_Object_ptr TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
378 GEOM::GEOM_Object_ptr theVector);
379 GEOM::GEOM_Object_ptr TranslateVectorDistance (GEOM::GEOM_Object_ptr theObject,
380 GEOM::GEOM_Object_ptr theVector,
381 CORBA::Double theDistance,
382 CORBA::Boolean theCopy);
383 GEOM::GEOM_Object_ptr MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
384 GEOM::GEOM_Object_ptr theVector,
385 CORBA::Double theStep,
386 CORBA::Long theNbTimes);
387 GEOM::GEOM_Object_ptr MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
388 GEOM::GEOM_Object_ptr theVector1,
389 CORBA::Double theStep1,
390 CORBA::Long theNbTimes1,
391 GEOM::GEOM_Object_ptr theVector2,
392 CORBA::Double theStep2,
393 CORBA::Long theNbTimes2);
394 GEOM::GEOM_Object_ptr Rotate (GEOM::GEOM_Object_ptr theObject,
395 GEOM::GEOM_Object_ptr theAxis,
396 CORBA::Double theAngle);
397 GEOM::GEOM_Object_ptr RotateCopy (GEOM::GEOM_Object_ptr theObject,
398 GEOM::GEOM_Object_ptr theAxis,
399 CORBA::Double theAngle);
401 GEOM::GEOM_Object_ptr RotateThreePoints (GEOM::GEOM_Object_ptr theObject,
402 GEOM::GEOM_Object_ptr theCentPoint,
403 GEOM::GEOM_Object_ptr thePoint1,
404 GEOM::GEOM_Object_ptr thePoint2);
406 GEOM::GEOM_Object_ptr RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject,
407 GEOM::GEOM_Object_ptr theCentPoint,
408 GEOM::GEOM_Object_ptr thePoint1,
409 GEOM::GEOM_Object_ptr thePoint2);
411 GEOM::GEOM_Object_ptr MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
412 GEOM::GEOM_Object_ptr theAxis,
413 CORBA::Long theNbTimes);
414 GEOM::GEOM_Object_ptr MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
415 GEOM::GEOM_Object_ptr theAxis,
416 CORBA::Double theAngle,
417 CORBA::Long theNbTimes1,
418 CORBA::Double theStep,
419 CORBA::Long theNbTimes2);
420 GEOM::GEOM_Object_ptr MirrorPlane (GEOM::GEOM_Object_ptr theObject,
421 GEOM::GEOM_Object_ptr thePlane);
422 GEOM::GEOM_Object_ptr MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject,
423 GEOM::GEOM_Object_ptr thePlane);
424 GEOM::GEOM_Object_ptr MirrorAxis (GEOM::GEOM_Object_ptr theObject,
425 GEOM::GEOM_Object_ptr theAxis);
426 GEOM::GEOM_Object_ptr MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject,
427 GEOM::GEOM_Object_ptr theAxis);
428 GEOM::GEOM_Object_ptr MirrorPoint (GEOM::GEOM_Object_ptr theObject,
429 GEOM::GEOM_Object_ptr thePoint);
430 GEOM::GEOM_Object_ptr MirrorPointCopy (GEOM::GEOM_Object_ptr theObject,
431 GEOM::GEOM_Object_ptr thePoint);
432 GEOM::GEOM_Object_ptr OffsetShape (GEOM::GEOM_Object_ptr theObject,
433 CORBA::Double theOffset);
434 GEOM::GEOM_Object_ptr OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
435 CORBA::Double theOffset);
436 GEOM::GEOM_Object_ptr ScaleShape (GEOM::GEOM_Object_ptr theObject,
437 GEOM::GEOM_Object_ptr thePoint,
438 CORBA::Double theFactor);
439 GEOM::GEOM_Object_ptr ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject,
440 GEOM::GEOM_Object_ptr thePoint,
441 CORBA::Double theFactor);
442 GEOM::GEOM_Object_ptr ScaleShapeAlongAxes (GEOM::GEOM_Object_ptr theObject,
443 GEOM::GEOM_Object_ptr thePoint,
444 CORBA::Double theFactorX,
445 CORBA::Double theFactorY,
446 CORBA::Double theFactorZ);
447 GEOM::GEOM_Object_ptr ScaleShapeAlongAxesCopy (GEOM::GEOM_Object_ptr theObject,
448 GEOM::GEOM_Object_ptr thePoint,
449 CORBA::Double theFactorX,
450 CORBA::Double theFactorY,
451 CORBA::Double theFactorZ);
452 GEOM::GEOM_Object_ptr PositionShape (GEOM::GEOM_Object_ptr theObject,
453 GEOM::GEOM_Object_ptr theStartLCS,
454 GEOM::GEOM_Object_ptr theEndLCS);
455 GEOM::GEOM_Object_ptr PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
456 GEOM::GEOM_Object_ptr theStartLCS,
457 GEOM::GEOM_Object_ptr theEndLCS);
458 GEOM::GEOM_Object_ptr PositionAlongPath (GEOM::GEOM_Object_ptr theObject,
459 GEOM::GEOM_Object_ptr thePath,
460 CORBA::Double theDistance,
461 CORBA::Boolean theCopy,
462 CORBA::Boolean theReverse);
464 //-----------------------------------------------------------//
465 // ShapesOperations //
466 //-----------------------------------------------------------//
467 GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
468 GEOM::GEOM_Object_ptr thePnt2);
469 GEOM::GEOM_Object_ptr MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires,
470 CORBA::Double theTolerance);
471 GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire,
472 CORBA::Boolean isPlanarWanted);
473 GEOM::GEOM_Object_ptr MakeFaceWires (GEOM::GEOM_List_ptr theWires,
474 CORBA::Boolean isPlanarWanted);
475 GEOM::GEOM_Object_ptr MakeShell (GEOM::GEOM_List_ptr theFacesAndShells);
476 GEOM::GEOM_Object_ptr MakeSolidShell (GEOM::GEOM_Object_ptr theShell);
477 GEOM::GEOM_Object_ptr MakeSolidShells (GEOM::GEOM_List_ptr theShells);
478 GEOM::GEOM_Object_ptr MakeCompound (GEOM::GEOM_List_ptr theShapes);
479 GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
480 CORBA::Double theTolerance,
481 CORBA::Boolean doKeepNonSolids);
482 GEOM::GEOM_List_ptr GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
483 CORBA::Double theTolerance);
484 GEOM::GEOM_Object_ptr MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
485 CORBA::Double theTolerance,
486 const GEOM::ListOfGO& theFaces,
487 CORBA::Boolean doKeepNonSolids);
488 GEOM::GEOM_List_ptr MakeExplode (GEOM::GEOM_Object_ptr theShape,
489 CORBA::Long theShapeType,
490 CORBA::Boolean isSorted);
491 CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape);
492 CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape);
493 GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape);
495 GEOM::GEOM_List_ptr GetShapesOnShape (GEOM::GEOM_Object_ptr theCheckShape,
496 GEOM::GEOM_Object_ptr theShape,
497 CORBA::Short theShapeType,
498 GEOM::shape_state theState);
499 GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound
500 (GEOM::GEOM_Object_ptr theCheckShape,
501 GEOM::GEOM_Object_ptr theShape,
502 CORBA::Short theShapeType,
503 GEOM::shape_state theState);
506 //-----------------------------------------------------------//
507 // BlocksOperations //
508 //-----------------------------------------------------------//
509 GEOM::GEOM_Object_ptr MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
510 GEOM::GEOM_Object_ptr thePnt2,
511 GEOM::GEOM_Object_ptr thePnt3,
512 GEOM::GEOM_Object_ptr thePnt4);
513 GEOM::GEOM_Object_ptr MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
514 GEOM::GEOM_Object_ptr theEdge2,
515 GEOM::GEOM_Object_ptr theEdge3,
516 GEOM::GEOM_Object_ptr theEdge4);
517 GEOM::GEOM_Object_ptr MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
518 GEOM::GEOM_Object_ptr theEdge2);
519 GEOM::GEOM_Object_ptr MakeHexa (GEOM::GEOM_Object_ptr theFace1,
520 GEOM::GEOM_Object_ptr theFace2,
521 GEOM::GEOM_Object_ptr theFace3,
522 GEOM::GEOM_Object_ptr theFace4,
523 GEOM::GEOM_Object_ptr theFace5,
524 GEOM::GEOM_Object_ptr theFace6);
525 GEOM::GEOM_Object_ptr MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
526 GEOM::GEOM_Object_ptr theFace2);
527 GEOM::GEOM_Object_ptr GetPoint (GEOM::GEOM_Object_ptr theShape,
531 CORBA::Double theEpsilon);
532 GEOM::GEOM_Object_ptr GetEdge (GEOM::GEOM_Object_ptr theShape,
533 GEOM::GEOM_Object_ptr thePoint1,
534 GEOM::GEOM_Object_ptr thePoint2);
535 GEOM::GEOM_Object_ptr GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
536 GEOM::GEOM_Object_ptr thePoint);
537 GEOM::GEOM_Object_ptr GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
538 GEOM::GEOM_Object_ptr thePoint1,
539 GEOM::GEOM_Object_ptr thePoint2,
540 GEOM::GEOM_Object_ptr thePoint3,
541 GEOM::GEOM_Object_ptr thePoint4);
542 GEOM::GEOM_Object_ptr GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
543 GEOM::GEOM_Object_ptr theEdge1,
544 GEOM::GEOM_Object_ptr theEdge2);
545 GEOM::GEOM_Object_ptr GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
546 GEOM::GEOM_Object_ptr theFace);
547 GEOM::GEOM_Object_ptr GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
548 GEOM::GEOM_Object_ptr thePoint);
549 GEOM::GEOM_Object_ptr GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
550 GEOM::GEOM_Object_ptr theVector);
551 CORBA::Boolean IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
552 CORBA::Long theMinNbFaces,
553 CORBA::Long theMaxNbFaces,
554 CORBA::Long& theNbBlocks);
555 CORBA::Boolean CheckCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
556 GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors);
557 char* PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
558 const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors);
559 GEOM::GEOM_List_ptr ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
560 CORBA::Long theMinNbFaces,
561 CORBA::Long theMaxNbFaces);
562 GEOM::GEOM_Object_ptr GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
563 GEOM::GEOM_Object_ptr thePoint);
564 GEOM::GEOM_Object_ptr GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
565 GEOM::GEOM_List_ptr theParts);
566 GEOM::GEOM_List_ptr GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
567 GEOM::GEOM_List_ptr theParts);
568 GEOM::GEOM_Object_ptr MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
569 CORBA::Long theDirFace1,
570 CORBA::Long theDirFace2,
571 CORBA::Long theNbTimes);
572 GEOM::GEOM_Object_ptr MakeMultiTransformation2D (GEOM::GEOM_Object_ptr theBlock,
573 CORBA::Long theDirFace1U,
574 CORBA::Long theDirFace2U,
575 CORBA::Long theNbTimesU,
576 CORBA::Long theDirFace1V,
577 CORBA::Long theDirFace2V,
578 CORBA::Long theNbTimesV);
580 //-----------------------------------------------------------//
581 // CurvesOperations //
582 //-----------------------------------------------------------//
583 GEOM::GEOM_Object_ptr MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
584 GEOM::GEOM_Object_ptr theVector,
586 GEOM::GEOM_Object_ptr MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
587 GEOM::GEOM_Object_ptr thePnt2,
588 GEOM::GEOM_Object_ptr thePnt3);
589 GEOM::GEOM_Object_ptr MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
590 GEOM::GEOM_Object_ptr thePnt2,
591 GEOM::GEOM_Object_ptr thePnt3);
592 GEOM::GEOM_Object_ptr MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
593 GEOM::GEOM_Object_ptr theVector,
594 CORBA::Double theRMajor, CORBA::Double theRMinor);
595 GEOM::GEOM_Object_ptr MakeEllipseVec (GEOM::GEOM_Object_ptr theCenter,
596 GEOM::GEOM_Object_ptr theVector,
597 CORBA::Double theRMajor, CORBA::Double theRMinor,
598 GEOM::GEOM_Object_ptr theVectorMajor);
599 GEOM::GEOM_Object_ptr MakeArc (GEOM::GEOM_Object_ptr thePnt1,
600 GEOM::GEOM_Object_ptr thePnt2,
601 GEOM::GEOM_Object_ptr thePnt3);
602 GEOM::GEOM_Object_ptr MakeArcCenter (GEOM::GEOM_Object_ptr theCenter,
603 GEOM::GEOM_Object_ptr thePnt1,
604 GEOM::GEOM_Object_ptr thePnt2,
605 CORBA::Boolean theSense);
606 GEOM::GEOM_Object_ptr MakeArcOfEllipse (GEOM::GEOM_Object_ptr thePnt1,
607 GEOM::GEOM_Object_ptr thePnt2,
608 GEOM::GEOM_Object_ptr thePnt3);
609 GEOM::GEOM_Object_ptr MakePolyline (GEOM::GEOM_List_ptr thePoints);
610 GEOM::GEOM_Object_ptr MakeSplineBezier (GEOM::GEOM_List_ptr thePoints);
611 GEOM::GEOM_Object_ptr MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints,
612 CORBA::Boolean theIsClosed);
613 GEOM::GEOM_Object_ptr MakeSketcher (const char* theCommand,
614 GEOM::GEOM_List_ptr theWorkingPlane);
615 GEOM::GEOM_Object_ptr Make3DSketcher (GEOM::GEOM_List_ptr theCoordinates);
617 //-----------------------------------------------------------//
618 // LocalOperations //
619 //-----------------------------------------------------------//
620 GEOM::GEOM_Object_ptr MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
622 GEOM::GEOM_Object_ptr MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
623 GEOM::GEOM_List_ptr theEdges);
624 GEOM::GEOM_Object_ptr MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
625 CORBA::Double theR2, GEOM::GEOM_List_ptr theEdges);
626 GEOM::GEOM_Object_ptr MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
627 GEOM::GEOM_List_ptr theFaces);
628 GEOM::GEOM_Object_ptr MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
629 CORBA::Double theR2, GEOM::GEOM_List_ptr theFaces);
630 GEOM::GEOM_Object_ptr MakeFillet2D (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
631 GEOM::GEOM_List_ptr theVertexes);
632 GEOM::GEOM_Object_ptr MakeFillet1D (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
633 GEOM::GEOM_List_ptr theVertexes);
634 GEOM::GEOM_Object_ptr MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD);
635 GEOM::GEOM_Object_ptr MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
636 CORBA::Double theD1, CORBA::Double theD2,
637 CORBA::Long theFace1, CORBA::Long theFace2);
638 GEOM::GEOM_Object_ptr MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
639 CORBA::Double theD, CORBA::Double theAngle,
640 CORBA::Long theFace1, CORBA::Long theFace2);
641 GEOM::GEOM_Object_ptr MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
642 CORBA::Double theD1, CORBA::Double theD2,
643 GEOM::GEOM_List_ptr theFaces);
644 GEOM::GEOM_Object_ptr MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
645 CORBA::Double theD, CORBA::Double theAngle,
646 GEOM::GEOM_List_ptr theFaces);
647 GEOM::GEOM_Object_ptr MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
648 CORBA::Double theD1, CORBA::Double theD2,
649 GEOM::GEOM_List_ptr theEdges);
650 GEOM::GEOM_Object_ptr MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
651 CORBA::Double theD, CORBA::Double theAngle,
652 GEOM::GEOM_List_ptr theEdges);
653 GEOM::GEOM_Object_ptr MakeArchimede (GEOM::GEOM_Object_ptr theShape,
654 CORBA::Double theWeight,
655 CORBA::Double theWaterDensity,
656 CORBA::Double theMeshingDeflection);
657 CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
658 GEOM::GEOM_Object_ptr theSubShape);
660 //-----------------------------------------------------------//
661 // GroupOperations //
662 //-----------------------------------------------------------//
663 GEOM::GEOM_Object_ptr CreateGroup (GEOM::GEOM_Object_ptr theMainShape,
664 CORBA::Long theShapeType);
665 void AddObject (GEOM::GEOM_Object_ptr theGroup,
666 CORBA::Long theSubShapeId);
667 void RemoveObject (GEOM::GEOM_Object_ptr theGroup,
668 CORBA::Long theSubShapeId);
669 CORBA::Long GetType (GEOM::GEOM_Object_ptr theGroup);
670 GEOM::GEOM_Object_ptr GetMainShape (GEOM::GEOM_Object_ptr theGroup);
671 GEOM::GEOM_List_ptr GetObjects (GEOM::GEOM_Object_ptr theGroup);
673 //-----------------------------------------------------------//
674 // Advanced Operations //
675 //-----------------------------------------------------------//
676 GEOM::GEOM_List_ptr MakePipeTShape (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_List_ptr MakePipeTShapeWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
680 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
681 CORBA::Boolean theHexMesh,
682 GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
683 GEOM::GEOM_List_ptr MakePipeTShapeChamfer (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_List_ptr MakePipeTShapeChamferWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
687 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
688 CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
689 GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
690 GEOM::GEOM_List_ptr MakePipeTShapeFillet (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_List_ptr MakePipeTShapeFilletWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
694 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
695 CORBA::Double theRF, CORBA::Boolean theHexMesh,
696 GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
697 /*@@ insert new functions before this line @@ do not remove this line @@*/
700 SALOME_NamingService * name_service;
701 GEOM::GEOM_Gen_var myGeomEngine;
702 CORBA::Long myStudyID;
703 CORBA::Long myLastStudyID; // mkr : PAL10770
704 PortableServer::POA_var myPOA;
706 GEOM::GEOM_IBasicOperations_var myBasicOp;
707 GEOM::GEOM_I3DPrimOperations_var my3DPrimOp;
708 GEOM::GEOM_IBooleanOperations_var myBoolOp;
709 GEOM::GEOM_IInsertOperations_var myInsOp;
710 GEOM::GEOM_ITransformOperations_var myTransfOp;
711 GEOM::GEOM_IShapesOperations_var myShapesOp;
712 GEOM::GEOM_IBlocksOperations_var myBlocksOp;
713 GEOM::GEOM_ICurvesOperations_var myCurvesOp;
714 GEOM::GEOM_ILocalOperations_var myLocalOp;
715 GEOM::GEOM_IGroupOperations_var myGroupOp;
716 GEOM::GEOM_IAdvancedOperations_var myAdvancedOp;