Skip to content

Update meshRefine.cpp

samy mukadi requested to merge mukadi-master-patch-69035 into master

changed the calculation of subdivision of the 2nd order Triangle on the face. The previous one used to compute the parametric coordinates of all 6 points, which indeed it might require solution of nonlinear equations to perform orthogonal projection or on Seam/Closed curve it ends up computing the linear value which does not lie upon the face. We replace with closestPoint(...) making the same calculation directly from the real barycenter() of 2nd order triangle and produce it exact orthogonal projection on the spherical surface. Hence the non linear equation is solved once only. besides, for spherical surfaces, the end-point has two valid values (2Pi and 0), the previous method cannot distinguish between the two, causing bad mesh location and bad splitting.

Edited by samy mukadi

Merge request reports