discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Curved slot

AM
Adrian Mariano
Thu, Feb 5, 2026 3:33 PM

Did you add "include<BOSL2/std.scad>" above the code?  The poster neglected
to include that line, without which BOSL2 isn't even loaded.

Also he didn't define gear_rad, so you need to give a value for that.  The
code actually makes 5 slots.

include<BOSL2/std.scad>
$fn=150;
gear_rad=22;
zrot_copies(n=5)
stroke(arc(angle=30, start=-15, r=gear_rad), width=3);

On Thu, Feb 5, 2026 at 10:20 AM Caddiy via Discuss <
discuss@lists.openscad.org> wrote:

Looks interesting but all I get is a load of error warnings:

WARNING: Ignoring unknown variable 'gear_rad' in file , line 4

ERROR: Assertion '(is_def(r) && (r > 0))' failed: "Arc radius invalid" in
file BOSL2/drawing.scad, line 790

TRACE: called by 'arc' in file Own, line 4

TRACE: called by 'stroke' in file Own, line 4

TRACE: called by 'children' in file BOSL2/distributors.scad, line 1180

TRACE: called by 'children' in file BOSL2/distributors.scad, line 902

TRACE: called by 'children' in file BOSL2/transforms.scad, line 1585

TRACE: called by 'children' in file builtins.scad, line 31

TRACE: called by 'translate' in file builtins.scad, line 31

TRACE: called by '_translate' in file BOSL2/transforms.scad, line 1585

TRACE: called by 'translate' in file BOSL2/distributors.scad, line 901

TRACE: called by 'children' in file BOSL2/transforms.scad, line 537

TRACE: called by 'children' in file BOSL2/transforms.scad, line 1617

TRACE: called by 'children' in file builtins.scad, line 30

Maybe I have an old version of BOSL2? Is there a new one somewhere?


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Did you add "include<BOSL2/std.scad>" above the code? The poster neglected to include that line, without which BOSL2 isn't even loaded. Also he didn't define gear_rad, so you need to give a value for that. The code actually makes 5 slots. include<BOSL2/std.scad> $fn=150; gear_rad=22; zrot_copies(n=5) stroke(arc(angle=30, start=-15, r=gear_rad), width=3); On Thu, Feb 5, 2026 at 10:20 AM Caddiy via Discuss < discuss@lists.openscad.org> wrote: > Looks interesting but all I get is a load of error warnings: > > WARNING: Ignoring unknown variable 'gear_rad' in file , line 4 > > ERROR: Assertion '(is_def(r) && (r > 0))' failed: "Arc radius invalid" in > file BOSL2/drawing.scad, line 790 > > TRACE: called by 'arc' in file Own, line 4 > > TRACE: called by 'stroke' in file Own, line 4 > > TRACE: called by 'children' in file BOSL2/distributors.scad, line 1180 > > TRACE: called by 'children' in file BOSL2/distributors.scad, line 902 > > TRACE: called by 'children' in file BOSL2/transforms.scad, line 1585 > > TRACE: called by 'children' in file builtins.scad, line 31 > > TRACE: called by 'translate' in file builtins.scad, line 31 > > TRACE: called by '_translate' in file BOSL2/transforms.scad, line 1585 > > TRACE: called by 'translate' in file BOSL2/distributors.scad, line 901 > > TRACE: called by 'children' in file BOSL2/transforms.scad, line 537 > > TRACE: called by 'children' in file BOSL2/transforms.scad, line 1617 > > TRACE: called by 'children' in file builtins.scad, line 30 > > Maybe I have an old version of BOSL2? Is there a new one somewhere? > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
M
mikeonenine@web.de
Thu, Feb 5, 2026 3:35 PM

Douglas Miller wrote:

Without projection(), you have a mix of 2D and 3D objects (the circles,
and the arc, respectively): rotate_extrude() produces a 3D object;
projection() turns that into a 2D object.

OK.

And projection() removes Z-fighting when the slot shape is differenced out of another shape to give it an actual slot.

Douglas Miller wrote: > Without projection(), you have a mix of 2D and 3D objects (the circles, > and the arc, respectively): rotate_extrude() produces a 3D object; > projection() turns that into a 2D object. OK. And projection() removes Z-fighting when the slot shape is differenced out of another shape to give it an actual slot.
M
mikeonenine@web.de
Thu, Feb 5, 2026 3:44 PM

Adrian Mariano wrote:

Did you add "include<BOSL2/std.scad>" above the code?  The poster neglected
to include that line, without which BOSL2 isn't even loaded.

Also he didn't define gear_rad, so you need to give a value for that.  The
code actually makes 5 slots.

include<BOSL2/std.scad>
$fn=150;
gear_rad=22;
zrot_copies(n=5)
stroke(arc(angle=30, start=-15, r=gear_rad), width=3);

Ah, that’s better. I had overlooked “r=gear_rad”.

Adrian Mariano wrote: > Did you add "include<BOSL2/std.scad>" above the code? The poster neglected > to include that line, without which BOSL2 isn't even loaded. > > Also he didn't define gear_rad, so you need to give a value for that. The > code actually makes 5 slots. > > include<BOSL2/std.scad> > $fn=150; > gear_rad=22; > zrot_copies(n=5) > stroke(arc(angle=30, start=-15, r=gear_rad), width=3); Ah, that’s better. I had overlooked “r=gear_rad”.
M
mikeonenine@web.de
Thu, Feb 5, 2026 4:56 PM
Currently studying https://github.com/BelfrySCAD/BOSL2/wiki/drawing.scad.