From beb5f39722bc5680f79e917926e8de0b1e80e40d Mon Sep 17 00:00:00 2001 From: kellervater Date: Sun, 27 Apr 2025 12:56:06 +0200 Subject: [PATCH] feat(rackmount_ears): option to show actual ear distance --- models/rackmount_ears/rackmount_ears.scad | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/models/rackmount_ears/rackmount_ears.scad b/models/rackmount_ears/rackmount_ears.scad index 8fa4b28..36bbb2a 100644 --- a/models/rackmount_ears/rackmount_ears.scad +++ b/models/rackmount_ears/rackmount_ears.scad @@ -21,6 +21,8 @@ autosize=true; rack_size=10; // [10:10 inch,19:19 inch] // Asymetry Slider. CAUTION: there's no sanity check for this slider! asymetry=0; // [-150:0.1:150] +// shows the distance between the rackmount ears considering the device width. +show_distance=false; // Width of the device in mm. Will determine the width of the rackmount ears depending on rack_size. device_width=201; @@ -119,11 +121,14 @@ module rackmount_ear(asym=0){ } } +// Ear distance +ear_distance = show_distance ? -device_width : -CAGE_BOLT_DIAMETER; + // Place the ears rackmount_ear(asymetry); x_mirror_plane = [1,0,0]; -translate([-device_width,0,0]) +translate([ear_distance,0,0]) mirror(x_mirror_plane){ rackmount_ear(-asymetry); }