mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-12 06:00:33 +05:00
fix project point on edge to stay in param range
This commit is contained in:
parent
7bbaf3dfa7
commit
11f2ff0c76
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user