2021-11-28 20:14:41 +05:00
|
|
|
#ifndef FILE_OCC_EDGE_INCLUDED
|
|
|
|
#define FILE_OCC_EDGE_INCLUDED
|
|
|
|
|
2023-07-31 03:13:56 +05:00
|
|
|
|
|
|
|
#pragma clang diagnostic push
|
|
|
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
|
|
|
2021-11-28 20:14:41 +05:00
|
|
|
#include <GProp_GProps.hxx>
|
|
|
|
#include <TopoDS.hxx>
|
|
|
|
#include <TopoDS_Edge.hxx>
|
|
|
|
#include <Geom_Curve.hxx>
|
|
|
|
#include <BRep_TEdge.hxx>
|
2022-12-19 17:26:18 +05:00
|
|
|
#include <BRep_Tool.hxx>
|
2021-11-28 20:14:41 +05:00
|
|
|
|
2023-07-31 03:13:56 +05:00
|
|
|
#pragma clang diagnostic pop
|
|
|
|
|
2021-11-28 20:14:41 +05:00
|
|
|
#include "occ_vertex.hpp"
|
|
|
|
#include "meshing.hpp"
|
|
|
|
|
|
|
|
namespace netgen
|
|
|
|
{
|
|
|
|
class OCCEdge : public GeometryEdge
|
|
|
|
{
|
2021-12-16 00:05:18 +05:00
|
|
|
public:
|
2021-11-28 20:14:41 +05:00
|
|
|
TopoDS_Edge edge;
|
|
|
|
Handle(Geom_Curve) curve;
|
|
|
|
double s0, s1;
|
|
|
|
GProp_GProps props;
|
|
|
|
|
2021-11-28 23:48:19 +05:00
|
|
|
public:
|
2021-12-16 00:05:18 +05:00
|
|
|
OCCEdge(TopoDS_Shape edge_, GeometryVertex & start_, GeometryVertex & end_);
|
2021-11-28 20:14:41 +05:00
|
|
|
|
|
|
|
auto Shape() const { return edge; }
|
|
|
|
|
|
|
|
double GetLength() const override;
|
|
|
|
Point<3> GetCenter() const override;
|
|
|
|
Point<3> GetPoint(double t) const override;
|
|
|
|
double CalcStep(double t, double sag) const override;
|
|
|
|
void ProjectPoint(Point<3>& p, EdgePointGeomInfo* gi) const override;
|
|
|
|
Vec<3> GetTangent(double t) const override;
|
2022-12-19 17:26:18 +05:00
|
|
|
bool IsDegenerated(double) const override {
|
|
|
|
return BRep_Tool::Degenerated(edge);
|
|
|
|
}
|
2021-11-28 20:14:41 +05:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // FILE_OCCEDGE_INCLUDED
|