5.7s
· 1325/456t · $0.0108
diff vs bare: +0/-0
// M8 Hex Bolt (simplified - no thread)
// Head bottom face at z=0, shank extends in -Z direction
// Parameters
across_flats = 13; // Head across-flats distance (mm)
head_height = 5.3; // Head height (mm)
shank_dia = 8; // Shank diameter (mm)
shank_len = 30; // Shank length (mm)
// Circumradius of regular hexagon from across-flats distance
hex_r = across_flats / (2 * cos(30)); // = across_flats / sqrt(3)
// Hex head: bottom at z=0, extends in +Z direction
module hex_head() {
linear_extrude(height = head_height) {
circle(r = hex_r, $fn = 6);
}
}
// Shank: top at z=0, extends in -Z direction
module shank() {
translate([0, 0, -shank_len]) {
cylinder(h = shank_len, d = shank_dia, $fn = 64);
}
}
// Assemble bolt
union() {
hex_head();
shank();
}
SCAD (31 lines)
// M8 Hex Bolt (simplified - no thread)
// Head bottom face at z=0, shank extends in -Z direction
// Parameters
across_flats = 13; // Head across-flats distance (mm)
head_height = 5.3; // Head height (mm)
shank_dia = 8; // Shank diameter (mm)
shank_len = 30; // Shank length (mm)
// Circumradius of regular hexagon from across-flats distance
hex_r = across_flats / (2 * cos(30)); // = across_flats / sqrt(3)
// Hex head: bottom at z=0, extends in +Z direction
module hex_head() {
linear_extrude(height = head_height) {
circle(r = hex_r, $fn = 6);
}
}
// Shank: top at z=0, extends in -Z direction
module shank() {
translate([0, 0, -shank_len]) {
cylinder(h = shank_len, d = shank_dia, $fn = 64);
}
}
// Assemble bolt
union() {
hex_head();
shank();
}
7.3s
· 1325/440t · $0.0106
diff vs i1: +0/-0
// M8 Hex Bolt (simplified - no thread)
// Head bottom face at z=0, shank extends in -Z direction
// Parameters
across_flats = 13; // Head across-flats distance (mm)
head_height = 5.3; // Head height (mm)
shank_dia = 8; // Shank diameter (mm)
shank_len = 30; // Shank length (mm)
// Circumradius of regular hexagon from across-flats distance
hex_r = across_flats / (2 * cos(30)); // = across_flats / sqrt(3)
// Hex head: bottom at z=0, extends in +Z direction
module hex_head() {
linear_extrude(height = head_height) {
circle(r = hex_r, $fn = 6);
}
}
// Shank: top at z=0, extends in -Z direction
module shank() {
translate([0, 0, -shank_len]) {
cylinder(h = shank_len, d = shank_dia, $fn = 64);
}
}
// Assemble bolt
union() {
hex_head();
shank();
}
SCAD (31 lines)
// M8 Hex Bolt (simplified - no thread)
// Head bottom face at z=0, shank extends in -Z direction
// Parameters
across_flats = 13; // Head across-flats distance (mm)
head_height = 5.3; // Head height (mm)
shank_dia = 8; // Shank diameter (mm)
shank_len = 30; // Shank length (mm)
// Circumradius of regular hexagon from across-flats distance
hex_r = across_flats / (2 * cos(30)); // = across_flats / sqrt(3)
// Hex head: bottom at z=0, extends in +Z direction
module hex_head() {
linear_extrude(height = head_height) {
circle(r = hex_r, $fn = 6);
}
}
// Shank: top at z=0, extends in -Z direction
module shank() {
translate([0, 0, -shank_len]) {
cylinder(h = shank_len, d = shank_dia, $fn = 64);
}
}
// Assemble bolt
union() {
hex_head();
shank();
}
7.2s
· 1325/445t · $0.0106
diff vs i2: +0/-0
// M8 Hex Bolt (simplified - no thread)
// Head bottom face at z=0, shank extends in -Z direction
// Parameters
across_flats = 13; // Head across-flats distance (mm)
head_height = 5.3; // Head height (mm)
shank_dia = 8; // Shank diameter (mm)
shank_len = 30; // Shank length (mm)
// Circumradius of regular hexagon from across-flats distance
hex_r = across_flats / (2 * cos(30)); // = across_flats / sqrt(3)
// Hex head: bottom at z=0, extends in +Z direction
module hex_head() {
linear_extrude(height = head_height) {
circle(r = hex_r, $fn = 6);
}
}
// Shank: top at z=0, extends in -Z direction
module shank() {
translate([0, 0, -shank_len]) {
cylinder(h = shank_len, d = shank_dia, $fn = 64);
}
}
// Assemble bolt
union() {
hex_head();
shank();
}
SCAD (31 lines)
// M8 Hex Bolt (simplified - no thread)
// Head bottom face at z=0, shank extends in -Z direction
// Parameters
across_flats = 13; // Head across-flats distance (mm)
head_height = 5.3; // Head height (mm)
shank_dia = 8; // Shank diameter (mm)
shank_len = 30; // Shank length (mm)
// Circumradius of regular hexagon from across-flats distance
hex_r = across_flats / (2 * cos(30)); // = across_flats / sqrt(3)
// Hex head: bottom at z=0, extends in +Z direction
module hex_head() {
linear_extrude(height = head_height) {
circle(r = hex_r, $fn = 6);
}
}
// Shank: top at z=0, extends in -Z direction
module shank() {
translate([0, 0, -shank_len]) {
cylinder(h = shank_len, d = shank_dia, $fn = 64);
}
}
// Assemble bolt
union() {
hex_head();
shank();
}