1 // Copyright (C) 2007-2010 CEA/DEN, EDF R&D, 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.
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
20 #ifndef _GEOMAlgo_ShapeInfo_HeaderFile
21 #define _GEOMAlgo_ShapeInfo_HeaderFile
23 #ifndef _TopAbs_ShapeEnum_HeaderFile
24 #include <TopAbs_ShapeEnum.hxx>
26 #ifndef _Standard_Integer_HeaderFile
27 #include <Standard_Integer.hxx>
29 #ifndef _GEOMAlgo_KindOfShape_HeaderFile
30 #include <GEOMAlgo_KindOfShape.hxx>
32 #ifndef _GEOMAlgo_KindOfName_HeaderFile
33 #include <GEOMAlgo_KindOfName.hxx>
35 #ifndef _GEOMAlgo_KindOfBounds_HeaderFile
36 #include <GEOMAlgo_KindOfBounds.hxx>
38 #ifndef _GEOMAlgo_KindOfClosed_HeaderFile
39 #include <GEOMAlgo_KindOfClosed.hxx>
41 #ifndef _gp_Pnt_HeaderFile
44 #ifndef _gp_Dir_HeaderFile
47 #ifndef _gp_Ax3_HeaderFile
50 #ifndef _Standard_Real_HeaderFile
51 #include <Standard_Real.hxx>
59 #ifndef _Standard_HeaderFile
60 #include <Standard.hxx>
62 #ifndef _Standard_Macro_HeaderFile
63 #include <Standard_Macro.hxx>
67 class GEOMAlgo_ShapeInfo {
71 void* operator new(size_t,void* anAddress)
75 void* operator new(size_t size)
77 return Standard::Allocate(size);
79 void operator delete(void *anAddress)
81 if (anAddress) Standard::Free((Standard_Address&)anAddress);
87 Standard_EXPORT GEOMAlgo_ShapeInfo();
88 Standard_EXPORT virtual ~GEOMAlgo_ShapeInfo();
91 Standard_EXPORT void Reset() ;
94 Standard_EXPORT void SetType(const TopAbs_ShapeEnum aType) ;
97 Standard_EXPORT TopAbs_ShapeEnum Type() const;
100 Standard_EXPORT void SetNbSubShapes(const TopAbs_ShapeEnum aType,const Standard_Integer aNb) ;
103 Standard_EXPORT Standard_Integer NbSubShapes(const TopAbs_ShapeEnum aType) const;
106 Standard_EXPORT void SetKindOfShape(const GEOMAlgo_KindOfShape aT) ;
109 Standard_EXPORT GEOMAlgo_KindOfShape KindOfShape() const;
112 Standard_EXPORT void SetKindOfName(const GEOMAlgo_KindOfName aT) ;
115 Standard_EXPORT GEOMAlgo_KindOfName KindOfName() const;
118 Standard_EXPORT void SetKindOfBounds(const GEOMAlgo_KindOfBounds aT) ;
121 Standard_EXPORT GEOMAlgo_KindOfBounds KindOfBounds() const;
124 Standard_EXPORT void SetKindOfClosed(const GEOMAlgo_KindOfClosed aT) ;
127 Standard_EXPORT GEOMAlgo_KindOfClosed KindOfClosed() const;
130 Standard_EXPORT void SetLocation(const gp_Pnt& aP) ;
133 Standard_EXPORT const gp_Pnt& Location() const;
136 Standard_EXPORT void SetDirection(const gp_Dir& aD) ;
139 Standard_EXPORT const gp_Dir& Direction() const;
142 Standard_EXPORT void SetPosition(const gp_Ax2& aAx2) ;
145 Standard_EXPORT void SetPosition(const gp_Ax3& aAx3) ;
148 Standard_EXPORT const gp_Ax3& Position() const;
151 Standard_EXPORT void SetPnt1(const gp_Pnt& aP) ;
154 Standard_EXPORT const gp_Pnt& Pnt1() const;
157 Standard_EXPORT void SetPnt2(const gp_Pnt& aP) ;
160 Standard_EXPORT const gp_Pnt& Pnt2() const;
163 Standard_EXPORT void SetRadius1(const Standard_Real aR) ;
166 Standard_EXPORT Standard_Real Radius1() const;
169 Standard_EXPORT void SetRadius2(const Standard_Real aR) ;
172 Standard_EXPORT Standard_Real Radius2() const;
175 Standard_EXPORT void SetLength(const Standard_Real aL) ;
178 Standard_EXPORT Standard_Real Length() const;
181 Standard_EXPORT void SetWidth(const Standard_Real aW) ;
184 Standard_EXPORT Standard_Real Width() const;
187 Standard_EXPORT void SetHeight(const Standard_Real aH) ;
190 Standard_EXPORT Standard_Real Height() const;
193 Standard_EXPORT void Dump() const;
205 Standard_EXPORT void DumpVertex() const;
208 Standard_EXPORT void DumpEdge() const;
211 Standard_EXPORT void DumpWire() const;
214 Standard_EXPORT void DumpFace() const;
217 Standard_EXPORT void DumpShell() const;
220 Standard_EXPORT void DumpSolid() const;
223 Standard_EXPORT void DumpCompSolid() const;
226 Standard_EXPORT void DumpCompound() const;
231 TopAbs_ShapeEnum myType;
232 Standard_Integer myNbSubShapes[9];
233 GEOMAlgo_KindOfShape myKindOfShape;
234 GEOMAlgo_KindOfName myKindOfName;
235 GEOMAlgo_KindOfBounds myKindOfBounds;
236 GEOMAlgo_KindOfClosed myKindOfClosed;
240 Standard_Real myRadius1;
241 Standard_Real myRadius2;
242 Standard_Real myLength;
243 Standard_Real myWidth;
244 Standard_Real myHeight;
247 Standard_Integer myNbTypes;
266 // other Inline functions and methods (like "C++: function call" methods)