mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
Fix apply() to handle degenerate input of empty list.
This commit is contained in:
parent
53c1e25395
commit
2ac6093a73
1 changed files with 1 additions and 0 deletions
|
@ -407,6 +407,7 @@ function affine3d_chain(affines, _m=undef, _i=0) =
|
||||||
// transformed = apply(rot(45), circle(r=3)); // Rotates 2d circle data by 45 deg
|
// transformed = apply(rot(45), circle(r=3)); // Rotates 2d circle data by 45 deg
|
||||||
// transformed = apply(rot(45)*right(4)*scale(3), circle(r=3)); // Scales, translates and rotates 2d circle data
|
// transformed = apply(rot(45)*right(4)*scale(3), circle(r=3)); // Scales, translates and rotates 2d circle data
|
||||||
function apply(transform,points) =
|
function apply(transform,points) =
|
||||||
|
points==[] ? [] :
|
||||||
is_vector(points) ? apply(transform, [points])[0] :
|
is_vector(points) ? apply(transform, [points])[0] :
|
||||||
let(
|
let(
|
||||||
tdim = len(transform[0])-1,
|
tdim = len(transform[0])-1,
|
||||||
|
|
Loading…
Reference in a new issue