From d2f222e82f61f7be8451319bc25675e1bba9024a Mon Sep 17 00:00:00 2001 From: Jan Huwald Date: Wed, 26 Feb 2014 00:02:40 +0100 Subject: Initial commit diff --git a/con_bar_v.scad b/con_bar_v.scad new file mode 100644 index 0000000..1706fb9 --- /dev/null +++ b/con_bar_v.scad @@ -0,0 +1,50 @@ +bar_width = 3; +bar_height = 20; + +clamp_thick = 5; +clamp_l1 = 10; +clamp_l2 = 50; + +strut_height = bar_height; + +angle = 30; // fake value; TODO + +clamp_width = 2 * clamp_thick + bar_width; +clamp_height = bar_height + clamp_thick; + +module clamp() { + l = clamp_l2 - clamp_l1; + + difference() { + translate([clamp_l1, -clamp_width/2, 0]) + cube([l, clamp_width, clamp_height]); + + translate([0, -bar_width/2, clamp_thick + clamp_l2 * sin(angle)]) + rotate([0, angle, 0]) + cube([2*l, bar_width, 2*bar_height]); + } +} + +module con(num) { + difference() { + for (dist = [clamp_l1 + 2*clamp_thick, clamp_l2]) + assign(l = 2 * dist * sin(180/num) + 2*clamp_thick) + for (i = [1:num]) + rotate(i*360/num) + translate([dist, -clamp_thick, 0]) + rotate(180/num) + translate([0, 0, 0]) + cube([clamp_thick, l, strut_height]); + for (i = [1:num]) + rotate(i*360/num) + translate([0, -clamp_width/2, 0]) + cube([2*clamp_l2, clamp_width, clamp_height]); + } + + for (i = [1:num]) + rotate(i*360/num) + clamp(); +} + +con(5); +//clamp(); \ No newline at end of file -- cgit v0.10.1