Fixed worm() face normals.

This commit is contained in:
Garth Minette 2021-03-15 15:14:10 -07:00
parent efb7a4fada
commit 5c9162e9f5
2 changed files with 11 additions and 1 deletions

View file

@ -1287,7 +1287,8 @@ function worm(
)
apply(zrot(a)*up(z), path3d(cross_sect))
],
vnf1 = vnf_vertex_array(profiles, caps=true, col_wrap=true, reverse=true, style="alt"),
rprofiles = [ for (prof=profiles) reverse(prof) ],
vnf1 = vnf_vertex_array(rprofiles, caps=true, col_wrap=true, style="quincunx"),
vnf = left_handed? xflip(p=vnf1) : vnf1
) reorient(anchor,spin,orient, d=d, l=l, p=vnf);

View file

@ -188,6 +188,15 @@ function vnf_compact(vnf) =
) vnf_add_faces(faces=faces);
// Function: vnf_reverse_faces()
// Usage:
// rvnf = vnf_reverse_faces(vnf);
// Description:
// Reverses the facing of all the faces in the given VNF.
function vnf_reverse_faces(vnf) =
[vnf[0], [for (face=vnf[1]) reverse(face)]];
// Function: vnf_triangulate()
// Usage:
// vnf2 = vnf_triangulate(vnf);