fix project point on edge to stay in param range

This commit is contained in:
Christopher Lackner 2022-10-07 12:22:11 +02:00
parent 7bbaf3dfa7
commit 11f2ff0c76

View File

@ -56,7 +56,7 @@ namespace netgen
void OCCEdge::ProjectPoint(Point<3>& p, EdgePointGeomInfo* gi) const void OCCEdge::ProjectPoint(Point<3>& p, EdgePointGeomInfo* gi) const
{ {
auto pnt = ng2occ(p); auto pnt = ng2occ(p);
GeomAPI_ProjectPointOnCurve proj(pnt, curve); GeomAPI_ProjectPointOnCurve proj(pnt, curve, s0, s1);
pnt = proj.NearestPoint(); pnt = proj.NearestPoint();
if(gi) if(gi)
gi->dist = (proj.LowerDistanceParameter() - s0)/(s1-s0); gi->dist = (proj.LowerDistanceParameter() - s0)/(s1-s0);