Repository navigation
ports P0d, part 1: cvc::contour_stack, its formats on each app, contours.* and pycvc - #1156
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.
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.
…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.
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
added a commit
that referenced
this pull request
Nov 12, 2026
transfix
added a commit
that referenced
this pull request
Nov 12, 2026
ci.yml's sanitizer test list keeps this branch's stream_test, net_ws_client_test and ariadne_host_test and master's contour_stack_test. The allowlist ratchet (#1152) passes: against master the list only loses the open-url clock's line.
transfix
added a commit
that referenced
this pull request
Nov 13, 2026
package-linux / libcvc-release-grpc failed only in tools/singleton_scan, on cvc::ocean::sea_surface::source's thread_local. The run tested a merge with master b745ea6, from before #1181 (29ff406) took that thread_local out, and a rerun would test the same merge. Master since then: #1156, #1153, #1166, #1181, #1165. No conflicts.
transfix
added a commit
that referenced
this pull request
Nov 14, 2026
…nt-classes.* and pycvc (#1160) * ports P0d, part 1: cvc::contour_stack, its formats on each app, contours.* 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. * ports P0d, part 2: cvc::point_classes, .vgr and .pts on each app, point-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. * contours: no contours.write; the DSL deals with stacks on the state tree 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. * point classes: no point-classes.write; the DSL deals with them on the 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. * contours: no contours.read or contours.formats either; the DSL works 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. * point classes: no point-classes.read or point-classes.formats either 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.
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 1 of phase P0d in
docs/roadmap/VOLROVER-LIBRARY-PORTS-ROADMAP.md(§3, §7):cvc::contour_stack, the contours the tiler (P3b) andvolume_grid(P10) will share. Part 2,cvc::point_classes, follows in its own PR.What lands
The type (
inc/cvc/geometry/contours.h):contour_problems();contour_componentandcontour_read_params(cvc::param_table, P0b).Formats, each app's own.
contour_handlers(app)is afile_handler_registry(P0a: the file handler tables are each app's own (volume, geometry, model, image) [4.0, breaking] #1119) kept inapp.slot<T>()(P0a: the action-intrinsic providers are each app's own; cvc::app::slot<T>() [4.0, breaking] #1137), soapp.hdoesn't change..ser.config.ptsfiles.contour.pcd.cvccReconstruct transforms are inverted properly. Reconstruct stores the polynomial from series coordinates to the section's own, so a trace's world coordinates are its inverse, as PyReconstruct reads them.
yused the already-transformedx.docs/PORT_SHARED_TYPES.md.No new process-wide state.
src/cvc/utility/xml_lite, a small stateless reader. boost::property_tree's XML parser keeps function-local statics (xmlattr<>()::s, rapidxml'snullstr()::zero) that aren't on the scan's allowlist.std::regex.tools/singleton_scan/allowlist.txtis unchanged.DSL intrinsics.
contours.info, andparams.*with the tablescontours.read(read_contours' parameters) andcontours.component.read_contours/write_contours, pycvc, a node's request or the CLI. A test checks thatcontours.read,contours.writeandcontours.formatsstay unbound.register_contour_intrinsics(env, ictx, app)binds them in one environment.install_contour_intrinsics(app)adds them as the app's own keyed action-intrinsic provider (cvc.contours).pycvc (
pycvc_contours.i):contour_stack, andread_contours/write_contours, which release the GIL. Both tables go throughPYCVC_PARAM_TABLE.Tests
contour_stack_test: inCVC_PORT_TESTS, so theports (wasm-mt, node)lane runs it, and inSAN_CXX_TESTS. It covers:src/cvc/tests/data/contoursread; a corpus of truncated and garbage files raises naming the file;xml_liteon its own.test_pycvc_contours.py, in ctest andSAN_PY_TESTS. It builds a stack, round-trips every format, checks keywords and the state round trip and the errors, and runs another Python thread during a read.src/cvc/utility.ci.ymlstays CRLF; it has 4 changed lines.Checked locally (Windows, MSVC 19.44, Release):
contour_stack_test: 22/22;pycvc_contours,pycvc_paramsandpycvc_jobspass;param_table_test,result_job_testandjob_intrinsics_testpass.Not checked locally: the wasm-mt build under node, Linux/macOS, and the writable-data scan. CI checks them.
Names follow §9 item 4 (still open).