upxo.meshing.gbconformant.d3v2p0.grain_subset_view module
View a chosen subset of grains of a saved closed RVE surface.
The view can open in a separate process (launch_grain_subset_view), so a notebook continues without waiting for the window to close. Selection helpers pick grains by volume percentile.
- Command line:
python -m upxo.meshing.gbconformant.d3v2p0.grain_subset_view SURFACE.vtp IDS.json [–title T] [–screenshot PNG]
IDS.json holds a list of grain IDs.
- upxo.meshing.gbconformant.d3v2p0.grain_subset_view.grain_subset_mesh(surface, grain_ids)[source]
Triangles bounding the given grains, as a PolyData with a ‘grain’ label.
surface: PolyData with cell arrays grain_a, grain_b and is_rve_cap (as saved by the CM pipeline). A triangle between two selected grains appears once for each, so every selected grain is a closed shell.
- upxo.meshing.gbconformant.d3v2p0.grain_subset_view.grains_above_percentile(volumes, percentile=90.0)[source]
Grain IDs whose volume is above the given percentile of all grain volumes.
volumes: {grain id: volume} (e.g. a tet report’s per_grain volumes or a surface report’s enclosed_grain_volumes; values may be dicts with ‘volume’).
- upxo.meshing.gbconformant.d3v2p0.grain_subset_view.show_grain_subset(surface, grain_ids, *, title='Grain subset', note=None, rve_dimensions=None, screenshot=None, seed=0)[source]
Open an interactive window (blocks until it is closed).