diff options
author | xengineering <me@xengineering.eu> | 2023-12-23 21:16:24 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-01-02 14:24:58 +0100 |
commit | db04f4ee722a6de068b7b77b9464fcc10470a468 (patch) | |
tree | eeb1c1b510f79c93de7f47f74712bb09f67bef9e /mech | |
parent | 3886d079bd7c162ef19c9f4c47c740b5883a8ef3 (diff) | |
download | soundbox-db04f4ee722a6de068b7b77b9464fcc10470a468.tar soundbox-db04f4ee722a6de068b7b77b9464fcc10470a468.tar.zst soundbox-db04f4ee722a6de068b7b77b9464fcc10470a468.zip |
mech: pcb_case: Set $fn variables for cylinders
This special variable decides on the level of detail these cylinders are
rendered with. Since this depends also on the size and thus on the
individual cylinder it is also set per cylinder individually.
Diffstat (limited to 'mech')
-rw-r--r-- | mech/pcb_case/rounded_cube.scad | 3 | ||||
-rw-r--r-- | mech/pcb_case/shell.scad | 12 |
2 files changed, 8 insertions, 7 deletions
diff --git a/mech/pcb_case/rounded_cube.scad b/mech/pcb_case/rounded_cube.scad index 5f1dcee..acd50e7 100644 --- a/mech/pcb_case/rounded_cube.scad +++ b/mech/pcb_case/rounded_cube.scad @@ -5,7 +5,8 @@ module rounded_cube(dim, radius) { hull() { for (y=range_y, z=range_z) { - translate([0,y,z]) rotate([0,90,0]) cylinder(r=radius, h=height); + translate([0,y,z]) rotate([0,90,0]) + cylinder(r=radius, h=height, $fn=30); } } } diff --git a/mech/pcb_case/shell.scad b/mech/pcb_case/shell.scad index ff34061..e7fe345 100644 --- a/mech/pcb_case/shell.scad +++ b/mech/pcb_case/shell.scad @@ -20,7 +20,7 @@ module shell_base(dim, t) { for (x = [dim[0]/4, dim[0]-dim[0]/4]) { translate([x,0,dim[2]/2-1.5*bolt_d]) rotate([-90,0,0]) - cylinder(r=bolt_r, h=1.1*t); + cylinder(r=bolt_r, h=1.1*t, $fn=30); } } } @@ -39,14 +39,14 @@ module shell_connector(dim, t) { for (x = [dim[0]/4, dim[0]-dim[0]/4]) { translate([x,dim[1]-t,dim[2]/2+1.5*bolt_d]) rotate([90,0,0]) - cylinder(r=bolt_r, h=size_y); + cylinder(r=bolt_r, h=size_y, $fn=30); } // nut holes for (x = [dim[0]/4, dim[0]-dim[0]/4]) { translate([x,dim[1]-t-size_y,dim[2]/2+1.5*bolt_d]) rotate([-90,0,0]) - cylinder(r=nut_r, h=nut_h); + cylinder(r=nut_r, h=nut_h, $fn=30); } } @@ -61,13 +61,13 @@ module pcb_case_shell(dim, t, h, sockets) { for (socket = sockets) { echo(socket=socket); translate([socket[0], socket[1], 0]) - cylinder(d=nut_d+2, h=h); + cylinder(d=nut_d+2, h=h, $fn=30); } } for (socket = sockets) { translate([socket[0], socket[1], 0]) { - cylinder(d=bolt_d, h=h); - cylinder(d=0.9*nut_d, h=nut_h); + cylinder(d=bolt_d, h=h, $fn=30); + cylinder(d=0.9*nut_d, h=nut_h, $fn=30); } } } |