Repository navigation
feat: derive display-only USD grid tubes (T01.7) - #422
Conversation
axisrow
left a comment
There was a problem hiding this comment.
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.
36a5344 to
9d35a02
Compare
axisrow
left a comment
There was a problem hiding this comment.
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.
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
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.