mirror of
https://github.com/NGSolve/netgen.git
synced 2025-02-13 13:53:08 +05:00
fix normal vector computation when mapping surfaces
This commit is contained in:
parent
e3772bf3af
commit
e581c0d91c
@ -1053,7 +1053,7 @@ namespace netgen
|
|||||||
if(do_invert.IsMaybe())
|
if(do_invert.IsMaybe())
|
||||||
{
|
{
|
||||||
auto n_src = src.GetNormal(mesh[sel[0]]);
|
auto n_src = src.GetNormal(mesh[sel[0]]);
|
||||||
auto n_dist = dst.GetNormal(mesh[sel[0]]);
|
auto n_dist = dst.GetNormal(trafo(mesh[sel[0]]));
|
||||||
Mat<3> normal_matrix;
|
Mat<3> normal_matrix;
|
||||||
CalcInverse(Trans(trafo.GetMatrix()), normal_matrix);
|
CalcInverse(Trans(trafo.GetMatrix()), normal_matrix);
|
||||||
do_invert = n_src * (normal_matrix * n_dist) < 0.0;
|
do_invert = n_src * (normal_matrix * n_dist) < 0.0;
|
||||||
|
Loading…
Reference in New Issue
Block a user