diff --git a/猫猫用品/猫门挂钩 - 门挂钩.scad b/猫猫用品/猫门挂钩 - 门挂钩.scad index 20fd091..179df2c 100644 --- a/猫猫用品/猫门挂钩 - 门挂钩.scad +++ b/猫猫用品/猫门挂钩 - 门挂钩.scad @@ -1,16 +1,26 @@ $fn = 20; +// 圆角半径 round_corner_r = 1; +// 挂钩总体长边长度 length_long = 70; +// 挂钩总体短边长度 length_short = 20; +// 门厚度 door_thickness = 40; -width = 8; // thickness = 8 +// 挂钩总体宽度 +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; diff --git a/猫猫用品/猫门挂钩 - 门框挂钩.scad b/猫猫用品/猫门挂钩 - 门框挂钩.scad index 9e43c9a..9156ee2 100644 --- a/猫猫用品/猫门挂钩 - 门框挂钩.scad +++ b/猫猫用品/猫门挂钩 - 门框挂钩.scad @@ -3,6 +3,7 @@ width = 8; // 卡槽长度 height = 200; +// 卡槽厚度 thickness = 8; // 门框宽度 @@ -10,21 +11,24 @@ frame_width = 58; // 门框深度 frame_depth = 12; -difference() { - union() { - cube([frame_width + width * 2, height, frame_depth + thickness]); - cube([height, frame_width + width * 2, frame_depth + thickness]); - }; - // 门框 - translate([width, width, 0]) +union() { + // 卡槽 + difference() { union() { - cube([frame_width, height, frame_depth]); - cube([height, frame_width, frame_depth]); + cube([frame_width + width * 2, height, frame_depth + thickness]); + cube([height, frame_width + width * 2, frame_depth + thickness]); }; + // 门框 + translate([width, width, 0]) + union() { + cube([frame_width, height, frame_depth]); + cube([height, frame_width, frame_depth]); + }; + } + + // 挂钩 + translate([frame_width / 2 + width, frame_width / 2 + width, frame_depth + thickness]) + cylinder(r=15, h=10); + translate([frame_width / 2 + width, frame_width / 2 + width, frame_depth + thickness + 10]) + cylinder(r=30, h=8); } - -translate([frame_width / 2 + width, frame_width / 2 + width, frame_depth + thickness]) - cylinder(r=15, h=10); - -translate([frame_width / 2 + width, frame_width / 2 + width, frame_depth + thickness + 10]) - cylinder(r=30, h=8);