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 CORBA::Double theAngle);
248 GEOM::GEOM_Object_ptr MakeCylinderRH (CORBA::Double theR,
251 GEOM::GEOM_Object_ptr MakeSphere (CORBA::Double theX,
254 CORBA::Double theRadius);
255 GEOM::GEOM_Object_ptr MakeSphereR (CORBA::Double theR);
256 GEOM::GEOM_Object_ptr MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt,
258 GEOM::GEOM_Object_ptr MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt,
259 GEOM::GEOM_Object_ptr theVec,
260 CORBA::Double theRMajor,
261 CORBA::Double theRMinor);
262 GEOM::GEOM_Object_ptr MakeTorusRR (CORBA::Double theRMajor,
263 CORBA::Double theRMinor);
264 GEOM::GEOM_Object_ptr MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt,
265 GEOM::GEOM_Object_ptr theAxis,
268 CORBA::Double theHeight);
269 GEOM::GEOM_Object_ptr MakeConeR1R2H (CORBA::Double theR1,
271 CORBA::Double theHeight);
272 GEOM::GEOM_Object_ptr MakePrismVecH (GEOM::GEOM_Object_ptr theBase,
273 GEOM::GEOM_Object_ptr theVec,
275 GEOM::GEOM_Object_ptr MakePrismVecH2Ways (GEOM::GEOM_Object_ptr theBase,
276 GEOM::GEOM_Object_ptr theVec,
278 GEOM::GEOM_Object_ptr MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase,
279 GEOM::GEOM_Object_ptr thePoint1,
280 GEOM::GEOM_Object_ptr thePoint2);
281 GEOM::GEOM_Object_ptr MakePrismTwoPnt2Ways (GEOM::GEOM_Object_ptr theBase,
282 GEOM::GEOM_Object_ptr thePoint1,
283 GEOM::GEOM_Object_ptr thePoint2);
284 GEOM::GEOM_Object_ptr MakePrismDXDYDZ (GEOM::GEOM_Object_ptr theBase,
287 CORBA::Double theDZ);
288 GEOM::GEOM_Object_ptr MakePrismDXDYDZ2Ways (GEOM::GEOM_Object_ptr theBase,
291 CORBA::Double theDZ);
292 GEOM::GEOM_Object_ptr MakePipe (GEOM::GEOM_Object_ptr theBase,
293 GEOM::GEOM_Object_ptr thePath);
294 GEOM::GEOM_Object_ptr MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase,
295 GEOM::GEOM_Object_ptr theAxis,
296 CORBA::Double theAngle);
297 GEOM::GEOM_Object_ptr MakeRevolutionAxisAngle2Ways (GEOM::GEOM_Object_ptr theBase,
298 GEOM::GEOM_Object_ptr theAxis,
299 CORBA::Double theAngle);
300 GEOM::GEOM_Object_ptr MakeFilling (GEOM::GEOM_Object_ptr theShape,
301 CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
302 CORBA::Double theTol2D, CORBA::Double theTol3D,
303 CORBA::Long theNbIter,
304 GEOM::filling_oper_method theMethod,
305 CORBA::Boolean theApprox);
307 GEOM::GEOM_Object_ptr MakeThruSections(const GEOM::ListOfGO& theSeqSections,
308 CORBA::Boolean theModeSolid,
309 CORBA::Double thePreci,
310 CORBA::Boolean theRuled);
312 GEOM::GEOM_Object_ptr MakePipeWithDifferentSections(const GEOM::ListOfGO& theBases,
313 const GEOM::ListOfGO& theLocations,
314 GEOM::GEOM_Object_ptr thePath,
315 CORBA::Boolean theWithContact,
316 CORBA::Boolean theWithCorrections);
318 GEOM::GEOM_Object_ptr MakePipeWithShellSections(const GEOM::ListOfGO& theBases,
319 const GEOM::ListOfGO& theSubBases,
320 const GEOM::ListOfGO& theLocations,
321 GEOM::GEOM_Object_ptr thePath,
322 CORBA::Boolean theWithContact,
323 CORBA::Boolean theWithCorrections);
325 GEOM::GEOM_Object_ptr MakePipeShellsWithoutPath(const GEOM::ListOfGO& theBases,
326 const GEOM::ListOfGO& theLocations);
328 GEOM::GEOM_Object_ptr MakePipeBiNormalAlongVector (GEOM::GEOM_Object_ptr theBase,
329 GEOM::GEOM_Object_ptr thePath,
330 GEOM::GEOM_Object_ptr theVec);
332 //-----------------------------------------------------------//
333 // BooleanOperations //
334 //-----------------------------------------------------------//
335 GEOM::GEOM_Object_ptr MakeBoolean (GEOM::GEOM_Object_ptr theShape1,
336 GEOM::GEOM_Object_ptr theShape2,
337 CORBA::Long theOperation);
338 GEOM::GEOM_Object_ptr MakeFuse (GEOM::GEOM_Object_ptr theShape1,
339 GEOM::GEOM_Object_ptr theShape2);
340 GEOM::GEOM_Object_ptr MakeCommon (GEOM::GEOM_Object_ptr theShape1,
341 GEOM::GEOM_Object_ptr theShape2);
342 GEOM::GEOM_Object_ptr MakeCut (GEOM::GEOM_Object_ptr theShape1,
343 GEOM::GEOM_Object_ptr theShape2);
344 GEOM::GEOM_Object_ptr MakeSection (GEOM::GEOM_Object_ptr theShape1,
345 GEOM::GEOM_Object_ptr theShape2);
346 GEOM::GEOM_Object_ptr MakePartition (GEOM::GEOM_List_ptr theShapes,
347 GEOM::GEOM_List_ptr theTools,
348 GEOM::GEOM_List_ptr theKeepInside,
349 GEOM::GEOM_List_ptr theRemoveInside,
350 CORBA::Short theLimit,
351 CORBA::Boolean theRemoveWebs,
352 GEOM::GEOM_List_ptr theMaterials,
353 CORBA::Short theKeepNonlimitShapes);
354 GEOM::GEOM_Object_ptr MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
355 GEOM::GEOM_Object_ptr thePlane);
357 //-----------------------------------------------------------//
358 // InsertOperations //
359 //-----------------------------------------------------------//
360 GEOM::GEOM_Object_ptr MakeCopy (GEOM::GEOM_Object_ptr theOriginal);
361 void Export (GEOM::GEOM_Object_ptr theObject,
362 const char* theFileName,
363 const char* theFormatName);
364 GEOM::GEOM_Object_ptr ImportFile (const char* theFileName,
365 const char* theFormatName);
366 void ImportTranslators (GEOM::string_array_out theFormats,
367 GEOM::string_array_out thePatterns);
368 void ExportTranslators (GEOM::string_array_out theFormats,
369 GEOM::string_array_out thePatterns);
371 //-----------------------------------------------------------//
372 // TransformOperations //
373 //-----------------------------------------------------------//
374 GEOM::GEOM_Object_ptr TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject,
375 GEOM::GEOM_Object_ptr thePoint1,
376 GEOM::GEOM_Object_ptr thePoint2);
377 GEOM::GEOM_Object_ptr TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject,
378 GEOM::GEOM_Object_ptr thePoint1,
379 GEOM::GEOM_Object_ptr thePoint2);
380 GEOM::GEOM_Object_ptr TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject,
383 CORBA::Double theDZ);
384 GEOM::GEOM_Object_ptr TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject,
387 CORBA::Double theDZ);
388 GEOM::GEOM_Object_ptr TranslateVector (GEOM::GEOM_Object_ptr theObject,
389 GEOM::GEOM_Object_ptr theVector);
390 GEOM::GEOM_Object_ptr TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject,
391 GEOM::GEOM_Object_ptr theVector);
392 GEOM::GEOM_Object_ptr TranslateVectorDistance (GEOM::GEOM_Object_ptr theObject,
393 GEOM::GEOM_Object_ptr theVector,
394 CORBA::Double theDistance,
395 CORBA::Boolean theCopy);
396 GEOM::GEOM_Object_ptr MultiTranslate1D (GEOM::GEOM_Object_ptr theObject,
397 GEOM::GEOM_Object_ptr theVector,
398 CORBA::Double theStep,
399 CORBA::Long theNbTimes);
400 GEOM::GEOM_Object_ptr MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
401 GEOM::GEOM_Object_ptr theVector1,
402 CORBA::Double theStep1,
403 CORBA::Long theNbTimes1,
404 GEOM::GEOM_Object_ptr theVector2,
405 CORBA::Double theStep2,
406 CORBA::Long theNbTimes2);
407 GEOM::GEOM_Object_ptr Rotate (GEOM::GEOM_Object_ptr theObject,
408 GEOM::GEOM_Object_ptr theAxis,
409 CORBA::Double theAngle);
410 GEOM::GEOM_Object_ptr RotateCopy (GEOM::GEOM_Object_ptr theObject,
411 GEOM::GEOM_Object_ptr theAxis,
412 CORBA::Double theAngle);
414 GEOM::GEOM_Object_ptr RotateThreePoints (GEOM::GEOM_Object_ptr theObject,
415 GEOM::GEOM_Object_ptr theCentPoint,
416 GEOM::GEOM_Object_ptr thePoint1,
417 GEOM::GEOM_Object_ptr thePoint2);
419 GEOM::GEOM_Object_ptr RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject,
420 GEOM::GEOM_Object_ptr theCentPoint,
421 GEOM::GEOM_Object_ptr thePoint1,
422 GEOM::GEOM_Object_ptr thePoint2);
424 GEOM::GEOM_Object_ptr MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
425 GEOM::GEOM_Object_ptr theAxis,
426 CORBA::Long theNbTimes);
427 GEOM::GEOM_Object_ptr MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
428 GEOM::GEOM_Object_ptr theAxis,
429 CORBA::Double theAngle,
430 CORBA::Long theNbTimes1,
431 CORBA::Double theStep,
432 CORBA::Long theNbTimes2);
433 GEOM::GEOM_Object_ptr MirrorPlane (GEOM::GEOM_Object_ptr theObject,
434 GEOM::GEOM_Object_ptr thePlane);
435 GEOM::GEOM_Object_ptr MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject,
436 GEOM::GEOM_Object_ptr thePlane);
437 GEOM::GEOM_Object_ptr MirrorAxis (GEOM::GEOM_Object_ptr theObject,
438 GEOM::GEOM_Object_ptr theAxis);
439 GEOM::GEOM_Object_ptr MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject,
440 GEOM::GEOM_Object_ptr theAxis);
441 GEOM::GEOM_Object_ptr MirrorPoint (GEOM::GEOM_Object_ptr theObject,
442 GEOM::GEOM_Object_ptr thePoint);
443 GEOM::GEOM_Object_ptr MirrorPointCopy (GEOM::GEOM_Object_ptr theObject,
444 GEOM::GEOM_Object_ptr thePoint);
445 GEOM::GEOM_Object_ptr OffsetShape (GEOM::GEOM_Object_ptr theObject,
446 CORBA::Double theOffset);
447 GEOM::GEOM_Object_ptr OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
448 CORBA::Double theOffset);
449 GEOM::GEOM_Object_ptr ScaleShape (GEOM::GEOM_Object_ptr theObject,
450 GEOM::GEOM_Object_ptr thePoint,
451 CORBA::Double theFactor);
452 GEOM::GEOM_Object_ptr ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject,
453 GEOM::GEOM_Object_ptr thePoint,
454 CORBA::Double theFactor);
455 GEOM::GEOM_Object_ptr ScaleShapeAlongAxes (GEOM::GEOM_Object_ptr theObject,
456 GEOM::GEOM_Object_ptr thePoint,
457 CORBA::Double theFactorX,
458 CORBA::Double theFactorY,
459 CORBA::Double theFactorZ);
460 GEOM::GEOM_Object_ptr ScaleShapeAlongAxesCopy (GEOM::GEOM_Object_ptr theObject,
461 GEOM::GEOM_Object_ptr thePoint,
462 CORBA::Double theFactorX,
463 CORBA::Double theFactorY,
464 CORBA::Double theFactorZ);
465 GEOM::GEOM_Object_ptr PositionShape (GEOM::GEOM_Object_ptr theObject,
466 GEOM::GEOM_Object_ptr theStartLCS,
467 GEOM::GEOM_Object_ptr theEndLCS);
468 GEOM::GEOM_Object_ptr PositionShapeCopy (GEOM::GEOM_Object_ptr theObject,
469 GEOM::GEOM_Object_ptr theStartLCS,
470 GEOM::GEOM_Object_ptr theEndLCS);
471 GEOM::GEOM_Object_ptr PositionAlongPath (GEOM::GEOM_Object_ptr theObject,
472 GEOM::GEOM_Object_ptr thePath,
473 CORBA::Double theDistance,
474 CORBA::Boolean theCopy,
475 CORBA::Boolean theReverse);
477 //-----------------------------------------------------------//
478 // ShapesOperations //
479 //-----------------------------------------------------------//
480 GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
481 GEOM::GEOM_Object_ptr thePnt2);
482 GEOM::GEOM_Object_ptr MakeEdgeOnCurveByLength (GEOM::GEOM_Object_ptr theRefCurve,
483 CORBA::Double theLength,
484 GEOM::GEOM_Object_ptr theStartPoint);
485 GEOM::GEOM_Object_ptr MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires,
486 CORBA::Double theTolerance);
487 GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire,
488 CORBA::Boolean isPlanarWanted);
489 GEOM::GEOM_Object_ptr MakeFaceWires (GEOM::GEOM_List_ptr theWires,
490 CORBA::Boolean isPlanarWanted);
491 GEOM::GEOM_Object_ptr MakeShell (GEOM::GEOM_List_ptr theFacesAndShells);
492 GEOM::GEOM_Object_ptr MakeSolidShell (GEOM::GEOM_Object_ptr theShell);
493 GEOM::GEOM_Object_ptr MakeSolidShells (GEOM::GEOM_List_ptr theShells);
494 GEOM::GEOM_Object_ptr MakeCompound (GEOM::GEOM_List_ptr theShapes);
495 GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
496 CORBA::Double theTolerance,
497 CORBA::Boolean doKeepNonSolids);
498 GEOM::GEOM_List_ptr GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
499 CORBA::Double theTolerance);
500 GEOM::GEOM_Object_ptr MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
501 CORBA::Double theTolerance,
502 const GEOM::ListOfGO& theFaces,
503 CORBA::Boolean doKeepNonSolids,
504 CORBA::Boolean doGlueAllEdges);
505 GEOM::GEOM_List_ptr MakeExplode (GEOM::GEOM_Object_ptr theShape,
506 CORBA::Long theShapeType,
507 CORBA::Boolean isSorted);
508 CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape);
509 CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape);
510 GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape);
512 GEOM::GEOM_List_ptr GetShapesOnShape (GEOM::GEOM_Object_ptr theCheckShape,
513 GEOM::GEOM_Object_ptr theShape,
514 CORBA::Short theShapeType,
515 GEOM::shape_state theState);
516 GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound
517 (GEOM::GEOM_Object_ptr theCheckShape,
518 GEOM::GEOM_Object_ptr theShape,
519 CORBA::Short theShapeType,
520 GEOM::shape_state theState);
523 //-----------------------------------------------------------//
524 // BlocksOperations //
525 //-----------------------------------------------------------//
526 GEOM::GEOM_Object_ptr MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
527 GEOM::GEOM_Object_ptr thePnt2,
528 GEOM::GEOM_Object_ptr thePnt3,
529 GEOM::GEOM_Object_ptr thePnt4);
530 GEOM::GEOM_Object_ptr MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
531 GEOM::GEOM_Object_ptr theEdge2,
532 GEOM::GEOM_Object_ptr theEdge3,
533 GEOM::GEOM_Object_ptr theEdge4);
534 GEOM::GEOM_Object_ptr MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
535 GEOM::GEOM_Object_ptr theEdge2);
536 GEOM::GEOM_Object_ptr MakeHexa (GEOM::GEOM_Object_ptr theFace1,
537 GEOM::GEOM_Object_ptr theFace2,
538 GEOM::GEOM_Object_ptr theFace3,
539 GEOM::GEOM_Object_ptr theFace4,
540 GEOM::GEOM_Object_ptr theFace5,
541 GEOM::GEOM_Object_ptr theFace6);
542 GEOM::GEOM_Object_ptr MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
543 GEOM::GEOM_Object_ptr theFace2);
544 GEOM::GEOM_Object_ptr GetPoint (GEOM::GEOM_Object_ptr theShape,
548 CORBA::Double theEpsilon);
549 GEOM::GEOM_Object_ptr GetEdge (GEOM::GEOM_Object_ptr theShape,
550 GEOM::GEOM_Object_ptr thePoint1,
551 GEOM::GEOM_Object_ptr thePoint2);
552 GEOM::GEOM_Object_ptr GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
553 GEOM::GEOM_Object_ptr thePoint);
554 GEOM::GEOM_Object_ptr GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
555 GEOM::GEOM_Object_ptr thePoint1,
556 GEOM::GEOM_Object_ptr thePoint2,
557 GEOM::GEOM_Object_ptr thePoint3,
558 GEOM::GEOM_Object_ptr thePoint4);
559 GEOM::GEOM_Object_ptr GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
560 GEOM::GEOM_Object_ptr theEdge1,
561 GEOM::GEOM_Object_ptr theEdge2);
562 GEOM::GEOM_Object_ptr GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
563 GEOM::GEOM_Object_ptr theFace);
564 GEOM::GEOM_Object_ptr GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
565 GEOM::GEOM_Object_ptr thePoint);
566 GEOM::GEOM_Object_ptr GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
567 GEOM::GEOM_Object_ptr theVector);
568 CORBA::Boolean IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
569 CORBA::Long theMinNbFaces,
570 CORBA::Long theMaxNbFaces,
571 CORBA::Long& theNbBlocks);
572 CORBA::Boolean CheckCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
573 GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors);
574 char* PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
575 const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors);
576 GEOM::GEOM_List_ptr ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
577 CORBA::Long theMinNbFaces,
578 CORBA::Long theMaxNbFaces);
579 GEOM::GEOM_Object_ptr GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
580 GEOM::GEOM_Object_ptr thePoint);
581 GEOM::GEOM_Object_ptr GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
582 GEOM::GEOM_List_ptr theParts);
583 GEOM::GEOM_List_ptr GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
584 GEOM::GEOM_List_ptr theParts);
585 GEOM::GEOM_Object_ptr MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
586 CORBA::Long theDirFace1,
587 CORBA::Long theDirFace2,
588 CORBA::Long theNbTimes);
589 GEOM::GEOM_Object_ptr MakeMultiTransformation2D (GEOM::GEOM_Object_ptr theBlock,
590 CORBA::Long theDirFace1U,
591 CORBA::Long theDirFace2U,
592 CORBA::Long theNbTimesU,
593 CORBA::Long theDirFace1V,
594 CORBA::Long theDirFace2V,
595 CORBA::Long theNbTimesV);
597 //-----------------------------------------------------------//
598 // CurvesOperations //
599 //-----------------------------------------------------------//
600 GEOM::GEOM_Object_ptr MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter,
601 GEOM::GEOM_Object_ptr theVector,
603 GEOM::GEOM_Object_ptr MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
604 GEOM::GEOM_Object_ptr thePnt2,
605 GEOM::GEOM_Object_ptr thePnt3);
606 GEOM::GEOM_Object_ptr MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
607 GEOM::GEOM_Object_ptr thePnt2,
608 GEOM::GEOM_Object_ptr thePnt3);
609 GEOM::GEOM_Object_ptr MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
610 GEOM::GEOM_Object_ptr theVector,
611 CORBA::Double theRMajor, CORBA::Double theRMinor);
612 GEOM::GEOM_Object_ptr MakeEllipseVec (GEOM::GEOM_Object_ptr theCenter,
613 GEOM::GEOM_Object_ptr theVector,
614 CORBA::Double theRMajor, CORBA::Double theRMinor,
615 GEOM::GEOM_Object_ptr theVectorMajor);
616 GEOM::GEOM_Object_ptr MakeArc (GEOM::GEOM_Object_ptr thePnt1,
617 GEOM::GEOM_Object_ptr thePnt2,
618 GEOM::GEOM_Object_ptr thePnt3);
619 GEOM::GEOM_Object_ptr MakeArcCenter (GEOM::GEOM_Object_ptr theCenter,
620 GEOM::GEOM_Object_ptr thePnt1,
621 GEOM::GEOM_Object_ptr thePnt2,
622 CORBA::Boolean theSense);
623 GEOM::GEOM_Object_ptr MakeArcOfEllipse (GEOM::GEOM_Object_ptr thePnt1,
624 GEOM::GEOM_Object_ptr thePnt2,
625 GEOM::GEOM_Object_ptr thePnt3);
626 GEOM::GEOM_Object_ptr MakePolyline (GEOM::GEOM_List_ptr thePoints,
627 CORBA::Boolean theIsClosed);
628 GEOM::GEOM_Object_ptr MakeSplineBezier (GEOM::GEOM_List_ptr thePoints,
629 CORBA::Boolean theIsClosed);
630 GEOM::GEOM_Object_ptr MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints,
631 CORBA::Boolean theIsClosed,
632 CORBA::Boolean theDoReordering);
633 GEOM::GEOM_Object_ptr MakeSketcher (const char* theCommand,
634 GEOM::GEOM_List_ptr theWorkingPlane);
635 GEOM::GEOM_Object_ptr Make3DSketcher (GEOM::GEOM_List_ptr theCoordinates);
637 //-----------------------------------------------------------//
638 // LocalOperations //
639 //-----------------------------------------------------------//
640 GEOM::GEOM_Object_ptr MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
642 GEOM::GEOM_Object_ptr MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
643 GEOM::GEOM_List_ptr theEdges);
644 GEOM::GEOM_Object_ptr MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
645 CORBA::Double theR2, GEOM::GEOM_List_ptr theEdges);
646 GEOM::GEOM_Object_ptr MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
647 GEOM::GEOM_List_ptr theFaces);
648 GEOM::GEOM_Object_ptr MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
649 CORBA::Double theR2, GEOM::GEOM_List_ptr theFaces);
650 GEOM::GEOM_Object_ptr MakeFillet2D (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
651 GEOM::GEOM_List_ptr theVertexes);
652 GEOM::GEOM_Object_ptr MakeFillet1D (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
653 GEOM::GEOM_List_ptr theVertexes, CORBA::Boolean doIgnoreSecantVertices);
654 GEOM::GEOM_Object_ptr MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD);
655 GEOM::GEOM_Object_ptr MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
656 CORBA::Double theD1, CORBA::Double theD2,
657 CORBA::Long theFace1, CORBA::Long theFace2);
658 GEOM::GEOM_Object_ptr MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
659 CORBA::Double theD, CORBA::Double theAngle,
660 CORBA::Long theFace1, CORBA::Long theFace2);
661 GEOM::GEOM_Object_ptr MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
662 CORBA::Double theD1, CORBA::Double theD2,
663 GEOM::GEOM_List_ptr theFaces);
664 GEOM::GEOM_Object_ptr MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
665 CORBA::Double theD, CORBA::Double theAngle,
666 GEOM::GEOM_List_ptr theFaces);
667 GEOM::GEOM_Object_ptr MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
668 CORBA::Double theD1, CORBA::Double theD2,
669 GEOM::GEOM_List_ptr theEdges);
670 GEOM::GEOM_Object_ptr MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
671 CORBA::Double theD, CORBA::Double theAngle,
672 GEOM::GEOM_List_ptr theEdges);
673 GEOM::GEOM_Object_ptr MakeArchimede (GEOM::GEOM_Object_ptr theShape,
674 CORBA::Double theWeight,
675 CORBA::Double theWaterDensity,
676 CORBA::Double theMeshingDeflection);
677 CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape,
678 GEOM::GEOM_Object_ptr theSubShape);
680 //-----------------------------------------------------------//
681 // GroupOperations //
682 //-----------------------------------------------------------//
683 GEOM::GEOM_Object_ptr CreateGroup (GEOM::GEOM_Object_ptr theMainShape,
684 CORBA::Long theShapeType);
685 void AddObject (GEOM::GEOM_Object_ptr theGroup,
686 CORBA::Long theSubShapeId);
687 void RemoveObject (GEOM::GEOM_Object_ptr theGroup,
688 CORBA::Long theSubShapeId);
689 CORBA::Long GetType (GEOM::GEOM_Object_ptr theGroup);
690 GEOM::GEOM_Object_ptr GetMainShape (GEOM::GEOM_Object_ptr theGroup);
691 GEOM::GEOM_List_ptr GetObjects (GEOM::GEOM_Object_ptr theGroup);
693 //-----------------------------------------------------------//
694 // ImportExport Operations //
695 //-----------------------------------------------------------//
696 CORBA::Boolean ExportXAO(GEOM::GEOM_Object_ptr shape,
697 const GEOM::ListOfGO& groups, const GEOM::ListOfFields& fields,
698 const char* author, const char* fileName);
699 CORBA::Boolean ImportXAO(const char* fileName, GEOM::GEOM_Object_out shape,
700 GEOM::ListOfGO_out subShapes, GEOM::ListOfGO_out groups, GEOM::ListOfFields_out fields);
702 //-----------------------------------------------------------//
703 // Advanced Operations //
704 //-----------------------------------------------------------//
705 GEOM::GEOM_List_ptr MakePipeTShape (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
706 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
707 CORBA::Boolean theHexMesh);
708 GEOM::GEOM_List_ptr MakePipeTShapeWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
709 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
710 CORBA::Boolean theHexMesh,
711 GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
712 GEOM::GEOM_List_ptr MakePipeTShapeChamfer (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
713 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
714 CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh);
715 GEOM::GEOM_List_ptr MakePipeTShapeChamferWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
716 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
717 CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
718 GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
719 GEOM::GEOM_List_ptr MakePipeTShapeFillet (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
720 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
721 CORBA::Double theRF, CORBA::Boolean theHexMesh);
722 GEOM::GEOM_List_ptr MakePipeTShapeFilletWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
723 CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
724 CORBA::Double theRF, CORBA::Boolean theHexMesh,
725 GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
726 GEOM::GEOM_Object_ptr MakeDividedDisk (CORBA::Double theR, CORBA::Double theRatio,
727 CORBA::Short theOrientation, GEOM::pattern thePattern);
728 GEOM::GEOM_Object_ptr MakeDividedCylinder (CORBA::Double theR,
730 GEOM::pattern thePattern);
731 GEOM::GEOM_Object_ptr MakeSmoothingSurface (GEOM::GEOM_List_ptr thelPoints);
732 /*@@ insert new functions before this line @@ do not remove this line @@*/
735 SALOME_NamingService * name_service;
736 GEOM::GEOM_Gen_var myGeomEngine;
737 CORBA::Long myStudyID;
738 CORBA::Long myLastStudyID; // mkr : PAL10770
739 PortableServer::POA_var myPOA;
741 GEOM::GEOM_IBasicOperations_var myBasicOp;
742 GEOM::GEOM_I3DPrimOperations_var my3DPrimOp;
743 GEOM::GEOM_IBooleanOperations_var myBoolOp;
744 GEOM::GEOM_IInsertOperations_var myInsOp;
745 GEOM::GEOM_ITransformOperations_var myTransfOp;
746 GEOM::GEOM_IShapesOperations_var myShapesOp;
747 GEOM::GEOM_IBlocksOperations_var myBlocksOp;
748 GEOM::GEOM_ICurvesOperations_var myCurvesOp;
749 GEOM::GEOM_ILocalOperations_var myLocalOp;
750 GEOM::GEOM_IGroupOperations_var myGroupOp;
751 GEOM::GEOM_IAdvancedOperations_var myAdvancedOp;