82 lines
2.0 KiB
OpenSCAD
82 lines
2.0 KiB
OpenSCAD
thickness = 3;
|
|
|
|
hook_width = 15;
|
|
hook_height = 20;
|
|
hook_dist = 125;
|
|
ledge_width = 220;
|
|
fraction = 0.7;
|
|
|
|
module hook(w, h, t){
|
|
polygon(
|
|
[
|
|
[0, 0],
|
|
[t, 0],
|
|
[t, h],
|
|
[t+w, h],
|
|
[t+w, 0],
|
|
[2*t+w, 0],
|
|
[2*t+w, h+t],
|
|
[0, h+t],
|
|
[0, 0]
|
|
]
|
|
);
|
|
}
|
|
|
|
module enforcement(diff, pos_frac){
|
|
polygon(
|
|
[
|
|
[-(pos_frac+diff)*ledge_width, (pos_frac+diff)*fraction*(hook_dist)+hook_height-1.5],
|
|
[-(pos_frac-diff)*ledge_width, (pos_frac-diff)*fraction*(hook_dist)+hook_height-1.5],
|
|
[-(pos_frac-diff)*ledge_width, fraction*(hook_dist+hook_height)],
|
|
[-(pos_frac+diff)*ledge_width, fraction*(hook_dist+hook_height)],
|
|
]
|
|
);
|
|
}
|
|
|
|
linear_extrude(10){
|
|
hook(hook_width, hook_height, thickness);
|
|
translate([0,hook_dist,0]){
|
|
hook(hook_width, hook_height, thickness);
|
|
}
|
|
// Connect hooks
|
|
polygon(
|
|
[
|
|
[0,0],
|
|
[thickness,0],
|
|
[thickness,hook_dist+hook_height],
|
|
[0,hook_dist+hook_height],
|
|
[0,0]
|
|
]
|
|
);
|
|
|
|
|
|
translate([-ledge_width, fraction*(hook_dist+hook_height), 0]){
|
|
square([ledge_width, thickness]);
|
|
}
|
|
|
|
// Enforce ledge
|
|
polygon(
|
|
[
|
|
[-ledge_width, fraction*(hook_dist+hook_height)],
|
|
[-ledge_width+2*thickness, fraction*(hook_dist+hook_height)],
|
|
[0, thickness+hook_height],
|
|
[0, 0+hook_height],
|
|
[-ledge_width, fraction*(hook_dist+hook_height)],
|
|
]
|
|
);
|
|
|
|
enforcement(0.005, 0.3);
|
|
enforcement(0.005, 0.6);
|
|
|
|
// Add little bump
|
|
polygon(
|
|
[
|
|
[-ledge_width, fraction*(hook_dist+hook_height)+thickness],
|
|
[-ledge_width+thickness, fraction*(hook_dist+hook_height)+thickness],
|
|
[-ledge_width+thickness, fraction*(hook_dist+hook_height)+2*thickness],
|
|
[-ledge_width, fraction*(hook_dist+hook_height)+2*thickness],
|
|
]
|
|
);
|
|
}
|
|
|