69.6s
· 1562/3365t · $0.0300
diff vs bare: +35/-29
- // L-bracket with countersunk holes
- // Dimensions
- WIDTH = 50; // X direction (common width of both flanges)
- DEPTH = 40; // Y direction of horizontal flange
- HEIGHT = 40; // Z direction of vertical flange
- THK = 3; // Plate thickness
+ // L-bracket with countersunk M4 holes
+ //------------------------------------------------
+ WIDTH = 50; // common width of both flanges (X)
+ DEPTH = 40; // depth of horizontal flange (Y)
+ HEIGHT = 40; // height of vertical flange (Z)
+ THK = 3; // plate thickness
// Hole parameters
- HOLE_D = 4.5; // Through-hole diameter (M4 clearance)
- CSK_D = 8; // Countersink seat diameter
- CSK_DEPTH = 2; // Countersink depth
- EDGE_OFFSET = 10; // Distance of hole-centres from side edges
- $fn = 64; // Circle resolution
+ HOLE_D = 4.5; // through-hole diameter (M4 clearance)
+ CSK_D = 8; // countersink seat diameter
+ CSK_DEPTH = 2; // countersink depth
+ EDGE_OFF = 10; // distance of hole centres from left/right edges
+ $fn = 64; // circle quality
+ // Small extra length for subtraction robustness
+ EPS = 0.2;
+
+ //------------------------------------------------
difference() {
- // --- Plates -----------------------------------------------------------
+
+ // ----- plates ---------------------------------------------------------
union() {
- // Horizontal flange (lies in XY plane, thickness +Z)
+ // horizontal flange (XY plane, thickness +Z)
cube([WIDTH, DEPTH, THK], center = false);
- // Vertical flange (stands in YZ plane, thickness –Y)
+ // vertical flange (XZ plane, thickness –Y)
translate([0, -THK, 0])
cube([WIDTH, THK, HEIGHT], center = false);
}
- // --- Countersunk holes ------------------------------------------------
- // Horizontal flange holes (axis = Z)
- for (x = [EDGE_OFFSET, WIDTH - EDGE_OFFSET]) {
+ // ----- holes ----------------------------------------------------------
+
+ // horizontal flange holes (axis = Z)
+ for (x = [EDGE_OFF, WIDTH - EDGE_OFF]) {
y = DEPTH / 2;
- // Through hole
- translate([x, y, -1])
- cylinder(h = THK + 2, d = HOLE_D);
+ // through-hole
+ translate([x, y, -EPS])
+ cylinder(h = THK + 2*EPS, d = HOLE_D);
- // Countersink (from top surface downward)
+ // countersink (from top surface downward)
translate([x, y, THK - CSK_DEPTH])
- cylinder(h = CSK_DEPTH + 1, d = CSK_D);
+ cylinder(h = CSK_DEPTH, d = CSK_D);
}
- // Vertical flange holes (axis = Y)
- for (x = [EDGE_OFFSET, WIDTH - EDGE_OFFSET]) {
+ // vertical flange holes (axis = Y)
+ for (x = [EDGE_OFF, WIDTH - EDGE_OFF]) {
z = HEIGHT / 2;
- // Through hole
- translate([x, -THK - 1, z])
+ // through-hole
+ translate([x, -THK - EPS, z])
rotate([90, 0, 0])
- cylinder(h = THK + 2, d = HOLE_D);
+ cylinder(h = THK + 2*EPS, d = HOLE_D);
- // Countersink (from outer side toward inside)
+ // countersink (from outer face inward)
translate([x, -THK, z])
rotate([90, 0, 0])
- cylinder(h = CSK_DEPTH + 1, d = CSK_D);
+ cylinder(h = CSK_DEPTH, d = CSK_D);
}
}
SCAD (60 lines)
// L-bracket with countersunk M4 holes
//------------------------------------------------
WIDTH = 50; // common width of both flanges (X)
DEPTH = 40; // depth of horizontal flange (Y)
HEIGHT = 40; // height of vertical flange (Z)
THK = 3; // plate thickness
// Hole parameters
HOLE_D = 4.5; // through-hole diameter (M4 clearance)
CSK_D = 8; // countersink seat diameter
CSK_DEPTH = 2; // countersink depth
EDGE_OFF = 10; // distance of hole centres from left/right edges
$fn = 64; // circle quality
// Small extra length for subtraction robustness
EPS = 0.2;
//------------------------------------------------
difference() {
// ----- plates ---------------------------------------------------------
union() {
// horizontal flange (XY plane, thickness +Z)
cube([WIDTH, DEPTH, THK], center = false);
// vertical flange (XZ plane, thickness –Y)
translate([0, -THK, 0])
cube([WIDTH, THK, HEIGHT], center = false);
}
// ----- holes ----------------------------------------------------------
// horizontal flange holes (axis = Z)
for (x = [EDGE_OFF, WIDTH - EDGE_OFF]) {
y = DEPTH / 2;
// through-hole
translate([x, y, -EPS])
cylinder(h = THK + 2*EPS, d = HOLE_D);
// countersink (from top surface downward)
translate([x, y, THK - CSK_DEPTH])
cylinder(h = CSK_DEPTH, d = CSK_D);
}
// vertical flange holes (axis = Y)
for (x = [EDGE_OFF, WIDTH - EDGE_OFF]) {
z = HEIGHT / 2;
// through-hole
translate([x, -THK - EPS, z])
rotate([90, 0, 0])
cylinder(h = THK + 2*EPS, d = HOLE_D);
// countersink (from outer face inward)
translate([x, -THK, z])
rotate([90, 0, 0])
cylinder(h = CSK_DEPTH, d = CSK_D);
}
}
40.9s
· 1570/2869t · $0.0261
diff vs i1: +0/-0
// L-bracket with countersunk M4 holes
//------------------------------------------------
WIDTH = 50; // common width of both flanges (X)
DEPTH = 40; // depth of horizontal flange (Y)
HEIGHT = 40; // height of vertical flange (Z)
THK = 3; // plate thickness
// Hole parameters
HOLE_D = 4.5; // through-hole diameter (M4 clearance)
CSK_D = 8; // countersink seat diameter
CSK_DEPTH = 2; // countersink depth
EDGE_OFF = 10; // distance of hole centres from left/right edges
$fn = 64; // circle quality
// Small extra length for subtraction robustness
EPS = 0.2;
//------------------------------------------------
difference() {
// ----- plates ---------------------------------------------------------
union() {
// horizontal flange (XY plane, thickness +Z)
cube([WIDTH, DEPTH, THK], center = false);
// vertical flange (XZ plane, thickness –Y)
translate([0, -THK, 0])
cube([WIDTH, THK, HEIGHT], center = false);
}
// ----- holes ----------------------------------------------------------
// horizontal flange holes (axis = Z)
for (x = [EDGE_OFF, WIDTH - EDGE_OFF]) {
y = DEPTH / 2;
// through-hole
translate([x, y, -EPS])
cylinder(h = THK + 2*EPS, d = HOLE_D);
// countersink (from top surface downward)
translate([x, y, THK - CSK_DEPTH])
cylinder(h = CSK_DEPTH, d = CSK_D);
}
// vertical flange holes (axis = Y)
for (x = [EDGE_OFF, WIDTH - EDGE_OFF]) {
z = HEIGHT / 2;
// through-hole
translate([x, -THK - EPS, z])
rotate([90, 0, 0])
cylinder(h = THK + 2*EPS, d = HOLE_D);
// countersink (from outer face inward)
translate([x, -THK, z])
rotate([90, 0, 0])
cylinder(h = CSK_DEPTH, d = CSK_D);
}
}
SCAD (60 lines)
// L-bracket with countersunk M4 holes
//------------------------------------------------
WIDTH = 50; // common width of both flanges (X)
DEPTH = 40; // depth of horizontal flange (Y)
HEIGHT = 40; // height of vertical flange (Z)
THK = 3; // plate thickness
// Hole parameters
HOLE_D = 4.5; // through-hole diameter (M4 clearance)
CSK_D = 8; // countersink seat diameter
CSK_DEPTH = 2; // countersink depth
EDGE_OFF = 10; // distance of hole centres from left/right edges
$fn = 64; // circle quality
// Small extra length for subtraction robustness
EPS = 0.2;
//------------------------------------------------
difference() {
// ----- plates ---------------------------------------------------------
union() {
// horizontal flange (XY plane, thickness +Z)
cube([WIDTH, DEPTH, THK], center = false);
// vertical flange (XZ plane, thickness –Y)
translate([0, -THK, 0])
cube([WIDTH, THK, HEIGHT], center = false);
}
// ----- holes ----------------------------------------------------------
// horizontal flange holes (axis = Z)
for (x = [EDGE_OFF, WIDTH - EDGE_OFF]) {
y = DEPTH / 2;
// through-hole
translate([x, y, -EPS])
cylinder(h = THK + 2*EPS, d = HOLE_D);
// countersink (from top surface downward)
translate([x, y, THK - CSK_DEPTH])
cylinder(h = CSK_DEPTH, d = CSK_D);
}
// vertical flange holes (axis = Y)
for (x = [EDGE_OFF, WIDTH - EDGE_OFF]) {
z = HEIGHT / 2;
// through-hole
translate([x, -THK - EPS, z])
rotate([90, 0, 0])
cylinder(h = THK + 2*EPS, d = HOLE_D);
// countersink (from outer face inward)
translate([x, -THK, z])
rotate([90, 0, 0])
cylinder(h = CSK_DEPTH, d = CSK_D);
}
}
48.3s
· 1570/4437t · $0.0386
diff vs i2: +0/-0
// L-bracket with countersunk M4 holes
//------------------------------------------------
WIDTH = 50; // common width of both flanges (X)
DEPTH = 40; // depth of horizontal flange (Y)
HEIGHT = 40; // height of vertical flange (Z)
THK = 3; // plate thickness
// Hole parameters
HOLE_D = 4.5; // through-hole diameter (M4 clearance)
CSK_D = 8; // countersink seat diameter
CSK_DEPTH = 2; // countersink depth
EDGE_OFF = 10; // distance of hole centres from left/right edges
$fn = 64; // circle quality
// Small extra length for subtraction robustness
EPS = 0.2;
//------------------------------------------------
difference() {
// ----- plates ---------------------------------------------------------
union() {
// horizontal flange (XY plane, thickness +Z)
cube([WIDTH, DEPTH, THK], center = false);
// vertical flange (XZ plane, thickness –Y)
translate([0, -THK, 0])
cube([WIDTH, THK, HEIGHT], center = false);
}
// ----- holes ----------------------------------------------------------
// horizontal flange holes (axis = Z)
for (x = [EDGE_OFF, WIDTH - EDGE_OFF]) {
y = DEPTH / 2;
// through-hole
translate([x, y, -EPS])
cylinder(h = THK + 2*EPS, d = HOLE_D);
// countersink (from top surface downward)
translate([x, y, THK - CSK_DEPTH])
cylinder(h = CSK_DEPTH, d = CSK_D);
}
// vertical flange holes (axis = Y)
for (x = [EDGE_OFF, WIDTH - EDGE_OFF]) {
z = HEIGHT / 2;
// through-hole
translate([x, -THK - EPS, z])
rotate([90, 0, 0])
cylinder(h = THK + 2*EPS, d = HOLE_D);
// countersink (from outer face inward)
translate([x, -THK, z])
rotate([90, 0, 0])
cylinder(h = CSK_DEPTH, d = CSK_D);
}
}
SCAD (60 lines)
// L-bracket with countersunk M4 holes
//------------------------------------------------
WIDTH = 50; // common width of both flanges (X)
DEPTH = 40; // depth of horizontal flange (Y)
HEIGHT = 40; // height of vertical flange (Z)
THK = 3; // plate thickness
// Hole parameters
HOLE_D = 4.5; // through-hole diameter (M4 clearance)
CSK_D = 8; // countersink seat diameter
CSK_DEPTH = 2; // countersink depth
EDGE_OFF = 10; // distance of hole centres from left/right edges
$fn = 64; // circle quality
// Small extra length for subtraction robustness
EPS = 0.2;
//------------------------------------------------
difference() {
// ----- plates ---------------------------------------------------------
union() {
// horizontal flange (XY plane, thickness +Z)
cube([WIDTH, DEPTH, THK], center = false);
// vertical flange (XZ plane, thickness –Y)
translate([0, -THK, 0])
cube([WIDTH, THK, HEIGHT], center = false);
}
// ----- holes ----------------------------------------------------------
// horizontal flange holes (axis = Z)
for (x = [EDGE_OFF, WIDTH - EDGE_OFF]) {
y = DEPTH / 2;
// through-hole
translate([x, y, -EPS])
cylinder(h = THK + 2*EPS, d = HOLE_D);
// countersink (from top surface downward)
translate([x, y, THK - CSK_DEPTH])
cylinder(h = CSK_DEPTH, d = CSK_D);
}
// vertical flange holes (axis = Y)
for (x = [EDGE_OFF, WIDTH - EDGE_OFF]) {
z = HEIGHT / 2;
// through-hole
translate([x, -THK - EPS, z])
rotate([90, 0, 0])
cylinder(h = THK + 2*EPS, d = HOLE_D);
// countersink (from outer face inward)
translate([x, -THK, z])
rotate([90, 0, 0])
cylinder(h = CSK_DEPTH, d = CSK_D);
}
}