1 // Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #ifndef __GEOM_SUPERV_I_H__
24 #define __GEOM_SUPERV_I_H__
26 #include "GEOM_I_Superv.hxx"
29 #include <SALOMEconfig.h>
30 #include CORBA_CLIENT_HEADER(GEOM_Gen)
31 #include CORBA_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 MakeCylinderPntVecRHA (GEOM::GEOM_Object_ptr thePnt,
250 GEOM::GEOM_Object_ptr theAxis,
251 CORBA::Double theRadius,
252 CORBA::Double theHeight,
253 CORBA::Double theAngle);
254 GEOM::GEOM_Object_ptr MakeCylinderRHA (CORBA::Double theR,
257 GEOM::GEOM_Object_ptr MakeSphere (CORBA::Double theX,
260 CORBA::Double theRadius);
261 GEOM::GEOM_Object_ptr MakeSphereR (CORBA::Double theR);
262 GEOM::GEOM_Object_ptr MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt,
264 GEOM::GEOM_Object_ptr MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
265 GEOM::GEOM_Object_ptr theVec,
266 CORBA::Double theRMajor,
267 CORBA::Double theRMinor);
268 GEOM::GEOM_Object_ptr MakeTorusRR (CORBA::Double theRMajor,
269 CORBA::Double theRMinor);
270 GEOM::GEOM_Object_ptr MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
271 GEOM::GEOM_Object_ptr theAxis,
274 CORBA::Double theHeight);
275 GEOM::GEOM_Object_ptr MakeConeR1R2H (CORBA::Double theR1,
277 CORBA::Double theHeight);
278 GEOM::GEOM_Object_ptr MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
279 GEOM::GEOM_Object_ptr theVec,
281 GEOM::GEOM_Object_ptr MakePrismVecH2Ways (GEOM::GEOM_Object_ptr theBase,
282 GEOM::GEOM_Object_ptr theVec,
284 GEOM::GEOM_Object_ptr MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
285 GEOM::GEOM_Object_ptr thePoint1,
286 GEOM::GEOM_Object_ptr thePoint2);
287 GEOM::GEOM_Object_ptr MakePrismTwoPnt2Ways (GEOM::GEOM_Object_ptr theBase,
288 GEOM::GEOM_Object_ptr thePoint1,
289 GEOM::GEOM_Object_ptr thePoint2);
290 GEOM::GEOM_Object_ptr MakePrismDXDYDZ (GEOM::GEOM_Object_ptr theBase,
293 CORBA::Double theDZ);
294 GEOM::GEOM_Object_ptr MakePrismDXDYDZ2Ways (GEOM::GEOM_Object_ptr theBase,
297 CORBA::Double theDZ);
298 GEOM::GEOM_Object_ptr MakePipe (GEOM::GEOM_Object_ptr theBase,
299 GEOM::GEOM_Object_ptr thePath);
300 GEOM::GEOM_Object_ptr MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
301 GEOM::GEOM_Object_ptr theAxis,
302 CORBA::Double theAngle);
303 GEOM::GEOM_Object_ptr MakeRevolutionAxisAngle2Ways (GEOM::GEOM_Object_ptr theBase,
304 GEOM::GEOM_Object_ptr theAxis,
305 CORBA::Double theAngle);
306 GEOM::GEOM_Object_ptr MakeFilling (GEOM::GEOM_Object_ptr theShape,
307 CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
308 CORBA::Double theTol2D, CORBA::Double theTol3D,
309 CORBA::Long theNbIter,
310 GEOM::filling_oper_method theMethod,
311 CORBA::Boolean theApprox);
313 GEOM::GEOM_Object_ptr MakeThruSections(const GEOM::ListOfGO& theSeqSections,
314 CORBA::Boolean theModeSolid,
315 CORBA::Double thePreci,
316 CORBA::Boolean theRuled);
318 GEOM::GEOM_Object_ptr MakePipeWithDifferentSections(const GEOM::ListOfGO& theBases,
319 const GEOM::ListOfGO& theLocations,
320 GEOM::GEOM_Object_ptr thePath,
321 CORBA::Boolean theWithContact,
322 CORBA::Boolean theWithCorrections);
324 GEOM::GEOM_Object_ptr MakePipeWithShellSections(const GEOM::ListOfGO& theBases,
325 const GEOM::ListOfGO& theSubBases,
326 const GEOM::ListOfGO& theLocations,
327 GEOM::GEOM_Object_ptr thePath,
328 CORBA::Boolean theWithContact,
329 CORBA::Boolean theWithCorrections);
331 GEOM::GEOM_Object_ptr MakePipeShellsWithoutPath(const GEOM::ListOfGO& theBases,
332 const GEOM::ListOfGO& theLocations);
334 GEOM::GEOM_Object_ptr MakePipeBiNormalAlongVector (GEOM::GEOM_Object_ptr theBase,
335 GEOM::GEOM_Object_ptr thePath,
336 GEOM::GEOM_Object_ptr theVec);
338 //-----------------------------------------------------------//
339 // BooleanOperations //
340 //-----------------------------------------------------------//
341 GEOM::GEOM_Object_ptr MakeBoolean (GEOM::GEOM_Object_ptr theShape1,
342 GEOM::GEOM_Object_ptr theShape2,
343 CORBA::Long theOperation);
344 GEOM::GEOM_Object_ptr MakeFuse (GEOM::GEOM_Object_ptr theShape1,
345 GEOM::GEOM_Object_ptr theShape2);
346 GEOM::GEOM_Object_ptr MakeCommon (GEOM::GEOM_Object_ptr theShape1,
347 GEOM::GEOM_Object_ptr theShape2);
348 GEOM::GEOM_Object_ptr MakeCut (GEOM::GEOM_Object_ptr theShape1,
349 GEOM::GEOM_Object_ptr theShape2);
350 GEOM::GEOM_Object_ptr MakeSection (GEOM::GEOM_Object_ptr theShape1,
351 GEOM::GEOM_Object_ptr theShape2);
352 GEOM::GEOM_Object_ptr MakePartition (GEOM::GEOM_List_ptr theShapes,
353 GEOM::GEOM_List_ptr theTools,
354 GEOM::GEOM_List_ptr theKeepInside,
355 GEOM::GEOM_List_ptr theRemoveInside,
356 CORBA::Short theLimit,
357 CORBA::Boolean theRemoveWebs,
358 GEOM::GEOM_List_ptr theMaterials,
359 CORBA::Short theKeepNonlimitShapes);
360 GEOM::GEOM_Object_ptr MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
361 GEOM::GEOM_Object_ptr thePlane);
363 //-----------------------------------------------------------//
364 // InsertOperations //
365 //-----------------------------------------------------------//
366 GEOM::GEOM_Object_ptr MakeCopy (GEOM::GEOM_Object_ptr theOriginal);
367 void Export (GEOM::GEOM_Object_ptr theObject,
368 const char* theFileName,
369 const char* theFormatName);
370 GEOM::GEOM_Object_ptr ImportFile (const char* theFileName,
371 const char* theFormatName);
372 void ImportTranslators (GEOM::string_array_out theFormats,
373 GEOM::string_array_out thePatterns);
374 void ExportTranslators (GEOM::string_array_out theFormats,
375 GEOM::string_array_out thePatterns);
377 //-----------------------------------------------------------//
378 // TransformOperations //
379 //-----------------------------------------------------------//
380 GEOM::GEOM_Object_ptr TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
381 GEOM::GEOM_Object_ptr thePoint1,
382 GEOM::GEOM_Object_ptr thePoint2);
383 GEOM::GEOM_Object_ptr TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
384 GEOM::GEOM_Object_ptr thePoint1,
385 GEOM::GEOM_Object_ptr thePoint2);
386 GEOM::GEOM_Object_ptr TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
389 CORBA::Double theDZ);
390 GEOM::GEOM_Object_ptr TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
393 CORBA::Double theDZ);
394 GEOM::GEOM_Object_ptr TranslateVector (GEOM::GEOM_Object_ptr theObject,
395 GEOM::GEOM_Object_ptr theVector);
396 GEOM::GEOM_Object_ptr TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
397 GEOM::GEOM_Object_ptr theVector);
398 GEOM::GEOM_Object_ptr TranslateVectorDistance (GEOM::GEOM_Object_ptr theObject,
399 GEOM::GEOM_Object_ptr theVector,
400 CORBA::Double theDistance,
401 CORBA::Boolean theCopy);
402 GEOM::GEOM_Object_ptr MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
403 GEOM::GEOM_Object_ptr theVector,
404 CORBA::Double theStep,
405 CORBA::Long theNbTimes);
406 GEOM::GEOM_Object_ptr MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
407 GEOM::GEOM_Object_ptr theVector1,
408 CORBA::Double theStep1,
409 CORBA::Long theNbTimes1,
410 GEOM::GEOM_Object_ptr theVector2,
411 CORBA::Double theStep2,
412 CORBA::Long theNbTimes2);
413 GEOM::GEOM_Object_ptr Rotate (GEOM::GEOM_Object_ptr theObject,
414 GEOM::GEOM_Object_ptr theAxis,
415 CORBA::Double theAngle);
416 GEOM::GEOM_Object_ptr RotateCopy (GEOM::GEOM_Object_ptr theObject,
417 GEOM::GEOM_Object_ptr theAxis,
418 CORBA::Double theAngle);
420 GEOM::GEOM_Object_ptr RotateThreePoints (GEOM::GEOM_Object_ptr theObject,
421 GEOM::GEOM_Object_ptr theCentPoint,
422 GEOM::GEOM_Object_ptr thePoint1,
423 GEOM::GEOM_Object_ptr thePoint2);
425 GEOM::GEOM_Object_ptr RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject,
426 GEOM::GEOM_Object_ptr theCentPoint,
427 GEOM::GEOM_Object_ptr thePoint1,
428 GEOM::GEOM_Object_ptr thePoint2);
430 GEOM::GEOM_Object_ptr MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
431 GEOM::GEOM_Object_ptr theAxis,
432 CORBA::Long theNbTimes);
433 GEOM::GEOM_Object_ptr MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
434 GEOM::GEOM_Object_ptr theAxis,
435 CORBA::Double theAngle,
436 CORBA::Long theNbTimes1,
437 CORBA::Double theStep,
438 CORBA::Long theNbTimes2);
439 GEOM::GEOM_Object_ptr MirrorPlane (GEOM::GEOM_Object_ptr theObject,
440 GEOM::GEOM_Object_ptr thePlane);
441 GEOM::GEOM_Object_ptr MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject,
442 GEOM::GEOM_Object_ptr thePlane);
443 GEOM::GEOM_Object_ptr MirrorAxis (GEOM::GEOM_Object_ptr theObject,
444 GEOM::GEOM_Object_ptr theAxis);
445 GEOM::GEOM_Object_ptr MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject,
446 GEOM::GEOM_Object_ptr theAxis);
447 GEOM::GEOM_Object_ptr MirrorPoint (GEOM::GEOM_Object_ptr theObject,
448 GEOM::GEOM_Object_ptr thePoint);
449 GEOM::GEOM_Object_ptr MirrorPointCopy (GEOM::GEOM_Object_ptr theObject,
450 GEOM::GEOM_Object_ptr thePoint);
451 GEOM::GEOM_Object_ptr OffsetShape (GEOM::GEOM_Object_ptr theObject,
452 CORBA::Double theOffset);
453 GEOM::GEOM_Object_ptr OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
454 CORBA::Double theOffset);
455 GEOM::GEOM_Object_ptr ScaleShape (GEOM::GEOM_Object_ptr theObject,
456 GEOM::GEOM_Object_ptr thePoint,
457 CORBA::Double theFactor);
458 GEOM::GEOM_Object_ptr ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject,
459 GEOM::GEOM_Object_ptr thePoint,
460 CORBA::Double theFactor);
461 GEOM::GEOM_Object_ptr ScaleShapeAlongAxes (GEOM::GEOM_Object_ptr theObject,
462 GEOM::GEOM_Object_ptr thePoint,
463 CORBA::Double theFactorX,
464 CORBA::Double theFactorY,
465 CORBA::Double theFactorZ);
466 GEOM::GEOM_Object_ptr ScaleShapeAlongAxesCopy (GEOM::GEOM_Object_ptr theObject,
467 GEOM::GEOM_Object_ptr thePoint,
468 CORBA::Double theFactorX,
469 CORBA::Double theFactorY,
470 CORBA::Double theFactorZ);
471 GEOM::GEOM_Object_ptr PositionShape (GEOM::GEOM_Object_ptr theObject,
472 GEOM::GEOM_Object_ptr theStartLCS,
473 GEOM::GEOM_Object_ptr theEndLCS);
474 GEOM::GEOM_Object_ptr PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
475 GEOM::GEOM_Object_ptr theStartLCS,
476 GEOM::GEOM_Object_ptr theEndLCS);
477 GEOM::GEOM_Object_ptr PositionAlongPath (GEOM::GEOM_Object_ptr theObject,
478 GEOM::GEOM_Object_ptr thePath,
479 CORBA::Double theDistance,
480 CORBA::Boolean theCopy,
481 CORBA::Boolean theReverse);
483 //-----------------------------------------------------------//
484 // ShapesOperations //
485 //-----------------------------------------------------------//
486 GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
487 GEOM::GEOM_Object_ptr thePnt2);
488 GEOM::GEOM_Object_ptr MakeEdgeOnCurveByLength (GEOM::GEOM_Object_ptr theRefCurve,
489 CORBA::Double theLength,
490 GEOM::GEOM_Object_ptr theStartPoint);
491 GEOM::GEOM_Object_ptr MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires,
492 CORBA::Double theTolerance);
493 GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire,
494 CORBA::Boolean isPlanarWanted);
495 GEOM::GEOM_Object_ptr MakeFaceWires (GEOM::GEOM_List_ptr theWires,
496 CORBA::Boolean isPlanarWanted);
497 GEOM::GEOM_Object_ptr MakeShell (GEOM::GEOM_List_ptr theFacesAndShells);
498 GEOM::GEOM_Object_ptr MakeSolidShell (GEOM::GEOM_Object_ptr theShell);
499 GEOM::GEOM_Object_ptr MakeSolidShells (GEOM::GEOM_List_ptr theShells);
500 GEOM::GEOM_Object_ptr MakeCompound (GEOM::GEOM_List_ptr theShapes);
501 GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
502 CORBA::Double theTolerance,
503 CORBA::Boolean doKeepNonSolids);
504 GEOM::GEOM_List_ptr GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
505 CORBA::Double theTolerance);
506 GEOM::GEOM_Object_ptr MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
507 CORBA::Double theTolerance,
508 const GEOM::ListOfGO& theFaces,
509 CORBA::Boolean doKeepNonSolids,
510 CORBA::Boolean doGlueAllEdges);
511 GEOM::GEOM_List_ptr MakeExplode (GEOM::GEOM_Object_ptr theShape,
512 CORBA::Long theShapeType,
513 CORBA::Boolean isSorted);
514 CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape);
515 CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape);
516 GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape);
518 GEOM::GEOM_List_ptr GetShapesOnShape (GEOM::GEOM_Object_ptr theCheckShape,
519 GEOM::GEOM_Object_ptr theShape,
520 CORBA::Short theShapeType,
521 GEOM::shape_state theState);
522 GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound
523 (GEOM::GEOM_Object_ptr theCheckShape,
524 GEOM::GEOM_Object_ptr theShape,
525 CORBA::Short theShapeType,
526 GEOM::shape_state theState);
529 //-----------------------------------------------------------//
530 // BlocksOperations //
531 //-----------------------------------------------------------//
532 GEOM::GEOM_Object_ptr MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
533 GEOM::GEOM_Object_ptr thePnt2,
534 GEOM::GEOM_Object_ptr thePnt3,
535 GEOM::GEOM_Object_ptr thePnt4);
536 GEOM::GEOM_Object_ptr MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
537 GEOM::GEOM_Object_ptr theEdge2,
538 GEOM::GEOM_Object_ptr theEdge3,
539 GEOM::GEOM_Object_ptr theEdge4);
540 GEOM::GEOM_Object_ptr MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
541 GEOM::GEOM_Object_ptr theEdge2);
542 GEOM::GEOM_Object_ptr MakeHexa (GEOM::GEOM_Object_ptr theFace1,
543 GEOM::GEOM_Object_ptr theFace2,
544 GEOM::GEOM_Object_ptr theFace3,
545 GEOM::GEOM_Object_ptr theFace4,
546 GEOM::GEOM_Object_ptr theFace5,
547 GEOM::GEOM_Object_ptr theFace6);
548 GEOM::GEOM_Object_ptr MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
549 GEOM::GEOM_Object_ptr theFace2);
550 GEOM::GEOM_Object_ptr GetPoint (GEOM::GEOM_Object_ptr theShape,
554 CORBA::Double theEpsilon);
555 GEOM::GEOM_Object_ptr GetEdge (GEOM::GEOM_Object_ptr theShape,
556 GEOM::GEOM_Object_ptr thePoint1,
557 GEOM::GEOM_Object_ptr thePoint2);
558 GEOM::GEOM_Object_ptr GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
559 GEOM::GEOM_Object_ptr thePoint);
560 GEOM::GEOM_Object_ptr GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
561 GEOM::GEOM_Object_ptr thePoint1,
562 GEOM::GEOM_Object_ptr thePoint2,
563 GEOM::GEOM_Object_ptr thePoint3,
564 GEOM::GEOM_Object_ptr thePoint4);
565 GEOM::GEOM_Object_ptr GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
566 GEOM::GEOM_Object_ptr theEdge1,
567 GEOM::GEOM_Object_ptr theEdge2);
568 GEOM::GEOM_Object_ptr GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
569 GEOM::GEOM_Object_ptr theFace);
570 GEOM::GEOM_Object_ptr GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
571 GEOM::GEOM_Object_ptr thePoint);
572 GEOM::GEOM_Object_ptr GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
573 GEOM::GEOM_Object_ptr theVector);
574 CORBA::Boolean IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
575 CORBA::Long theMinNbFaces,
576 CORBA::Long theMaxNbFaces,
577 CORBA::Long& theNbBlocks);
578 CORBA::Boolean CheckCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
579 GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors);
580 char* PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
581 const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors);
582 GEOM::GEOM_List_ptr ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
583 CORBA::Long theMinNbFaces,
584 CORBA::Long theMaxNbFaces);
585 GEOM::GEOM_Object_ptr GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
586 GEOM::GEOM_Object_ptr thePoint);
587 GEOM::GEOM_Object_ptr GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
588 GEOM::GEOM_List_ptr theParts);
589 GEOM::GEOM_List_ptr GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
590 GEOM::GEOM_List_ptr theParts);
591 GEOM::GEOM_Object_ptr MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
592 CORBA::Long theDirFace1,
593 CORBA::Long theDirFace2,
594 CORBA::Long theNbTimes);
595 GEOM::GEOM_Object_ptr MakeMultiTransformation2D (GEOM::GEOM_Object_ptr theBlock,
596 CORBA::Long theDirFace1U,
597 CORBA::Long theDirFace2U,
598 CORBA::Long theNbTimesU,
599 CORBA::Long theDirFace1V,
600 CORBA::Long theDirFace2V,
601 CORBA::Long theNbTimesV);
603 //-----------------------------------------------------------//
604 // CurvesOperations //
605 //-----------------------------------------------------------//
606 GEOM::GEOM_Object_ptr MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
607 GEOM::GEOM_Object_ptr theVector,
609 GEOM::GEOM_Object_ptr MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
610 GEOM::GEOM_Object_ptr thePnt2,
611 GEOM::GEOM_Object_ptr thePnt3);
612 GEOM::GEOM_Object_ptr MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
613 GEOM::GEOM_Object_ptr thePnt2,
614 GEOM::GEOM_Object_ptr thePnt3);
615 GEOM::GEOM_Object_ptr MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
616 GEOM::GEOM_Object_ptr theVector,
617 CORBA::Double theRMajor, CORBA::Double theRMinor);
618 GEOM::GEOM_Object_ptr MakeEllipseVec (GEOM::GEOM_Object_ptr theCenter,
619 GEOM::GEOM_Object_ptr theVector,
620 CORBA::Double theRMajor, CORBA::Double theRMinor,
621 GEOM::GEOM_Object_ptr theVectorMajor);
622 GEOM::GEOM_Object_ptr MakeArc (GEOM::GEOM_Object_ptr thePnt1,
623 GEOM::GEOM_Object_ptr thePnt2,
624 GEOM::GEOM_Object_ptr thePnt3);
625 GEOM::GEOM_Object_ptr MakeArcCenter (GEOM::GEOM_Object_ptr theCenter,
626 GEOM::GEOM_Object_ptr thePnt1,
627 GEOM::GEOM_Object_ptr thePnt2,
628 CORBA::Boolean theSense);
629 GEOM::GEOM_Object_ptr MakeArcOfEllipse (GEOM::GEOM_Object_ptr thePnt1,
630 GEOM::GEOM_Object_ptr thePnt2,
631 GEOM::GEOM_Object_ptr thePnt3);
632 GEOM::GEOM_Object_ptr MakePolyline (GEOM::GEOM_List_ptr thePoints,
633 CORBA::Boolean theIsClosed);
634 GEOM::GEOM_Object_ptr MakeSplineBezier (GEOM::GEOM_List_ptr thePoints,
635 CORBA::Boolean theIsClosed);
636 GEOM::GEOM_Object_ptr MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints,
637 CORBA::Boolean theIsClosed,
638 CORBA::Boolean theDoReordering);
639 GEOM::GEOM_Object_ptr MakeSketcher (const char* theCommand,
640 GEOM::GEOM_List_ptr theWorkingPlane);
641 GEOM::GEOM_Object_ptr Make3DSketcher (GEOM::GEOM_List_ptr theCoordinates);
643 //-----------------------------------------------------------//
644 // LocalOperations //
645 //-----------------------------------------------------------//
646 GEOM::GEOM_Object_ptr MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
648 GEOM::GEOM_Object_ptr MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
649 GEOM::GEOM_List_ptr theEdges);
650 GEOM::GEOM_Object_ptr MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
651 CORBA::Double theR2, GEOM::GEOM_List_ptr theEdges);
652 GEOM::GEOM_Object_ptr MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
653 GEOM::GEOM_List_ptr theFaces);
654 GEOM::GEOM_Object_ptr MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
655 CORBA::Double theR2, GEOM::GEOM_List_ptr theFaces);
656 GEOM::GEOM_Object_ptr MakeFillet2D (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
657 GEOM::GEOM_List_ptr theVertexes);
658 GEOM::GEOM_Object_ptr MakeFillet1D (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
659 GEOM::GEOM_List_ptr theVertexes, CORBA::Boolean doIgnoreSecantVertices);
660 GEOM::GEOM_Object_ptr MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD);
661 GEOM::GEOM_Object_ptr MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
662 CORBA::Double theD1, CORBA::Double theD2,
663 CORBA::Long theFace1, CORBA::Long theFace2);
664 GEOM::GEOM_Object_ptr MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
665 CORBA::Double theD, CORBA::Double theAngle,
666 CORBA::Long theFace1, CORBA::Long theFace2);
667 GEOM::GEOM_Object_ptr MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
668 CORBA::Double theD1, CORBA::Double theD2,
669 GEOM::GEOM_List_ptr theFaces);
670 GEOM::GEOM_Object_ptr MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
671 CORBA::Double theD, CORBA::Double theAngle,
672 GEOM::GEOM_List_ptr theFaces);
673 GEOM::GEOM_Object_ptr MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
674 CORBA::Double theD1, CORBA::Double theD2,
675 GEOM::GEOM_List_ptr theEdges);
676 GEOM::GEOM_Object_ptr MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
677 CORBA::Double theD, CORBA::Double theAngle,
678 GEOM::GEOM_List_ptr theEdges);
679 GEOM::GEOM_Object_ptr MakeArchimede (GEOM::GEOM_Object_ptr theShape,
680 CORBA::Double theWeight,
681 CORBA::Double theWaterDensity,
682 CORBA::Double theMeshingDeflection);
683 CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
684 GEOM::GEOM_Object_ptr theSubShape);
686 //-----------------------------------------------------------//
687 // GroupOperations //
688 //-----------------------------------------------------------//
689 GEOM::GEOM_Object_ptr CreateGroup (GEOM::GEOM_Object_ptr theMainShape,
690 CORBA::Long theShapeType);
691 void AddObject (GEOM::GEOM_Object_ptr theGroup,
692 CORBA::Long theSubShapeId);
693 void RemoveObject (GEOM::GEOM_Object_ptr theGroup,
694 CORBA::Long theSubShapeId);
695 CORBA::Long GetType (GEOM::GEOM_Object_ptr theGroup);
696 GEOM::GEOM_Object_ptr GetMainShape (GEOM::GEOM_Object_ptr theGroup);
697 GEOM::GEOM_List_ptr GetObjects (GEOM::GEOM_Object_ptr theGroup);
699 //-----------------------------------------------------------//
700 // ImportExport Operations //
701 //-----------------------------------------------------------//
702 CORBA::Boolean ExportXAO(GEOM::GEOM_Object_ptr shape,
703 const GEOM::ListOfGO& groups, const GEOM::ListOfFields& fields,
704 const char* author, const char* fileName);
705 CORBA::Boolean ImportXAO(const char* fileName, GEOM::GEOM_Object_out shape,
706 GEOM::ListOfGO_out subShapes, GEOM::ListOfGO_out groups, GEOM::ListOfFields_out fields);
708 //-----------------------------------------------------------//
709 // Advanced Operations //
710 //-----------------------------------------------------------//
711 GEOM::GEOM_List_ptr MakePipeTShape (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
712 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
713 CORBA::Boolean theHexMesh);
714 GEOM::GEOM_List_ptr MakePipeTShapeWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
715 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
716 CORBA::Boolean theHexMesh,
717 GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
718 GEOM::GEOM_List_ptr MakePipeTShapeChamfer (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
719 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
720 CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh);
721 GEOM::GEOM_List_ptr MakePipeTShapeChamferWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
722 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
723 CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
724 GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
725 GEOM::GEOM_List_ptr MakePipeTShapeFillet (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
726 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
727 CORBA::Double theRF, CORBA::Boolean theHexMesh);
728 GEOM::GEOM_List_ptr MakePipeTShapeFilletWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
729 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
730 CORBA::Double theRF, CORBA::Boolean theHexMesh,
731 GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
732 GEOM::GEOM_Object_ptr MakeDividedDisk (CORBA::Double theR, CORBA::Double theRatio,
733 CORBA::Short theOrientation, GEOM::pattern thePattern);
734 GEOM::GEOM_Object_ptr MakeDividedCylinder (CORBA::Double theR,
736 GEOM::pattern thePattern);
737 GEOM::GEOM_Object_ptr MakeSmoothingSurface (GEOM::GEOM_List_ptr thelPoints);
738 /*@@ insert new functions before this line @@ do not remove this line @@*/
741 SALOME_NamingService * name_service;
742 GEOM::GEOM_Gen_var myGeomEngine;
743 CORBA::Long myStudyID;
744 CORBA::Long myLastStudyID; // mkr : PAL10770
745 PortableServer::POA_var myPOA;
747 GEOM::GEOM_IBasicOperations_var myBasicOp;
748 GEOM::GEOM_I3DPrimOperations_var my3DPrimOp;
749 GEOM::GEOM_IBooleanOperations_var myBoolOp;
750 GEOM::GEOM_IInsertOperations_var myInsOp;
751 GEOM::GEOM_ITransformOperations_var myTransfOp;
752 GEOM::GEOM_IShapesOperations_var myShapesOp;
753 GEOM::GEOM_IBlocksOperations_var myBlocksOp;
754 GEOM::GEOM_ICurvesOperations_var myCurvesOp;
755 GEOM::GEOM_ILocalOperations_var myLocalOp;
756 GEOM::GEOM_IGroupOperations_var myGroupOp;
757 GEOM::GEOM_IAdvancedOperations_var myAdvancedOp;