Handle region face after half space computation

This commit is contained in:
Adrian Mariano 2021-04-14 23:24:53 -04:00
parent 6e805163ab
commit 5ea5e301b8

View file

@ -1163,7 +1163,12 @@ function vnf_halfspace(_arg1=_UNDEF, _arg2=_UNDEF,
newedges=[for(x=tmp2) each x[1]],
// generate new faces
paths=_vnf_halfspace_paths(newedges),
loops=[for(p=paths) if(coords[p[0]] == coords[last(p)]) reverse(p)])
[coords, concat(newfaces, loops)];
reg = [for(p=paths) project_plane(select(coords,p), halfspace)],
regvnf = region_faces(reg,reverse=true),
regvert = lift_plane(regvnf[0], halfspace)
//loops=[for(p=paths) if(coords[p[0]] == coords[last(p)]) reverse(p)])
)
vnf_merge([[coords, newfaces], [regvert, regvnf[1]]]);
// [coords, concat(newfaces, loops)];
// vim: expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap