chiark / gitweb /
scaffold-clamp: wip vhook
[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     intersection(){
51       VHookHookMain();
52     }
53   }
54
55   //translate([0, vhook_y0, 50]) rotate([0,0,-90]) color("black") cube(10);
56   // translate([0,0,-150]) rotate([0,0,180 + theta]) color("blue") cube(100);
57 }
58
59 module PlanDemo(){ ////toplevel
60   GeneralPlanDemo();
61   translate([0, -tube_dia*1.5]) {
62     VHookPlan();
63     translate([0, vhook_ctr, 5])
64       for (m=[0,1]) {
65         mirror([0,m])
66           color("blue") VHookProfile();
67       }
68   }
69 }