mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
skip zero area polygons in vnf_slice
This commit is contained in:
parent
41369e844b
commit
d17f72cffd
1 changed files with 5 additions and 3 deletions
8
vnf.scad
8
vnf.scad
|
@ -806,8 +806,8 @@ function vnf_triangulate(vnf) =
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Function vnf_unify_faces()
|
// Function: vnf_unify_faces()
|
||||||
// Synposis: Remove triangulation from VNF, returning a copy with full faces
|
// Synopsis: Remove triangulation from VNF, returning a copy with full faces
|
||||||
// SynTags: VNF
|
// SynTags: VNF
|
||||||
// Topics: VNF Manipulation
|
// Topics: VNF Manipulation
|
||||||
// See Also: vnf_reverse_faces(), vnf_quantize(), vnf_merge_points(), vnf_triangulate(), vnf_slice()
|
// See Also: vnf_reverse_faces(), vnf_quantize(), vnf_merge_points(), vnf_triangulate(), vnf_slice()
|
||||||
|
@ -999,7 +999,9 @@ function _slice_3dpolygons(polys, dir, cuts) =
|
||||||
)
|
)
|
||||||
flatten([
|
flatten([
|
||||||
for (poly = polys)
|
for (poly = polys)
|
||||||
let( plane = plane_from_polygon(poly))
|
if (polygon_area(poly)>EPSILON) // Discard zero area polygons
|
||||||
|
let(
|
||||||
|
plane = plane_from_polygon(poly,1e-4))
|
||||||
assert(plane,"Found non-coplanar face.")
|
assert(plane,"Found non-coplanar face.")
|
||||||
let(
|
let(
|
||||||
normal = point3d(plane),
|
normal = point3d(plane),
|
||||||
|
|
Loading…
Reference in a new issue