Salome HOME
DCQ : Co-localisation
[modules/geom.git] / idl / GEOM_Shape.idl
1 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
3 // 
4 //  This library is free software; you can redistribute it and/or 
5 //  modify it under the terms of the GNU Lesser General Public 
6 //  License as published by the Free Software Foundation; either 
7 //  version 2.1 of the License. 
8 // 
9 //  This library is distributed in the hope that it will be useful, 
10 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 //  Lesser General Public License for more details. 
13 // 
14 //  You should have received a copy of the GNU Lesser General Public 
15 //  License along with this library; if not, write to the Free Software 
16 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
17 // 
18 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
19 //
20 //
21 //
22 //  File   : GEOM_Shape.idl
23 //  Author : Lucien PIGNOLONI
24
25 #ifndef __GEOM_Shape__
26 #define __GEOM_Shape__
27
28 module GEOM
29 {
30   //-----------------------------------------------------------------//
31   //   Topological types for shapes (like Open Cascade types)        //
32   //-----------------------------------------------------------------//
33    
34   enum shape_type { COMPOUND, COMPSOLID, SOLID, SHELL,
35                     FACE, WIRE, EDGE, VERTEX, SHAPE } ;
36    
37   //----------------------------------------------------------------//
38   // Structures                                                     //
39   //--------------------------------------------------- ------------//
40   struct PointStruct { double x; 
41                        double y; 
42                        double z; } ; 
43   struct DirStruct   { PointStruct PS ; } ;          // analog to Occ Direction
44    
45   struct AxisStruct  { double x;
46                        double y;
47                        double z;
48                        double vx;
49                        double vy;
50                        double vz; } ; 
51    
52   //----------------------------------------------------------------//
53   // interface GEOM_Shape methods                                   //
54   //----------------------------------------------------------------//
55
56   interface GEOM_Gen;
57   
58   interface GEOM_Shape
59   {
60     typedef sequence<long>   ListOfSubShapeID ;
61     typedef sequence<octet> TMPFile;
62    
63     attribute string Name;            // (to set and get) the name of shape (= CORBA IOR converted into a string)
64     attribute string MainName;        // (to set and get) the name of mainshape (= CORBA IOR converted into a string)
65    
66     attribute boolean IsMainShape;    // (...) true if this is a main shape (not a sub shape)
67     attribute string ShapeId;         // (...) the entry of the shape in geom/OCAF document
68     attribute string StudyShapeId;    // (...) the entry of the shape in the study/OCAF when added
69     attribute ListOfSubShapeID Index; // (...) list of references (number) identifing the sub shapes in the main shape
70     attribute shape_type ShapeType;   // (...) a topological type of the shape
71    
72     attribute string NameType;        // (...) a topological/geometrical name of the shape
73    
74     //Transfer resulting shape to client as sequence of bytes
75     //client can extract shape from stream using BrepTools::Read function
76     TMPFile GetShapeStream();       
77    
78     // the generator engine
79     GEOM_Gen Engine();
80    
81     // Get the TopoDS_Shape, for colocated case only
82     long getShape();
83   };
84 };
85 #endif