mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-07 20:16:55 +02:00
@@ -1913,8 +1913,7 @@ function centroid(poly, eps=EPSILON) =
|
|||||||
assert( is_finite(eps) && (eps>=0), "The tolerance should be a non-negative value." )
|
assert( is_finite(eps) && (eps>=0), "The tolerance should be a non-negative value." )
|
||||||
let(
|
let(
|
||||||
n = len(poly[0])==2 ? 1 :
|
n = len(poly[0])==2 ? 1 :
|
||||||
let(
|
let( plane = plane_from_points(poly, fast=true) )
|
||||||
plane = plane_from_points(poly, fast=true) )
|
|
||||||
assert( !is_undef(plane), "The polygon must be planar." )
|
assert( !is_undef(plane), "The polygon must be planar." )
|
||||||
plane_normal(plane),
|
plane_normal(plane),
|
||||||
v0 = poly[0] ,
|
v0 = poly[0] ,
|
||||||
|
Reference in New Issue
Block a user