Merge branch 'fix_bisect_occ' into 'master'

Fix refinement with OCC geometries

See merge request ngsolve/netgen!546
This commit is contained in:
Schöberl, Joachim 2022-12-22 11:16:08 +01:00
commit 26d12898a6

View File

@ -3418,9 +3418,17 @@ namespace netgen
INDEX_2 edge(oldpi1, oldpi2);
edge.Sort();
int si = mesh.GetFaceDescriptor (oldtri.surfid).SurfNr();
PointGeomInfo npgi;
PointGeomInfo gi1 = oldtri.pgeominfo[(oldtri.markededge+1)%3];
PointGeomInfo gi2 = oldtri.pgeominfo[(oldtri.markededge+2)%3];
if (cutedges.Used (edge))
{
newp = cutedges.Get(edge);
npgi.u = 0.5*(gi1.u + gi2.u);
npgi.v = 0.5*(gi1.v + gi2.v);
geo.ProjectPointGI (si, mesh[newp], npgi);
}
else
{
@ -3428,17 +3436,9 @@ namespace netgen
mesh.Point (edge.I2()));
newp = mesh.AddPoint (npt);
cutedges.Set (edge, newp);
}
int si = mesh.GetFaceDescriptor (oldtri.surfid).SurfNr();
PointGeomInfo npgi;
if (mesh[newp].Type() != EDGEPOINT)
geo.PointBetween (mesh.Point (oldpi1), mesh.Point (oldpi2),
0.5, si,
oldtri.pgeominfo[(oldtri.markededge+1)%3],
oldtri.pgeominfo[(oldtri.markededge+2)%3],
mesh.Point (newp), npgi);
0.5, si, gi1, gi2, mesh.Point (newp), npgi);
}
BTBisectTri (oldtri, newp, npgi, newtri1, newtri2);