Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- filletDiam = [10,10,10]; // [0.1:0.1:30]
- debugOn = false;
- /* [Hidden] */
- $fs=0.5; $fa=1.0;
- module cornerfillet(cfx = 15, cfy = 25, cfz = 10) {
- smidge = .001;
- cfr = max(cfx, cfy, cfz);
- rnd = cfr - sqrt(2) / 2 * cfr + smidge;
- resize([cfx, cfy, cfz])
- difference() {
- cube(cfr);
- hull() {
- if(debugOn)echo(cfx, cfy, cfz);
- for (r = [[0, 0, 0], [-90, 180, 180], [180, -90, 180]])
- rotate(r)
- translate([cfr + smidge, cfr + smidge, 0])
- rotate([0, 0, 180])
- linear_extrude(height=smidge, center=true)
- intersection() {
- square(cfr + smidge);
- circle(cfr + smidge);
- }
- translate([rnd, rnd, rnd])
- sphere(r=rnd);
- translate([cfr + smidge, cfr + smidge, cfr + smidge])
- sphere(smidge * 2, $fn=1);
- } // end hull
- }
- }
- if(debugOn) cornerfillet(filletDiam.x, filletDiam.y, filletDiam.z);
Advertisement
Add Comment
Please, Sign In to add comment