1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #ifndef _GEOMAlgo_ShapeInfo_HeaderFile
23 #define _GEOMAlgo_ShapeInfo_HeaderFile
25 #ifndef _TopAbs_ShapeEnum_HeaderFile
26 #include <TopAbs_ShapeEnum.hxx>
28 #ifndef _Standard_Integer_HeaderFile
29 #include <Standard_Integer.hxx>
31 #ifndef _GEOMAlgo_KindOfShape_HeaderFile
32 #include <GEOMAlgo_KindOfShape.hxx>
34 #ifndef _GEOMAlgo_KindOfName_HeaderFile
35 #include <GEOMAlgo_KindOfName.hxx>
37 #ifndef _GEOMAlgo_KindOfBounds_HeaderFile
38 #include <GEOMAlgo_KindOfBounds.hxx>
40 #ifndef _GEOMAlgo_KindOfClosed_HeaderFile
41 #include <GEOMAlgo_KindOfClosed.hxx>
43 #ifndef _gp_Pnt_HeaderFile
46 #ifndef _gp_Dir_HeaderFile
49 #ifndef _gp_Ax3_HeaderFile
52 #ifndef _Standard_Real_HeaderFile
53 #include <Standard_Real.hxx>
61 #ifndef _Standard_HeaderFile
62 #include <Standard.hxx>
64 #ifndef _Standard_Macro_HeaderFile
65 #include <Standard_Macro.hxx>
69 class GEOMAlgo_ShapeInfo {
73 void* operator new(size_t,void* anAddress)
77 void* operator new(size_t size)
79 return Standard::Allocate(size);
81 void operator delete(void *anAddress)
83 if (anAddress) Standard::Free((Standard_Address&)anAddress);
89 Standard_EXPORT GEOMAlgo_ShapeInfo();
90 Standard_EXPORT virtual ~GEOMAlgo_ShapeInfo();
93 Standard_EXPORT void Reset() ;
96 Standard_EXPORT void SetType(const TopAbs_ShapeEnum aType) ;
99 Standard_EXPORT TopAbs_ShapeEnum Type() const;
102 Standard_EXPORT void SetNbSubShapes(const TopAbs_ShapeEnum aType,const Standard_Integer aNb) ;
105 Standard_EXPORT Standard_Integer NbSubShapes(const TopAbs_ShapeEnum aType) const;
108 Standard_EXPORT void SetKindOfShape(const GEOMAlgo_KindOfShape aT) ;
111 Standard_EXPORT GEOMAlgo_KindOfShape KindOfShape() const;
114 Standard_EXPORT void SetKindOfName(const GEOMAlgo_KindOfName aT) ;
117 Standard_EXPORT GEOMAlgo_KindOfName KindOfName() const;
120 Standard_EXPORT void SetKindOfBounds(const GEOMAlgo_KindOfBounds aT) ;
123 Standard_EXPORT GEOMAlgo_KindOfBounds KindOfBounds() const;
126 Standard_EXPORT void SetKindOfClosed(const GEOMAlgo_KindOfClosed aT) ;
129 Standard_EXPORT GEOMAlgo_KindOfClosed KindOfClosed() const;
132 Standard_EXPORT void SetLocation(const gp_Pnt& aP) ;
135 Standard_EXPORT const gp_Pnt& Location() const;
138 Standard_EXPORT void SetDirection(const gp_Dir& aD) ;
141 Standard_EXPORT const gp_Dir& Direction() const;
144 Standard_EXPORT void SetPosition(const gp_Ax2& aAx2) ;
147 Standard_EXPORT void SetPosition(const gp_Ax3& aAx3) ;
150 Standard_EXPORT const gp_Ax3& Position() const;
153 Standard_EXPORT void SetPnt1(const gp_Pnt& aP) ;
156 Standard_EXPORT const gp_Pnt& Pnt1() const;
159 Standard_EXPORT void SetPnt2(const gp_Pnt& aP) ;
162 Standard_EXPORT const gp_Pnt& Pnt2() const;
165 Standard_EXPORT void SetRadius1(const Standard_Real aR) ;
168 Standard_EXPORT Standard_Real Radius1() const;
171 Standard_EXPORT void SetRadius2(const Standard_Real aR) ;
174 Standard_EXPORT Standard_Real Radius2() const;
177 Standard_EXPORT void SetLength(const Standard_Real aL) ;
180 Standard_EXPORT Standard_Real Length() const;
183 Standard_EXPORT void SetWidth(const Standard_Real aW) ;
186 Standard_EXPORT Standard_Real Width() const;
189 Standard_EXPORT void SetHeight(const Standard_Real aH) ;
192 Standard_EXPORT Standard_Real Height() const;
195 Standard_EXPORT void Dump() const;
207 Standard_EXPORT void DumpVertex() const;
210 Standard_EXPORT void DumpEdge() const;
213 Standard_EXPORT void DumpWire() const;
216 Standard_EXPORT void DumpFace() const;
219 Standard_EXPORT void DumpShell() const;
222 Standard_EXPORT void DumpSolid() const;
225 Standard_EXPORT void DumpCompSolid() const;
228 Standard_EXPORT void DumpCompound() const;
233 TopAbs_ShapeEnum myType;
234 Standard_Integer myNbSubShapes[9];
235 GEOMAlgo_KindOfShape myKindOfShape;
236 GEOMAlgo_KindOfName myKindOfName;
237 GEOMAlgo_KindOfBounds myKindOfBounds;
238 GEOMAlgo_KindOfClosed myKindOfClosed;
242 Standard_Real myRadius1;
243 Standard_Real myRadius2;
244 Standard_Real myLength;
245 Standard_Real myWidth;
246 Standard_Real myHeight;
249 Standard_Integer myNbTypes;
268 // other Inline functions and methods (like "C++: function call" methods)