Version: 9.12.0
GEOMAlgo_ShapeInfo.hxx
Go to the documentation of this file.
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>
40 #include <GEOMAlgo_KindOfDef.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 //=======================================================================
53 {
54  public:
55  Standard_EXPORT
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
82 
83  Standard_EXPORT
84  void SetKindOfName(const GEOMAlgo_KindOfName aT) ;
85 
86  Standard_EXPORT
88 
89  Standard_EXPORT
90  void SetKindOfBounds(const GEOMAlgo_KindOfBounds aT) ;
91 
92  Standard_EXPORT
94 
95  Standard_EXPORT
96  void SetKindOfClosed(const GEOMAlgo_KindOfClosed aT) ;
97 
98  Standard_EXPORT
100 
101  Standard_EXPORT
102  void SetKindOfDef(const GEOMAlgo_KindOfDef aT) ;
103 
104  Standard_EXPORT
106 
107  Standard_EXPORT
108  void SetKindOfPeriod(const GEOMAlgo_KindOfPeriod aT) ;
109 
110  Standard_EXPORT
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];
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;
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
GEOMAlgo_KindOfBounds
Definition: GEOMAlgo_KindOfBounds.hxx:27
GEOMAlgo_KindOfClosed
Definition: GEOMAlgo_KindOfClosed.hxx:26
GEOMAlgo_KindOfDef
Definition: GEOMAlgo_KindOfDef.hxx:26
GEOMAlgo_KindOfName
Definition: GEOMAlgo_KindOfName.hxx:27
GEOMAlgo_KindOfPeriod
Definition: GEOMAlgo_KindOfPeriod.hxx:26
GEOMAlgo_KindOfShape
Definition: GEOMAlgo_KindOfShape.hxx:26
Definition: GEOMAlgo_ShapeInfo.hxx:53
Standard_EXPORT Standard_Real Height() const
Definition: GEOMAlgo_ShapeInfo.cxx:404
Standard_EXPORT void SetNbKnots(const Standard_Integer aNb)
Definition: GEOMAlgo_ShapeInfo.cxx:444
Standard_Integer myNbMultiplicities
Definition: GEOMAlgo_ShapeInfo.hxx:281
Standard_EXPORT void DumpCompound() const
Definition: GEOMAlgo_ShapeInfo.cxx:612
Standard_EXPORT void SetDirection(const gp_Dir &aD)
Definition: GEOMAlgo_ShapeInfo.cxx:258
Standard_EXPORT void SetRadius1(const Standard_Real aR)
Definition: GEOMAlgo_ShapeInfo.cxx:332
Standard_Integer myNbSubShapes[9]
Definition: GEOMAlgo_ShapeInfo.hxx:260
Standard_EXPORT Standard_Integer NbMultiplicities() const
Definition: GEOMAlgo_ShapeInfo.cxx:484
Standard_EXPORT Standard_Real Radius1() const
Definition: GEOMAlgo_ShapeInfo.cxx:340
Standard_Integer myDegree
Definition: GEOMAlgo_ShapeInfo.hxx:282
Standard_EXPORT GEOMAlgo_KindOfName KindOfName() const
Definition: GEOMAlgo_ShapeInfo.cxx:170
Handle(TColStd_HArray1OfReal) myKnots
Standard_EXPORT void SetHeight(const Standard_Real aH)
Definition: GEOMAlgo_ShapeInfo.cxx:396
Standard_EXPORT GEOMAlgo_KindOfClosed KindOfClosed() const
Definition: GEOMAlgo_ShapeInfo.cxx:202
Standard_EXPORT Standard_Real Radius2() const
Definition: GEOMAlgo_ShapeInfo.cxx:356
Standard_EXPORT const gp_Pnt & Pnt2() const
Definition: GEOMAlgo_ShapeInfo.cxx:324
Standard_EXPORT void SetLocation(const gp_Pnt &aP)
Definition: GEOMAlgo_ShapeInfo.cxx:242
Standard_EXPORT void SetPoles(Handle(TColgp_HArray1OfPnt) P)
Definition: GEOMAlgo_ShapeInfo.cxx:492
Standard_EXPORT TopAbs_ShapeEnum Type() const
Definition: GEOMAlgo_ShapeInfo.cxx:109
Standard_EXPORT void SetPnt1(const gp_Pnt &aP)
Definition: GEOMAlgo_ShapeInfo.cxx:300
Standard_EXPORT void SetKindOfShape(const GEOMAlgo_KindOfShape aT)
Definition: GEOMAlgo_ShapeInfo.cxx:146
Standard_EXPORT void SetRadius2(const Standard_Real aR)
Definition: GEOMAlgo_ShapeInfo.cxx:348
gp_Pnt myPnt2
Definition: GEOMAlgo_ShapeInfo.hxx:275
Standard_EXPORT void DumpEdge() const
Definition: GEOMAlgo_ShapeInfo.cxx:878
Handle(TColStd_HArray1OfReal) myWeights
Standard_EXPORT GEOMAlgo_KindOfDef KindOfDef() const
Definition: GEOMAlgo_ShapeInfo.cxx:218
Standard_Integer myNbPoles
Definition: GEOMAlgo_ShapeInfo.hxx:279
Standard_EXPORT GEOMAlgo_KindOfShape KindOfShape() const
Definition: GEOMAlgo_ShapeInfo.cxx:154
Standard_EXPORT Standard_Integer Degree() const
Definition: GEOMAlgo_ShapeInfo.cxx:420
Standard_EXPORT const gp_Dir & Direction() const
Definition: GEOMAlgo_ShapeInfo.cxx:266
gp_Pnt myPnt1
Definition: GEOMAlgo_ShapeInfo.hxx:274
Standard_EXPORT void SetNbWeights(const Standard_Integer aNb)
Definition: GEOMAlgo_ShapeInfo.cxx:460
Standard_EXPORT void SetKindOfDef(const GEOMAlgo_KindOfDef aT)
Definition: GEOMAlgo_ShapeInfo.cxx:210
GEOMAlgo_KindOfName myKindOfName
Definition: GEOMAlgo_ShapeInfo.hxx:262
Standard_EXPORT void SetPnt2(const gp_Pnt &aP)
Definition: GEOMAlgo_ShapeInfo.cxx:316
Standard_EXPORT const gp_Ax3 & Position() const
Definition: GEOMAlgo_ShapeInfo.cxx:291
Handle(TColStd_HArray1OfInteger) myMultiplicities
Standard_EXPORT Standard_Integer NbPoles() const
Definition: GEOMAlgo_ShapeInfo.cxx:436
Standard_EXPORT const gp_Pnt & Location() const
Definition: GEOMAlgo_ShapeInfo.cxx:250
Standard_EXPORT void SetWidth(const Standard_Real aW)
Definition: GEOMAlgo_ShapeInfo.cxx:380
Standard_EXPORT void DumpShell() const
Definition: GEOMAlgo_ShapeInfo.cxx:837
Standard_EXPORT void SetNbPoles(const Standard_Integer aNb)
Definition: GEOMAlgo_ShapeInfo.cxx:428
Standard_EXPORT void SetDegree(const Standard_Integer aDeg)
Definition: GEOMAlgo_ShapeInfo.cxx:412
Standard_EXPORT void DumpCompSolid() const
Definition: GEOMAlgo_ShapeInfo.cxx:647
Standard_EXPORT Handle(TColStd_HArray1OfInteger) Multiplicities() const
GEOMAlgo_KindOfShape myKindOfShape
Definition: GEOMAlgo_ShapeInfo.hxx:261
GEOMAlgo_KindOfBounds myKindOfBounds
Definition: GEOMAlgo_ShapeInfo.hxx:263
Standard_EXPORT void DumpFace() const
Definition: GEOMAlgo_ShapeInfo.cxx:743
Standard_Real myLength
Definition: GEOMAlgo_ShapeInfo.hxx:271
Standard_EXPORT GEOMAlgo_KindOfPeriod KindOfPeriod() const
Definition: GEOMAlgo_ShapeInfo.cxx:234
Standard_EXPORT void SetNbMultiplicities(const Standard_Integer aNb)
Definition: GEOMAlgo_ShapeInfo.cxx:476
Standard_Integer myNbKnots
Definition: GEOMAlgo_ShapeInfo.hxx:278
Standard_Real myRadius2
Definition: GEOMAlgo_ShapeInfo.hxx:270
virtual Standard_EXPORT ~GEOMAlgo_ShapeInfo()
Definition: GEOMAlgo_ShapeInfo.cxx:54
Standard_EXPORT void DumpVertex() const
Definition: GEOMAlgo_ShapeInfo.cxx:1030
Standard_EXPORT void SetKnots(Handle(TColStd_HArray1OfReal) K)
gp_Dir myDirection
Definition: GEOMAlgo_ShapeInfo.hxx:267
Standard_EXPORT void SetPosition(const gp_Ax2 &aAx2)
Definition: GEOMAlgo_ShapeInfo.cxx:274
Standard_EXPORT void SetNbSubShapes(const TopAbs_ShapeEnum aType, const Standard_Integer aNb)
Definition: GEOMAlgo_ShapeInfo.cxx:117
Standard_EXPORT void SetKindOfPeriod(const GEOMAlgo_KindOfPeriod aT)
Definition: GEOMAlgo_ShapeInfo.cxx:226
Standard_EXPORT const gp_Pnt & Pnt1() const
Definition: GEOMAlgo_ShapeInfo.cxx:308
Standard_EXPORT Standard_Integer NbSubShapes(const TopAbs_ShapeEnum aType) const
Definition: GEOMAlgo_ShapeInfo.cxx:132
Standard_EXPORT Handle(TColStd_HArray1OfReal) Knots() const
Standard_EXPORT Standard_Real Width() const
Definition: GEOMAlgo_ShapeInfo.cxx:388
Standard_Integer myNbWeights
Definition: GEOMAlgo_ShapeInfo.hxx:280
Standard_EXPORT void SetWeights(Handle(TColStd_HArray1OfReal) W)
Handle(TColgp_HArray1OfPnt) myPoles
GEOMAlgo_KindOfPeriod myKindOfPeriod
Definition: GEOMAlgo_ShapeInfo.hxx:276
Standard_EXPORT GEOMAlgo_ShapeInfo()
Definition: GEOMAlgo_ShapeInfo.cxx:46
gp_Pnt myLocation
Definition: GEOMAlgo_ShapeInfo.hxx:266
Standard_EXPORT void SetLength(const Standard_Real aL)
Definition: GEOMAlgo_ShapeInfo.cxx:364
Standard_Integer myNbTypes
Definition: GEOMAlgo_ShapeInfo.hxx:277
Standard_Real myWidth
Definition: GEOMAlgo_ShapeInfo.hxx:272
Standard_EXPORT Handle(TColgp_HArray1OfPnt) Poles() const
GEOMAlgo_KindOfDef myKindOfDef
Definition: GEOMAlgo_ShapeInfo.hxx:265
Standard_EXPORT void Dump() const
Definition: GEOMAlgo_ShapeInfo.cxx:567
Standard_EXPORT void Reset()
Definition: GEOMAlgo_ShapeInfo.cxx:61
Standard_EXPORT void SetKindOfBounds(const GEOMAlgo_KindOfBounds aT)
Definition: GEOMAlgo_ShapeInfo.cxx:178
Standard_EXPORT void SetType(const TopAbs_ShapeEnum aType)
Definition: GEOMAlgo_ShapeInfo.cxx:101
Standard_EXPORT Standard_Real Length() const
Definition: GEOMAlgo_ShapeInfo.cxx:372
Standard_EXPORT Handle(TColStd_HArray1OfReal) Weights() const
Standard_EXPORT void SetKindOfName(const GEOMAlgo_KindOfName aT)
Definition: GEOMAlgo_ShapeInfo.cxx:162
Standard_Real myHeight
Definition: GEOMAlgo_ShapeInfo.hxx:273
gp_Ax3 myPosition
Definition: GEOMAlgo_ShapeInfo.hxx:268
Standard_EXPORT void DumpSolid() const
Definition: GEOMAlgo_ShapeInfo.cxx:678
Standard_EXPORT void SetMultiplicities(Handle(TColStd_HArray1OfInteger) M)
Standard_EXPORT GEOMAlgo_KindOfBounds KindOfBounds() const
Definition: GEOMAlgo_ShapeInfo.cxx:186
Standard_EXPORT Standard_Integer NbWeights() const
Definition: GEOMAlgo_ShapeInfo.cxx:468
Standard_EXPORT void DumpWire() const
Definition: GEOMAlgo_ShapeInfo.cxx:858
TopAbs_ShapeEnum myType
Definition: GEOMAlgo_ShapeInfo.hxx:259
Standard_Real myRadius1
Definition: GEOMAlgo_ShapeInfo.hxx:269
Standard_EXPORT Standard_Integer NbKnots() const
Definition: GEOMAlgo_ShapeInfo.cxx:452
Standard_EXPORT void SetKindOfClosed(const GEOMAlgo_KindOfClosed aT)
Definition: GEOMAlgo_ShapeInfo.cxx:194
GEOMAlgo_KindOfClosed myKindOfClosed
Definition: GEOMAlgo_ShapeInfo.hxx:264