Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $fs = $preview ? 1 : 0.2;
- $fa = $preview ? 3 : 0.2;
- vertical_space_between_holes = 25;
- horizontal_space_between_holes = 40*2;
- hole_height = 15;
- hole_hook_height_ratio = 0.8;
- hole_width = 4.6;
- hole_depth=6;
- corner_radius=2;
- hook_radius=7;
- hook_angle=180;
- hook_down_extension=12.5;
- hook_up_extension=7;
- module rounded_rect(x=1, y=1, radius=1){
- hull(){
- translate([radius, radius, 0])
- circle(r = radius);
- translate([x-radius, radius, 0])
- circle( r = radius);
- translate([radius, y-radius, 0])
- circle( r = radius);
- translate([x-radius, y-radius, 0])
- circle( r = radius);
- }
- }
- 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 ){
- // main shaft body
- color("red")
- translate([0,0,-hole_width*0.05-hook_down_extension])
- translate([0,0,hole_width])
- linear_extrude(hole_height_space+hole_width*0.1+hook_down_extension)
- rounded_rect(x=hole_width, y=hole_width, radius=corner_radius);
- // lower hole insertion
- color("green")
- linear_extrude(hole_width)
- rounded_rect(x=hole_width, y=hole_depth + hole_width, radius=corner_radius);
- // upper hole insertion
- color("green")
- translate([0,0,hole_height_space+ hole_width])
- linear_extrude(hole_width)
- rounded_rect(x=hole_width, y=hole_depth*2 + hole_width, radius=corner_radius);
- //hole_insertion(hole_width = hole_width, hole_depth = hole_depth*2, corner_radius = corner_radius);
- // upper hole hook
- hook_height= hole_height*hole_hook_height_ratio;
- color("yellow")
- translate([0,hole_depth*2,hole_height_space+hole_width*2 - hook_height])
- linear_extrude(hook_height)
- rounded_rect(x=hole_width, y=hole_width, radius = corner_radius);
- // main hook
- translate([0,-hook_radius, -hook_down_extension+hole_width])
- rotate([0,90,0])
- rotate([0,0,90-hook_angle])
- union(){
- color("blue")
- rotate_extrude(angle=hook_angle)
- translate([hook_radius, 0 , 0])
- rounded_rect(x=hole_width, y=hole_width, radius=corner_radius);
- color("yellow")
- translate([hook_radius,.5,0])
- rotate([90,0,0])
- linear_extrude(hook_up_extension+1)
- rounded_rect(x=hole_width, y=hole_width, radius=corner_radius);
- }
- }
- /*
- skadis_hole_width_space= 35;
- */
- rotate([0,90,0])
- skadis_hook(
- hole_height_space=vertical_space_between_holes+2,
- hole_height=hole_height,
- hole_hook_height_ratio=hole_hook_height_ratio,
- hole_width = hole_width,
- hole_depth=hole_depth,
- corner_radius=corner_radius,
- hook_radius=hook_radius,
- hook_angle=hook_angle,
- hook_down_extension=hook_down_extension,
- hook_up_extension=hook_up_extension);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement