m3 nut openscad
// Tight fit parameters
nut_flat = 5.7; // 5.7mm for a tight press-fit (M3 hardware)
nut_depth = 2.4; // Standard M3 nut thickness
bolt_dia = 3.2; // Tighter clearance for the bolt
plate_height = 3.0; // Thin base for placing on top of parts
difference() {
// 1. THE BASE
cube([12, 12, plate_height], center=true);
// 2. THE NUT CUTOUT (Hex Hole)// Move to top surface and sink ittranslate([0, 0, (plate_height / 2) - nut_depth])cylinder(d = nut_flat / cos(30), h = nut_depth + 0.1, $fn = 6);// 3. THE BOLT HOLEcylinder(d = bolt_dia, h = plate_height + 2, $fn = 32, center = true);}