Version: 6.3.1

src/GEOMAlgo/GEOMAlgo_ShapeInfo.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #ifndef _GEOMAlgo_ShapeInfo_HeaderFile
00021 #define _GEOMAlgo_ShapeInfo_HeaderFile
00022 
00023 #ifndef _TopAbs_ShapeEnum_HeaderFile
00024 #include <TopAbs_ShapeEnum.hxx>
00025 #endif
00026 #ifndef _Standard_Integer_HeaderFile
00027 #include <Standard_Integer.hxx>
00028 #endif
00029 #ifndef _GEOMAlgo_KindOfShape_HeaderFile
00030 #include <GEOMAlgo_KindOfShape.hxx>
00031 #endif
00032 #ifndef _GEOMAlgo_KindOfName_HeaderFile
00033 #include <GEOMAlgo_KindOfName.hxx>
00034 #endif
00035 #ifndef _GEOMAlgo_KindOfBounds_HeaderFile
00036 #include <GEOMAlgo_KindOfBounds.hxx>
00037 #endif
00038 #ifndef _GEOMAlgo_KindOfClosed_HeaderFile
00039 #include <GEOMAlgo_KindOfClosed.hxx>
00040 #endif
00041 #ifndef _gp_Pnt_HeaderFile
00042 #include <gp_Pnt.hxx>
00043 #endif
00044 #ifndef _gp_Dir_HeaderFile
00045 #include <gp_Dir.hxx>
00046 #endif
00047 #ifndef _gp_Ax3_HeaderFile
00048 #include <gp_Ax3.hxx>
00049 #endif
00050 #ifndef _Standard_Real_HeaderFile
00051 #include <Standard_Real.hxx>
00052 #endif
00053 class gp_Pnt;
00054 class gp_Dir;
00055 class gp_Ax2;
00056 class gp_Ax3;
00057 
00058 
00059 #ifndef _Standard_HeaderFile
00060 #include <Standard.hxx>
00061 #endif
00062 #ifndef _Standard_Macro_HeaderFile
00063 #include <Standard_Macro.hxx>
00064 #endif
00065 
00066 
00067 class GEOMAlgo_ShapeInfo  {
00068 
00069 public:
00070 
00071     void* operator new(size_t,void* anAddress) 
00072       {
00073         return anAddress;
00074       }
00075     void* operator new(size_t size) 
00076       { 
00077         return Standard::Allocate(size); 
00078       }
00079     void  operator delete(void *anAddress) 
00080       { 
00081         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
00082       }
00083  // Methods PUBLIC
00084  // 
00085 
00086 
00087 Standard_EXPORT GEOMAlgo_ShapeInfo();
00088 Standard_EXPORT virtual ~GEOMAlgo_ShapeInfo();
00089 
00090 
00091 Standard_EXPORT   void Reset() ;
00092 
00093 
00094 Standard_EXPORT   void SetType(const TopAbs_ShapeEnum aType) ;
00095 
00096 
00097 Standard_EXPORT   TopAbs_ShapeEnum Type() const;
00098 
00099 
00100 Standard_EXPORT   void SetNbSubShapes(const TopAbs_ShapeEnum aType,const Standard_Integer aNb) ;
00101 
00102 
00103 Standard_EXPORT   Standard_Integer NbSubShapes(const TopAbs_ShapeEnum aType) const;
00104 
00105 
00106 Standard_EXPORT   void SetKindOfShape(const GEOMAlgo_KindOfShape aT) ;
00107 
00108 
00109 Standard_EXPORT   GEOMAlgo_KindOfShape KindOfShape() const;
00110 
00111 
00112 Standard_EXPORT   void SetKindOfName(const GEOMAlgo_KindOfName aT) ;
00113 
00114 
00115 Standard_EXPORT   GEOMAlgo_KindOfName KindOfName() const;
00116 
00117 
00118 Standard_EXPORT   void SetKindOfBounds(const GEOMAlgo_KindOfBounds aT) ;
00119 
00120 
00121 Standard_EXPORT   GEOMAlgo_KindOfBounds KindOfBounds() const;
00122 
00123 
00124 Standard_EXPORT   void SetKindOfClosed(const GEOMAlgo_KindOfClosed aT) ;
00125 
00126 
00127 Standard_EXPORT   GEOMAlgo_KindOfClosed KindOfClosed() const;
00128 
00129 
00130 Standard_EXPORT   void SetLocation(const gp_Pnt& aP) ;
00131 
00132 
00133 Standard_EXPORT  const gp_Pnt& Location() const;
00134 
00135 
00136 Standard_EXPORT   void SetDirection(const gp_Dir& aD) ;
00137 
00138 
00139 Standard_EXPORT  const gp_Dir& Direction() const;
00140 
00141 
00142 Standard_EXPORT   void SetPosition(const gp_Ax2& aAx2) ;
00143 
00144 
00145 Standard_EXPORT   void SetPosition(const gp_Ax3& aAx3) ;
00146 
00147 
00148 Standard_EXPORT  const gp_Ax3& Position() const;
00149 
00150 
00151 Standard_EXPORT   void SetPnt1(const gp_Pnt& aP) ;
00152 
00153 
00154 Standard_EXPORT  const gp_Pnt& Pnt1() const;
00155 
00156 
00157 Standard_EXPORT   void SetPnt2(const gp_Pnt& aP) ;
00158 
00159 
00160 Standard_EXPORT  const gp_Pnt& Pnt2() const;
00161 
00162 
00163 Standard_EXPORT   void SetRadius1(const Standard_Real aR) ;
00164 
00165 
00166 Standard_EXPORT   Standard_Real Radius1() const;
00167 
00168 
00169 Standard_EXPORT   void SetRadius2(const Standard_Real aR) ;
00170 
00171 
00172 Standard_EXPORT   Standard_Real Radius2() const;
00173 
00174 
00175 Standard_EXPORT   void SetLength(const Standard_Real aL) ;
00176 
00177 
00178 Standard_EXPORT   Standard_Real Length() const;
00179 
00180 
00181 Standard_EXPORT   void SetWidth(const Standard_Real aW) ;
00182 
00183 
00184 Standard_EXPORT   Standard_Real Width() const;
00185 
00186 
00187 Standard_EXPORT   void SetHeight(const Standard_Real aH) ;
00188 
00189 
00190 Standard_EXPORT   Standard_Real Height() const;
00191 
00192 
00193 Standard_EXPORT   void Dump() const;
00194 
00195 
00196 
00197 
00198 
00199 protected:
00200 
00201  // Methods PROTECTED
00202  // 
00203 
00204 
00205 Standard_EXPORT   void DumpVertex() const;
00206 
00207 
00208 Standard_EXPORT   void DumpEdge() const;
00209 
00210 
00211 Standard_EXPORT   void DumpWire() const;
00212 
00213 
00214 Standard_EXPORT   void DumpFace() const;
00215 
00216 
00217 Standard_EXPORT   void DumpShell() const;
00218 
00219 
00220 Standard_EXPORT   void DumpSolid() const;
00221 
00222 
00223 Standard_EXPORT   void DumpCompSolid() const;
00224 
00225 
00226 Standard_EXPORT   void DumpCompound() const;
00227 
00228 
00229  // Fields PROTECTED
00230  //
00231 TopAbs_ShapeEnum myType;
00232 Standard_Integer myNbSubShapes[9];
00233 GEOMAlgo_KindOfShape myKindOfShape;
00234 GEOMAlgo_KindOfName myKindOfName;
00235 GEOMAlgo_KindOfBounds myKindOfBounds;
00236 GEOMAlgo_KindOfClosed myKindOfClosed;
00237 gp_Pnt myLocation;
00238 gp_Dir myDirection;
00239 gp_Ax3 myPosition;
00240 Standard_Real myRadius1;
00241 Standard_Real myRadius2;
00242 Standard_Real myLength;
00243 Standard_Real myWidth;
00244 Standard_Real myHeight;
00245 gp_Pnt myPnt1;
00246 gp_Pnt myPnt2;
00247 Standard_Integer myNbTypes;
00248 
00249 
00250 private: 
00251 
00252  // Methods PRIVATE
00253  // 
00254 
00255 
00256  // Fields PRIVATE
00257  //
00258 
00259 
00260 };
00261 
00262 
00263 
00264 
00265 
00266 // other Inline functions and methods (like "C++: function call" methods)
00267 //
00268 
00269 
00270 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS