Skip to content

New case#2

Open
mhellevang wants to merge 19 commits into
mainfrom
claude-cad-case
Open

New case#2
mhellevang wants to merge 19 commits into
mainfrom
claude-cad-case

Conversation

@mhellevang

Copy link
Copy Markdown
Owner

No description provided.

mhellevang and others added 11 commits May 30, 2026 23:43
Parametric case (base + lid + LED light pipe) sized from the PCB
deliverables: 48x22 R2 board, diagonal Ø2 mount holes, 1.6mm PCB.
Ship-lap closure with screw (heat-set Ø6 / self-tap) or snap option,
battery bay under the PCB on standoffs, USB-C / XH / LED openings,
SS12F15 slide-switch slot with screw bosses, and drop-in PCB guide
fins. Includes export.sh, English README, and the SS12F15 reference
step file.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The USB-C opening straddles the base/lid split: its centre sits ~1.65mm
above split_z, so the lower ~1.85mm of the 7mm-tall window fell below the
seam and was blocked by the base side wall. cut_usb() ran only in lid();
now it also runs in base() so the full window is open (centre of the
lower edge verified clear, only the R2 corners remain by design).

Add a raised vertical alignment rib on the front-left corner, split
across the seam (base = lower half, lid = upper half). Aligned halves
form one continuous rib; a 180deg-misassembled lid puts its half on the
opposite corner, so the mismatch is obvious. Raised rather than recessed
to avoid thinning the 1mm ship-lap wall.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
All code comments, banner headers, and Customizer section labels are now
in English, matching the rest of the project's documentation. Variable,
parameter, and module names were already English, so nothing was renamed
and the geometry is unchanged (base/lid/lightpipe STL output is
byte-identical to before this commit).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Embossed "Open RZ67 Trigger" on the lid top, standing 0.6mm proud of the
otherwise-flat top face so it can be printed in a second filament colour
(matches the previous case). Centred at mid-Y, clear of the LED window
and both screw counterbores; ~43mm wide at the default size 3.5 on the
54.8mm top. Added on top of the finished lid so the openings can't cut
it; lid stays Genus 10, NoError.

New part="lidtext" exports the text solid alone (export.sh now writes
openrz67-lidtext.stl) for the load-as-separate-coloured-part slicer
workflow, which works in any print orientation. README documents both
the filament-change-by-height and separate-part colouring methods and
the print-orientation trade-off. All text parameters are configurable
(string, size, relief height, font, position, angle).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
export.sh now accepts optional environment-variable overrides that map to
OpenSCAD -D flags (any .scad parameter is reachable this way): LID_TEXT,
LID_TEXT_SHOW, LID_TEXT_SIZE, SCREW_ANCHOR, PCB_T. The lidtext export is
now tolerant of empty geometry, so turning the text off no longer aborts
the run with a non-zero exit. Translated the script's comments to English
to match the rest of the project. README documents the overrides.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Lid text is now off by default (lid_text_show = false): it adds noticeable
render time, so it stays off during prototyping and is turned on for the
final print (lid_text_show = true, or LID_TEXT_SHOW=true ./export.sh). The
raised text remains fused onto the lid and is coloured by a filament change
at the top layer, so the separate part="lidtext" branch and its STL export
are removed (no loose component needed). README/export.sh updated to match.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The pocket was a touch too narrow; batt_l 19 -> 20mm, kept centred by
shifting batt_pos (Y 1.5 -> 1.0) so it grows 0.5mm each side. Stays clear
of the cavity walls (0.2mm rib margin each side) and the standoffs/corner
supports. Base remains Genus 0, NoError.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The four guide fins were attached to the wall only in the bottom ~2.6mm
(below the lap zone); above that the inner wall is rabbeted away for the
lid tongue, leaving the fins as free-standing blades that flex easily.
Since the lid tongue is already notched where the fins stand, run the
fin's anchored side all the way out to the outer wall face (yreach 1.3
-> 0mm front / -> outer_h back, via frame_fin_reach = wall). The fin now
merges with the outer wall across the full lap-zone height — a wall-backed
rib instead of a cantilever. yreach is clamped to the outer face so larger
frame_fin_reach values can't poke outside the wall.

Verified: base Genus 0, lid Genus 10, base ∩ lid = 0mm³ (tongue notch
still clears the wider fin), fins ∩ board-footprint empty (board still
drops straight in, catching faces unchanged at 0.2mm clearance).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The battery sits under the PCB and its cable must reach BAT1 on the PCB
top (back-left, by the left wall). The ~2.4mm PCB-to-wall gap plus the
ship-lap tongue pinched the cable, so you could route it or close the lid
but not both. Add a rounded vertical channel at that corner, cut from both
base and lid: it scallops the inner wall by batt_cable_depth (leaving ~1mm
skin, no breach to outside) and notches the lid tongue locally, giving the
cable a protected path through the seam. Positioned between the USB-C
recess and the back corner, clear of the corner support post.

Verified: base Genus 0, lid Genus 10, base ∩ lid = 0mm³, outer wall skin
(X0..0.8) fully solid (no hole), scallop region cleared. Parametric
(batt_cable / _y / _r / _depth), README documents it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The switch boss pillars hung only from the lid ceiling, set back sw_ear_t
(0.6mm) from the wall - a free-standing cantilever that flexes when the
screw is tightened (the gap the user noticed). Add a web that bridges that
ear gap, fusing each pillar to the wall across the boss footprint, with a
window (sw_ear_w x sw_ear_h, default 4.0 x 4.5, centred on the screw) left
open for the switch's mounting ear/tab. Parametric and toggleable
(sw_boss_wall_anchor) since the exact ear/plate size can't be read cleanly
from the STEP - if the switch has a large front plate, enlarge the window
or disable the anchor.

