Salome HOME
Merge from V6_main 01/04/2013
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_ShapeInfo.hxx
1 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20
21 #ifndef _GEOMAlgo_ShapeInfo_HeaderFile
22 #define _GEOMAlgo_ShapeInfo_HeaderFile
23
24 #include <Standard.hxx>
25 #include <Standard_Macro.hxx>
26 #include <TopAbs_ShapeEnum.hxx>
27 #include <Standard_Integer.hxx>
28 #include <GEOMAlgo_KindOfShape.hxx>
29 #include <GEOMAlgo_KindOfName.hxx>
30 #include <GEOMAlgo_KindOfBounds.hxx>
31 #include <GEOMAlgo_KindOfClosed.hxx>
32 #include <gp_Pnt.hxx>
33 #include <gp_Dir.hxx>
34 #include <gp_Ax3.hxx>
35 #include <Standard_Real.hxx>
36 #include <gp_Ax2.hxx>
37
38
39
40 //=======================================================================
41 //class : GEOMAlgo_ShapeInfo
42 //purpose  :
43 //=======================================================================
44 class GEOMAlgo_ShapeInfo
45 {
46  public:
47   Standard_EXPORT
48     GEOMAlgo_ShapeInfo();
49
50   Standard_EXPORT
51     virtual ~GEOMAlgo_ShapeInfo();
52
53   Standard_EXPORT
54     void Reset() ;
55
56   Standard_EXPORT
57     void SetType(const TopAbs_ShapeEnum aType) ;
58
59   Standard_EXPORT
60     TopAbs_ShapeEnum Type() const;
61
62   Standard_EXPORT
63     void SetNbSubShapes(const TopAbs_ShapeEnum aType,const Standard_Integer aNb) ;
64
65   Standard_EXPORT
66     Standard_Integer NbSubShapes(const TopAbs_ShapeEnum aType) const;
67
68   Standard_EXPORT
69     void SetKindOfShape(const GEOMAlgo_KindOfShape aT) ;
70
71   Standard_EXPORT
72     GEOMAlgo_KindOfShape KindOfShape() const;
73
74   Standard_EXPORT
75     void SetKindOfName(const GEOMAlgo_KindOfName aT) ;
76
77   Standard_EXPORT
78     GEOMAlgo_KindOfName KindOfName() const;
79
80   Standard_EXPORT
81     void SetKindOfBounds(const GEOMAlgo_KindOfBounds aT) ;
82
83   Standard_EXPORT
84     GEOMAlgo_KindOfBounds KindOfBounds() const;
85
86   Standard_EXPORT
87     void SetKindOfClosed(const GEOMAlgo_KindOfClosed aT) ;
88
89   Standard_EXPORT
90     GEOMAlgo_KindOfClosed KindOfClosed() const;
91
92   Standard_EXPORT
93     void SetLocation(const gp_Pnt& aP) ;
94
95   Standard_EXPORT
96     const gp_Pnt& Location() const;
97
98   Standard_EXPORT
99     void SetDirection(const gp_Dir& aD) ;
100
101   Standard_EXPORT
102     const gp_Dir& Direction() const;
103
104   Standard_EXPORT
105     void SetPosition(const gp_Ax2& aAx2) ;
106
107   Standard_EXPORT
108     void SetPosition(const gp_Ax3& aAx3) ;
109
110   Standard_EXPORT
111     const gp_Ax3& Position() const;
112
113   Standard_EXPORT
114     void SetPnt1(const gp_Pnt& aP) ;
115
116   Standard_EXPORT
117     const gp_Pnt& Pnt1() const;
118
119   Standard_EXPORT
120     void SetPnt2(const gp_Pnt& aP) ;
121
122   Standard_EXPORT
123     const gp_Pnt& Pnt2() const;
124
125   Standard_EXPORT
126     void SetRadius1(const Standard_Real aR) ;
127
128   Standard_EXPORT
129     Standard_Real Radius1() const;
130
131   Standard_EXPORT
132     void SetRadius2(const Standard_Real aR) ;
133
134   Standard_EXPORT
135     Standard_Real Radius2() const;
136
137   Standard_EXPORT
138     void SetLength(const Standard_Real aL) ;
139
140   Standard_EXPORT
141     Standard_Real Length() const;
142
143   Standard_EXPORT
144     void SetWidth(const Standard_Real aW) ;
145
146   Standard_EXPORT
147     Standard_Real Width() const;
148
149   Standard_EXPORT
150     void SetHeight(const Standard_Real aH) ;
151
152   Standard_EXPORT
153     Standard_Real Height() const;
154
155   Standard_EXPORT
156     void Dump() const;
157
158  protected:
159   Standard_EXPORT
160     void DumpVertex() const;
161
162   Standard_EXPORT
163     void DumpEdge() const;
164
165   Standard_EXPORT
166     void DumpWire() const;
167
168   Standard_EXPORT
169     void DumpFace() const;
170
171   Standard_EXPORT
172     void DumpShell() const;
173
174   Standard_EXPORT
175     void DumpSolid() const;
176
177   Standard_EXPORT
178     void DumpCompSolid() const;
179
180   Standard_EXPORT
181     void DumpCompound() const;
182
183
184   TopAbs_ShapeEnum myType;
185   Standard_Integer myNbSubShapes[9];
186   GEOMAlgo_KindOfShape myKindOfShape;
187   GEOMAlgo_KindOfName myKindOfName;
188   GEOMAlgo_KindOfBounds myKindOfBounds;
189   GEOMAlgo_KindOfClosed myKindOfClosed;
190   gp_Pnt myLocation;
191   gp_Dir myDirection;
192   gp_Ax3 myPosition;
193   Standard_Real myRadius1;
194   Standard_Real myRadius2;
195   Standard_Real myLength;
196   Standard_Real myWidth;
197   Standard_Real myHeight;
198   gp_Pnt myPnt1;
199   gp_Pnt myPnt2;
200   Standard_Integer myNbTypes;
201 };
202 #endif