Skip to content

Fix mirrored 3D plot meshes - #57

Open
shanedertrain wants to merge 1 commit into
i2cjak:mainfrom
shanedertrain:fix/3d-view-handedness
Open

shanedertrain wants to merge 1 commit into
i2cjak:mainfrom
shanedertrain:fix/3d-view-handedness

Conversation

@shanedertrain

@shanedertrain shanedertrain commented Oct 9, 2026 •

Copy link
Copy Markdown

Fix mirrored 3D plot meshes

The web and phone 3D viewers show reflected geometry compared with KiCad because the shared mesh encoder swaps glTF Y and Z without preserving handedness. Rotate Y-up coordinates to Z-up as (x, -z, y), preserving asymmetric landmark positions and triangle winding. Apply the same conversion to mesh bounds.

Add regression coverage that decodes the encoded mesh and checks asymmetric positions, upward-facing winding, rotated bounds, and signed underside coordinates. Update the existing serialized mesh expectation.

Validation:

  • scripts/test.sh: all 91 test programs passed.
  • scripts/check.sh: all type checks and formal proofs passed.
  • Native build and execution of solid_orientation_test.bend: all four checks passed.
  • test/tools/orbit_test.ts: all camera and wheel checks passed.
  • Chromium verification using a real Bend-produced CBOR packet and src/web/solid.js: GPU positions and +Z normals matched the expected rotation.

This PR contains only the mesh conversion and its regression tests.

Fixes #45

Snaiderbg pushed a commit to Snaiderbg/Backplane that referenced this pull request Oct 9, 2026
Dictation goes in at the caret and reads on; dev installs ship the fast voice helper
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.

3D board view mirrored

1 participant