🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
133 lines
4.5 KiB
OpenSCAD
133 lines
4.5 KiB
OpenSCAD
// GFCI Paddle Switch Plate - Extended Size
|
|
// Custom oversized plate with centered paddle opening
|
|
// Opening and screw holes remain in original position
|
|
|
|
include <BOSL2/std.scad>
|
|
|
|
/* [Plate Dimensions] */
|
|
// Extended plate dimensions
|
|
plate_width = 153.0; // mm - X dimension (was 83.64)
|
|
plate_height = 230.0; // mm - Y dimension (was 126.64)
|
|
plate_thickness = 5.0; // mm - Z dimension
|
|
|
|
/* [Bevel Settings] */
|
|
bevel_inset = 1.82; // mm - how much smaller bottom is per side
|
|
|
|
/* [Recess Settings] */
|
|
recess_enabled = true;
|
|
recess_depth = 2.0; // mm - depth of recess (from bottom)
|
|
recess_inset = 8.0; // mm - inset from outer edge
|
|
|
|
/* [Paddle Opening] */
|
|
// Rectangular opening for paddle switch (same as standard plate)
|
|
opening_width = 34.0; // mm - width of opening
|
|
opening_height = 67.0; // mm - height of opening
|
|
|
|
/* [Corner Rounding] */
|
|
plate_corner_radius = 3.0; // mm
|
|
opening_corner_radius = 2.0; // mm
|
|
|
|
/* [Screw Holes] */
|
|
screw_holes_enabled = true;
|
|
screw_hole_height = 6.0; // mm - vertical dimension (was diameter)
|
|
screw_hole_width = 14.0; // mm - horizontal dimension (250% of height)
|
|
screw_hole_spacing = 83.3; // mm - distance between main screw holes
|
|
|
|
// Outer screw holes (smaller, beyond the main holes)
|
|
outer_screw_holes_enabled = true;
|
|
outer_screw_hole_offset = 6.35; // mm (0.25 inches) beyond main holes
|
|
outer_screw_hole_diameter = 2.68; // mm (67% of main hole diameter)
|
|
|
|
/* [Resolution] */
|
|
$fn = 64;
|
|
|
|
// ============================================
|
|
// CALCULATED VALUES
|
|
// ============================================
|
|
|
|
bottom_width = plate_width - (bevel_inset * 2);
|
|
bottom_height = plate_height - (bevel_inset * 2);
|
|
recess_width = plate_width - (recess_inset * 2);
|
|
recess_height = plate_height - (recess_inset * 2);
|
|
|
|
// ============================================
|
|
// MODULES
|
|
// ============================================
|
|
|
|
module plate_body() {
|
|
// Flipped for printing: front face (larger) at Z=0, back (smaller) at Z=5
|
|
// This eliminates overhang on beveled edges
|
|
prismoid(
|
|
size1 = [plate_width, plate_height], // front face (larger) at bottom
|
|
size2 = [bottom_width, bottom_height], // back face (smaller) at top
|
|
h = plate_thickness,
|
|
rounding = plate_corner_radius,
|
|
anchor = BOTTOM
|
|
);
|
|
}
|
|
|
|
module back_recess() {
|
|
if (recess_enabled) {
|
|
recess_rounding = max(0.5, plate_corner_radius - recess_inset/4);
|
|
// Recess now at top (Z=5) since plate is flipped for printing
|
|
translate([0, 0, plate_thickness - recess_depth - 0.01])
|
|
prismoid(
|
|
size1 = [recess_width, recess_height],
|
|
size2 = [recess_width, recess_height],
|
|
h = recess_depth + 0.02,
|
|
rounding = recess_rounding,
|
|
anchor = BOTTOM
|
|
);
|
|
}
|
|
}
|
|
|
|
// 2D paddle opening shape (simple rectangle with rounded corners)
|
|
module paddle_opening_2d() {
|
|
rect([opening_width, opening_height], rounding=opening_corner_radius);
|
|
}
|
|
|
|
module paddle_opening_3d() {
|
|
translate([0, 0, -0.1])
|
|
linear_extrude(height = plate_thickness + 0.2)
|
|
paddle_opening_2d();
|
|
}
|
|
|
|
module screw_holes() {
|
|
if (screw_holes_enabled) {
|
|
// Top main screw hole (pill-shaped, horizontal)
|
|
translate([0, screw_hole_spacing/2, -0.1])
|
|
linear_extrude(height = plate_thickness + 0.2)
|
|
rect([screw_hole_width, screw_hole_height], rounding=screw_hole_height/2);
|
|
|
|
// Bottom main screw hole (pill-shaped, horizontal)
|
|
translate([0, -screw_hole_spacing/2, -0.1])
|
|
linear_extrude(height = plate_thickness + 0.2)
|
|
rect([screw_hole_width, screw_hole_height], rounding=screw_hole_height/2);
|
|
}
|
|
|
|
if (outer_screw_holes_enabled) {
|
|
// Top outer screw hole (above top main hole)
|
|
translate([0, screw_hole_spacing/2 + outer_screw_hole_offset, -0.1])
|
|
cylinder(h = plate_thickness + 0.2, d = outer_screw_hole_diameter);
|
|
|
|
// Bottom outer screw hole (below bottom main hole)
|
|
translate([0, -screw_hole_spacing/2 - outer_screw_hole_offset, -0.1])
|
|
cylinder(h = plate_thickness + 0.2, d = outer_screw_hole_diameter);
|
|
}
|
|
}
|
|
|
|
// ============================================
|
|
// MAIN ASSEMBLY
|
|
// ============================================
|
|
|
|
module gfci_paddle_plate_extended() {
|
|
difference() {
|
|
plate_body();
|
|
back_recess();
|
|
paddle_opening_3d();
|
|
screw_holes();
|
|
}
|
|
}
|
|
|
|
gfci_paddle_plate_extended();
|