Files
3d-models/猫猫用品/猫门挂钩 - 门挂钩.scad

65 lines
1.9 KiB
OpenSCAD

$fn = 20;
// 圆角半径
round_corner_r = 1;
// 挂钩总体长边长度
length_long = 70;
// 挂钩总体短边长度
length_short = 20;
// 门厚度
door_thickness = 40;
// 挂钩总体宽度
width = 8;
surface_width = width - round_corner_r * 2; // 6
// 挂钩的钩子部分的位置
hook_pos = 46;
// 钩子到主体的间隔
hook_gap = 12;
// 钩子长度
hook_length = 12;
hook_surface_width = surface_width - round_corner_r * 2; // 4
strength_cube_width = width;
union() {
minkowski() {
union() {
cube([length_long, surface_width, surface_width]);
cube([surface_width, door_thickness + surface_width + round_corner_r * 2, surface_width]);
translate([0, surface_width + round_corner_r * 2 + door_thickness, 0])
cube([length_short, surface_width, surface_width]);
}
sphere(r = round_corner_r);
}
minkowski() {
union() {
translate([hook_pos, - hook_gap - round_corner_r, round_corner_r])
cube([hook_surface_width, hook_gap + width *0.7, hook_surface_width]);
translate([hook_pos - hook_length, - hook_gap - round_corner_r, round_corner_r])
cube([hook_length, hook_surface_width, hook_surface_width]);
translate([hook_pos + surface_width - round_corner_r * 2, -round_corner_r, round_corner_r])
linear_extrude(height=hook_surface_width)
polygon([
[0, 0],
[0, -12],
[12, 0],
]);
translate([hook_pos - hook_surface_width * 2 - round_corner_r * 2, -round_corner_r, round_corner_r])
linear_extrude(height=hook_surface_width)
polygon([
[12, -12],
[0, -12],
[12, 0],
]);
}
sphere(r = round_corner_r);
}
}