mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-31 10:02:14 +02:00
more error messages for star()
improve speed and flexibility of apply() fix triangulation bug add support for single point 2d solutions in polygon_line_intersection
This commit is contained in:
7
vnf.scad
7
vnf.scad
@@ -211,7 +211,7 @@ function vnf_triangulate(vnf) =
|
||||
let(
|
||||
vnf = is_vnf_list(vnf)? vnf_merge(vnf) : vnf,
|
||||
verts = vnf[0],
|
||||
faces = [for (face=vnf[1]) polygon_triangulation(verts, face)]
|
||||
faces = [for (face=vnf[1]) each polygon_triangulate(verts, face)]
|
||||
) [verts, faces];
|
||||
|
||||
|
||||
@@ -546,6 +546,11 @@ function vnf_volume(vnf) =
|
||||
])/6;
|
||||
|
||||
|
||||
function vnf_area(vnf) =
|
||||
let(verts=vnf[0])
|
||||
sum([for(face=vnf[1]) polygon_area(select(verts,face))]);
|
||||
|
||||
|
||||
// Function: vnf_centroid()
|
||||
// Usage:
|
||||
// vol = vnf_centroid(vnf);
|
||||
|
Reference in New Issue
Block a user