Back to index

salome-geom  6.5.0
GEOMAlgo_ShapeInfo.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  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 
00021 #ifndef _GEOMAlgo_ShapeInfo_HeaderFile
00022 #define _GEOMAlgo_ShapeInfo_HeaderFile
00023 
00024 #include <Standard.hxx>
00025 #include <Standard_Macro.hxx>
00026 #include <TopAbs_ShapeEnum.hxx>
00027 #include <Standard_Integer.hxx>
00028 #include <GEOMAlgo_KindOfShape.hxx>
00029 #include <GEOMAlgo_KindOfName.hxx>
00030 #include <GEOMAlgo_KindOfBounds.hxx>
00031 #include <GEOMAlgo_KindOfClosed.hxx>
00032 #include <gp_Pnt.hxx>
00033 #include <gp_Dir.hxx>
00034 #include <gp_Ax3.hxx>
00035 #include <Standard_Real.hxx>
00036 #include <gp_Ax2.hxx>
00037 
00038 
00039 
00040 //=======================================================================
00041 //class : GEOMAlgo_ShapeInfo
00042 //purpose  :
00043 //=======================================================================
00044 class GEOMAlgo_ShapeInfo
00045 {
00046  public:
00047   Standard_EXPORT
00048     GEOMAlgo_ShapeInfo();
00049 
00050   Standard_EXPORT
00051     virtual ~GEOMAlgo_ShapeInfo();
00052 
00053   Standard_EXPORT
00054     void Reset() ;
00055 
00056   Standard_EXPORT
00057     void SetType(const TopAbs_ShapeEnum aType) ;
00058 
00059   Standard_EXPORT
00060     TopAbs_ShapeEnum Type() const;
00061 
00062   Standard_EXPORT
00063     void SetNbSubShapes(const TopAbs_ShapeEnum aType,const Standard_Integer aNb) ;
00064 
00065   Standard_EXPORT
00066     Standard_Integer NbSubShapes(const TopAbs_ShapeEnum aType) const;
00067 
00068   Standard_EXPORT
00069     void SetKindOfShape(const GEOMAlgo_KindOfShape aT) ;
00070 
00071   Standard_EXPORT
00072     GEOMAlgo_KindOfShape KindOfShape() const;
00073 
00074   Standard_EXPORT
00075     void SetKindOfName(const GEOMAlgo_KindOfName aT) ;
00076 
00077   Standard_EXPORT
00078     GEOMAlgo_KindOfName KindOfName() const;
00079 
00080   Standard_EXPORT
00081     void SetKindOfBounds(const GEOMAlgo_KindOfBounds aT) ;
00082 
00083   Standard_EXPORT
00084     GEOMAlgo_KindOfBounds KindOfBounds() const;
00085 
00086   Standard_EXPORT
00087     void SetKindOfClosed(const GEOMAlgo_KindOfClosed aT) ;
00088 
00089   Standard_EXPORT
00090     GEOMAlgo_KindOfClosed KindOfClosed() const;
00091 
00092   Standard_EXPORT
00093     void SetLocation(const gp_Pnt& aP) ;
00094 
00095   Standard_EXPORT
00096     const gp_Pnt& Location() const;
00097 
00098   Standard_EXPORT
00099     void SetDirection(const gp_Dir& aD) ;
00100 
00101   Standard_EXPORT
00102     const gp_Dir& Direction() const;
00103 
00104   Standard_EXPORT
00105     void SetPosition(const gp_Ax2& aAx2) ;
00106 
00107   Standard_EXPORT
00108     void SetPosition(const gp_Ax3& aAx3) ;
00109 
00110   Standard_EXPORT
00111     const gp_Ax3& Position() const;
00112 
00113   Standard_EXPORT
00114     void SetPnt1(const gp_Pnt& aP) ;
00115 
00116   Standard_EXPORT
00117     const gp_Pnt& Pnt1() const;
00118 
00119   Standard_EXPORT
00120     void SetPnt2(const gp_Pnt& aP) ;
00121 
00122   Standard_EXPORT
00123     const gp_Pnt& Pnt2() const;
00124 
00125   Standard_EXPORT
00126     void SetRadius1(const Standard_Real aR) ;
00127 
00128   Standard_EXPORT
00129     Standard_Real Radius1() const;
00130 
00131   Standard_EXPORT
00132     void SetRadius2(const Standard_Real aR) ;
00133 
00134   Standard_EXPORT
00135     Standard_Real Radius2() const;
00136 
00137   Standard_EXPORT
00138     void SetLength(const Standard_Real aL) ;
00139 
00140   Standard_EXPORT
00141     Standard_Real Length() const;
00142 
00143   Standard_EXPORT
00144     void SetWidth(const Standard_Real aW) ;
00145 
00146   Standard_EXPORT
00147     Standard_Real Width() const;
00148 
00149   Standard_EXPORT
00150     void SetHeight(const Standard_Real aH) ;
00151 
00152   Standard_EXPORT
00153     Standard_Real Height() const;
00154 
00155   Standard_EXPORT
00156     void Dump() const;
00157 
00158  protected:
00159   Standard_EXPORT
00160     void DumpVertex() const;
00161 
00162   Standard_EXPORT
00163     void DumpEdge() const;
00164 
00165   Standard_EXPORT
00166     void DumpWire() const;
00167 
00168   Standard_EXPORT
00169     void DumpFace() const;
00170 
00171   Standard_EXPORT
00172     void DumpShell() const;
00173 
00174   Standard_EXPORT
00175     void DumpSolid() const;
00176 
00177   Standard_EXPORT
00178     void DumpCompSolid() const;
00179 
00180   Standard_EXPORT
00181     void DumpCompound() const;
00182 
00183 
00184   TopAbs_ShapeEnum myType;
00185   Standard_Integer myNbSubShapes[9];
00186   GEOMAlgo_KindOfShape myKindOfShape;
00187   GEOMAlgo_KindOfName myKindOfName;
00188   GEOMAlgo_KindOfBounds myKindOfBounds;
00189   GEOMAlgo_KindOfClosed myKindOfClosed;
00190   gp_Pnt myLocation;
00191   gp_Dir myDirection;
00192   gp_Ax3 myPosition;
00193   Standard_Real myRadius1;
00194   Standard_Real myRadius2;
00195   Standard_Real myLength;
00196   Standard_Real myWidth;
00197   Standard_Real myHeight;
00198   gp_Pnt myPnt1;
00199   gp_Pnt myPnt2;
00200   Standard_Integer myNbTypes;
00201 };
00202 #endif