Screw is M2 self-tapping (~8mm): clearance sw_screw_d 2.4 through the wall,
sw_boss_pilot 1.5 into the boss, head in the sw_screw_head counterbore.

Verified: base unchanged (byte-identical), lid NoError (Genus 10->8 as the
webs fuse the pillars to the wall), base ∩ lid = 0mm³, web bridges the gap
beside the window, ear window stays clear. README documents screw size and
the wall anchor.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mhellevang mhellevang changed the title Claude cad case New case Jun 1, 2026
mhellevang and others added 8 commits June 2, 2026 16:19
Using the measured switch: actuator opening sw_slot_l x sw_slot_h is now
10.65 x 6.3 mm. The mounting bracket is flat (19.45 x 5.75 x 0.4 mm), so
the previous "ear window" wall-anchor (which assumed small tabs) is
replaced with a proper plate recess: a sw_plate_t-deep pocket in the inner
wall over the bracket footprint, so the bracket sits flush with the inner
wall. This also fixes the boss strength - the bracket bottoms against the
solid recess floor and the screw clamps boss -> bracket -> wall in
compression, so the boss is no longer a free-standing cantilever. The boss
front moves to the inner wall plane (sw_ear_t setback removed) and fuses to
the wall above the recess. Parametric (sw_plate_recess / _w / _h / _t /
_clr); removed sw_ear_t, sw_boss_wall_anchor, sw_ear_w, sw_ear_h.

Verified: base byte-identical, lid NoError Genus 10, base ∩ lid = 0mm³,
recess pocket empty with the 1.6mm wall skin intact behind it (no breach).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The mounting bracket fastens on the OUTSIDE of the case, so the flush
pocket is now cut into the outer wall face (was inner). The inner wall
behind the bracket stays solid, which actually improves the bosses: their
front bears against full inner wall and the screw clamps bracket -> wall ->
boss in compression. Screws pass from outside through the bracket + wall
into the bosses; the head sits on the external bracket, so the case head
counterbore is removed (sw_screw_head_d/h dropped).

Verified: base byte-identical, lid NoError, base ∩ lid = 0mm³, outer recess
pocket empty with the inner wall solid behind it (no breach).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The SS12F15 body that protrudes into the cavity is ~11mm wide, but the two
screw bosses (5mm wide, centred at +-7.5) leave only a 10mm gap, so each
boss inner face bit ~0.5mm into the body and stopped the toggle short of
seating. Found on a physical print.

Add switch_body_clearance(): a keepout (sw_body_l x sw_body_h x sw_body_w +
sw_body_clr per side) cut from the inner wall inward, relieving the boss
inner faces over the body's Y/Z extent only. The screw region (+-7.5, well
outside the body) and the pillar above the body stay full, so screw
clamping and lateral stiffness are unaffected. The preview body proxy now
uses the same sw_body_* params instead of hardcoded dims.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The printable is a Bambu/Orca project 3mf (3 parts on a plate, print
profile, light pipe assigned to the clear filament) that was rebuilt by
hand in the slicer on every geometry change. Automate it.

make_3mf.py swaps the fresh STL meshes into a saved project template
(bambu-template.3mf), keeping ALL slicer settings: it re-applies each
part's source_offset so placement is preserved exactly, and touches only
the three mesh blocks + face counts. project_settings.config and the
per-part filament mapping are carried over verbatim.

export.sh runs it after the STLs (screw closure only; gate with
MAKE_3MF=false). The generated openrz67-case.3mf is now a build artifact,
so gitignore it like the STLs - the template carries the settings. Edit
the project in the slicer and re-save over the template to change setup.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The riser sat at Y=17.6 on the left wall, only ~0.8mm clear of the USB-C
recess (which ends ~Y15.2) - a tight squeeze for the battery cable in the
assembled unit. Push it to the back-left corner (Y=20.5), 5+mm clear of
USB-C, where the rounded PCB corner (R2) also opens extra room.

Keep it on the LEFT wall: pcb_overhang_left gives a ~2.4mm gap there,
while the back/right walls have only clr (~0.4mm) - too tight to route a
~3.2mm cable behind the board. The cable now surfaces just behind BAT1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… wall

The cable was pinched in the back-left corner: the left-wall gutter is the
only roomy one (pcb_overhang_left), but USB-C pins the PCB to that wall, so
widening it would shallow the plug seating. Instead add back_margin (2mm) -
a dedicated gutter behind the board. Only the back wall moves out; USB-C and
the snug PCB fit are untouched and the case stays a clean rectangle
(54.8 x 28.8 x 21.6mm). The cable now wraps the board's back edge and rises
behind BAT1 through a channel scalloped into the back wall.

Make the guide fins board-edge-referenced (anchored to the OUTER wall face)
so the back fins still catch the board edge across the widened back gutter,
rather than tracking the wall and floating. Drop the now-unused
frame_fin_reach. Geometry is identical when back_margin = 0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The XH plug is top-entry: wires leave the plug top at h_xh (8mm) and had to
dive ~5mm down to the port at the wall, too sharp an S-bend for the stiff
wires and it fought the lid closing. Move cable_port_z 3.0 -> 5.5 so the port
mouth sits near the wire exit; the bundle only eases down ~2.5mm. Port stays
entirely in the lid wall, clear of the split and the hold-down boss.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…te offset

The script recentred each fresh mesh on the source_offset the slicer template
recorded by hand. That offset is the bbox centre at template-creation time, so
when the SCAD geometry changed size (back_margin grew the case 2mm in Y) it went
stale: base and lid loaded 1mm off-centre in Y and landed shifted on the plate,
out of alignment with the light pipe. Compute each part's bbox centre fresh every
run (a clean re-import) and write it back into source_offset_{x,y,z}, so the parts
stay aligned through any future geometry change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant