File indexing completed on 2025-01-18 10:04:05
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _IMeshData_Face_HeaderFile
0017 #define _IMeshData_Face_HeaderFile
0018
0019 #include <IMeshData_TessellatedShape.hxx>
0020 #include <IMeshData_StatusOwner.hxx>
0021 #include <Standard_Type.hxx>
0022 #include <TopoDS.hxx>
0023 #include <IMeshData_Status.hxx>
0024 #include <IMeshData_Types.hxx>
0025 #include <BRepAdaptor_Surface.hxx>
0026
0027 class TopoDS_Wire;
0028
0029
0030
0031
0032 class IMeshData_Face : public IMeshData_TessellatedShape, public IMeshData_StatusOwner
0033 {
0034 public:
0035
0036
0037 virtual ~IMeshData_Face()
0038 {
0039 }
0040
0041
0042 Standard_EXPORT virtual Standard_Integer WiresNb () const = 0;
0043
0044
0045 Standard_EXPORT virtual const IMeshData::IWireHandle& AddWire (
0046 const TopoDS_Wire& theWire,
0047 const Standard_Integer theEdgeNb = 0) = 0;
0048
0049
0050 Standard_EXPORT virtual const IMeshData::IWireHandle& GetWire (
0051 const Standard_Integer theIndex) const = 0;
0052
0053
0054 const Handle(BRepAdaptor_Surface)& GetSurface() const
0055 {
0056 return mySurface;
0057 }
0058
0059
0060 const TopoDS_Face& GetFace () const
0061 {
0062 return TopoDS::Face (GetShape ());
0063 }
0064
0065
0066 Standard_Boolean IsValid () const
0067 {
0068 return (IsEqual(IMeshData_NoError) ||
0069 IsEqual(IMeshData_ReMesh) ||
0070 IsEqual(IMeshData_UnorientedWire));
0071 }
0072
0073 DEFINE_STANDARD_RTTIEXT(IMeshData_Face, IMeshData_TessellatedShape)
0074
0075 protected:
0076
0077
0078
0079 IMeshData_Face (const TopoDS_Face& theFace)
0080 : IMeshData_TessellatedShape(theFace)
0081 {
0082 BRepAdaptor_Surface aSurfAdaptor(GetFace(), Standard_False);
0083 mySurface = new BRepAdaptor_Surface(aSurfAdaptor);
0084 }
0085
0086 private:
0087
0088 mutable Handle(BRepAdaptor_Surface) mySurface;
0089 };
0090
0091 #endif