chiark / gitweb /
86adc380eed567c6e3c973f84161214cf6a81f40
[reprap-play.git] / scaffold-clamp-vhook.scad
1 // -*- C -*-
2
3 hinge_units = 4;
4
5 include <scaffold-clamp-common.scad>
6
7 vhook_th = 10;
8
9 theta = atan2( smooth_r, main_r );
10
11 vhook_inside = 15;
12
13 // calculated
14
15 vhook_y0 = -cos(theta) * (main_r + smooth_r);
16 vhook_ctr = vhook_y0 - vhook_inside/2;
17 vhook_outer_dia = vhook_inside + vhook_th*2;
18
19 //echo(theta);
20
21 module VHookPlan() {
22   PlanWeldMainCircle(){
23     rectfromto([ -vhook_th/2, 0 ],
24                [ +vhook_th/2, vhook_y0 ]);
25   }
26 }
27
28 module VHookProfile() {
29   translate([0, -vhook_inside/2 - vhook_th/2])
30     circle(r = vhook_th/2);
31 }
32
33 module PartB(){ ////toplevel
34  GeneralB();
35 }
36
37 module VHookHookMain(){ ////toplevel
38   rotate([0,90,0])
39     rotate_extrude(convexity=10)
40     rotate([0,0,90])
41     VHookProfile();
42 }
43
44 module PartA(){ ////toplevel
45   DummyA();
46   linextr(min_z, max_z)
47     VHookPlan();
48
49   translate([0, vhook_ctr, min_z + vhook_outer_dia/2]){
50     linextr(-0.1, vhook_outer_dia/2)
51       VHookProfile();
52     intersection(){
53       VHookHookMain();
54       translate([0,0, -vhook_outer_dia])
55         cube(center=true, vhook_outer_dia*2);
56     }
57   }
58
59   //translate([0, vhook_y0, 50]) rotate([0,0,-90]) color("black") cube(10);
60   // translate([0,0,-150]) rotate([0,0,180 + theta]) color("blue") cube(100);
61 }
62
63 module PlanDemo(){ ////toplevel
64   GeneralPlanDemo();
65   translate([0, -tube_dia*1.5]) {
66     VHookPlan();
67     translate([0, vhook_ctr, 5])
68       for (m=[0,1]) {
69         mirror([0,m])
70           color("blue") VHookProfile();
71       }
72   }
73 }