File indexing completed on 2026-09-20 09:18:06
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 ~IMeshData_Face() override = default;
0037
0038
0039 Standard_EXPORT virtual int WiresNb() const = 0;
0040
0041
0042 Standard_EXPORT virtual const IMeshData::IWireHandle& AddWire(const TopoDS_Wire& theWire,
0043 const int theEdgeNb = 0) = 0;
0044
0045
0046 Standard_EXPORT virtual const IMeshData::IWireHandle& GetWire(const int theIndex) const = 0;
0047
0048
0049 const occ::handle<BRepAdaptor_Surface>& GetSurface() const { return mySurface; }
0050
0051
0052 const TopoDS_Face& GetFace() const { return TopoDS::Face(GetShape()); }
0053
0054
0055 bool IsValid() const
0056 {
0057 return (IsEqual(IMeshData_NoError) || IsEqual(IMeshData_ReMesh)
0058 || IsEqual(IMeshData_UnorientedWire));
0059 }
0060
0061 DEFINE_STANDARD_RTTIEXT(IMeshData_Face, IMeshData_TessellatedShape)
0062
0063 protected:
0064
0065
0066 IMeshData_Face(const TopoDS_Face& theFace)
0067 : IMeshData_TessellatedShape(theFace)
0068 {
0069 mySurface = new BRepAdaptor_Surface(GetFace(), false);
0070 }
0071
0072 private:
0073 mutable occ::handle<BRepAdaptor_Surface> mySurface;
0074 };
0075
0076 #endif