fix secondorder mesh generation for closed occ edge

This commit is contained in:
Christopher Lackner 2019-01-23 16:00:57 +01:00
parent 0247b92a8a
commit c062933c42

View File

@ -673,13 +673,13 @@ namespace netgen
if (surfi > 0)
{
double u = gi1.u+secpoint*(gi2.u-gi1.u);
double v = gi1.v+secpoint*(gi2.v-gi1.v);
if (!geometry.FastProject (surfi, hnewp, u, v))
if (!geometry.FastProject (surfi, hnewp, u, v) || Dist(hnewp, p1) > Dist(p1,p2))
{
// cout << "Fast projection to surface fails! Using OCC projection" << endl;
// cout << "Fast projection to surface fails! Using OCC projection" << endl;
hnewp = p1+secpoint*(p2-p1);
geometry.Project (surfi, hnewp);
}