feat(microscope-slide-holder): explicit fit_clearance_slide behind the legacy material injection - #109
Merged
aldoruizluna merged 2 commits intoOct 2, 2026
Conversation
…e legacy material injection Declare fit_clearance_slide (mm, default 0.0) for the OpenSCAD box, staining rack and cabinet drawer. The vendored slide library reads it in slide_slot_width(); while yantra4d RENDER_MATERIAL_INJECTION is on, an injected mat_clear_slide still wins, so today's geometry is unchanged. The legacy branch is marked for removal at the flip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Aldo Ruiz Luna <aldo.ruiz.luna@gmail.com>
…the fit clearance tooltip Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Aldo Ruiz Luna <aldo.ruiz.luna@gmail.com>
aldoruizluna
marked this pull request as ready for review
October 2, 2026 22:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Digital Twins MES, Phase 2 wave 2, lane W2-MAT. Owner ruling: "flag now, flip later". This PR is the commons side that lets yantra4d turn
RENDER_MATERIAL_INJECTIONoff without losing function.libs/microscope-slide-hyperobject/slide.scad(the vendored library, which rides with this cartridge):slide_slot_width()now addsfit_clearance_slide(mm, default 0). The legacymat_clear_slideisundefunless the platform injects it with-D, and an injected value wins (_legacy_or()). Every render made with the flag on is therefore unchanged. The legacy branch is commentedREMOVE AT THE FLIP. The header is the same text as microscope-slide-hyperobject's PR; the vendored file's rib module is untouched.project.json: declaresfit_clearance_slide(slider 0 to 1 mm, step 0.01, grouptolerance, advanced visibility, labels in en/es/fr/pt), visible in the OpenSCAD modes that callslot_width():box,staining_rackandcabinet_drawer.What the legacy injection does to this cartridge today (measured)
-D mat_clear_slidedoes reach geometry, even throughuse <slide_lib.scad>→include <libs/…/slide.scad>. The-Drender is identical to a render with the literal edited in the source.box(base and lid) andcabinet_drawer(drawer and shell) at every SCAD preset.staining_rackis inert at defaults and at every preset, because of its 5 mm minimum pitch. It is reachable only for thick slides near the slider maxima.traynever callsslot_width().mat_shrinkage_*,mat_clear_press,mat_clear_looseandthermo_*are inert here.main.py) read none of them, and this PR does not touchmain.py.GOC-1 mapping
fit_clearance_slidepasses the GOC-1variablesdenylist; I checked it againstgenerator-output.schema.json. After the flip, a resolved sliding-fit clearance reaches this cartridge as a geometry-named number invariables, andlegacy_physical_inputsstays empty.RENDER_INJECT_FULL_PARAMSon, the geometry is unchanged (row A4).Evidence
I rendered locally with OpenSCAD 2026.02.13 and
--backend=Manifold. Geometry was compared as volume, AABB, body count and the sha256 of the sorted unique vertex set rounded to 1e-4, never as STL bytes.The matrix is 6 SCAD targets (
boxbase and lid,tray,staining_rack,cabinet_drawerdrawer and shell) × 9 parameter sets (defaults plus the 8 SCAD presets) = 54 rows. Each row has 6 checks, 324 comparisons in total, with 0 mismatches:fit_clearance_slide=0.0= before, no materialbambu-tpu-95ainjected = before, TPU injectedsinterit-pa12-smoothinjected = before, PA12 injectedfit_clearance_slide=0.1= before, TPU injectedFor example, at defaults
box_basemeasures 86312.824 mm³ with no material and 86893.175 mm³ with TPU, andcabinet_drawershell measures 235996.166 mm³ and 241873.840 mm³.y4d-spec check ./microscope-slide-holder --render --require-openscad --parity --openscad-path libs --openscad-path .:3ff3736:cartridges=1 failures=0 notes=0 geometry=verified renders=19 presets=9 skipped=0 parity=0/0 ok510efba):failures=0 notes=19. All 19 notes are pre-existingdefault-driftnotes on other parameters; unmodifiedmaingives the samenotes=19. None concernsfit_clearance_slide.CI status
Green on Linux CI (own runners) at the time of writing: manifest conformance (all cartridges) passed in 38s, render scope passed, and render (cartridges changed in this PR: microscope-slide-holder) passed in 2m18s.
Deviations / notes
target_materialchange; this cartridge never declared it.libs/microscope-slide-hyperobject/{project.json,slide.py,README.md}are not re-synced. The holder executes only the vendoredslide.scad.🤖 Generated with Claude Code