ci: linting
This commit is contained in:
@@ -7,4 +7,4 @@ This is my first [OpenSCAD](https://openscad.org/) project to get a grip on it.
|
||||
|
||||
Here are some customization examples:
|
||||

|
||||

|
||||

|
||||
|
||||
@@ -9,12 +9,12 @@ 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=10; // [10:10 inch,19:19 inch]
|
||||
|
||||
// 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;
|
||||
// Height of the device in mm. Will determine the height of the rackmount ear in standard HeightUnits (1HU=44.5 mm). The program will always choose the minimum number of units to fit the device height. Minimum is 1 unit.
|
||||
device_height=40;
|
||||
// Thickness of the rackmount ear.
|
||||
strength=3;
|
||||
strength=3;
|
||||
|
||||
/* [Device Bores] */
|
||||
// Distance (in mm) of the device's front bores(s) to the front of the device
|
||||
@@ -70,9 +70,9 @@ echo("Height: ", RACK_HEIGHT);
|
||||
echo("Rack Bore Count: ", RACK_BORE_COUNT);
|
||||
|
||||
// Calculate the width of the ear
|
||||
function get_ear_width(device_width) =
|
||||
device_width > RACK_WIDTH_10_INCH_INNER || autosize == false && rack_size == 19 ?
|
||||
(RACK_WIDTH_19_INCH - device_width) / 2 :
|
||||
function get_ear_width(device_width) =
|
||||
device_width > RACK_WIDTH_10_INCH_INNER || autosize == false && rack_size == 19 ?
|
||||
(RACK_WIDTH_19_INCH - device_width) / 2 :
|
||||
(RACK_WIDTH_10_INCH_OUTER - device_width) / 2
|
||||
;
|
||||
rack_ear_width = get_ear_width(device_width);
|
||||
@@ -83,8 +83,8 @@ function get_bore_depth(device_bore_margin_horizontal,device_bore_columns) =
|
||||
// Calculate the depth of the ear
|
||||
depth=device_bore_distance_front*2+get_bore_depth(device_bore_margin_horizontal,device_bore_columns);
|
||||
device_screw_alignment_vertical=
|
||||
center_device_bore_alignment ?
|
||||
RACK_HEIGHT / 2 :
|
||||
center_device_bore_alignment ?
|
||||
RACK_HEIGHT / 2 :
|
||||
device_bore_margin_vertical / 2 + device_bore_distance_bottom
|
||||
;
|
||||
device_screw_alignment = [strength,depth/2,device_screw_alignment_vertical];
|
||||
@@ -99,8 +99,8 @@ module base_ear(width,strength,height) {
|
||||
}
|
||||
|
||||
module screws_countersunk(length, diameter_head, length_head, diameter_shaft) {
|
||||
translate(device_screw_alignment)
|
||||
yrot(-90)
|
||||
translate(device_screw_alignment)
|
||||
yrot(-90)
|
||||
grid_copies(spacing=[device_bore_margin_vertical,device_bore_margin_horizontal],n=[device_bore_rows, device_bore_columns])
|
||||
union() {
|
||||
cylinder(h=length_head, r1=diameter_head/2, r2=diameter_shaft/2);
|
||||
|
||||
Reference in New Issue
Block a user