diff options
author | xengineering <me@xengineering.eu> | 2024-01-01 14:51:54 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-01-02 14:24:58 +0100 |
commit | 973cd7c4765b31f6d280ac8585287231bf62f343 (patch) | |
tree | 3adda5900bda22af466be05458685f470df88022 /mech | |
parent | a09f5e3cdaabdcaf80dfa825d373f380a36c885d (diff) | |
download | soundbox-973cd7c4765b31f6d280ac8585287231bf62f343.tar soundbox-973cd7c4765b31f6d280ac8585287231bf62f343.tar.zst soundbox-973cd7c4765b31f6d280ac8585287231bf62f343.zip |
mech: pcb_case: Test with external tolerances
The current tolerance values should be written down inside the files
covering the related parts. The tolerance_tests.scad file should include
those values.
Diffstat (limited to 'mech')
-rw-r--r-- | mech/pcb_case/panel.scad | 3 | ||||
-rw-r--r-- | mech/pcb_case/tolerance_tests.scad | 46 |
2 files changed, 25 insertions, 24 deletions
diff --git a/mech/pcb_case/panel.scad b/mech/pcb_case/panel.scad index df4baf1..0ecd4f5 100644 --- a/mech/pcb_case/panel.scad +++ b/mech/pcb_case/panel.scad @@ -1,5 +1,8 @@ use <rounded_cube.scad> +panel_dim_0_tol = 0.4; +panel_dim_1_2_tol = 0.8; + module pcb_case_panel(dim, t) { rounded_cube([t,dim[1]-2*t,dim[2]-2*t], t); } diff --git a/mech/pcb_case/tolerance_tests.scad b/mech/pcb_case/tolerance_tests.scad index 476cd35..43560f7 100644 --- a/mech/pcb_case/tolerance_tests.scad +++ b/mech/pcb_case/tolerance_tests.scad @@ -1,5 +1,6 @@ include <bolt.scad> include <nut.scad> +include <panel.scad> use <rounded_cube.scad> @@ -10,7 +11,7 @@ module bolt_drilling() { for(i = [-steps : steps]) { tol = bolt_ds_tol + i * step_width; - echo(tol=tol); + echo(bolt_ds_tol=tol); translate([i*5*bolt_ds,0,0]) difference() { cube([5*bolt_ds, 5*bolt_ds, height]); @@ -27,7 +28,7 @@ module nut_drilling() { for(i = [-steps : steps]) { tol = nut_d_tol + i * step_width; - echo(tol=tol); + echo(nut_d_tol=tol); translate([i*5*nut_d,0,0]) difference() { cube([5*nut_d, 5*nut_d, 2*nut_h]); @@ -42,54 +43,51 @@ module nut_drilling() { } } -module panel_width_height() { +module panel_thickness() { steps = 3; step_width = 0.2; t = 2; - t_tol = 0.4; - current_tol = 0.8; - height = 3*t; + height = 2*t; for(i = [-steps : steps]) { - tol = current_tol + i * step_width; - echo(tol=tol); - translate([i*3*t,0,0]) + tol = panel_dim_0_tol + i * step_width; + echo(panel_dim_0_tol=tol); + translate([i*5*t,0,0]) difference() { - cube([3*t, 8*t, height]); - translate([t, t-tol/2, t]) { - rounded_cube([t, 6*t+tol, 6*t+tol], t); + cube([5*t, 5*t, height]); + translate([2*t, 0, t]) { + cube([t+tol, 5*t, t]); } } } - translate([0, 9*t, 0]) rotate([0, -90, 0]) rounded_cube([t, 6*t, 6*t], t); + translate([0, 6*t, 0]) rotate([0, -90, 0]) rounded_cube([t, 4*t, 7*t], t); } -module panel_thickness() { +module panel_width_height() { steps = 3; step_width = 0.2; t = 2; - current_tol = 0.4; - height = 2*t; + height = 3*t; for(i = [-steps : steps]) { - tol = current_tol + i * step_width; - echo(tol=tol); - translate([i*5*t,0,0]) + tol = panel_dim_1_2_tol + i * step_width; + echo(panel_dim_1_2_tol=tol); + translate([i*3*t,0,0]) difference() { - cube([5*t, 5*t, height]); - translate([2*t, 0, t]) { - cube([t+tol, 5*t, t]); + cube([3*t, 8*t, height]); + translate([t, t-tol/2, t]) { + rounded_cube([t, 6*t+tol, 6*t+tol], t); } } } - translate([0, 6*t, 0]) rotate([0, -90, 0]) rounded_cube([t, 4*t, 7*t], t); + translate([0, 9*t, 0]) rotate([0, -90, 0]) rounded_cube([t, 6*t, 6*t], t); } bolt_drilling(); translate([0, 20, 0]) nut_drilling(); -translate([0, 50, 0]) panel_width_height(); translate([0, 90, 0]) panel_thickness(); +translate([0, 50, 0]) panel_width_height(); |