SHOW:
|
|
- or go back to the newest paste.
1 | vertical_space_between_holes = 25; | |
2 | - | $fs = $preview ? 1 : 0.2; |
2 | + | |
3 | - | $fa = $preview ? 3 : 0.2; |
3 | + | |
4 | hole_width = 4.6; | |
5 | hole_depth = 6; | |
6 | - | horizontal_space_between_holes = 40*2; |
6 | + | corner_r = 2; |
7 | hook_r = 7; | |
8 | hook_angle = 180; | |
9 | hook_down_extension = 12.5; | |
10 | - | hole_depth=6; |
10 | + | hook_up_extension = 7; |
11 | - | corner_radius=2; |
11 | + | |
12 | - | hook_radius=7; |
12 | + | hole_height_space = vertical_space_between_holes + 2; |
13 | - | hook_angle=180; |
13 | + | |
14 | - | hook_down_extension=12.5; |
14 | + | $fs = 0.2; |
15 | - | hook_up_extension=7; |
15 | + | $fa = 2; |
16 | ||
17 | module rounded_rect(x=hole_width, y=hole_width, r=corner_r) { | |
18 | hull() { | |
19 | - | module rounded_rect(x=1, y=1, radius=1){ |
19 | + | translate([ r, r]) circle(r); |
20 | - | hull(){ |
20 | + | translate([x-r, r]) circle(r); |
21 | - | translate([radius, radius, 0]) |
21 | + | translate([ r, y-r]) circle(r); |
22 | - | circle(r = radius); |
22 | + | translate([x-r, y-r]) circle(r); |
23 | - | translate([x-radius, radius, 0]) |
23 | + | |
24 | - | circle( r = radius); |
24 | + | |
25 | - | translate([radius, y-radius, 0]) |
25 | + | |
26 | - | circle( r = radius); |
26 | + | module main_shaft_body() { |
27 | - | translate([x-radius, y-radius, 0]) |
27 | + | |
28 | - | circle( r = radius); |
28 | + | translate([0,0,hole_width-hook_down_extension]) |
29 | linear_extrude(hole_height_space+hook_down_extension) | |
30 | rounded_rect(); | |
31 | } | |
32 | ||
33 | module hole_insertion(depth) { | |
34 | - | module skadis_hook(hole_height_space, hole_height, hole_hook_height_ratio, hole_width, hole_depth, corner_radius, hook_radius,hook_angle, hook_down_extension, hook_up_extension ){ |
34 | + | |
35 | - | // main shaft body |
35 | + | |
36 | rounded_rect(y=depth + hole_width); | |
37 | - | translate([0,0,-hole_width*0.05-hook_down_extension]) |
37 | + | |
38 | - | translate([0,0,hole_width]) |
38 | + | |
39 | - | linear_extrude(hole_height_space+hole_width*0.1+hook_down_extension) |
39 | + | |
40 | - | rounded_rect(x=hole_width, y=hole_width, radius=corner_radius); |
40 | + | module upper_hole_hook() { |
41 | - | |
41 | + | hook_height = hole_height*hole_hook_height_ratio; |
42 | color("yellow") | |
43 | - | // lower hole insertion |
43 | + | |
44 | linear_extrude(hook_height) | |
45 | rounded_rect(); | |
46 | - | rounded_rect(x=hole_width, y=hole_depth + hole_width, radius=corner_radius); |
46 | + | |
47 | ||
48 | - | // upper hole insertion |
48 | + | module main_hook() { |
49 | translate([0,-hook_r, -hook_down_extension+hole_width]) | |
50 | rotate([0,90,0]) | |
51 | rotate([0,0,90-hook_angle]) | |
52 | - | rounded_rect(x=hole_width, y=hole_depth*2 + hole_width, radius=corner_radius); |
52 | + | union() { |
53 | color("blue") | |
54 | - | |
54 | + | |
55 | - | //hole_insertion(hole_width = hole_width, hole_depth = hole_depth*2, corner_radius = corner_radius); |
55 | + | translate([hook_r, 0 , 0]) |
56 | rounded_rect(); | |
57 | ||
58 | - | // upper hole hook |
58 | + | |
59 | - | |
59 | + | translate([hook_r,0,0]) |
60 | - | hook_height= hole_height*hole_hook_height_ratio; |
60 | + | |
61 | linear_extrude(hook_up_extension) | |
62 | rounded_rect(); | |
63 | } | |
64 | - | rounded_rect(x=hole_width, y=hole_width, radius = corner_radius); |
64 | + | |
65 | - | |
65 | + | |
66 | - | // main hook |
66 | + | module skadis_hook() { |
67 | - | translate([0,-hook_radius, -hook_down_extension+hole_width]) |
67 | + | main_shaft_body(); |
68 | ||
69 | hole_insertion(hole_depth); | |
70 | - | union(){ |
70 | + | |
71 | - | color("blue") |
71 | + | hole_insertion(hole_depth*2); |
72 | - | |
72 | + | |
73 | upper_hole_hook(); | |
74 | - | translate([hook_radius, 0 , 0]) |
74 | + | |
75 | - | rounded_rect(x=hole_width, y=hole_width, radius=corner_radius); |
75 | + | main_hook(); |
76 | } | |
77 | ||
78 | - | translate([hook_radius,.5,0]) |
78 | + | rotate([0,90,0]) skadis_hook(); |
79 |