netgen/libsrc/occ/occ_face.hpp

50 lines
1.5 KiB
C++
Raw Normal View History

2021-11-28 20:14:41 +05:00
#ifndef FILE_OCC_FACE_INCLUDED
#define FILE_OCC_FACE_INCLUDED
#include <GProp_GProps.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <ShapeAnalysis_Surface.hxx>
#include "occ_vertex.hpp"
#include "meshing.hpp"
namespace netgen
{
class OCCFace : public GeometryFace
{
T_Shape tface;
TopoDS_Face face;
GProp_GProps props;
Box<3> bbox;
Handle( Geom_Surface ) surface;
Handle( ShapeAnalysis_Surface ) shape_analysis;
double tolerance;
public:
OCCFace(TopoDS_Shape dshape);
T_Shape TShape() { return tface; }
size_t GetHash() const override;
Point<3> GetCenter() const override;
virtual size_t GetNBoundaries() const override;
virtual Array<Segment> GetBoundary(const Mesh& mesh) const override;
virtual PointGeomInfo Project(Point<3>& p) const override;
virtual bool ProjectPointGI(Point<3>& p, PointGeomInfo& gi) const override;
virtual Point<3> GetPoint(const PointGeomInfo& gi) const override;
virtual void CalcEdgePointGI(const GeometryEdge& edge,
double t,
EdgePointGeomInfo& egi) const override;
virtual Box<3> GetBoundingBox() const override;
virtual double GetCurvature(const PointGeomInfo& gi) const override;
virtual void RestrictH(Mesh& mesh, const MeshingParameters& mparam) const override;
virtual Vec<3> GetNormal(const Point<3>& p, const PointGeomInfo* gi = nullptr) const override;
};
}
#endif // FILE_OCC_FACE_INCLUDED