sgio.ensure_node_ids#
- sgio.ensure_node_ids(mesh) None#
Ensure mesh has node IDs in point_data.
If mesh.point_data does not contain
'node_id'(or it is empty), generates sequential node IDs starting from 1.This is a Phase 4 utility intended to make node IDs always present so format-specific writers/readers can rely on them.
- Parameters:
mesh (SGMesh) – Mesh object to ensure has node IDs.
- Raises:
ValueError – If
mesh.point_data['node_id']exists but its length does not match the number of points.