Repository navigation
feat(microscope-slide-hyperobject): explicit scale_comp parameters behind the legacy material injection - #108
Merged
aldoruizluna merged 2 commits intoOct 2, 2026
Conversation
…hind the legacy material injection Declare scale_comp_x/y/z (unitless, default 1.0) and read them in both kernels. While yantra4d RENDER_MATERIAL_INJECTION is on, an injected mat_shrinkage_* value still wins, so today's geometry is unchanged; the legacy branch is marked for removal at the flip. The library function slide_slot_width() gains the same precedence for fit_clearance_slide over mat_clear_slide. mat_clear_press and mat_clear_loose were never read and are no longer declared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Aldo Ruiz Luna <aldo.ruiz.luna@gmail.com>
…sation parameters 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.slide.scad: new explicit inputsscale_comp_x,scale_comp_yandscale_comp_z(unitless, default 1.0) drive thescale()around the slide body. The legacymat_shrinkage_*andmat_clear_slideare nowundefunless the platform injects them with-D. An injected value wins (_legacy_or()), so every render made with the flag on is unchanged. The legacy branch is commentedREMOVE AT THE FLIP.slide_slot_width()gets the same precedence forfit_clearance_slide(mm, default 0) overmat_clear_slide. This cartridge renders no slot, so its manifest does not declarefit_clearance_slide.microscope-slide-holderdeclares it in its own PR.mat_clear_pressandmat_clear_loosewere declared here but never read, so they are no longer declared.slide.py(CadQuery twin) readsscale_comp_*, so both kernels agree for any explicit value. It never readmat_*and still does not, so its output with injection on is unchanged.project.json: declaresscale_comp_x,scale_comp_yandscale_comp_z(slider 0.9 to 1.1, step 0.001, labels in en/es/fr/pt, advanced visibility).README.mddocuments them.GOC-1 mapping
variablesdenylist; I checked them againstgenerator-output.schema.json(exact list plus the prefixesmat_shrinkage_,mat_clear_andthermo_). After the flip, shrinkage reaches this cartridge only as a geometry-named number invariables, and nothing is recorded inlegacy_physical_inputs.scale_comp_* = 1.0. WithRENDER_INJECT_FULL_PARAMSon, the injected defaults leave the geometry unchanged (row A4 below).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 rows coverslide_standard0 to 4 (all 5 values; the cartridge has no presets):scale_comp_*=1.0)bambu-tpu-95ainjected (the fullmat_*/thermo_*set, as yantra4d sends it)sinterit-pa12-smoothinjectedscale_comp=1.012/1.012/1.018with no injectionscale_comp=0.95CadQuery twin, before vs after: identical at all 5 standards, with and without injected
mat_*. The explicitscale_compin CQ matches the SCAD TPU render (for example, standard 0 gives a volume of 2060.1353 mm³ and a bbox of ±38.456 × ±13.156 × ±0.509 mm in both).y4d-spec check ./microscope-slide-hyperobject --render --require-openscad --parity --openscad-path libs --openscad-path .:3ff3736:cartridges=1 failures=0 notes=0 geometry=verified renders=2 presets=0 skipped=0 parity=1/1 ok510efba, with thedefault-driftrule): the same,notes=0CI status
Green on Linux CI (own runners) at the time of writing: manifest conformance (all cartridges) passed in 45s, render scope passed, and render (cartridges changed in this PR: microscope-slide-hyperobject) passed in 1m22s.
Deviations / notes
target_materialis untouched; this cartridge never declared it. Removing it is the flip, which is the owner's decision.microscope-slide-holder/libs/already carries a single-polyhedron rib fix (a coincident-face union under Manifold) that this upstreamslide_retention_rib()lacks.🤖 Generated with Claude Code