chiark / gitweb /
chimney-cable-retainer: wip
[reprap-play.git] / chimney-cable-retainer.scad
1 // -*- C -*-
2
3 include <utils.scad>
4
5 inrear_d_real = 20;
6 inrear_d = 15;
7 bar_th = 5;
8 general_th = 5;
9 between_cables = 150;
10 around_cables = 20;
11 cable_dia = 15;
12
13 total_d = 40;
14 above_h = 40;
15
16 // calculated
17
18 cable_x = around_cables + cable_dia/2;
19 total_x = cable_x * 2 + between_cables;
20
21 below_h = above_h;
22
23 sit_angle = atan2(inrear_d_real - inrear_d, below_h);
24
25 module CoreElevation(){
26   rotate(-sit_angle)
27     rectfromto([ 0, 0 ],
28                [ total_d, general_th ]);
29   rectfromto([ 0, 0 ],
30              [ general_th, above_h ]);
31   translate([ inrear_d, -above_h ])
32     rectfromto([ 0,0 ],
33                [ -bar_th, -bar_th ]);
34 }
35
36 module Retainer(){ ////toplevel
37   difference(){
38     union(){
39       linextr_x_yz(0, total_x)
40         mirror([1,0])
41         CoreElevation();
42     }
43
44     for (x = [cable_x, total_x - cable_x])
45       translate([x, 0, 0])
46       linextr(-below_h/2, 100)
47       hull(){
48         translate([ 0, -(general_th + cable_dia/2) ])
49           circle(r = cable_dia/2);
50         translate([ 0, -(total_d + 1)])
51           square([ cable_dia, 1], center=true);
52       }
53   }
54 }