chiark / gitweb /
scaffold-clamp-cleat: sort out toplevels
[reprap-play.git] / summit-lantern-hook.scad
1 // -*- C -*-
2
3 include <utils.scad>
4
5 height = 60;
6 curl = 10;
7 width = 85;
8 sides_depth = 50;
9 th = 6;
10 th2 = 4;
11
12 $fa = 3;
13 $fs = 0.3;
14
15 // calculated
16
17 upper_r = th/2;
18 upper_ctr_maj_r = curl/2 + upper_r;
19
20 zmin = curl/2 + th;
21
22 module UpperPlan(){
23   circle(r = upper_r);
24 }
25
26 module EndCurl(){
27   rotate([90,0,0])
28     rotate_extrude(angle=180)
29     translate([upper_ctr_maj_r, 0])
30     UpperPlan();
31   translate([-upper_ctr_maj_r, 0,0])
32     sphere(r= upper_r);
33 }
34
35 module Upper(){
36   translate([upper_ctr_maj_r, 0, 0])
37     linextr(-0.1, height + 0.1)
38     UpperPlan();
39   translate([0, 0, height])
40     EndCurl();
41 }
42
43 module Lower(){
44   rotate([180,0,0])
45     EndCurl();
46   linextr(-zmin, -zmin + th) {
47     square(center=true, [th2, width]);
48     for (m=[0,1])
49       mirror([0,m])
50         hull()
51       {
52         for (x= sides_depth/2 * [-1,+1])
53           translate([ x, width/2 - th2/2 ])
54             circle(r= th2/2);
55       }
56   }
57 }
58
59 module Hook(){
60   Upper();
61   Lower();
62 }
63
64 Hook();