liblaf.melon.xfer
¶
Transfer arrays between related triangular and tetrahedral meshes.
Functions:
-
tri_cell_to_tri_point–Sample triangle cell arrays onto target surface points.
-
tri_point_to_tet_point–Transfer point arrays from a surface to nearest tetrahedral points.
-
tri_point_to_tri_point–
tri_cell_to_tri_point
¶
tri_cell_to_tri_point(source: PolyData, target: PolyData, names: Iterable[str], *, tolerance: float | None = None, snap_to_closest_point: bool = True) -> PolyData
Sample triangle cell arrays onto target surface points.
Parameters:
-
source(PolyData) –Surface carrying the source cell-data arrays.
-
target(PolyData) –Surface whose points receive sampled point-data arrays.
-
names(Iterable[str]) –Cell-data array names to transfer.
-
tolerance(float | None, default:None) –Optional PyVista sampling tolerance.
-
snap_to_closest_point(bool, default:True) –Forwarded to [
pyvista.DataSetFilters.sample][].
Returns:
-
PolyData–The mutated
targetmesh.
Source code in src/liblaf/melon/xfer/_tri_cell_to_tri_point.py
tri_point_to_tet_point
¶
tri_point_to_tet_point(source: PolyData, target: UnstructuredGrid, fill_values: Mapping[str, Any]) -> UnstructuredGrid
Transfer point arrays from a surface to nearest tetrahedral points.
Parameters:
-
source(PolyData) –Surface with source point-data arrays.
-
target(UnstructuredGrid) –Tetrahedral mesh whose point data should be filled.
-
fill_values(Mapping[str, Any]) –Mapping from point-data array name to default value for target points that do not receive a nearest source value.
Returns:
-
UnstructuredGrid–The mutated
targetmesh.
Source code in src/liblaf/melon/xfer/_tri_point_to_tet_point.py
tri_point_to_tri_point
¶
tri_point_to_tri_point(source: PolyData, target: PolyData, names: Iterable[str] | None = None, *, max_dist: float = 0.01, normal_threshold: float = 0.8) -> PolyData