Repository navigation
mesh_lab skeleton: the skeleton request, its children and a mesh_tools section, a skeleton lab demo (P2) - #1402
Merged
Merged
Conversation
…s section, a skeleton lab demo (P2)
Phase P2 of docs/roadmap/VOLROVER-LIBRARY-PORTS-ROADMAP.md: P1's cvc::skeletonize in Ariadne.
- mesh_lab `skeleton` request: cvc::skeletonize_job on the shown mesh's vertices as a sliced
task on the app's scheduler. Its parameters are skeleton_params' table under
<node>.mesh_ops.skeleton.* (seeded from a `skeleton:` prop, with their properties, read when a
run starts; a bad value is reported and nothing runs; one changed mid-run applies to the next
run, and the status says so). It publishes job_keys' busy, stoppable, status, progress, phase,
stats.work_ms and pid, plus info.* and warnings. `stop` ends it and keeps the last skeleton,
other requests wait while it runs, and a new mesh clears it. A realize-time load now runs
before a request already waiting instead of replacing it.
- Children <id>_strands (lines) and <id>_sheets, view.strands / view.sheets, and the parts on
the data channel at <node>.skeleton.{strands, sheets, helix}.
- View tags: the children are tagged skeleton and the node's own surface surface, for its props
alone (RealizedScene::TaggedNode::subtree, honoured by scene_views when hiding, restyling and
framing), so show: [skeleton] shows the skeleton alone and hide: [surface] drops the surface.
- RealizedScene::settling: probes a custom node type registers while its work would still change
the frame; cvcgl_ari_golden steps on until they are all false before it captures.
- mesh_tools.ari: a Skeleton section (parameters, Skeleton and Stop, progress, counts, a show
toggle per part).
- examples/ariadne/documents/skeleton_lab.ari, in the gallery as skeleton_lab_ari with a
thumbnail. Golden src/cvcGL/test/golden/skeleton.ari on a committed 4,000-triangle bunny
(golden/data/bunny_4k.off); its PNG follows from CI's llvmpipe run. arigl-web smoke case
(docset skeleton.ari). arigl-web's and the gallery's recipes gain shewchuk-predicates, and
arigl-web's full build fails at configure without them.
- Tests: cvcgl_mesh_skeleton, plus a cooperative-threading entry; cvcgl_ariadne_views' parts
case; SkeletonParams.OnTheStateTree in skeleton_test (ports lane: native and wasm-mt).
- Docs: ARIADNE.md (§5.4 rows and the skeleton, Tags, golden tests), INDEX.ari, the roadmap's §2
and P2 row.
The skeleton document's reference frame, taken from the ari-golden artifact of package-linux / libcvc-release-grpc (llvmpipe, LLVM 20.1.8) on this PR: the run settled (done, 315 strands, 2 sheets from 2064 points), the skeleton alone in the side view and over the translucent bunny in the main view.
… it frames A view frames its camera once, the first frame it holds props with bounds. A view with show: [skeleton] lets in a mesh_lab's skeleton children, which have bounds only once the run ends; until then shown_bounds found none and the view framed on every visible prop in its renderer (the surfaces) instead, for good. Whether the skeleton was there first was a race: CI's Linux run framed on the surfaces, its Windows run on the skeleton, so the skeleton golden differed in its side view (1.9% of pixels). - A view whose show: list lets in tagged nodes, none of them with bounds yet, now waits for them. With no tagged node let in, it frames on what it draws, as before. - shown_bounds leaves out a node an entry out of the view takes along (the entry's own node, and with subtree every node under it), as the view's renderer does: a mesh_lab tagged lab no longer puts its skeleton children (tagged lab and skeleton) in show: [skeleton]'s framing. - cvcgl_ariadne_views: show: [skeleton] is framed on the untagged mesh_lab's skeleton once it has one (fails on the old code: framed on both bunnies). - The skeleton golden and the skeleton_lab demo: the side view's zoom 0.85 -> 0.6, now that it is framed on the skeleton itself. - ARIADNE.md: when a view naming tags to show is framed. skeleton.png still holds the old framing; its replacement comes from this commit's llvmpipe run.
The skeleton document's frame from package-linux / libcvc-release-grpc's ari-golden artifact (llvmpipe, LLVM 20.1.8) at 6b8e6af, where the side view waits for the skeleton's bounds and frames on it (zoom 0.6). The run settled: 315 strands, 2 sheets from 2064 points. The previous golden had the side view framed on the surfaces, the losing side of the race.
…eleton branch P4 added RealizedScene::pending_work, a probe per custom node that is true while its work is in flight, for the golden harness to wait on: the same thing as P2's RealizedScene::settling. The merge keeps master's name and drops settling: - scene_realize.h: one pending_work, its comment covering both (a contour_lab's tile, a mesh_lab's skeleton, a result not drawn yet). - mesh_lab registers its probe on pending_work; cvcgl_mesh_skeleton reads it there. - cvcgl_ari_golden: one loop. It steps until no probe has said busy for kMinFrames frames after the one it went idle on (P2's "until done, then kMinFrames more", with P4's restart when a probe goes busy again), under P2's 180 s ceiling. The skeleton golden gets the frames it was taken with; the contour tiler two more, after its scene has settled. - arigl-web and libcvc-examples-web recipes: clipper2, cdt and shewchuk-predicates, with one comment saying the predicates serve the tiler (P4) and the skeleton (P2). - demos.json and arigl_web_smoke.mjs: both demos and both page cases. - ARIADNE.md, the roadmap and skeleton.ari name pending_work.
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.
Phase P2 of
docs/roadmap/VOLROVER-LIBRARY-PORTS-ROADMAP.md(§7's row, §2 "Ariadne"): P1'scvc::skeletonizein Ariadne, as amesh_labrequest.The request (
src/cvcGL/ariadne/mesh_nodes.cpp, documented inmesh_nodes.hand ARIADNE.md §5.4)mesh_ops.request = skeletonrunscvc::skeletonize_jobon the shown mesh's vertices. It runs as a sliced task on the app's scheduler: cooperative slices on single-threaded wasm, pool chunks where there are threads.skeleton_params' table under<node>.mesh_ops.skeleton.*, with their properties.skeleton: { ... }prop, else the defaults, and read when a run starts.skeleton.status, and nothing runs.busy,stoppable,status,progress,phase,stats.work_msandpid;info.{points, strands, sheets, clusters, lines, triangles}andwarnings.stop(a request word, as in fe_lab) ends a run at its next step and keeps the last skeleton.<id>_strands(lines) and<id>_sheets.view.strandsandview.sheetsshow or hide each.<node>.skeleton.{strands, sheets, helix}ascvc::geometry.load(keys aninit:wrote) now runs before a request already waiting in the key, instead of replacing it.View tags (
scene_realize.h,scene_views.cpp)skeleton.surface, for its props alone: a newRealizedScene::TaggedNode::subtreeflag, which views honour when they hide, restyle and frame.show: [skeleton]shows an untagged mesh_lab's skeleton alone, andhide: [surface]shows any mesh_lab without its surface.show:list names neither tag now leaves a mesh_lab out, as it would any tagged node. No document in the tree has such a view. (Children alone couldn't do this: a node's tags hold for its subtree, so a view leaving the surface out took the skeleton with it.)show: [skeleton]raced the run: CI's Linux run framed the skeleton golden's side view on the surfaces, its Windows run on the skeleton (1.9% of pixels apart).shown_bounds(the framing's bounds) now leaves out a node an entry out of the view takes along, as the renderer does: a mesh_lab taggedlabno longer puts its skeleton children inshow: [skeleton]'s framing.Golden waits (
cvcgl_ari_golden.cpp)RealizedScene::settlingholds probes that a custom node type registers. A probe is true while the node's work would still change the frame: a request waiting, a job running, a colour not yet made.Component, demo, golden, browser
mesh_tools.arigains a Skeleton section: the main parameters, Skeleton and Stop buttons, a progress bar labelled by phase, the counts, and a show toggle for each part.examples/ariadne/documents/skeleton_lab.aridecimates the embedded bunny to 4,000 triangles, then skeletonizes it. A second view shows the skeleton alone. It is in the gallery asskeleton_lab_ari, with a thumbnail.src/cvcGL/test/golden/skeleton.ari.golden/data/bunny_4k.off, 119 KB, written once bycvc::simplify), so every platform skeletonizes the same points and CI's Debug lanes don't decimate.golden/skeleton.png, comes from this PR's CI (anari-goldenartifact, llvmpipe), as orthoslicer demo: three volume_slice planes beside a volren, a slice view down any axis (P7) #1257's did; the harness refuses any renderer but llvmpipe. It was retaken on the framing fix (from package-linux / libcvc-release-grpc at 6b8e6af); that run's Linux and Windows llvmpipe frames agree to a largest channel difference of 1.src/cvc/tests/data/ariadne_docset/app/skeleton.aridecimates to 2,000 triangles and prints the counts once the skeleton is drawn.shewchuk-predicates. arigl-web's full build now fails at configure without them (otherwise the page's skeleton could only report an error).Tests
cvcgl_mesh_skeleton(headless, 47 checks), plus acvcgl_mesh_skeleton_cooperativeentry run withCVC_SLICED_THREADING=cooperative. It covers:skeletonize's output, and the data channel;cvcgl_ariadne_views: a parts case with two mesh_labs (one untagged, one taggedlab) undershow: [skeleton],hide: [surface]andshow: [lab]. It also checks thatshow: [skeleton]is framed on the untagged mesh_lab's skeleton once it has one (the old code framed on both bunnies).skeleton_test:SkeletonParams.OnTheStateTree(T8). It covers every field struct → keys → struct, seeding and properties, and an unparseable or out-of-range value. It is in the ports lane, so it runs natively and under node.Verified locally (Windows, MSVC Release, libigl + Shewchuk)
cvcgl_mesh_skeletonpasses in both modes;cvcgl_ariadne_viewspasses, 63 checks;cvcgl_ariadne_realizepasses, 424 checks;cvcgl_fe_intervalpasses;cvcgl_ariadne_{data,labels,physics,pick,repeat,ribbons,scenes,slice_view},cvcgl_ari_switch,cvcgl_viewport_refreshandcvcgl_volume_slice;cvcgl_tf_bindingpasses run alone or serially (4 of 4). It failed once underctest -j4, in its threaded overlay "mid-computation" timing check, which this PR doesn't touch.skeleton_testpasses natively (11 tests) and in a wasm-mt build under node 22 (11 tests).cvcgl_ari_goldenon this machine's GPU (not llvmpipe) draws the skeleton document with its run settled.ariglrunsskeleton_lab.ariend to end.Not verified here: macOS (the arigl-web smoke passed on CI). macOS's Apple Software Renderer may need a
skeleton.macos.png, as the orthoslicer did (#1333). package-macos runs only on pushes, so that shows on master's run, or on a push toci/full/**.