summaryrefslogtreecommitdiff
path: root/enclosure/rails/rs485_base.scad
diff options
context:
space:
mode:
Diffstat (limited to 'enclosure/rails/rs485_base.scad')
-rw-r--r--enclosure/rails/rs485_base.scad43
1 files changed, 43 insertions, 0 deletions
diff --git a/enclosure/rails/rs485_base.scad b/enclosure/rails/rs485_base.scad
new file mode 100644
index 0000000..2b5afe5
--- /dev/null
+++ b/enclosure/rails/rs485_base.scad
@@ -0,0 +1,43 @@
+eps=0.01;
+
+nut_dia = 5.3;
+nut_depth=5.5;
+
+bx=71.12;
+by=35.56;
+
+w=8;
+h=5;
+s=30;
+d=w;
+bh=8;
+sd=4;
+
+module qc(a, b, d, h) {
+ translate([-a, -b, 0]) cylinder(d=d, h=h);
+ translate([-a, b, 0]) cylinder(d=d, h=h);
+ translate([ a, -b, 0]) cylinder(d=d, h=h);
+ translate([ a, b, 0]) cylinder(d=d, h=h);
+}
+
+module foo() {
+ difference() {
+ union() {
+ translate([0, by/2, h/2]) cube([2*s+w, w, h], center=true);
+ translate([0, -by/2, h/2]) cube([2*s+w, w, h], center=true);
+ translate([-bx/2, 0, h/2]) cube([w, by, h], center=true);
+ translate([bx/2, 0, h/2]) cube([w, by, h], center=true);
+
+ qc(a=bx/2, b=by/2, d=d, h=bh);
+ qc(a=s, b=by/2, d=d, h=bh);
+ }
+ translate([0, 0, -eps]) {
+ qc(a=bx/2, b=by/2, d=sd, h=bh+2*eps);
+ qc(a=s, b=by/2, d=sd, h=bh+2*eps);
+ translate([0, 0, bh-nut_depth+eps]) qc(a=bx/2, b=by/2, d=nut_dia, h=nut_depth+eps);
+ qc(a=s, b=by/2, d=nut_dia, h=nut_depth+eps);
+ }
+ }
+}
+
+foo($fn=25); \ No newline at end of file