3.2s
· 1598/361t · $0.0003
diff vs bare: +7/-6
$fn = 100;
// カップ本体のパラメータ
outer_r = 40; // 外径 80mm
height = 100; // 高さ 100mm
wall_thick = 4; // 肉厚 4mm
bottom_thick = 6;// 底の厚み 6mm
// 取手のパラメータ
- handle_radius = 12; // 取手の断面半径
- handle_offset = 25; // 取手の中心位置(カップ中心からの距離)
- handle_center_z = height / 2; // 取手の高さ(中心)
+ handle_radius = 12; // 取手の断面半径
+ handle_ring_radius = 20; // 取手のリングの半径(指を通す穴の大きさを考慮)
+ handle_center_z = height / 2; // 取手の高さ(中心)
module mug() {
difference() {
// カップの外形
cylinder(r = outer_r, h = height);
// 内側のくり抜き
translate([0, 0, bottom_thick])
cylinder(r = outer_r - wall_thick, h = height - bottom_thick + 0.1);
}
}
module handle() {
- // カップの側面に接するように配置
- translate([outer_r - wall_thick, 0, handle_center_z])
+ // カップの側面から外側にせり出すように配置
+ // handle_ring_radius を調整して指が通るスペースを確保
+ translate([outer_r - 2, 0, handle_center_z])
rotate([0, 90, 0])
rotate_extrude(angle = 360)
- translate([handle_offset, 0, 0])
+ translate([handle_ring_radius, 0, 0])
circle(r = handle_radius);
}
union() {
mug();
handle();
}
SCAD (38 lines)
$fn = 100;
// カップ本体のパラメータ
outer_r = 40; // 外径 80mm
height = 100; // 高さ 100mm
wall_thick = 4; // 肉厚 4mm
bottom_thick = 6;// 底の厚み 6mm
// 取手のパラメータ
handle_radius = 12; // 取手の断面半径
handle_ring_radius = 20; // 取手のリングの半径(指を通す穴の大きさを考慮)
handle_center_z = height / 2; // 取手の高さ(中心)
module mug() {
difference() {
// カップの外形
cylinder(r = outer_r, h = height);
// 内側のくり抜き
translate([0, 0, bottom_thick])
cylinder(r = outer_r - wall_thick, h = height - bottom_thick + 0.1);
}
}
module handle() {
// カップの側面から外側にせり出すように配置
// handle_ring_radius を調整して指が通るスペースを確保
translate([outer_r - 2, 0, handle_center_z])
rotate([0, 90, 0])
rotate_extrude(angle = 360)
translate([handle_ring_radius, 0, 0])
circle(r = handle_radius);
}
union() {
mug();
handle();
}
4.6s
· 1629/350t · $0.0003
diff vs i1: +8/-8
$fn = 100;
// カップ本体のパラメータ
outer_r = 40; // 外径 80mm
height = 100; // 高さ 100mm
wall_thick = 4; // 肉厚 4mm
bottom_thick = 6;// 底の厚み 6mm
// 取手のパラメータ
- handle_radius = 12; // 取手の断面半径
- handle_ring_radius = 20; // 取手のリングの半径(指を通す穴の大きさを考慮)
- handle_center_z = height / 2; // 取手の高さ(中心)
+ handle_r = 12; // 取手の断面半径
+ handle_ring_r = 20; // 取手のリングの半径(中心線までの距離)
+ // 取手の位置調整:リングがカップにめり込みすぎないよう調整
+ handle_offset = outer_r - 2;
module mug() {
difference() {
// カップの外形
cylinder(r = outer_r, h = height);
// 内側のくり抜き
translate([0, 0, bottom_thick])
cylinder(r = outer_r - wall_thick, h = height - bottom_thick + 0.1);
}
}
module handle() {
- // カップの側面から外側にせり出すように配置
- // handle_ring_radius を調整して指が通るスペースを確保
- translate([outer_r - 2, 0, handle_center_z])
+ // カップの側面から突き出すリング状の取手
+ translate([handle_offset + handle_r, 0, height / 2])
rotate([0, 90, 0])
rotate_extrude(angle = 360)
- translate([handle_ring_radius, 0, 0])
- circle(r = handle_radius);
+ translate([handle_ring_r, 0, 0])
+ circle(r = handle_r);
}
union() {
mug();
handle();
}
SCAD (38 lines)
$fn = 100;
// カップ本体のパラメータ
outer_r = 40; // 外径 80mm
height = 100; // 高さ 100mm
wall_thick = 4; // 肉厚 4mm
bottom_thick = 6;// 底の厚み 6mm
// 取手のパラメータ
handle_r = 12; // 取手の断面半径
handle_ring_r = 20; // 取手のリングの半径(中心線までの距離)
// 取手の位置調整:リングがカップにめり込みすぎないよう調整
handle_offset = outer_r - 2;
module mug() {
difference() {
// カップの外形
cylinder(r = outer_r, h = height);
// 内側のくり抜き
translate([0, 0, bottom_thick])
cylinder(r = outer_r - wall_thick, h = height - bottom_thick + 0.1);
}
}
module handle() {
// カップの側面から突き出すリング状の取手
translate([handle_offset + handle_r, 0, height / 2])
rotate([0, 90, 0])
rotate_extrude(angle = 360)
translate([handle_ring_r, 0, 0])
circle(r = handle_r);
}
union() {
mug();
handle();
}
3.2s
· 1618/371t · $0.0003
diff vs i2: +7/-5
$fn = 100;
// カップ本体のパラメータ
outer_r = 40; // 外径 80mm
height = 100; // 高さ 100mm
wall_thick = 4; // 肉厚 4mm
bottom_thick = 6;// 底の厚み 6mm
// 取手のパラメータ
- handle_r = 12; // 取手の断面半径
- handle_ring_r = 20; // 取手のリングの半径(中心線までの距離)
- // 取手の位置調整:リングがカップにめり込みすぎないよう調整
+ handle_r = 8; // 取手の断面半径 (指を通しやすくするため適宜調整)
+ handle_ring_r = 15; // 取手のリングの半径
+ // 取手をカップに接合するためのオフセット調整
+ // リングの外縁がカップの外周にちょうど触れるように配置
handle_offset = outer_r - 2;
module mug() {
difference() {
// カップの外形
cylinder(r = outer_r, h = height);
// 内側のくり抜き
translate([0, 0, bottom_thick])
cylinder(r = outer_r - wall_thick, h = height - bottom_thick + 0.1);
}
}
module handle() {
- // カップの側面から突き出すリング状の取手
- translate([handle_offset + handle_r, 0, height / 2])
+ // カップの側面中心に配置
+ // intersectionを使用してカップ本体と不自然に重ならないようにする
+ translate([outer_r - 2, 0, height / 2])
rotate([0, 90, 0])
rotate_extrude(angle = 360)
translate([handle_ring_r, 0, 0])
circle(r = handle_r);
}
union() {
mug();
handle();
}
SCAD (40 lines)
$fn = 100;
// カップ本体のパラメータ
outer_r = 40; // 外径 80mm
height = 100; // 高さ 100mm
wall_thick = 4; // 肉厚 4mm
bottom_thick = 6;// 底の厚み 6mm
// 取手のパラメータ
handle_r = 8; // 取手の断面半径 (指を通しやすくするため適宜調整)
handle_ring_r = 15; // 取手のリングの半径
// 取手をカップに接合するためのオフセット調整
// リングの外縁がカップの外周にちょうど触れるように配置
handle_offset = outer_r - 2;
module mug() {
difference() {
// カップの外形
cylinder(r = outer_r, h = height);
// 内側のくり抜き
translate([0, 0, bottom_thick])
cylinder(r = outer_r - wall_thick, h = height - bottom_thick + 0.1);
}
}
module handle() {
// カップの側面中心に配置
// intersectionを使用してカップ本体と不自然に重ならないようにする
translate([outer_r - 2, 0, height / 2])
rotate([0, 90, 0])
rotate_extrude(angle = 360)
translate([handle_ring_r, 0, 0])
circle(r = handle_r);
}
union() {
mug();
handle();
}