mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
51 lines
1.6 KiB
C++
51 lines
1.6 KiB
C++
#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);
|
|
|
|
const TopoDS_Face Shape() const { return face; }
|
|
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
|