Salome HOME
NRI : Merge from V1_2.
[modules/geom.git] / src / GEOM / GEOM_Gen_i.hh
1 //  GEOM GEOM : implementaion of GEOM_Gen.idl and GEOM_Shape.idl
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
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. 
10 // 
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. 
15 // 
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 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : GEOM_GEN_i.h file
25 //  Author : Lucien PIGNOLONI
26 //  Module : GEOM
27 //  $Header$ 
28
29 #ifndef __GEOM_GEN_I_H__
30 #define __GEOM_GEN_I_H__
31
32 // standard C++ headers
33 #include <TDocStd_Document.hxx>
34 #include "GEOMDS_DataMapOfIntegerTransient.hxx"
35 #include "GEOMDS_Application.hxx"
36 #include <TopTools_MapOfShape.hxx>
37 #include <TopTools_SequenceOfShape.hxx>
38 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
39 #include <TopAbs_ShapeEnum.hxx>
40 #include <TopoDS_Wire.hxx>
41 #include <TopoDS_Face.hxx>
42
43 // IDL headers
44 #include <SALOMEconfig.h>
45 #include CORBA_SERVER_HEADER(GEOM_Gen)
46 #include CORBA_SERVER_HEADER(GEOM_Shape)
47 #include CORBA_SERVER_HEADER(SALOMEDS)
48
49 #include "SALOME_Component_i.hxx"
50 #include "GEOM_Shape_i.hh"
51
52 #include "SALOME_NamingService.hxx"
53 #include <iostream.h>
54
55 #include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
56
57
58 //=====================================================================
59 // GEOM_Gen_i : class definition
60 //=====================================================================
61 class GEOM_Gen_i: public POA_GEOM::GEOM_Gen,
62   public Engines_Component_i
63 {
64  private:
65
66   SALOME_NamingService * name_service;
67   char * _name;
68   Handle(GEOMDS_Application)        myOCAFApp;          /* geom/OCAF Application             */
69   Handle(TDocStd_Document)          myCurrentOCAFDoc;   /* Current geom/OCAF Document        */
70   GEOMDS_DataMapOfIntegerTransient  myStudyIDToDoc;     /* Map to bind a Study to a Document */
71
72   int myStudyID;
73
74   GEOM::GEOM_Shape_ptr CreateObject(TopoDS_Shape& tds) ;
75
76   GEOM::GEOM_Shape_ptr CreateSubObject(const TopoDS_Shape& SubShape,
77                                        const GEOM::GEOM_Shape_ptr MainShape,
78                                        const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID);
79   // Create and insert(!) SubShape of MainShape
80
81   GEOM::GEOM_Shape_ptr GEOM_Gen_i::SubShapesOne( GEOM::GEOM_Shape_ptr shape, 
82                                                 const TopAbs_ShapeEnum ShapeType, 
83                                                 const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID,
84                                                 const Standard_Boolean sorted=Standard_False)
85     throw (SALOME::SALOME_Exception);
86   // return all listed subshapes as one shape
87   
88   GEOM::GEOM_Gen::ListOfGeomShapes* SubShapesAll(GEOM::GEOM_Shape_ptr shape,
89                                                  const TopAbs_ShapeEnum type,
90                                                  const Standard_Boolean sorted=Standard_False)
91     throw (SALOME::SALOME_Exception);
92   // return all subshapes by type
93
94   TopoDS_Face FindSameFace(const TopoDS_Shape& aShape, 
95                            const TopoDS_Face& F,
96                            double tol3d);
97   TopoDS_Edge FindSameEdge(const TopoDS_Face& newFace, 
98                            TopoDS_Edge& Eold,
99                            double tol3d);
100
101  public:
102   //-----------------------------------------------------------------------//
103   // Constructor / Destructor                                              //
104   //-----------------------------------------------------------------------//
105   // constructor to be called for servant creation. 
106   GEOM_Gen_i();
107   GEOM_Gen_i(CORBA::ORB_ptr orb,
108              PortableServer::POA_ptr poa,
109              PortableServer::ObjectId * contId, 
110              const char *instanceName, 
111              const char *interfaceName);
112
113   // destructor, doing nothing (for now)
114   virtual ~GEOM_Gen_i();
115
116   // generic method to be put in a super class
117   void register_name(char * name);
118
119   //-----------------------------------------------------------------------//
120   // Studies Management                                                    //
121   //-----------------------------------------------------------------------//
122   void GetCurrentStudy (CORBA::Long StudyID);
123
124   CORBA::Short NbLabels();
125
126   // inherited methods from SALOMEDS::Driver
127   SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
128                           const char* theURL,
129                           bool isMultiFile);
130
131   SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
132                                const char* theURL,
133                                bool isMultiFile);
134   
135   CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent,
136                       const SALOMEDS::TMPFile& theStream,
137                       const char* theURL,
138                       bool isMultiFile);
139
140   CORBA::Boolean LoadASCII(SALOMEDS::SComponent_ptr theComponent,
141                            const SALOMEDS::TMPFile& theStream,
142                            const char* theURL,
143                            bool isMultiFile);
144
145   void Close(SALOMEDS::SComponent_ptr theComponent);
146   char* ComponentDataType();
147
148
149   char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
150                                const char* IORString,
151                                CORBA::Boolean isMultiFile,
152                                CORBA::Boolean isASCII);
153   char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
154                                const char* aLocalPersistentID,
155                                CORBA::Boolean isMultiFile,
156                                CORBA::Boolean isASCII);
157
158   bool CanPublishInStudy(CORBA::Object_ptr theIOR);
159   SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
160                                        SALOMEDS::SObject_ptr theSObject,
161                                        CORBA::Object_ptr theObject,
162                                        const char* theName) throw (SALOME::SALOME_Exception) ;
163
164   CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
165   SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
166   CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID);
167   SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
168                                   CORBA::Long theObjectID,
169                                   SALOMEDS::SObject_ptr theObject);
170
171   //-----------------------------------------------------------------------//
172   // Shapes Management                                                     //
173   //-----------------------------------------------------------------------//
174   const char* InsertInLabel(TopoDS_Shape S,
175                             const char *nameIor,
176                             Handle(TDocStd_Document) OCAFDoc) ;
177
178   const char* InsertInLabelDependentShape(TopoDS_Shape S,
179                                           const char *nameIor,
180                                           GEOM::GEOM_Shape_ptr mainshape_ptr,
181                                           Handle(TDocStd_Document) OCAFDoc) ;
182   
183   void InsertInLabelOneArgument(TopoDS_Shape main_topo,
184                                 GEOM::GEOM_Shape_ptr shape_ptr,
185                                 TopoDS_Shape result_topo,                               
186                                 GEOM::GEOM_Shape_ptr result,    
187                                 Handle(TDocStd_Document) OCAFDoc) ;
188
189   void InsertInLabelMoreArguments(TopoDS_Shape main_topo,
190                                   GEOM::GEOM_Shape_ptr result,
191                                   const GEOM::GEOM_Gen::ListOfIOR& ListShapes,                          
192                                   Handle(TDocStd_Document) OCAFDoc) ;
193
194   // Methods used by SuppressFaces
195   int SuppressFacesGlue( const TopoDS_Shape& S,
196                         const TopTools_MapOfShape& mapFaces,
197                         TopoDS_Shape& aCompoundOfShells ) throw (SALOME::SALOME_Exception) ;
198
199   // various services
200   int GetIndexTopology( const TopoDS_Shape& subshape,
201                        const TopoDS_Shape& mainShape ) ;
202
203   bool GetShapeFromIndex( const TopoDS_Shape& aShape,
204                          const TopAbs_ShapeEnum aType, 
205                          const int index,
206                          TopoDS_Shape& tds) ; 
207
208   GEOM::GEOM_Shape::ListOfSubShapeID* IndexOfFacesOfSubShell( const TopoDS_Shape& S,
209                                                              const TopoDS_Shape subShell )
210     throw (SALOME::SALOME_Exception) ;
211
212   bool ListOfIDIntoMapOfShapes( const TopoDS_Shape& S,
213                                const GEOM::GEOM_Shape::ListOfSubShapeID& L, 
214                                const int subShapeType,
215                                TopTools_MapOfShape& aMap ) ;
216
217   bool ListOfIDIntoSequenceOfShapes( const TopoDS_Shape& S,
218                                     const GEOM::GEOM_Shape::ListOfSubShapeID& L,
219                                     const int subShapeType,
220                                     TopTools_SequenceOfShape& aSequenceOfShapes ) ;
221
222   // Returns a  TopoDS_Shape from a GEOM::GEOM_Shape_ptr
223   TopoDS_Shape GetTopoShape(GEOM::GEOM_Shape_ptr shape_ptr) ;
224
225   // Define a sequence of shapes from 'listShapes' and return its length
226   int SequenceOfShapeFromListOfGeomShape( const GEOM::GEOM_Gen::ListOfGeomShapes& listShapes,
227                                          TopTools_SequenceOfShape& SS ) ;
228
229   // Get a string representing a shape ref IOR
230   const char* GetStringFromIOR(GEOM::GEOM_Shape_var shapeIOR);
231
232   // Return the shape ref represented by a string of IOR
233   GEOM::GEOM_Shape_ptr GetIORFromString(const char* stringIOR);
234
235   GEOM::GEOM_Gen::ListOfIOR* GetReferencedObjects(GEOM::GEOM_Shape_ptr shape);
236   GEOM::GEOM_Gen::ListOfIOR* GetObjects(GEOM::GEOM_Shape_ptr shape);
237
238
239   //-----------------------------------------------------------------------//
240   // Internal structure of shapes                                          //
241   //-----------------------------------------------------------------------//
242   // Explode SubShape
243   GEOM::GEOM_Shape_ptr SubShape(GEOM::GEOM_Shape_ptr shape,
244                                 CORBA::Short ShapeType, 
245                                 const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID)
246     throw (SALOME::SALOME_Exception) ;
247
248   // Explode SubShape in predictable order
249   GEOM::GEOM_Shape_ptr SubShapeSorted(GEOM::GEOM_Shape_ptr shape,
250                                       CORBA::Short ShapeType, 
251                                       const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID)
252     throw (SALOME::SALOME_Exception) ;
253   
254   // Explode SubShape
255   GEOM::GEOM_Gen::ListOfGeomShapes*  SubShapeAll(GEOM::GEOM_Shape_ptr shape,
256                                                  CORBA::Short ShapeType)
257     throw (SALOME::SALOME_Exception) ;
258   
259   // Explode SubShape in predictable order for TUI or GUI
260   GEOM::GEOM_Gen::ListOfGeomShapes*  SubShapeAllSorted(GEOM::GEOM_Shape_ptr shape,
261                                                        CORBA::Short ShapeType)
262     throw (SALOME::SALOME_Exception) ;
263
264   // Suppress faces in a shape 
265   GEOM::GEOM_Gen::ListOfGeomShapes* SuppressFaces( GEOM::GEOM_Shape_ptr shape,
266                                                   const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID )
267     throw (SALOME::SALOME_Exception) ;
268
269   // Suppress one or more holes in a face or shell independant topology
270   GEOM::GEOM_Shape_ptr SuppressHolesInFaceOrShell( GEOM::GEOM_Shape_ptr shapeFaceShell,
271                                                   const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfIdWires)
272     throw (SALOME::SALOME_Exception) ;
273
274   // Suppress a single hole in a topology (face) shell or solid with/without hole traversing
275   GEOM::GEOM_Shape_ptr SuppressHole( GEOM::GEOM_Shape_ptr shape,
276                                     const GEOM::GEOM_Shape::ListOfSubShapeID& ListIdFace,
277                                     const GEOM::GEOM_Shape::ListOfSubShapeID& ListIdWire,
278                                     const GEOM::GEOM_Shape::ListOfSubShapeID& ListIdEndFace )
279     throw (SALOME::SALOME_Exception) ;
280
281   bool RebuildFaceRemovingHoles( const TopoDS_Face& aFace,
282                                 const TopTools_MapOfShape& mapHoles,
283                                 TopoDS_Shape& resultFace ) ;
284
285   void SuppressHoleSubRoutine( const TopoDS_Shape& mainShape,
286                                const TopoDS_Face& aFace,
287                                const TopTools_SequenceOfShape& SSedgesOfWire,
288                                const TopTools_IndexedDataMapOfShapeListOfShape& aMapEdgesFaces,
289                                const TopTools_MapOfShape& MSfaces,
290                                TopTools_MapOfShape& MSfacesSuppress,
291                                const Standard_Boolean withEndFace,
292                                const TopoDS_Face& endFace,
293                                TopTools_MapOfShape& MSwireEndEdges )
294     throw (SALOME::SALOME_Exception ) ;  
295   
296   bool BuildShapeHoleNotTraversing( const TopoDS_Shape& aShape,
297                                    const TopoDS_Face& aFace,
298                                    const TopoDS_Wire& aWire,
299                                    const TopTools_MapOfShape& MFSuppress,
300                                    TopoDS_Shape& resultTds )
301     throw (SALOME::SALOME_Exception) ;
302
303   bool BuildShapeHoleTraversing( const TopoDS_Shape& aShape,
304                                 const TopoDS_Face& aFace,
305                                 const TopoDS_Wire& aWire,
306                                 const TopTools_MapOfShape& MFSuppress,
307                                  const TopoDS_Face& endFace,
308                                 const TopoDS_Wire& endWire,
309                                 TopoDS_Shape& resultTds )
310     throw (SALOME::SALOME_Exception) ;
311
312   bool FindCompareWireHoleOnFace( const TopoDS_Face& F,
313                                  const TopTools_MapOfShape& MSwireEdges,
314                                  TopoDS_Wire& aFoundWire ) ;
315
316   bool IsShapeInSequence( const TopTools_SequenceOfShape& SS, const TopoDS_Shape& aShape ) ;
317
318   void FreeEdgesFromMapOfFace(const TopTools_MapOfShape& MSfaces, TopTools_MapOfShape& MS ) ;
319
320   void MapRemoveSequence( const TopTools_MapOfShape& MS,
321                          const TopTools_SequenceOfShape& SSRemove,
322                          TopTools_SequenceOfShape& ST) ;
323
324   bool BuildShellWithFaceCompound( const TopoDS_Compound Comp,
325                                   TopoDS_Shell& resultShell ) ;
326
327   //-----------------------------------------------------------------------//
328   // Basic structures                                                      //
329   //-----------------------------------------------------------------------//
330   GEOM::PointStruct MakePointStruct(CORBA::Double x,
331                                           CORBA::Double y,
332                                           CORBA::Double z) ;
333   GEOM::DirStruct   MakeDirection(const GEOM::PointStruct& p) ;
334
335   GEOM::AxisStruct  MakeAxisStruct(CORBA::Double x,
336                                          CORBA::Double y,
337                                          CORBA::Double z,
338                                          CORBA::Double vx,
339                                          CORBA::Double vy,
340                                          CORBA::Double vz) ;
341
342   //----------------------------------------------------------------------//
343   // Boolean Operations                                                   //
344   //----------------------------------------------------------------------//
345   GEOM::GEOM_Shape_ptr MakeBoolean(GEOM::GEOM_Shape_ptr shape1,
346                                    GEOM::GEOM_Shape_ptr shape2,
347                                    CORBA::Long operation)
348     throw (SALOME::SALOME_Exception) ;
349   GEOM::GEOM_Shape_ptr MakeFuse(GEOM::GEOM_Shape_ptr shape1,
350                                 GEOM::GEOM_Shape_ptr shape2)
351     throw (SALOME::SALOME_Exception) ;
352
353   //----------------------------------------------------------------------//
354   // Advanced Operations                                                  //
355   //----------------------------------------------------------------------//
356   GEOM::GEOM_Shape_ptr Partition(const GEOM::GEOM_Gen::ListOfIOR& ListShapes, 
357                                  const GEOM::GEOM_Gen::ListOfIOR& ListTools,
358                                  const GEOM::GEOM_Gen::ListOfIOR& ListKeepInside,
359                                  const GEOM::GEOM_Gen::ListOfIOR& ListRemoveInside,
360                                  const CORBA::Short               Limit)
361     throw (SALOME::SALOME_Exception) ;
362
363   // Filling a surface with section curves
364   GEOM::GEOM_Shape_ptr MakeFilling(GEOM::GEOM_Shape_ptr shape,
365                                    CORBA::Short mindeg,
366                                    CORBA::Short maxdeg,
367                                    CORBA::Double tol3d,
368                                    CORBA::Double tol2d,
369                                    CORBA::Short nbiter)
370     throw (SALOME::SALOME_Exception) ;
371   // Sewing of shapes
372   GEOM::GEOM_Shape_ptr MakeSewing(const GEOM::GEOM_Gen::ListOfIOR& ListShapes,
373                                   CORBA::Double precision)
374     throw (SALOME::SALOME_Exception) ;
375
376   GEOM::GEOM_Shape_ptr MakeSewingShape( GEOM::GEOM_Shape_ptr aShape,
377                                        CORBA::Double precision )
378     throw (SALOME::SALOME_Exception);
379
380   GEOM::GEOM_Shape_ptr MakeGlueFaces(GEOM::GEOM_Shape_ptr myShape,
381                                      double tol3d)
382     throw (SALOME::SALOME_Exception);
383
384   // Change the orientation of a (new) shape
385   GEOM::GEOM_Shape_ptr OrientationChange(GEOM::GEOM_Shape_ptr shape)
386     throw (SALOME::SALOME_Exception) ;
387
388   GEOM::GEOM_Shape_ptr MakePlacedBox(CORBA::Double x1,  CORBA::Double y1,  CORBA::Double z1,
389                                      CORBA::Double delta1, CORBA::Double delta2, CORBA::Double delta3)
390     throw (SALOME::SALOME_Exception) ;
391
392   GEOM::GEOM_Shape_ptr MakePanel(GEOM::GEOM_Shape_ptr shape,
393                                  CORBA::Short directiontype,
394                                  CORBA::Double delta)
395     throw (SALOME::SALOME_Exception) ;
396
397   //---------------------------------------------------------------------//
398   // Transformations Operations                                          //
399   //---------------------------------------------------------------------//
400   // Copy 
401   GEOM::GEOM_Shape_ptr MakeCopy( GEOM::GEOM_Shape_ptr shape)
402     throw (SALOME::SALOME_Exception) ;
403
404   // Translation
405   GEOM::GEOM_Shape_ptr MakeTranslation( GEOM::GEOM_Shape_ptr shape,
406                                        CORBA::Double x,
407                                        CORBA::Double y,
408                                        CORBA::Double z)
409     throw (SALOME::SALOME_Exception) ;
410   // Rotation
411   GEOM::GEOM_Shape_ptr MakeRotation( GEOM::GEOM_Shape_ptr shape,
412                                     const GEOM::AxisStruct& axis,
413                                     CORBA::Double angle)
414     throw (SALOME::SALOME_Exception) ;
415   // Create a shape using a scale factor
416   GEOM::GEOM_Shape_ptr MakeScaleTransform(GEOM::GEOM_Shape_ptr shape,
417                                           const GEOM::PointStruct& theCenterOfScale,
418                                           CORBA::Double factor)
419     throw (SALOME::SALOME_Exception) ;
420   // Mirror of a shape by a  plane
421   GEOM::GEOM_Shape_ptr MakeMirrorByPlane(GEOM::GEOM_Shape_ptr shape,
422                                          GEOM::GEOM_Shape_ptr shapePlane)
423     throw (SALOME::SALOME_Exception) ;  
424
425   // Shape by revolution of another around an axis
426   GEOM::GEOM_Shape_ptr MakeRevolution(GEOM::GEOM_Shape_ptr shape,
427                                       const GEOM::AxisStruct& axis,
428                                       CORBA::Double angle)
429     throw (SALOME::SALOME_Exception) ;
430
431   // Create a prism with a base shape along a vector P1 to P2 
432   GEOM::GEOM_Shape_ptr MakePrism(GEOM::GEOM_Shape_ptr baseShape,
433                                  const GEOM::PointStruct& P1,
434                                  const GEOM::PointStruct& P2)
435     throw (SALOME::SALOME_Exception) ;
436   // Create a shape by sweeping a baseShape along a pathShape
437   GEOM::GEOM_Shape_ptr MakePipe(GEOM::GEOM_Shape_ptr pathShape,
438                                 GEOM::GEOM_Shape_ptr baseShape)
439     throw (SALOME::SALOME_Exception) ;
440
441   //---------------------------------------------------------------------//
442   // Patterns Operations                                                 //
443   //---------------------------------------------------------------------//
444
445   // Multi Translation 1D
446   GEOM::GEOM_Shape_ptr MakeMultiTranslation1D( GEOM::GEOM_Shape_ptr shape,
447                                               const GEOM::DirStruct& dir,
448                                               CORBA::Double step,
449                                               CORBA::Short nbtimes)
450     throw (SALOME::SALOME_Exception) ;
451
452   // Multi Translation 2D
453   GEOM::GEOM_Shape_ptr MakeMultiTranslation2D( GEOM::GEOM_Shape_ptr shape,
454                                               const GEOM::DirStruct& dir1,
455                                               CORBA::Double step1,
456                                               CORBA::Short nbtimes1,
457                                               const GEOM::DirStruct& dir2,
458                                               CORBA::Double step2,
459                                               CORBA::Short nbtimes2)
460     throw (SALOME::SALOME_Exception) ;
461
462   // Multi Rotation 1D
463   GEOM::GEOM_Shape_ptr MakeMultiRotation1D( GEOM::GEOM_Shape_ptr shape,
464                                            const GEOM::DirStruct& dir,
465                                            const GEOM::PointStruct& loc,
466                                            CORBA::Short nbtimes)
467     throw (SALOME::SALOME_Exception) ;
468
469   // Multi Rotation 2D
470   GEOM::GEOM_Shape_ptr MakeMultiRotation2D( GEOM::GEOM_Shape_ptr shape,
471                                            const GEOM::DirStruct& dir,
472                                            const GEOM::PointStruct& loc,
473                                            CORBA::Double ang,
474                                            CORBA::Short nbtimes1,
475                                            CORBA::Double step,
476                                            CORBA::Short nbtimes2)
477     throw (SALOME::SALOME_Exception) ;
478
479   //--------------------------------------------------------------------//
480   // Primitives Construction                                            //
481   //--------------------------------------------------------------------//
482   GEOM::GEOM_Shape_ptr MakeBox(CORBA::Double x1,
483                                CORBA::Double y1,
484                                CORBA::Double z1,
485                                CORBA::Double x2,
486                                CORBA::Double y2,
487                                CORBA::Double z2)
488     throw (SALOME::SALOME_Exception) ;
489   GEOM::GEOM_Shape_ptr MakeSphere(CORBA::Double x1,
490                                   CORBA::Double y1,
491                                   CORBA::Double z1,
492                                   CORBA::Double radius)
493     throw (SALOME::SALOME_Exception) ;
494   GEOM::GEOM_Shape_ptr MakeCylinder(const  GEOM::PointStruct& pstruct,
495                                     const GEOM::DirStruct& dstruct,
496                                     CORBA::Double radius,
497                                     CORBA::Double height)
498     throw (SALOME::SALOME_Exception) ;
499   GEOM::GEOM_Shape_ptr MakeTorus(const GEOM::PointStruct& pstruct,
500                                  const GEOM::DirStruct& dstruct,
501                                  CORBA::Double major_radius,
502                                  CORBA::Double minor_radius)
503     throw (SALOME::SALOME_Exception) ;
504   GEOM::GEOM_Shape_ptr MakeCone(const GEOM::PointStruct& pstruct,
505                                 const GEOM::DirStruct& dstruct,
506                                 CORBA::Double radius1,
507                                 CORBA::Double radius2,
508                                 CORBA::Double height)
509     throw (SALOME::SALOME_Exception) ;
510
511   //-------------------------------------------------------------------//
512   // Import/Export                                                     //
513   //-------------------------------------------------------------------//
514   GEOM::GEOM_Shape_ptr ImportIGES(const char* filename) throw (SALOME::SALOME_Exception) ;
515   GEOM::GEOM_Shape_ptr ImportBREP(const char* filename) throw (SALOME::SALOME_Exception) ;
516   GEOM::GEOM_Shape_ptr ImportSTEP(const char* filename) throw (SALOME::SALOME_Exception) ;
517
518   void ExportIGES(const char* filename,GEOM::GEOM_Shape_ptr theShape) throw (SALOME::SALOME_Exception) ;
519   void ExportBREP(const char* filename,GEOM::GEOM_Shape_ptr theShape) throw (SALOME::SALOME_Exception) ;
520   void ExportSTEP(const char* filename,GEOM::GEOM_Shape_ptr theShape) throw (SALOME::SALOME_Exception) ;
521   //-------------------------------------------------------------------//
522   // Fillet and Chamfer construction                                   //
523   //-------------------------------------------------------------------//
524   GEOM::GEOM_Shape_ptr MakeFillet (GEOM::GEOM_Shape_ptr shape,
525                                    CORBA::Double radius,
526                              CORBA::Short ShapeType,
527                                    const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID)
528     throw (SALOME::SALOME_Exception) ;
529
530   GEOM::GEOM_Shape_ptr MakeChamfer(GEOM::GEOM_Shape_ptr shape,
531                                    CORBA::Double d1,
532                                    CORBA::Double d2,
533                                    CORBA::Short ShapeType,
534                                    const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID)
535     throw (SALOME::SALOME_Exception) ;
536
537   //-------------------------------------------------------------------//
538   // Mesures Construction                                              //
539   //-------------------------------------------------------------------//
540   GEOM::GEOM_Shape_ptr MakeCDG(GEOM::GEOM_Shape_ptr shape)
541     throw (SALOME::SALOME_Exception) ;
542
543   //-------------------------------------------------------------------//
544   // Check Shape                                                       //
545   //-------------------------------------------------------------------//
546   CORBA::Boolean CheckShape(GEOM::GEOM_Shape_ptr shape)
547     throw (SALOME::SALOME_Exception) ;
548
549   //-------------------------------------------------------------------//
550   // Primitives Construction                                           //
551   //-------------------------------------------------------------------//
552   GEOM::GEOM_Shape_ptr MakeVertex(CORBA::Double x,
553                                   CORBA::Double y,
554                                   CORBA::Double z)
555     throw (SALOME::SALOME_Exception) ;
556   GEOM::GEOM_Shape_ptr MakeVector(const GEOM::PointStruct& pstruct1,
557                                   const GEOM::PointStruct& pstruct2)
558     throw (SALOME::SALOME_Exception) ;
559   GEOM::GEOM_Shape_ptr MakeLine  (const GEOM::PointStruct& pstruct,
560                                   const GEOM::DirStruct& dstruc)
561     throw (SALOME::SALOME_Exception) ;
562   GEOM::GEOM_Shape_ptr MakePlane (const GEOM::PointStruct& pstruct,
563                                   const GEOM::DirStruct& dstruc,
564                                   CORBA::Double trimsize)
565     throw (SALOME::SALOME_Exception) ;
566   GEOM::GEOM_Shape_ptr MakeCircle(const  GEOM::PointStruct& pstruct,
567                                   const GEOM::DirStruct& dstruct,
568                                   CORBA::Double radius)
569     throw (SALOME::SALOME_Exception) ;
570   GEOM::GEOM_Shape_ptr MakeEllipse(const GEOM::PointStruct& pstruct,
571                                    const GEOM::DirStruct& dstruct,
572                                    CORBA::Double radius_major,
573                                    CORBA::Double radiusminus )
574     throw (SALOME::SALOME_Exception) ;
575   GEOM::GEOM_Shape_ptr MakeArc   (const  GEOM::PointStruct& pInit,
576                                   const  GEOM::PointStruct& pCircle,
577                                   const  GEOM::PointStruct& pEnd)
578     throw (SALOME::SALOME_Exception) ;
579
580   GEOM::GEOM_Shape_ptr MakeCompound (const GEOM::GEOM_Gen::ListOfIOR& ListShapes)
581     throw (SALOME::SALOME_Exception) ;
582   GEOM::GEOM_Shape_ptr MakeWire     (const GEOM::GEOM_Gen::ListOfIOR& ListShapes)
583     throw (SALOME::SALOME_Exception) ;
584   GEOM::GEOM_Shape_ptr MakeEdge     (const GEOM::PointStruct& pstruct1,
585                                      const GEOM::PointStruct& pstruct2)
586     throw (SALOME::SALOME_Exception) ;
587   GEOM::GEOM_Shape_ptr MakeFace     (GEOM::GEOM_Shape_ptr wire, CORBA::Boolean wantplanarface)
588     throw (SALOME::SALOME_Exception) ;
589
590
591   //-------------------------------------------------------------------//
592   // Speciic method Archimede                                          //
593   //-------------------------------------------------------------------//
594   GEOM::GEOM_Shape_ptr Archimede(GEOM::GEOM_Shape_ptr aShape,
595                                  CORBA::Double aWeight,
596                                  CORBA::Double aWaterDensity,
597                                  CORBA::Double aMeshingDeflection)
598     throw (SALOME::SALOME_Exception) ;
599
600 };
601
602 #endif