-
-
Save ABillBlakely/602dbe7353f41d9160f793bf255c0529 to your computer and use it in GitHub Desktop.
| module speaker_stand(){ | |
| // This module extrudes the profile() to create the | |
| // solid model of the stand excludin the backstop. | |
| linear_extrude(width, center = true) | |
| profile(); | |
| // Adding a center brace | |
| brace(); | |
| } | |
| module brace(){ | |
| // Adjust these 3 variables to adjust the center brace. | |
| // They don't have to be based on the outer vars, but that should help it auto scale with the rest of the design. | |
| // Note that brace_depth doesn't directly correspond to something you could measure on the finished product. | |
| // The actual width of the brace 'web' that can be measured will depend on brace_angle and maybe other parameters. | |
| brace_depth = top_depth / 3; | |
| brace_angle = 3 * angle; | |
| brace_thickness = thickness / 4; | |
| translate([0, 0, -brace_thickness / 2]) | |
| linear_extrude(brace_thickness) | |
| difference(){ | |
| // hull of the profile fills in the center of the profile() | |
| hull() profile(); | |
| // subtract a big chunk since brace of the full area seems overkill, | |
| // also rotate the subtraction so it matches the design better. | |
| translate([brace_depth, 0, 0]) | |
| rotate([0, 0, -brace_angle]) | |
| square([2 * top_depth - brace_depth, 2 * height]); | |
| } | |
| } |
Heh, yeah that is generally one of the harder things to do in openscad. Look into the BOSL2 library which has a fillet() function:
https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#module-fillet
I've not used the library though so I'm not sure it even applies here.
For this model, about as far as I would recommend going would be placing a cylinder at the front edge of the brace. Here is a quick and dirty version, you might need to tweak the values if the cylinder sticks out or leaves a gap. Smoothing the edges into the rest of the model is more difficult, although not impossible. If you are up for the challenge I could point you in the right direction though.
module brace(){
// Adjust these 3 variables to adjust the center brace.
// They don't have to be based on the outer vars, but that should help it auto scale with the rest of the design.
// Note that brace_depth doesn't directly correspond to something you could measure on the finished product.
// The actual width of the brace 'web' that can be measured will depend on brace_angle and maybe other parameters.
brace_depth = top_depth / 3;
brace_angle = 3 * angle;
brace_thickness = thickness / 4;
// add a cylinder to round the front of the brace.
translate([brace_depth,0,0])
rotate([-90,0,-brace_angle])
translate([0, 0, thickness/4])
cylinder(d=brace_thickness, h=height-thickness/2,); //number for height could be calculated but this should work for most values
translate([0, 0, -brace_thickness / 2])
linear_extrude(brace_thickness)
difference(){
// hull of the profile fills in the center of the profile()
hull() profile();
// subtract a big chunk since brace of the full area seems overkill,
// also rotate the subtraction so it matches the design better.
translate([brace_depth, 0, 0])
rotate([0, 0, -brace_angle])
square([2 * top_depth - brace_depth, 2 * height]);
}
}Legend. I will give it a shot, if not I will finish it off in Fusion where I am a bit more comfortable :)
Just responding to say this worked great. My Diamond 10.1s sound even better. Thank you!
Thank you for this! I am still trying to work out the syntax of the openscad script. Can you give me a hint as to how to chamfer all edges of the brace - front, sides, top and bottom? I tried some copy/paste work and failed 😅