Japanese Switch Plate
A plain cover plate for Japanese flush-mount switch boxes, with windows for wide-type switch and outlet modules. Choose 1 to 3 gangs side by side and 1 to 3 modules per gang; the plate widens and the windows and countersunk screw holes follow automatically, with the mounting holes on the 83.5 mm JIS box screw pitch. The plate is a hollow tray with rounded corners and a rounded front edge. The default 1-gang, 3-module plate measures 70 x 120 x 7 mm (3 gangs is 170 mm wide). Flip it in the slicer and print front face down for a smooth finish; no supports are needed. Several dimensions are assumed values, so all of them (plate size, gang pitch, depth, wall thickness, window size, screw pitch and hole diameter) are parameters you can match to your own hardware.
# Japanese Wall Switch Plate - for wide-type modules, 1-3 gangs x 1-3 modules
#
# A cover plate for a Japanese flush-mount switch box. Based on a 70x120 outline (1 gang),
# it widens by the number of gangs (boxes) and opens a window for 1-3 wide-type modules per gang.
# Mounting screw holes match the switch box screw pitch of 83.5mm (vertical).
# * Dimensions not checked against real parts are marked "assumed" in the comments.
#
# Axes: as mounted on the wall. Front face at z=depth (top), wall side (open) at z=0.
# For printing, flip it in the slicer so the front face is down.
@param 1..3 desc:"Number of gangs (boxes side by side)"
gangs = 1
@param 1..3 desc:"Modules per gang (1, 2 or 3)"
modules = 3
@param 60..90..0.5 group:"Plate" desc:"Width of a 1-gang plate (mm) *assumed 70"
plate_w1 = 70
@param 100..140..0.5 group:"Plate" desc:"Plate height (mm) *assumed 120"
plate_h = 120
@param 40..60..0.5 group:"Plate" desc:"Gang pitch (added width per extra gang) (mm) *assumed 50"
gang_pitch = 50
@param 4..12..0.5 group:"Plate" desc:"Plate depth (height off the wall) (mm) *assumed"
depth = 7
@param 1.6..3..0.1 group:"Plate" desc:"Wall thickness (mm)"
wall = 2.0
@param 40..50..0.1 group:"Window" desc:"Window width (mm) *assumed"
win_w = 46
@param 20..26..0.1 group:"Window" desc:"Window height per module (mm) *assumed"
module_h = 23.3
@param 80..90..0.1 group:"Screw" desc:"Mounting screw pitch (vertical) (mm), JIS box 83.5"
screw_pitch = 83.5
@param 3..4.5..0.1 group:"Screw" desc:"Screw hole diameter (mm) *assumed M3.5 clearance"
screw_d = 3.8
# --- Derived dimensions ---
plate_w = plate_w1 + (gangs - 1) * gang_pitch
win_h = module_h * modules
corner_r = 4 # outline corner radius (assumed). Larger than wall so an inner radius survives the shell
edge_r = 3 # front edge rounding (assumed). At or below wall, shell fails with CONSTRUCTION_FAILED
win_r = 1 # window corner radius (assumed)
csk_d = 7.0 # countersunk head diameter (M3.5 flat head ~ 7)
gx = [(i - (gangs - 1) / 2) * gang_pitch for i in range(gangs)]
# --- Plate body: round corners -> round front edge -> hollow from the back (fillet first, shell last) ---
plate = box plate_w plate_h depth | floor
| edges =Z | fillet corner_r
| edges >Z | fillet edge_r
| faces <Z | shell wall
# --- Windows (centered on each gang) ---
window = box win_w win_h (depth + 2) | floor | edges =Z | fillet win_r
| translate 0 0 -1
windows = union [window | translate x 0 0 for x in gx]
# --- Screw holes (countersunk), on each gang center line at +/- screw_pitch/2 ---
csk_h = (csk_d - screw_d) / 2 # depth of the 90 deg countersink
screw = union [
cylinder (screw_d / 2) (depth + 2) | floor | translate 0 0 -1,
cone (screw_d / 2) (csk_d / 2 + 0.5) (csk_h + 0.5) | floor | translate 0 0 (depth - csk_h)
]
# Loop over the top/bottom holes of every gang in one list, k = 0..2*gangs-1 (k//2 is the gang, k%2 is top/bottom)
screws = union [screw | translate (gx[k // 2]) (((k % 2) * 2 - 1) * screw_pitch / 2) 0
for k in range(2 * gangs)]
plate - windows - screws