Closed lijon closed 9 months ago
Which example specifically? Everything appears OK to me.
It's Example 1:
include <BOSL2/std.scad>
include <BOSL2/rounding.scad>
arc = arc(points=[[1,1],[3,4],[6,3]],n=50);
path = [[0,0],[6,2],[9,7],[8,10]];
xdistribute(spacing=10){
offset_stroke(path, width = 2);
offset_stroke(path, start="round", end="round", width = 2);
offset_stroke(path, start="pointed", end="pointed", width = 2);
}
fwd(10) xdistribute(spacing=10){
offset_stroke(arc, width = 2);
offset_stroke(arc, start="round", end="round", width = 2);
offset_stroke(arc, start="pointed", end="pointed", width = 2);
}
The second stroke is supposed to have rounded ends. But as can be seen in the image, they are pointed.
Looks like $fn
is too small. There used to be a bug where arc used the total number of points for a circle for its arc, no matter how short the arc. That probably made this example work in the past without setting $fn
.
Fixed this in the example.
So is it only using $fn? Perhaps it should use segs()?
It computed the number of segments on the circle I think using segs() but then put that number of segments on the arc instead of dividing by the fraction of the circle that the arc occupied. Current version should be correct.
Describe the bug
See the wiki example https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-offset_stroke
The
end="round"
still gives a pointed end.