]> www.fi.muni.cz Git - things.git/blobdiff - rc-plane-ski.scad
switch holder.scad
[things.git] / rc-plane-ski.scad
index ebd4c56e8235a24557eb03a489ec0b1547a91581..13dfffd22f5c761a763ec58cb7027e91184038c5 100644 (file)
@@ -4,50 +4,67 @@ eps = 0.01;
 base_w = 30;
 base_l = 150;
 
-tip_r = 25;
-tip_rv = 25;
-tip_rv_off = base_l/2-2;
-wall = 1.25;
+center_w = 5;
+center_l = base_l - base_w;
+center_h = 1.5;
 
-axle_hole = 3;
-axle_h = 7;
-axle_off = base_l/6;
-axle_cube = 10;
+tip_l = 30;
+wall = 0.8;
+
+axle_pos = 0.55;
+axle_x = base_l/2 - axle_pos*base_l;
+
+axle_hole = 1.2 + 0.5;
+axle_slot = 1.2;
+axle_top_l = 10;
+axle_bot_l = 10;
+axle_top_w = 3;
+axle_bot_w = 10;
+axle_h = 3;
 
 module body() {
        // base
-       translate([-base_l/2, 0 ])
-               cube([base_l, wall, base_w]);
+       translate([-base_l/2, -base_w/2, 0 ])
+               cube([base_l-tip_l, base_w, wall]);
 
        // tip
-       intersection() {
-               // the main tube
-               difference() {
-                       translate([base_l/2, tip_r, 0]) 
-                               cylinder(r = tip_r, h = base_w, $fn = 128);
-                       translate([base_l/2, tip_r, -eps]) 
-                               cylinder(r = tip_r - wall, h = base_w+2*eps, $fn = 128);
-               }
-               // the appropriate quarter of the tube only
-               translate([base_l/2, -eps, -eps])
-                       cube([tip_r + eps, tip_r + eps, base_w+2*eps]);
-               // make the tip round
-               translate([tip_rv_off, -eps, base_w/2-eps])
-                       rotate([-90, 0, 0])
-                       cylinder(r = tip_rv, h = base_w + 2*eps);
+       translate([base_l/2-tip_l, 0, 0])
+               scale([2*tip_l/base_w, 1, 1])
+               cylinder(r = base_w/2, h = wall);
+
+       // center reinforcement
+       for (y = [-1, 1]) scale([1, y, 1]) hull() {
+               translate([base_l/2-tip_l, axle_bot_l/2, wall])
+                       cube(eps);
+               translate([-base_l/2, axle_bot_l/2, wall])
+                       cube(eps);
+               translate([0, axle_bot_l/2-3, wall])
+                       cube([eps, 6, eps]);
+               translate([0, axle_bot_l/2, wall])
+                       cube([eps, eps, axle_h/2]);
        }
 
-       // axle block
-       difference() {
-               translate([axle_off - axle_cube/2, wall, 0])
-                       cube([axle_cube, axle_cube/2 + axle_h, axle_cube]);
-               translate([axle_off, axle_h + wall, -eps])
-                       cylinder(r = axle_hole/2, h = axle_cube + 2*eps);
+       // axle holder
+       hull() {
+               translate([axle_x-axle_bot_w/2, -axle_bot_l/2, wall])
+                       cube([axle_bot_w, axle_bot_l, eps]);
+               translate([axle_x-axle_top_w/2, -axle_top_l/2, wall+axle_h])
+                       cube([axle_top_w, axle_top_l, eps]);
        }
 }
 
-// left and right part
-for (i = [-1, 1]) scale([1, i, 1])
-       translate([0, axle_h, 0])
+module ski() {
+       difference() {
                body();
+               // slot
+               translate([axle_x-axle_slot/2, -base_w/2, wall+axle_h/2])
+                       cube([axle_slot, base_w, infty]);
+               // hole
+               translate([axle_x, -base_w/2, wall+axle_h/2])
+                       rotate([-90, 0, 0])
+                       cylinder(r = axle_hole/2, h = base_w, $fn = 6);
+       }
+}
+
+ski();