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