1 // Threads for acorn model
2 // Copyright (c) 2017 Clinton Ebadi <clinton@unknownlamer.org>
5 use <screw_threads.scad>
12 outer_d = (26 - thread_size - 10)/2;
18 thread_tolerance = 0.6;
22 //cylinder (d = outer_d, h = 10);
23 module acorn_thread (outer_d = outer_d, internal = false) {
24 //outer_d = outer_d + (internal ? thread_tolerance : 0);
25 outer_d = outer_d + thread_size;
26 thread_height = thread_height; // + (internal ? thread_tolerance : 0);
27 local_thread_size = thread_size; // + (internal ? thread_tolerance : 0);
32 echo ("outer ring = ", outer_d+wall_thickness/2+local_thread_size);
33 ScrewHole (outer_diam=outer_d, height = thread_height, pitch = thread_pitch, angle = thread_angle) {
34 cylinder (d = outer_d+wall_thickness/2+thread_size, h = thread_height);
38 //translate ([0, 0, internal ? -0.0 : 0]) metric_thread (diameter=outer_d, pitch = thread_pitch, thread_size=local_thread_size, length = thread_height, internal=internal, angle=thread_angle);
42 ScrewThread (outer_diam=outer_d, height = thread_height, pitch = thread_pitch, tooth_height = local_thread_size, angle = thread_angle);
43 cylinder (d = outer_d-wall_thickness-local_thread_size-0.01, h = thread_height * 4, center=true);
49 module acorn_base_1 () {
52 translate ([0, 0, base_height-base_d/2]) cylinder (d=outer_d, h=0.1);
57 module acorn_base_xxx () {
60 resize ([outer_d-wall_thickness, 0, 0], auto=true) acorn_base_1 ();
61 translate ([0, 0, base_height-base_d/2-wall_thickness]) cylinder (d = outer_d - wall_thickness, h = 5);
66 real_outer_d = 4 * sqrt(outer_d/2)*sqrt(base_height/sqrt(outer_d/2)) + rfa*2;
69 paraboloid (y=base_height, f=sqrt(outer_d/2),rfa=rfa,fc=0,detail=120, x = outer_d, hi=base_height);
73 //cylinder(d=real_outer_d, h=base_height+1);
76 translate ([0, 0, wall_thickness]) resize ([real_outer_d - wall_thickness, 0, 0], auto=true) nut_1 ();
79 translate ([0, 0, base_height-0.1]) acorn_thread (outer_d = real_outer_d);//, $fa=0.1, $fs=0.1);
89 //translate ([real_outer_d+10, 0, 0,]) nut ();
90 translate ([0, 0, thread_height]) rotate ([180, 0, 0]) acorn_thread (outer_d = real_outer_d, internal=true); //, outer_d=real_outer_d);
99 module print_test () {
100 translate ([real_outer_d+5, 0, thread_height]) rotate ([180, 0, 0]) acorn_thread (outer_d = real_outer_d, internal=true); //, outer_d=real_outer_d);
101 translate ([0, 0, thread_height]) rotate ([180, 0, 0]) union () {
102 translate ([0, 0, 0]) cylinder (d=real_outer_d-wall_thickness, h=thread_height);
103 translate ([0, 0, -thread_height*3]) cylinder (d=real_outer_d/2, h=thread_height*3);
104 acorn_thread (outer_d = real_outer_d);
113 color ("YellowGreen", 0.5) acorn_thread (outer_d = real_outer_d, internal=true);
114 /* /\*translate ([0, 0, thread_height]) rotate ([180, 0, 0]) *\/ color ("Peru") union () { */
115 /* translate ([0, 0, 0]) cylinder (d=real_outer_d-wall_thickness, h=thread_height); */
116 /* translate ([0, 0, -thread_height*3]) cylinder (d=real_outer_d/2, h=thread_height*3); */
117 /* acorn_thread (outer_d = real_outer_d); */
120 //color ("White", 0.5) cube (real_outer_d);