mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
correction of centroid
This commit is contained in:
parent
fd2c073bb2
commit
575db80056
2 changed files with 19 additions and 18 deletions
|
@ -1913,7 +1913,8 @@ function centroid(poly, eps=EPSILON) =
|
|||
assert( is_finite(eps) && (eps>=0), "The tolerance should be a non-negative value." )
|
||||
let(
|
||||
n = len(poly[0])==2 ? 1 :
|
||||
let( plane = plane_from_points(poly, fast=true) )
|
||||
let(
|
||||
plane = plane_from_points(poly, fast=true) )
|
||||
assert( !is_undef(plane), "The polygon must be planar." )
|
||||
plane_normal(plane),
|
||||
v0 = poly[0] ,
|
||||
|
|
Loading…
Reference in a new issue