"""Everything measurable about the Steckerleiste lives here. GROUND TRUTH - measured by Patrick on the real strip, quoted verbatim. These numbers win. Nothing here gets "corrected" from a catalogue, a standard or a guess; if something downstream doesn't work, the design changes, not the measurement. Anything not measured is marked ASSUMED or DERIVED. "18.5cm long, 5.5cm wide" "43mm high" "a model number on the side IU-432" "diameter of the plug holes 3,9cm" -> later, against the printed rings: "the holes fit exactly but we might as well make them 0.5mm bigger" (at 40) "thinnest wall part between holes about 3mm" "center to center is closer to 42mm" "distance of last hole to end ca 10mm" "the distance of last hole to end is the same as the distance from button to first hole ... it's both 1cm" "walls at thinnest part on the short axis about 3mm" "the thing itself bulges out a bit, the casing" "the far side ... has a bit of a belly there as well going out" "corner radius is more like 5mm" "switch is oriented the other way ... the longer side of the switch is parallel to the shorter side of the Leiste ... the switch's outline is 1,9cm x 2,4cm" -> against the printed box: "too small ... about 2mm each side" (so 23 x 28) "cable plug first level 30mm diameter, ca 1cm long, actual cable ca 8 to 9mm" "cable end is on the switch side" "cable is pretty much perfectly in the middle of the case height (excl switch)" "the body is about 4cm ish high" -> so 43 is over the switch, 40 is the top face "the switch needs to be 0.75mm closer to the holes" "the long sides come out far ... def too much" -> case narrowed 79.4 -> 72.4 "on the short non-switch side it fits but we can add 1mm just to be safe" on schablone v3: "the outer rim is where the cable starts so the outer measurements are good" -> window and overall length confirmed. "the inner rim ... if it's supposed to be where the main body ends, it's not but that's fine" -> the top-face outline is DERIVED and known to be off; nothing depends on it. "make the holes one unit larger, like 0.2mm" "there's a about 3cm diameter cylinder first that goes out about 1cm" (again) "make it a sleeve that goes on top ... extend the top to go down 3.8cm with walls ... it could even create a floating effect if the bottom is open a few millimetres" "if we just make the casing longer, then the slit can be only 1cm wide because the length extends over" -> the 30 mm boss stays inside the case, as before schablone v1 came out 207 for a 208 mm part, engraved line on 200 -> the printer is not scaling; the first guesses were simply too big. Two of the notes cannot both hold: 42 pitch with 40 recesses leaves a 2 mm web, not 3 mm. Left as measured (42 / 40); the printed rings settle it and it changes nothing in the sleeve either way. Origin: x = 0 at the SWITCH end, measured along the length. """ import os # ---------- the strip itself ---------- STRIP_L = 185.0 # body length, cable not counted STRIP_W = 55.0 # body width at its widest - the casing bulges STRIP_W_TOP = 46.0 # DERIVED, and known not to match: marker only STRIP_W_BASE = 50.0 # ASSUMED; the hairs make it not matter STRIP_H = 40.0 # height of the flat top face STRIP_H_MAX = 43.0 # tallest point, over the switch bezel STRIP_R = 5.0 # corner radius of the footprint from above SOCKET_D = 40.0 # round socket recess (the plug's nose drops in here) PLUG_FLANGE = 50.0 # the plug's outer body, rests ON the top face SOCKET_X = [71.0, 113.0, 155.0] # centres from the switch end; 42 pitch, # 10 mm from the last one to the far end SWITCH_X = 30.25 # centre from the switch end: 10 mm gap to the first # recess, same as the 10 mm from the last one to the end SWITCH_L = 23.0 # switch bezel along the strip (19 + 2 each side) SWITCH_W = 28.0 # switch bezel across the strip (the long side) SWITCH_R = 2.0 CABLE_END = 0 # 0 = cable leaves at the switch end, 1 = at the far end CABLE_D = 8.5 # the cable itself CABLE_BOSS_D = 30.0 # strain relief where it leaves the housing CABLE_BOSS_L = 10.0 # how far that boss sticks out past the body CABLE_Z = 20.0 # cable sits in the middle of the body height # ---------- print / fit ---------- NOZZLE = 0.4 WALL = 2.6 # side walls (6.5 lines) FIT = 0.6 # air around the strip, per side # ---------- the sleeve: open underneath, it drops over the strip ---------- SHELL_H = 38.0 # how far the walls come down from the top face LEDGE_IN = 6.0 # end ledges that rest on the strip - this is what holds it up LEDGE_W = 40.0 TAB_W = 8.0 # hidden sockets inside the bottom edge for a future base TAB_D = 1.4 TAB_H = 6.0 PAD_SIDE = float(os.environ.get('PAD_SIDE', 5.5)) # gap beside the strip: this, # plus the 2.6 wall, is the whole visible frame band PAD_END = 9.0 # gap past the far end: window overhang + frame ledge PAD_CABLE = 16.0 # gap past the cable end: encases the strain relief boss FRAME_T = 3.0 # thickness of the top frame FRAME_GAP = 0.8 # air between the strip's top face and the frame's underside WIN_GAP = 2.0 # air beside the strip in the window, per side WIN_OVER = 4.0 # window runs PAST each end of the strip, so no frame # ever sits over a plug and the strip drops straight in WIN_R = 12.0 # corner radius of the window WIN_CHAM = 2.0 # top edge of the window ramps out, so a fat plug # body never lands on a square lip CORNER_R = 10.0 # outer corner radius CABLE_HOLE = 10.5 # slit in the end wall, open at the BOTTOM now: the shell # comes down over the cable, the boss stays inside FLUTE_R = 2.0 # half-round flutes down the long sides FLUTE_STEP = 7.0 FLUTE_DEPTH = 0.9 PAD_REC_D = 12.0 # recesses underneath for stick-on feet PAD_REC_H = 0.6 # ---------- the hairs: swept blades that take up whatever slack is left ---------- HAIR_T = 0.8 # blade thickness (2 lines) HAIR_H = 24.0 # blade height HAIR_Z = 6.0 # above the floor HAIR_N = 5 # per long side HAIR_SWEEP = 10.0 # how far the tip leans along the strip -> ~45 deg, so it bends HAIR_BITE = 0.5 # how far the tip reaches inside the strip's widest KERB_SLACK = 3.0 # kerb is a loose corral now, the hairs do the holding # ---------- schablone: open frame, stiff enough to peel off in one piece ---------- SCH_T = 2.4 # thickness SCH_RIB = 3.0 # width of the case / window ribbons SCH_MARK = 1.8 # width of the socket / switch / top-face markers SCH_SPOKE = 2.5 # struts tying everything into one grid SCH_RING_CLR = 0.7 # rings printed a touch bigger than the measured recess SCH_FIN_H = 6.0 # fins hanging down the window edge: where the case goes SCH_FIN_L = 26.0