-
Notifications
You must be signed in to change notification settings - Fork 176
Description
I realized BOSL2 offset(path,r=…) does not use $fs and $fa the same way as OpenSCAD offset(r=…) CHILDREN; so I tried using $fn with weird results. I don't know if this is a bug exactly, but it's very unexpected and it prevents me to get control over the relative number of faces for rounding — it seems to be mostly all-or-nothing.
I tried to demonstrate the problem with the following code:
include <BOSL2/std.scad>
rainbow([0,1,2,3,4])
let(fn=3+$item*2)
for(y=[0:3])
move([$item,y]*25)
let(path=offset(regular_ngon(3+y*2,5),r=5,$fn=fn)) {
stroke(path,width=0.5,joints="dot",closed=true);
text(str("$fn=",fn),halign="center",valign="center",size=4);
}
It shows what happens when trying to offset different polygons using different $fn, somewhat arbitrarily chosen to show the problem. Unfortunately I couldn't understand the source code for offset(), it was a lot more code than I expected!
I think that ideally it should work the same or similar to OpenSCAD built-in offset() with more gradual increase of edges, at least in the same ballpark/
- OpenSCAD 2025.08.12.nightly
- BOSL2 e940b69