1 // Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #ifndef _GEOMAlgo_ShapeInfo_HeaderFile
22 #define _GEOMAlgo_ShapeInfo_HeaderFile
24 #include <Standard.hxx>
25 #include <Standard_Macro.hxx>
26 #include <TopAbs_ShapeEnum.hxx>
27 #include <Standard_Integer.hxx>
33 #include <Standard_Real.hxx>
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>
43 #include <TColgp_HArray1OfPnt.hxx>
44 #include <TColStd_HArray1OfReal.hxx>
45 #include <TColStd_HArray1OfInteger.hxx>
48 //=======================================================================
49 //class : GEOMAlgo_ShapeInfo
51 //=======================================================================
52 class GEOMAlgo_ShapeInfo
59 virtual ~GEOMAlgo_ShapeInfo();
65 void SetType(const TopAbs_ShapeEnum aType) ;
68 TopAbs_ShapeEnum Type() const;
71 void SetNbSubShapes(const TopAbs_ShapeEnum aType,
72 const Standard_Integer aNb) ;
75 Standard_Integer NbSubShapes(const TopAbs_ShapeEnum aType) const;
78 void SetKindOfShape(const GEOMAlgo_KindOfShape aT) ;
81 GEOMAlgo_KindOfShape KindOfShape() const;
84 void SetKindOfName(const GEOMAlgo_KindOfName aT) ;
87 GEOMAlgo_KindOfName KindOfName() const;
90 void SetKindOfBounds(const GEOMAlgo_KindOfBounds aT) ;
93 GEOMAlgo_KindOfBounds KindOfBounds() const;
96 void SetKindOfClosed(const GEOMAlgo_KindOfClosed aT) ;
99 GEOMAlgo_KindOfClosed KindOfClosed() const;
102 void SetKindOfDef(const GEOMAlgo_KindOfDef aT) ;
105 GEOMAlgo_KindOfDef KindOfDef() const;
108 void SetKindOfPeriod(const GEOMAlgo_KindOfPeriod aT) ;
111 GEOMAlgo_KindOfPeriod KindOfPeriod() const;
114 void SetLocation(const gp_Pnt& aP) ;
117 const gp_Pnt& Location() const;
120 void SetDirection(const gp_Dir& aD) ;
123 const gp_Dir& Direction() const;
126 void SetPosition(const gp_Ax2& aAx2) ;
129 void SetPosition(const gp_Ax3& aAx3) ;
132 const gp_Ax3& Position() const;
135 void SetPnt1(const gp_Pnt& aP) ;
138 const gp_Pnt& Pnt1() const;
141 void SetPnt2(const gp_Pnt& aP) ;
144 const gp_Pnt& Pnt2() const;
147 void SetRadius1(const Standard_Real aR) ;
150 Standard_Real Radius1() const;
153 void SetRadius2(const Standard_Real aR) ;
156 Standard_Real Radius2() const;
159 void SetLength(const Standard_Real aL) ;
162 Standard_Real Length() const;
165 void SetWidth(const Standard_Real aW) ;
168 Standard_Real Width() const;
171 void SetHeight(const Standard_Real aH) ;
174 Standard_Real Height() const;
177 void SetDegree(const Standard_Integer aDeg) ;
180 Standard_Integer Degree() const;
183 void SetNbPoles(const Standard_Integer aNb) ;
186 Standard_Integer NbPoles() const;
189 void SetNbKnots(const Standard_Integer aNb) ;
192 Standard_Integer NbKnots() const;
195 void SetNbWeights(const Standard_Integer aNb) ;
198 Standard_Integer NbWeights() const;
201 void SetNbMultiplicities(const Standard_Integer aNb) ;
204 Standard_Integer NbMultiplicities() const;
207 void SetPoles(Handle(TColgp_HArray1OfPnt) P) ;
210 Handle(TColgp_HArray1OfPnt) Poles() const;
213 void SetKnots(Handle(TColStd_HArray1OfReal) K) ;
216 Handle(TColStd_HArray1OfReal) Knots() const;
219 void SetWeights(Handle(TColStd_HArray1OfReal) W) ;
222 Handle(TColStd_HArray1OfReal) Weights() const;
225 void SetMultiplicities(Handle(TColStd_HArray1OfInteger) M) ;
228 Handle(TColStd_HArray1OfInteger) Multiplicities() const;
235 void DumpVertex() const;
238 void DumpEdge() const;
241 void DumpWire() const;
244 void DumpFace() const;
247 void DumpShell() const;
250 void DumpSolid() const;
253 void DumpCompSolid() const;
256 void DumpCompound() const;
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;
269 Standard_Real myRadius1;
270 Standard_Real myRadius2;
271 Standard_Real myLength;
272 Standard_Real myWidth;
273 Standard_Real myHeight;
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;