Salome HOME
[bos #39942] EDF 25230 - New problem with XYZtoUV
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_ShapeInfo.hxx
1 // Copyright (C) 2007-2023  CEA, EDF, 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, or (at your option) any later version.
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
29
30 #include <gp_Pnt.hxx>
31 #include <gp_Dir.hxx>
32 #include <gp_Ax3.hxx>
33 #include <Standard_Real.hxx>
34 #include <gp_Ax2.hxx>
35
36 #include <GEOMAlgo_KindOfShape.hxx>
37 #include <GEOMAlgo_KindOfName.hxx>
38 #include <GEOMAlgo_KindOfBounds.hxx>
39 #include <GEOMAlgo_KindOfClosed.hxx>
40 #include <GEOMAlgo_KindOfDef.hxx>
41 #include <GEOMAlgo_KindOfPeriod.hxx>
42
43 #include <TColgp_HArray1OfPnt.hxx>
44 #include <TColStd_HArray1OfReal.hxx>
45 #include <TColStd_HArray1OfInteger.hxx>
46
47
48 //=======================================================================
49 //class : GEOMAlgo_ShapeInfo
50 //purpose  :
51 //=======================================================================
52 class GEOMAlgo_ShapeInfo
53 {
54  public:
55   Standard_EXPORT
56     GEOMAlgo_ShapeInfo();
57
58   Standard_EXPORT
59     virtual ~GEOMAlgo_ShapeInfo();
60
61   Standard_EXPORT
62     void Reset() ;
63
64   Standard_EXPORT
65     void SetType(const TopAbs_ShapeEnum aType) ;
66
67   Standard_EXPORT
68     TopAbs_ShapeEnum Type() const;
69
70   Standard_EXPORT
71     void SetNbSubShapes(const TopAbs_ShapeEnum aType,
72                         const Standard_Integer aNb) ;
73
74   Standard_EXPORT
75     Standard_Integer NbSubShapes(const TopAbs_ShapeEnum aType) const;
76
77   Standard_EXPORT
78     void SetKindOfShape(const GEOMAlgo_KindOfShape aT) ;
79
80   Standard_EXPORT
81     GEOMAlgo_KindOfShape KindOfShape() const;
82
83   Standard_EXPORT
84     void SetKindOfName(const GEOMAlgo_KindOfName aT) ;
85
86   Standard_EXPORT
87     GEOMAlgo_KindOfName KindOfName() const;
88
89   Standard_EXPORT
90     void SetKindOfBounds(const GEOMAlgo_KindOfBounds aT) ;
91
92   Standard_EXPORT
93     GEOMAlgo_KindOfBounds KindOfBounds() const;
94
95   Standard_EXPORT
96     void SetKindOfClosed(const GEOMAlgo_KindOfClosed aT) ;
97
98   Standard_EXPORT
99     GEOMAlgo_KindOfClosed KindOfClosed() const;
100
101   Standard_EXPORT
102     void SetKindOfDef(const GEOMAlgo_KindOfDef aT) ;
103
104   Standard_EXPORT
105     GEOMAlgo_KindOfDef KindOfDef() const;
106
107   Standard_EXPORT
108     void SetKindOfPeriod(const GEOMAlgo_KindOfPeriod aT) ;
109
110   Standard_EXPORT
111     GEOMAlgo_KindOfPeriod KindOfPeriod() const;
112
113   Standard_EXPORT
114     void SetLocation(const gp_Pnt& aP) ;
115
116   Standard_EXPORT
117     const gp_Pnt& Location() const;
118
119   Standard_EXPORT
120     void SetDirection(const gp_Dir& aD) ;
121
122   Standard_EXPORT
123     const gp_Dir& Direction() const;
124
125   Standard_EXPORT
126     void SetPosition(const gp_Ax2& aAx2) ;
127
128   Standard_EXPORT
129     void SetPosition(const gp_Ax3& aAx3) ;
130
131   Standard_EXPORT
132     const gp_Ax3& Position() const;
133
134   Standard_EXPORT
135     void SetPnt1(const gp_Pnt& aP) ;
136
137   Standard_EXPORT
138     const gp_Pnt& Pnt1() const;
139
140   Standard_EXPORT
141     void SetPnt2(const gp_Pnt& aP) ;
142
143   Standard_EXPORT
144     const gp_Pnt& Pnt2() const;
145
146   Standard_EXPORT
147     void SetRadius1(const Standard_Real aR) ;
148
149   Standard_EXPORT
150     Standard_Real Radius1() const;
151
152   Standard_EXPORT
153     void SetRadius2(const Standard_Real aR) ;
154
155   Standard_EXPORT
156     Standard_Real Radius2() const;
157
158   Standard_EXPORT
159     void SetLength(const Standard_Real aL) ;
160
161   Standard_EXPORT
162     Standard_Real Length() const;
163
164   Standard_EXPORT
165     void SetWidth(const Standard_Real aW) ;
166
167   Standard_EXPORT
168     Standard_Real Width() const;
169
170   Standard_EXPORT
171     void SetHeight(const Standard_Real aH) ;
172
173   Standard_EXPORT
174     Standard_Real Height() const;
175
176   Standard_EXPORT
177     void SetDegree(const Standard_Integer aDeg) ;
178
179   Standard_EXPORT
180     Standard_Integer Degree() const;
181
182   Standard_EXPORT
183     void SetNbPoles(const Standard_Integer aNb) ;
184
185   Standard_EXPORT
186     Standard_Integer NbPoles() const;
187
188   Standard_EXPORT
189     void SetNbKnots(const Standard_Integer aNb) ;
190
191   Standard_EXPORT
192     Standard_Integer NbKnots() const;
193
194   Standard_EXPORT
195     void SetNbWeights(const Standard_Integer aNb) ;
196
197   Standard_EXPORT
198     Standard_Integer NbWeights() const;
199
200   Standard_EXPORT
201     void SetNbMultiplicities(const Standard_Integer aNb) ;
202
203   Standard_EXPORT
204     Standard_Integer NbMultiplicities() const;
205
206   Standard_EXPORT
207     void SetPoles(Handle(TColgp_HArray1OfPnt) P) ;
208
209   Standard_EXPORT
210     Handle(TColgp_HArray1OfPnt) Poles() const;
211
212   Standard_EXPORT
213     void SetKnots(Handle(TColStd_HArray1OfReal) K) ;
214
215   Standard_EXPORT
216     Handle(TColStd_HArray1OfReal) Knots() const;
217
218   Standard_EXPORT
219     void SetWeights(Handle(TColStd_HArray1OfReal) W) ;
220
221   Standard_EXPORT
222     Handle(TColStd_HArray1OfReal) Weights() const;
223
224   Standard_EXPORT
225     void SetMultiplicities(Handle(TColStd_HArray1OfInteger) M) ;
226
227   Standard_EXPORT
228     Handle(TColStd_HArray1OfInteger) Multiplicities() const;
229
230   Standard_EXPORT
231     void Dump() const;
232
233  protected:
234   Standard_EXPORT
235     void DumpVertex() const;
236
237   Standard_EXPORT
238     void DumpEdge() const;
239
240   Standard_EXPORT
241     void DumpWire() const;
242
243   Standard_EXPORT
244     void DumpFace() const;
245
246   Standard_EXPORT
247     void DumpShell() const;
248
249   Standard_EXPORT
250     void DumpSolid() const;
251
252   Standard_EXPORT
253     void DumpCompSolid() const;
254
255   Standard_EXPORT
256     void DumpCompound() const;
257
258
259   TopAbs_ShapeEnum myType;
260   Standard_Integer myNbSubShapes[9];
261   GEOMAlgo_KindOfShape myKindOfShape;
262   GEOMAlgo_KindOfName myKindOfName;
263   GEOMAlgo_KindOfBounds myKindOfBounds;
264   GEOMAlgo_KindOfClosed myKindOfClosed;
265   GEOMAlgo_KindOfDef myKindOfDef;
266   gp_Pnt myLocation;
267   gp_Dir myDirection;
268   gp_Ax3 myPosition;
269   Standard_Real myRadius1;
270   Standard_Real myRadius2;
271   Standard_Real myLength;
272   Standard_Real myWidth;
273   Standard_Real myHeight;
274   gp_Pnt myPnt1;
275   gp_Pnt myPnt2;
276   GEOMAlgo_KindOfPeriod myKindOfPeriod;
277   Standard_Integer myNbTypes;
278   Standard_Integer myNbKnots;
279   Standard_Integer myNbPoles;
280   Standard_Integer myNbWeights;
281   Standard_Integer myNbMultiplicities;
282   Standard_Integer myDegree;
283   Handle(TColgp_HArray1OfPnt)      myPoles;
284   Handle(TColStd_HArray1OfReal)    myKnots;
285   Handle(TColStd_HArray1OfReal)    myWeights;
286   Handle(TColStd_HArray1OfInteger) myMultiplicities;
287 };
288 #endif