Repository navigation
ports P0d, part 2: cvc::point_classes, .vgr and .pts on each app, point-classes.* and pycvc - #1160
Merged
Merged
Conversation
…urs.* and pycvc The contours the tiler (P3b) and volume_grid (P10) share (docs/roadmap/VOLROVER-LIBRARY-PORTS-ROADMAP.md §3, P0d): - inc/cvc/geometry/contours.h: slices by z index (a spacing and origin, or a slice's own plane), closed polygons per component, components with a colour and a visibility; contour_problems(); parameter tables for contour_component and contour_read_params. - Readers and writers are each app's own (contour_handlers(app), a file_handler_registry in app.slot<T>()): Reconstruct .ser with its sections, the Tiling .config + .pts, ctr2suf .contour, VolumeGridRover's .pcd (written only) and a .cvcc JSON file. Reconstruct traces are mapped through the inverse of their section transform, exactly for affine ones and by Newton's method otherwise (the legacy reader was right only for a translation). - src/cvc/utility/xml_lite: a small stateless XML reader. boost::property_tree's XML parser keeps function-local statics the writable-data scan would flag; the name filters use boost::regex, whose statics are already allowlisted, rather than std::regex. - contours.read / write / info / formats and params.* with the tables "contours.read" and "contours.component": register_contour_intrinsics(env, ictx, app) for one environment, and install_contour_intrinsics(app) as the app's own keyed action-intrinsic provider. - pycvc: contour_stack, read_contours / write_contours (the GIL released), both tables through PYCVC_PARAM_TABLE. - Tests: contour_stack_test (in CVC_PORT_TESTS and the sanitizer lanes): the model, T8, T9 with legacy samples and a bad-file corpus, T6 (two apps, two threads, order), the DSL and an Ariadne document through the provider. test_pycvc_contours.py (T11). docs/PORT_SHARED_TYPES.md.
…nt-classes.* and pycvc The seeds GenSeg (P5) grows from and the points volume_grid (P8) marks (docs/roadmap/VOLROVER-LIBRARY-PORTS-ROADMAP.md §4, §5, P0d). On part 1 (#1156), whose xml_lite the .vgr reader uses. - inc/cvc/volume/point_classes.h: classes of voxel points (i j k), each with a name, colour, display radius, variable and timestep, known by name, variable and timestep together; add, remove, set_class; new classes take a fixed palette's colours (the legacy used srand(time)); point_class_problems(pc, dims); tables for point_class's metadata and point_class_read_params (dims, bbox, variable, timestep). - Formats each app's own (point_class_handlers(app), in app.slot<T>()): VolumeGridRover's .vgr read and written (its reader was stubbed out in the Qt6 migration; a radius attribute added), and its .pts point list read, with object coordinates turned into voxels as the legacy did when the volume's dims and box are given. - point-classes.read / write / add / remove / points / info / formats and params.* (tables "point-classes.read", "point-classes.class"). Edits return a new data object and never change their input. register_point_class_intrinsics(env, ictx, app) and install_point_class_intrinsics(app), a keyed per-app provider. - pycvc: point_classes, point_class and point_class_read_params with their tables, points() and points_array() (an (n, 3) int32 numpy copy), read/write with the GIL released; IntVector. - Tests: point_classes_test (CVC_PORT_TESTS, sanitizer lanes): the model, T8, T9 with legacy samples and a bad-file corpus, T6, the DSL, an Ariadne document through the provider. test_pycvc_point_classes.py (T11). docs/PORT_SHARED_TYPES.md gains the section.
Joe (2026-11-12): the intrinsics deal with data on the state tree; writing it to files is left to the rest of libcvc (write_contours, pycvc, a node's request, the CLI). So contours.write goes, and contours.formats lists only the extensions contours.read reads. A test checks that contours.write stays unbound, and that the stack contours.read puts on the tree is the one write_contours writes. The docs and the roadmap's §1.6 row say so.
… state tree As for contours (Joe, 2026-11-12): point-classes.write goes, and point-classes.formats lists only what point-classes.read reads. Writing classes from the tree to a file is write_point_classes', pycvc's or a node request's. A test checks point-classes.write stays unbound and reads back what write_point_classes wrote from the tree; the docs and the roadmap's §1.6 row say so.
…on the tree Joe (2026-11-12): drop the read intrinsics too. No contours intrinsic touches files: a stack reaches the state tree, and leaves it for a file, through read_contours / write_contours, pycvc, a node's request or the CLI. contours.* is now contours.info, with params.* and the tables "contours.read" (read_contours' parameters) and "contours.component". The tests put stacks on the tree from C++ (contour_stack_value, or the stack itself) and check that contours.read, contours.write and contours.formats stay unbound.
# Conflicts: # docs/roadmap/VOLROVER-LIBRARY-PORTS-ROADMAP.md
As for contours (Joe, 2026-11-12): no point-classes intrinsic touches files. Classes reach the state tree, and leave it for a file, through read_point_classes / write_point_classes, pycvc or a node's request. point-classes.* keeps add, remove, points and info, with params.* and the tables "point-classes.read" (read_point_classes' parameters) and "point-classes.class". The tests put classes on the tree from C++ and check that point-classes.read, .write and .formats stay unbound.
transfix
enabled auto-merge (squash)
November 12, 2026 08:23
transfix
disabled auto-merge
November 12, 2026 08:42
transfix
enabled auto-merge (squash)
November 12, 2026 09:56
transfix
disabled auto-merge
November 13, 2026 23:31
transfix
enabled auto-merge (squash)
November 14, 2026 01:49
transfix
added a commit
that referenced
this pull request
Nov 14, 2026
…#1222-#1225, #1229) Master's #1190 (file-pick and http-upload) was written for a single async host; this branch runs an isolated document's programs on its own group's host, on a pool worker in an `any` group. - net_intrinsics.cpp: StartedRequest takes master's deliver()/on_outcome, settling through the host's finisher. http-upload is its own provider, `any` as the requests are: it parks on the calling program's host (ictx.host), takes its progress path from ictx.root_path (no tree walk on a worker), and a started upload (a browser page) keeps the host's finisher, not the host. - ariadne.cpp: file-pick, file-info and file-forget bind into the program's env as they are, in every group (install_backend_verbs), not through the backend verbs' host_proxied wrapper, which cannot park an async verb. file-pick parks on the program's own host, claims the Runtime's picker hub under its lock where it is called, and opens the picker on the host thread (exec_pool::run_on_host; inline when called there). Its answer goes through the host's finisher, as the host may be gone by then. - ci.yml: the sanitizer list keeps this branch's tests and master's point_classes_test. - STATE_EXEC_THREADED.md: rows for http-upload, the file verbs, and the contours and point-classes providers. The last two are registered without a kind, so they are host_only, and an isolated document in an app that installs them goes to a host-affinity group. - New test: AriadneIsolatedDocs.FilePickOpensItsPickerOnTheFramesThread.
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.
Part 2 of phase P0d in
docs/roadmap/VOLROVER-LIBRARY-PORTS-ROADMAP.md(§4, §5, §7):cvc::point_classes, the seeds GenSeg (P5) grows from and the pointsvolume_grid(P8) marks.Stacked on #1156, whose
xml_litethe.vgrreader uses. Until #1156 merges, this PR carries its commits (merged in as 7c93e1a and 998b12b). Review only 5d4e07a, b5c0179 and a9f1a52. It targets master so CI runs. Merge #1156 first; then this one's diff is its own.What lands
inc/cvc/volume/point_classes.h):i j k), each with a name, colour, display radius, variable and timestep;add,removeandset_class;.vgrkeeps them exactly). The legacy drew random colours withsrand(time(NULL));point_class_problems(pc, dims);point_class's metadata and forpoint_class_read_params(dims,bbox,variable,timestep).point_class_handlers(app), inapp.slot<T>()):.vgr, read and written. VolumeGridRover's reader was stubbed out in the Qt6 migration. Aradiusattribute is added, read as 1 when absent..pts, read only. Given the volume's dims and box, object coordinates become voxels asloadPointClassesSlotcomputed them (truncated, then clamped). Without them, each coordinate goes to the nearest index.point-classes.add,remove,pointsandinfo, andparams.*with the tablespoint-classes.read(read_point_classes' parameters) andpoint-classes.class.read_point_classes/write_point_classes, pycvc or a node's request. A test checks thatpoint-classes.read,.writeand.formatsstay unbound.register_point_class_intrinsics(env, ictx, app)binds them in one environment;install_point_class_intrinsics(app)adds them as the app's own keyed provider (cvc.point-classes).pycvc_point_classes.i):point_classes,point_classandpoint_class_read_params, with their tables;points(), andpoints_array(), an(n, 3)int32 numpy copy;read_point_classes/write_point_classes, which release the GIL;%template(IntVector) std::vector<int>.tools/singleton_scan/allowlist.txtis unchanged.Tests
point_classes_test: inCVC_PORT_TESTSandSAN_CXX_TESTS. It covers:.vgrround trip, the hand-made legacy samples insrc/cvc/tests/data/point_classes(QDom's attribute order, a repeated point, a name reused across timesteps;.ptswith and without a grid), and a bad-file corpus;test_pycvc_point_classes.py, in ctest andSAN_PY_TESTS.Checked locally (Windows, MSVC 19.44, Release):
point_classes_test: 16/16;contour_stack_test: 22/22;pycvc_point_classespasses, and 48 of 49 pycvc tests pass. The one failure,pycvc_physics, runs a C++ physics test binary that wasn't built locally.Not checked locally: wasm-mt under node, Linux/macOS, and the writable-data scan. CI checks them.