BelfrySCAD / BOSL2

The Belfry OpenScad Library, v2.0. An OpenSCAD library of shapes, masks, and manipulators to make working with OpenSCAD easier. BETA
https://github.com/BelfrySCAD/BOSL2/wiki
BSD 2-Clause "Simplified" License
1.01k stars 115 forks source link

[BUG] spiral_sweep lead_in does not work as expected #1440

Closed pipatron closed 5 months ago

pipatron commented 5 months ago

In spiral_sweep(), lead_in2 does nothing and lead_in1 works as the plain lead_in argument:

spiral_sweep(rect(5),30,10,2,lead_in=5);
spiral_sweep(rect(5),30,10,2,lead_in1=5);
spiral_sweep(rect(5),30,10,2,lead_in2=5);
lead_in=5 lead_in1=5 lead_in2=5
lead_in=5 lead_in1=5 lead_in2=5

I get different breakage with lead_in_ang:

spiral_sweep(rect(5),30,10,2,lead_in_ang=20);
spiral_sweep(rect(5),30,10,2,lead_in_ang1=20);
spiral_sweep(rect(5),30,10,2,lead_in_ang2=20);
lead_in_ang=20 lead_in_ang1=20 lead_in_ang2=20
lead_in_ang=20 lead_in_ang1=20 lead_in_ang2=20

The missing render comes with this error message:

ERROR: Assertion '(is_num(v) || is_vector(v))' failed: "Invalid scale" in file ../../openscad/lib/BOSL2/transforms.scad, line 822 TRACE: called by 'scale' in file ../../openscad/lib/BOSL2/skin.scad, line 1311 TRACE: called by 'spiral_sweep' in file ../../openscad/lib/BOSL2/skin.scad, line 1334 TRACE: assignment to 'vnf' in file ../../openscad/lib/BOSL2/skin.scad, line 1334 TRACE: called by 'spiral_sweep' in file old_headphone_inlet.scad, line 6

adrianVmariano commented 5 months ago

I think I have this fixed in the PR.