mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-26 12:50:34 +05:00
fix project on edge in MapSurfacemesh if no trafo is given
This commit is contained in:
parent
2c7912e5dc
commit
236f14553c
@ -1072,7 +1072,19 @@ namespace netgen
|
|||||||
if(trafo)
|
if(trafo)
|
||||||
p = (*trafo)(p);
|
p = (*trafo)(p);
|
||||||
else
|
else
|
||||||
dst.Project(p);
|
for(auto& edge: dst.edges)
|
||||||
|
if (edge->primary->nr == seg.edgenr-1)
|
||||||
|
{
|
||||||
|
if (mesh[pi].Type() == FIXEDPOINT) {
|
||||||
|
if((edge->GetStartVertex().GetPoint() - p).Length2() >\
|
||||||
|
(edge->GetEndVertex().GetPoint() - p).Length2())
|
||||||
|
p = edge->GetEndVertex().GetPoint();
|
||||||
|
else
|
||||||
|
p = edge->GetStartVertex().GetPoint();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
edge->ProjectPoint(p, nullptr);
|
||||||
|
}
|
||||||
tree.Insert(p, pi);
|
tree.Insert(p, pi);
|
||||||
is_point_in_tree[pi] = true;
|
is_point_in_tree[pi] = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user