3.4s
· 1109/298t · $0.0013
diff vs bare: +14/-14
$fn = 128;
outer_d = 80;
height = 100;
wall = 4;
bottom = 6;
- handle_r = 12;
- handle_tube_r = 4; // 取手の太さ
- handle_z = height * 0.55;
- handle_clear = 10; // カップ外周からの余裕
+ handle_ring_r = 12; // 取手の半径
+ handle_tube_r = 4; // 取手の太さ
+ handle_z = height * 0.5;
+ handle_clear = 8; // 外周からのはみ出し量
module mug_body() {
difference() {
// 外形
cylinder(h = height, d = outer_d);
- // 内側のくり抜き
+ // 内側のくり抜き(底厚 6mm)
translate([0, 0, bottom])
cylinder(h = height - bottom + 0.5, d = outer_d - 2 * wall);
}
}
- module ring_handle() {
- // カップ外周から十分にはみ出すように配置
- handle_center_x = outer_d / 2 + handle_clear + handle_r;
-
- translate([handle_center_x, 0, handle_z])
- rotate([0, 90, 0])
- torus(handle_r, handle_tube_r);
- }
-
module torus(R, r) {
rotate_extrude(convexity = 10)
translate([R, 0, 0])
circle(r = r);
}
+ module ring_handle() {
+ // カップ外周から十分に外側へ配置
+ handle_center_x = outer_d / 2 + handle_clear + handle_ring_r;
+
+ translate([handle_center_x, 0, handle_z])
+ rotate([0, 90, 0])
+ torus(handle_ring_r, handle_tube_r);
+ }
+
union() {
mug_body();
ring_handle();
}
SCAD (42 lines)
$fn = 128;
outer_d = 80;
height = 100;
wall = 4;
bottom = 6;
handle_ring_r = 12; // 取手の半径
handle_tube_r = 4; // 取手の太さ
handle_z = height * 0.5;
handle_clear = 8; // 外周からのはみ出し量
module mug_body() {
difference() {
// 外形
cylinder(h = height, d = outer_d);
// 内側のくり抜き(底厚 6mm)
translate([0, 0, bottom])
cylinder(h = height - bottom + 0.5, d = outer_d - 2 * wall);
}
}
module torus(R, r) {
rotate_extrude(convexity = 10)
translate([R, 0, 0])
circle(r = r);
}
module ring_handle() {
// カップ外周から十分に外側へ配置
handle_center_x = outer_d / 2 + handle_clear + handle_ring_r;
translate([handle_center_x, 0, handle_z])
rotate([0, 90, 0])
torus(handle_ring_r, handle_tube_r);
}
union() {
mug_body();
ring_handle();
}
2.8s
· 1126/290t · $0.0013
diff vs i1: +7/-10
$fn = 128;
outer_d = 80;
height = 100;
wall = 4;
bottom = 6;
- handle_ring_r = 12; // 取手の半径
- handle_tube_r = 4; // 取手の太さ
- handle_z = height * 0.5;
- handle_clear = 8; // 外周からのはみ出し量
+ handle_major_r = 12; // 取手のリング半径
+ handle_tube_r = 4; // 取手の太さ
+ handle_z = height * 0.5;
+ handle_gap = 2; // カップ外周からの最小クリアランス
module mug_body() {
difference() {
- // 外形
cylinder(h = height, d = outer_d);
-
- // 内側のくり抜き(底厚 6mm)
translate([0, 0, bottom])
cylinder(h = height - bottom + 0.5, d = outer_d - 2 * wall);
}
}
module torus(R, r) {
rotate_extrude(convexity = 10)
translate([R, 0, 0])
circle(r = r);
}
module ring_handle() {
- // カップ外周から十分に外側へ配置
- handle_center_x = outer_d / 2 + handle_clear + handle_ring_r;
+ // 取手がカップ外周から十分にはみ出すように配置
+ handle_center_x = outer_d / 2 + handle_gap + handle_major_r;
translate([handle_center_x, 0, handle_z])
rotate([0, 90, 0])
- torus(handle_ring_r, handle_tube_r);
+ torus(handle_major_r, handle_tube_r);
}
union() {
mug_body();
ring_handle();
}
SCAD (39 lines)
$fn = 128;
outer_d = 80;
height = 100;
wall = 4;
bottom = 6;
handle_major_r = 12; // 取手のリング半径
handle_tube_r = 4; // 取手の太さ
handle_z = height * 0.5;
handle_gap = 2; // カップ外周からの最小クリアランス
module mug_body() {
difference() {
cylinder(h = height, d = outer_d);
translate([0, 0, bottom])
cylinder(h = height - bottom + 0.5, d = outer_d - 2 * wall);
}
}
module torus(R, r) {
rotate_extrude(convexity = 10)
translate([R, 0, 0])
circle(r = r);
}
module ring_handle() {
// 取手がカップ外周から十分にはみ出すように配置
handle_center_x = outer_d / 2 + handle_gap + handle_major_r;
translate([handle_center_x, 0, handle_z])
rotate([0, 90, 0])
torus(handle_major_r, handle_tube_r);
}
union() {
mug_body();
ring_handle();
}
2.6s
· 1118/299t · $0.0013
diff vs i2: +6/-5
$fn = 128;
outer_d = 80;
height = 100;
wall = 4;
bottom = 6;
- handle_major_r = 12; // 取手のリング半径
- handle_tube_r = 4; // 取手の太さ
+ handle_major_r = 12; // リングの中心線半径
+ handle_tube_r = 4; // 取手の断面半径
handle_z = height * 0.5;
- handle_gap = 2; // カップ外周からの最小クリアランス
+ // カップ本体
module mug_body() {
difference() {
cylinder(h = height, d = outer_d);
translate([0, 0, bottom])
cylinder(h = height - bottom + 0.5, d = outer_d - 2 * wall);
}
}
+ // リング状取手
module torus(R, r) {
rotate_extrude(convexity = 10)
translate([R, 0, 0])
circle(r = r);
}
module ring_handle() {
- // 取手がカップ外周から十分にはみ出すように配置
- handle_center_x = outer_d / 2 + handle_gap + handle_major_r;
+ // 外径80mmの側面から十分にはみ出し、指を通しやすいように配置
+ handle_center_x = outer_d / 2 + handle_major_r + handle_tube_r + 2;
translate([handle_center_x, 0, handle_z])
rotate([0, 90, 0])
torus(handle_major_r, handle_tube_r);
}
union() {
mug_body();
ring_handle();
}
SCAD (40 lines)
$fn = 128;
outer_d = 80;
height = 100;
wall = 4;
bottom = 6;
handle_major_r = 12; // リングの中心線半径
handle_tube_r = 4; // 取手の断面半径
handle_z = height * 0.5;
// カップ本体
module mug_body() {
difference() {
cylinder(h = height, d = outer_d);
translate([0, 0, bottom])
cylinder(h = height - bottom + 0.5, d = outer_d - 2 * wall);
}
}
// リング状取手
module torus(R, r) {
rotate_extrude(convexity = 10)
translate([R, 0, 0])
circle(r = r);
}
module ring_handle() {
// 外径80mmの側面から十分にはみ出し、指を通しやすいように配置
handle_center_x = outer_d / 2 + handle_major_r + handle_tube_r + 2;
translate([handle_center_x, 0, handle_z])
rotate([0, 90, 0])
torus(handle_major_r, handle_tube_r);
}
union() {
mug_body();
ring_handle();
}