1 Commits

Author SHA1 Message Date
kellervater
3194e6e19e feat(rackmount_ears): asymetry slider 2025-04-27 12:41:20 +02:00
3 changed files with 5 additions and 140 deletions

View File

@@ -22,8 +22,8 @@ LOCK_PIN_EDGE_DISTANCE=5.5; // mm
/* [Device Measurements] */ /* [Device Measurements] */
// Width of the device in mm. Will determine how far apart the actual mounts are in width. // Width of the device in mm. Will determine how far apart the actual mounts are in width.
device_width=100; // [20:0.1:500] device_width=100 // [20:0.1:500]
// TODO test for zero cube ; // TODO test for zero cube
// Depth of the device in mm. Will determine how far apart the actual mounts are in depth. // Depth of the device in mm. Will determine how far apart the actual mounts are in depth.
device_depth=99; // [54:0.1:400] device_depth=99; // [54:0.1:400]
// Height of the device in mm. Will determine how far apart the actual mounts are in height. // Height of the device in mm. Will determine how far apart the actual mounts are in height.

View File

@@ -19,10 +19,8 @@ RACK_WIDTH_19_INCH=482.6; // mm
autosize=true; autosize=true;
// rack size in inches. If autosize is true, this value will be ignored. Only 10 and 19 inch racks are supported. // rack size in inches. If autosize is true, this value will be ignored. Only 10 and 19 inch racks are supported.
rack_size=10; // [10:10 inch,19:19 inch] rack_size=10; // [10:10 inch,19:19 inch]
// Asymetry Slider. CAUTION: there's no sanity check for this slider! // Asymetry Slider. If autosize is true, this value will be ignored. CAUTION: there's no sanity check for this slider!
asymetry=0; // [-150:0.1:150] asymetry=100; // [-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. // Width of the device in mm. Will determine the width of the rackmount ears depending on rack_size.
device_width=201; device_width=201;
@@ -121,14 +119,11 @@ module rackmount_ear(asym=0){
} }
} }
// Ear distance
ear_distance = show_distance ? -device_width : -CAGE_BOLT_DIAMETER;
// Place the ears // Place the ears
rackmount_ear(asymetry); rackmount_ear(asymetry);
x_mirror_plane = [1,0,0]; x_mirror_plane = [1,0,0];
translate([ear_distance,0,0]) translate([-device_width,0,0])
mirror(x_mirror_plane){ mirror(x_mirror_plane){
rackmount_ear(-asymetry); rackmount_ear(-asymetry);
} }

View File

@@ -1,130 +0,0 @@
// import BOSL2
include <BOSL2/std.scad>
/* [Hidden] */
// constants which shouldn't be changed
$fn=100;
// This is the HomeRacker base unit. don't change this!
BASE_UNIT=15; // mm
// Standard tolerance for the mount. This is a sane default.
TOLERANCE=0.2; // mm
// Base strength. This is a sane default.
BASE_STRENGTH=2; // mm
// Chamfer size. This is a sane default.
CHAMFER=1; // mm
// Lock Pin side length
LOCK_PIN_SIDE=4; // mm
// lock pin edge distance
LOCK_PIN_EDGE_DISTANCE=5.5; // mm
// lock pin chamfer
LOCK_PIN_CHAMFER=0.8; // mm
// Negative chamfer fix:
NEGATIVE_CHAMFER_TRANSLATE=0.01;
mount_units=2;
/* [Base] */
// TODO: enable mount units
// How many units shall the mount span across the support
//mount_units=2; //[2:1:10]
// Shall bores be countersunk or flathead
bore_type="flathead"; //[flathead,countersunk]
// Bore Shaft Diameter in mm
bore_shaft_diameter=4;
// Bore Head Diameter in mm (only relevant if bore_type=countersunk)
bore_head_diameter=8.5;
/* [Finetuning] */
// Defines the angle of the head rejuvenation. 90° is ISO standard. (only relevant if bore_type=countersunk)
countersunk_angle=90;
// Tolerance (in mm) for the bore holes. This is a sane default.
bore_tolerance=0.2;
// Calculate the head depth based on the countersunk angle.
head_depth = bore_head_diameter/2 - bore_shaft_diameter/2 * tan( countersunk_angle/2 );
echo("head_depth: ", head_depth);
connector_width_net=BASE_UNIT+TOLERANCE;
connector_width_gross=connector_width_net+BASE_STRENGTH*2;
//Wall Mount
mount_thickness=head_depth+BASE_STRENGTH;
mount_height=mount_units*BASE_UNIT;
mount_width=mount_units*2*BASE_UNIT+connector_width_gross;
// Support Interface
module mount(){
difference() {
union(){
cuboid([mount_width,mount_height,mount_thickness],anchor=CENTER+BOTTOM,chamfer=CHAMFER);
cuboid([connector_width_gross,mount_height,connector_width_gross],anchor=CENTER+BOTTOM,chamfer=CHAMFER);
}
translate([0,0,BASE_STRENGTH])
cuboid([connector_width_net,mount_height,connector_width_net],anchor=CENTER+BOTTOM);
}
}
// Lock pin Holes
module lock_pin_hole(){
// fix for negative chamfer. Otherwise the holes would not reach the surface
translate([0,0,-NEGATIVE_CHAMFER_TRANSLATE/2])
cuboid(
size=[LOCK_PIN_SIDE,LOCK_PIN_SIDE,connector_width_gross+0.01],
anchor=CENTER+BOTTOM,
chamfer=-LOCK_PIN_CHAMFER,edges=[TOP,BOTTOM]
);
}
module lock_pin_holes(){
// ycopies
ycopies(BASE_UNIT,mount_units)
// Create cross
union(){
lock_pin_hole();
yrot(90,cp=[0,0,connector_width_gross/2])
lock_pin_hole();
}
}
//// Bores
// Shafts
module bore(){
bore_shaft_radius=(bore_shaft_diameter+bore_tolerance)/2;
bore_head_radius=(bore_head_diameter+bore_tolerance)/2;
if (bore_type=="flathead") {
cylinder(r=bore_shaft_radius,h=mount_thickness,anchor=CENTER+BOTTOM);
} else if (bore_type=="countersunk") {
// Countersunk
union() {
// Head
translate([0,0,mount_thickness])
cylinder(r1=bore_shaft_radius,r2=bore_head_radius,h=head_depth,anchor=CENTER+TOP);
// Shaft
cylinder(r=bore_shaft_radius,h=mount_thickness,anchor=CENTER+BOTTOM);
}
}
}
bore_position_x=BASE_STRENGTH+BASE_UNIT/2+TOLERANCE/2+BASE_UNIT;
echo("bore_position_x: ", bore_position_x);
// Assembly
translate([0,0,BASE_UNIT]) rotate([90,0,0])
union(){
difference() {
mount();
translate([-bore_position_x,0,0])
bore();
translate([bore_position_x,0,0])
bore();
// Lock Pin Holes
lock_pin_holes();
}
}