|
Wildmeshing Toolkit
|
Functions | |
| _decode (el) | |
| read_vtu (path) | |
| boundary_edges (tris, inside) | |
| to3d (pts2) | |
| compact (nodes, edges) | |
| add_run (label, vtu, color, seen_inputs) | |
| main (argv) | |
Variables | |
| dict | VTK_DTYPE |
| list | PALETTE |
Polyscope viewer for topological_offset results.
Every layer is registered separately so it can be toggled in the UI: the input complex, and
per target distance the offset boundary and the offset region itself.
pip install polyscope numpy
python3 view_offset.py <outdir> [<outdir> ...]
Each <outdir> is a run_configs.py output directory -- it is scanned for */out.vtu. Pass the
construction and the optimized directory together to compare them in one window:
python3 view_offset.py plot_con plot_opt
Layers are named "<dir>/<run> offset" and "<dir>/<run> band", plus one "input <tag>" per input
tag. Every layer starts hidden, so the window opens empty and you switch on exactly what you want
to compare. Everything is drawn in the z=0 plane and viewed
orthographically along z, with planar navigation.
|
protected |
VTK inline 'binary' is base64 of [UInt64 nbytes][payload], uncompressed.
| view_offset.add_run | ( | label, | |
| vtu, | |||
| color, | |||
| seen_inputs | |||
| ) |
Register the offset band, its boundary, and every input tag present as its own layer. Which cell array means what is dataset-dependent -- the annots model calls the input complex tag_1 and the offset tag_5, the disk example is the other way round -- so nothing is hardcoded: `offset_tag` is written by the offset itself and names the band, and every other tag_* array is registered as an input layer under its own name.
| view_offset.boundary_edges | ( | tris, | |
| inside | |||
| ) |
Edges incident to exactly one `inside` triangle -- the boundary of that region.
| view_offset.compact | ( | nodes, | |
| edges | |||
| ) |
Keep only the nodes the edges actually use, and reindex. Polyscope draws a sphere at EVERY node of a curve network, so handing it the whole mesh vertex array renders thousands of stray dots for vertices no edge touches.
| view_offset.read_vtu | ( | path | ) |
-> (points Nx2, triangles Mx3, {cell array name: values})
| list view_offset.PALETTE |
| dict view_offset.VTK_DTYPE |