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