Fixed nan length for rounded_polygon with zero radius corners.
This commit is contained in:
parent
17b12c7f31
commit
f18044915d
|
@ -60,7 +60,7 @@ function rounded_polygon_length(points, tangents) = //! Calculate the length giv
|
|||
v1 = p1 - c,
|
||||
v2 = p2 - c,
|
||||
r = abs(corner.z),
|
||||
a = acos((v1 * v2) / sqr(r))) PI * (cross(v1,v2) <= 0 ? a : 360 - a) * r / 180]
|
||||
a = acos((v1 * v2) / sqr(r))) r ? PI * (cross(v1, v2) <= 0 ? a : 360 - a) * r / 180 : 0]
|
||||
)
|
||||
sumv(concat(straights, arcs));
|
||||
|
||||
|
|
Loading…
Reference in New Issue