]> www.fi.muni.cz Git - things.git/commitdiff
bridge: test object for printing bridges
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Wed, 5 Oct 2016 13:57:06 +0000 (15:57 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Wed, 5 Oct 2016 13:57:06 +0000 (15:57 +0200)
bridge.scad [new file with mode: 0644]

diff --git a/bridge.scad b/bridge.scad
new file mode 100644 (file)
index 0000000..d0fc76c
--- /dev/null
@@ -0,0 +1,27 @@
+infty = 1000;
+eps = 0.01;
+
+gap = 25;       // the air gap of the bridge
+width = 10;      // width of the bridge
+thickness = 1;  // thickness of the bridge
+height = 2;     // height of the column under the bridge
+top_len = 4;    // length of the top of the bridge column
+base_add = 2;   // make the base of the column this wider and longer
+
+// two columns
+for (x = [-1,1]) {
+       scale([1, x, 1])
+       translate([0, gap/2+top_len/2, 0])
+       hull() { // base column
+               // bottom rectangle
+               translate([-(width+base_add)/2, -(top_len+base_add)/2, 0])
+                       cube([width+base_add, top_len+base_add, eps]);
+               // top rectangle
+               translate([-width/2, -top_len/2, height])
+                       cube([width, top_len, eps]);
+       }
+}
+
+// top rectangle
+translate([-width/2, -(gap+2*top_len)/2, height])
+       cube([width, gap+2*top_len, thickness]);