You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to round the corners of a 120 degree arc. Unfortunately round_corners() doesn't differentiate between the $fa segments of the arc and a sharp corner, so I cannot round the sharp corners with a value of r larger than $fa. Question: is there an alternate way to round the corners? If I was working with a 90 degree arc, I could let round_corners create the arc from a rect(), but I don't what the starting shape might be for a 120 degree wedge.
In the code below, I use offset_sweep to turn the arc into a nicely rounded wedge of cheese. Then I need to open a window in the rounded face of that wedge of cheese. If I wanted square corners I could use rotate_sweep(). I spent a lot of time in the documentation, but couldn't figure out how to open a round-corner window except the hull() of four cylinders. I'm kind of lucky even this worked -- depending on what additional shapes are present, this may not have been an acceptable solution. Question: can you think of another way to open the window? Here's a picture:
Thanks & happy holidays!
Dan
`
include <BOSL2/std.scad>
include <BOSL2/rounding.scad>
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Two questions about the following code:
I want to round the corners of a 120 degree arc. Unfortunately round_corners() doesn't differentiate between the $fa segments of the arc and a sharp corner, so I cannot round the sharp corners with a value of r larger than $fa. Question: is there an alternate way to round the corners? If I was working with a 90 degree arc, I could let round_corners create the arc from a rect(), but I don't what the starting shape might be for a 120 degree wedge.
In the code below, I use offset_sweep to turn the arc into a nicely rounded wedge of cheese. Then I need to open a window in the rounded face of that wedge of cheese. If I wanted square corners I could use rotate_sweep(). I spent a lot of time in the documentation, but couldn't figure out how to open a round-corner window except the hull() of four cylinders. I'm kind of lucky even this worked -- depending on what additional shapes are present, this may not have been an acceptable solution. Question: can you think of another way to open the window? Here's a picture:
Thanks & happy holidays!
Dan
`
include <BOSL2/std.scad>
include <BOSL2/rounding.scad>
$fs = 0.4; $fa = 3;
diam = 151.3;
shell_th = 3.6;
axispt = [shell_th/tan(60), shell_th];
container_shell_120(80);
module container_shell_120(height) {
rounded_arc = round_corners(r=3, arc(r=0.5*diam, angle=120, wedge=true));
interior = offset(rounded_arc, delta=shell_th);
}
module hull_arc(height) {
// angle of sweep = 120 - 2angle corresponding to 10mm of arc
sweep_angle = 120 - 220360/(PIdiam); // 15 is 10mm of arc + 5mm for corner rad
hull() {
up(20) zrot(60 - 0.5sweep_angle) right(0.5diam - 5)
xcyl(r=10, h=70, anchor=LEFT);
up(height - 20) zrot(60 - 0.5sweep_angle) right(0.5diam - 5)
xcyl(r=10, h=70, anchor=LEFT);
up(20) zrot(60 + 0.5sweep_angle) right(0.5diam - 5)
xcyl(r=10, h=70, anchor=LEFT);
up(height - 20) zrot(60 + 0.5sweep_angle) right(0.5diam - 5)
xcyl(r=10, h=70, anchor=LEFT);
}
}
`
Beta Was this translation helpful? Give feedback.
All reactions