Skip to content

feat: derive display-only USD grid tubes (T01.7) - #422

Merged
Blogbotana merged 1 commit into
Apibim-com:masterfrom
axisrow:feat/t01-7-grid-viewer-geometry
Oct 26, 2026
Merged

Blogbotana merged 1 commit into
Apibim-com:masterfrom
axisrow:feat/t01-7-grid-viewer-geometry

Conversation

@axisrow

@axisrow axisrow commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

What this changes

Other USD readers can display project grids as 50 mm diameter tubes centred on Z=0. The engine builds one bounded Mesh containing a closed sixteen-sided tube per line; the adapter writes it only to the derived layer with purpose=guide. Grid placement is inherited from its authoritative frame, labels remain native UI text, and the guide has no engineering body, FeatureIds or quantities.

Grid creation/copy and line/family edits maintain the guide atomically. Label edits preserve derived bytes, geometry edits rebuild it, and deletion removes it. Existing grids without guide geometry remain readable. The stored graph validator admits only the guide-tagged grid Mesh and retains the normal mesh-buffer checks. Derived footprint/rebase handling includes the guide purpose.

Stacked on #421 (and #419); uses the #415 viewer defaults. Current upstream 65728b0 and open PRs checked for duplicates. Refs #192. Rebase after the preceding slices land.

How you verified it

  • Engine radius/endpoints/index checks and geometry-only digest invariance passed.
  • 2 actual-binary guide cases passed, including a complete layer-set reopen with configured OpenUSD Python: standard Mesh, purpose, face/point counts, normals and transformed world bounds.
  • Grid creation, drawn edits, regular updates and placement/query regressions passed; 32 tests across the selected CLI/engine suites.
  • All 35 layer authoring integration cases passed.
  • Scoped Clippy for engine, layer-engine and CLI, all targets, passed; formatting and diff whitespace checks passed.
  • No interactive external viewer is available in this cloud session; the independent OpenUSD reader verified the standard scene. Full platform CI is pending.

Never-crash and provenance

Buffers are bounded by 400 lines, point indices are checked, and production code adds no unwrap/expect/panic, unsafe, dependencies or assets. Contributor-original MPL-2.0.

Review points

Keep draft for dependencies and checks. Guide tubes remain excluded from engineering picking, BOM, numbering and quantities; the engine's grid-query records remain authoritative. This does not claim the T01 parent acceptance gate.

@axisrow axisrow left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving

The tube tessellation is correct: a sixteen-sided closed prism per line with end caps, 32 points, 18 faces and 96 indices per line, indices bounds-checked, and the digest is geometry-only, so label edits preserve derived bytes while geometry edits rebuild them. Guide authoring stays atomic with grid creation and edits through the Derived footprint entries, and deletion removes the guide with the parent. read_grids now admits only the exact purpose=guide Mesh with no element identity and no quantity properties and rejects anything else under /Geometry, so grids without guide geometry remain readable. Non-blocking note: guide_target in authored/grid.rs has missing spaces inside the matches! call, which rustfmt will not fix since it does not reformat macro contents. No changes requested.

@axisrow
axisrow force-pushed the feat/t01-7-grid-viewer-geometry branch from 36a5344 to 9d35a02 Compare October 26, 2026 21:36

@axisrow axisrow left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving (rebased head 9d35a02)

Re-reviewed after the rebase. The slice is now a single commit on merged upstream (9cfa681, which includes #421 and #420), and git range-diff shows the patch is identical to the previously reviewed 36a5344, so the prior review carries over: tessellation, bounds, the geometry-only digest, the atomic Derived guide authoring, the strict purpose=guide admission in read_grids, and readable guide-less grids all stand as before. The new base content (#420 model diagnostics, #415 contract docs) does not intersect any file this slice touches. The non-blocking note about missing spaces inside the matches! call in guide_target still applies; rustfmt does not reformat macro contents. No changes requested.

@Blogbotana
Blogbotana merged commit 112be7b into Apibim-com:master Oct 26, 2026
32 checks passed
@axisrow axisrow added this to the M0: grids milestone Oct 27, 2026
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.

2 participants