parq_blockmodel.utils.pyvista.categorical_utils.store_mapping_dict

parq_blockmodel.utils.pyvista.categorical_utils.store_mapping_dict(mesh, name, mapping)[source]

Store a mapping dictionary in the field_data of a PyVista mesh as a JSON string.

Parameters: - mesh: pyvista.DataSet (e.g., PolyData, UnstructuredGrid) - name: str, the key under which to store the mapping (e.g., “rock_type_map”) - mapping: dict, the dictionary to store (must be JSON-serializable)