Skip to content

fix(book-fold-phone): centre the default lens row as the manifest declares - #110

Merged
aldoruizluna merged 1 commit into
mainfrom
fix/default-drift-book-fold-phone
Oct 2, 2026
Merged

aldoruizluna merged 1 commit into
mainfrom
fix/default-drift-book-fold-phone

Conversation

@aldoruizluna

@aldoruizluna aldoruizluna commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Both twins now place the default lens row where the manifest declares it.

param mode(s) manifest default source literal (before) source literal (after) file:line
lens_first_center_x device, cover_half, camera_half, hinge 47.808 47.736 47.808 main.py:182 (PARAM fallback)
lens_first_center_x graph_device 47.808 47.736 47.808 bookfold.graph.json:57 (lenswindow_lens_place.x, the manifest binding)

Direction and why

The source now matches the manifest default.

  • 47.808 is the centred row: lens_island_center_x − lens_pitch_x·(lens_count−1)/2 = 56.88 − 9.072.
  • All 27 of 27 device presets that set the lens row follow exactly that rule. I checked this with a script: zero exceptions.
  • 47.736 left the default row 0.072 mm off-centre on the island. Studio sends the manifest value, so users already see the centred row.

How this maps to GOC-1

GOC-1 (Digital Twins MES, Phase 2) variables.json is only complete once yantra4d injects every declared parameter (RENDER_INJECT_FULL_PARAMS). This PR removes both default-drift notes for this cartridge (rule from hyperobjects-spec#30), on CadQuery and on the graph.

Evidence

Tooling: hyperobjects-spec at 510efba (the #30 branch; CI pins 3ff3736, which lacks the rule), CadQuery 2.8.0, macOS.

$ y4d-spec check ./book-fold-phone
y4d-spec check: cartridges=1 failures=0 notes=0 ...            # before: notes=2 (default-drift lens_first_center_x, py + graph)

$ y4d-spec check ./book-fold-phone --render --require-openscad --parity --openscad-path libs --openscad-path . -v
       (device, camera_half, cadquery): ok — volume 43302.81mm³, 1 body/bodies, watertight
       (graph_device, camera_half, graph): ok — volume 43302.81mm³, 1 body/bodies, watertight
  ok book-fold-phone (./book-fold-phone, 279 render(s) verified (270 preset), no comparable pair)
y4d-spec check: cartridges=1 failures=0 notes=84 geometry=verified renders=279 presets=270 skipped=0 parity=0/0 ok, ...

The 84 notes break down as follows. None is a default-drift note and none involves the lens:

  • 66 are printability measurements (overhang and thin-wall).
  • 18 say that the fold-state-* presets render the flat cover_half and hinge parts identically to the defaults. These presets set only fold_angle, which by design does not change an isolated flat part.

The CadQuery and graph twins still agree on every default part; for example, camera_half is 43302.81 mm³ on both. verification is unchanged. One cartridge, two files.

macOS green is not proof (AGENTS.md rule 4). The CI Linux render lane decides, and it is pending at the time of writing.

CI status (updated)

Linux CI on this head: manifest conformance (all cartridges): pass; render (cartridges changed in this PR) (book-fold-phone): pass; render scope: pass.

🤖 Generated with Claude Code

…lares

Both twins placed the first lens at x = 47.736 while the manifest (bound to
lenswindow_lens_place.x) declares 47.808. 47.808 is the centred row,
island_center_x - lens_pitch_x = 56.88 - 9.072, the same rule every
device preset follows; 47.736 left the default row 0.072 mm off-centre.
main.py's PARAM fallback and the graph node literal now state the
manifest default (GOC-1 default-drift).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Aldo Ruiz Luna <aldo.ruiz.luna@gmail.com>
@aldoruizluna
aldoruizluna marked this pull request as ready for review October 2, 2026 22:26
@aldoruizluna
aldoruizluna merged commit 9459fe0 into main Oct 2, 2026
6 checks passed
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