2.0s
· 1220/256t · $0.0025
diff vs bare: +0/-0
module hex_bolt_m8() {
// 六角形の対辺距離 13mm から、外接円の半径を計算
// 対辺距離 = sqrt(3) * 外接円半径
// 外接円半径 = 対辺距離 / sqrt(3)
hex_radius = 13 / sqrt(3);
// 頭部:六角柱
cylinder(h = 5.3, r = hex_radius, $fn = 6);
// シャンク:円柱(z < 0 側へ伸ばす)
translate([0, 0, -30])
cylinder(h = 30, r = 4, $fn = 32);
}
hex_bolt_m8();
SCAD (15 lines)
module hex_bolt_m8() {
// 六角形の対辺距離 13mm から、外接円の半径を計算
// 対辺距離 = sqrt(3) * 外接円半径
// 外接円半径 = 対辺距離 / sqrt(3)
hex_radius = 13 / sqrt(3);
// 頭部:六角柱
cylinder(h = 5.3, r = hex_radius, $fn = 6);
// シャンク:円柱(z < 0 側へ伸ばす)
translate([0, 0, -30])
cylinder(h = 30, r = 4, $fn = 32);
}
hex_bolt_m8();
1.8s
· 1220/251t · $0.0025
diff vs i1: +1/-1
module hex_bolt_m8() {
// 六角形の対辺距離 13mm から、外接円の半径を計算
// 対辺距離 = sqrt(3) * 外接円半径
// 外接円半径 = 対辺距離 / sqrt(3)
hex_radius = 13 / sqrt(3);
// 頭部:六角柱
cylinder(h = 5.3, r = hex_radius, $fn = 6);
// シャンク:円柱(z < 0 側へ伸ばす)
translate([0, 0, -30])
- cylinder(h = 30, r = 4, $fn = 32);
+ cylinder(h = 30, r = 8/2, $fn = 32);
}
hex_bolt_m8();
SCAD (15 lines)
module hex_bolt_m8() {
// 六角形の対辺距離 13mm から、外接円の半径を計算
// 対辺距離 = sqrt(3) * 外接円半径
// 外接円半径 = 対辺距離 / sqrt(3)
hex_radius = 13 / sqrt(3);
// 頭部:六角柱
cylinder(h = 5.3, r = hex_radius, $fn = 6);
// シャンク:円柱(z < 0 側へ伸ばす)
translate([0, 0, -30])
cylinder(h = 30, r = 8/2, $fn = 32);
}
hex_bolt_m8();
2.3s
· 1222/290t · $0.0027
diff vs i2: +0/-0
module hex_bolt_m8() {
// 六角形の対辺距離 13mm から、外接円の半径を計算
// 対辺距離 = sqrt(3) * 外接円半径
// 外接円半径 = 対辺距離 / sqrt(3)
hex_radius = 13 / sqrt(3);
// 頭部:六角柱
cylinder(h = 5.3, r = hex_radius, $fn = 6);
// シャンク:円柱(z < 0 側へ伸ばす)
translate([0, 0, -30])
cylinder(h = 30, r = 8/2, $fn = 32);
}
hex_bolt_m8();
SCAD (15 lines)
module hex_bolt_m8() {
// 六角形の対辺距離 13mm から、外接円の半径を計算
// 対辺距離 = sqrt(3) * 外接円半径
// 外接円半径 = 対辺距離 / sqrt(3)
hex_radius = 13 / sqrt(3);
// 頭部:六角柱
cylinder(h = 5.3, r = hex_radius, $fn = 6);
// シャンク:円柱(z < 0 側へ伸ばす)
translate([0, 0, -30])
cylinder(h = 30, r = 8/2, $fn = 32);
}
hex_bolt_m8();