liblaf.melon
€
Modules:
-
barycentricâ -
cliâ -
compatâ -
extâ -
ioâ -
meshâ -
proximityâ -
tetâ -
transferâ -
triâ -
typingâ -
utilsâ
Classes:
-
NearestAlgorithmâ -
NearestAlgorithmPreparedâ -
NearestPointâ -
NearestPointOnSurfaceâ -
NearestPointOnSurfacePreparedâ -
NearestPointOnSurfaceResultâ -
NearestPointPreparedâ -
NearestPointResultâ -
NearestResultâ -
PVDWriterâ.
-
SeriesReaderâ -
SeriesWriterâ
Functions:
-
annotate_landmarksâ -
as_meshâ -
barycentric_to_pointsâ -
bounds_containsâ -
cell_neighborsâ -
compute_edges_lengthâ -
fast_wrappingâ -
geodesic_distanceâ -
geodesic_pathâ -
get_landmarks_pathâ -
get_polygons_pathâ -
load_landmarksâ -
load_polygonsâ -
mesh_fixâ -
nearestâ -
nearest_point_on_surfaceâ -
sample_barycentric_coordsâ -
save_landmarksâ -
save_polygonsâ -
tetwildâ -
transfer_tet_cellâ -
transfer_tet_cell_to_pointâ -
transfer_tri_cell_to_point_categoryâ -
transfer_tri_pointâ -
transfer_tri_point_to_tetâ
Attributes:
-
__version__(str) â -
__version_tuple__(tuple[int | str, ...]) â -
as_multi_block(ConverterDispatcher[MultiBlock]) â -
as_pointset(ConverterDispatcher[PointSet]) â -
as_polydata(ConverterDispatcher[PolyData]) â -
as_structured_grid(ConverterDispatcher[StructuredGrid]) â -
as_trimesh(ConverterDispatcher[Trimesh]) â -
as_unstructured_grid(ConverterDispatcher[UnstructuredGrid]) â -
load_multi_block(ReaderDispatcher[MultiBlock]) â -
load_polydata(ReaderDispatcher[PolyData]) â -
load_structured_grid(ReaderDispatcher[StructuredGrid]) â -
load_trimesh(ReaderDispatcher[Trimesh]) â -
load_unstructured_grid(ReaderDispatcher[UnstructuredGrid]) â -
saveâ
as_multi_block
module-attribute
€
as_multi_block: ConverterDispatcher[MultiBlock] = (
ConverterDispatcher(MultiBlock)
)
as_pointset
module-attribute
€
as_polydata
module-attribute
€
as_structured_grid
module-attribute
€
as_structured_grid: ConverterDispatcher[StructuredGrid] = (
ConverterDispatcher(StructuredGrid)
)
as_trimesh
module-attribute
€
as_unstructured_grid
module-attribute
€
as_unstructured_grid: ConverterDispatcher[
UnstructuredGrid
] = ConverterDispatcher(UnstructuredGrid)
load_multi_block
module-attribute
€
load_multi_block: ReaderDispatcher[MultiBlock] = (
ReaderDispatcher(MultiBlock)
)
load_polydata
module-attribute
€
load_structured_grid
module-attribute
€
load_structured_grid: ReaderDispatcher[StructuredGrid] = (
ReaderDispatcher(StructuredGrid)
)
load_trimesh
module-attribute
€
load_unstructured_grid
module-attribute
€
load_unstructured_grid: ReaderDispatcher[
UnstructuredGrid
] = ReaderDispatcher(UnstructuredGrid)
NearestAlgorithm
€
Bases: ABC
flowchart TD
liblaf.melon.NearestAlgorithm[NearestAlgorithm]
click liblaf.melon.NearestAlgorithm href "" "liblaf.melon.NearestAlgorithm"
Methods:
-
prepareâ
NearestAlgorithmPrepared
€
Bases: ABC
flowchart TD
liblaf.melon.NearestAlgorithmPrepared[NearestAlgorithmPrepared]
click liblaf.melon.NearestAlgorithmPrepared href "" "liblaf.melon.NearestAlgorithmPrepared"
Methods:
-
queryâ
NearestPoint
€
Bases: NearestAlgorithm
flowchart TD
liblaf.melon.NearestPoint[NearestPoint]
liblaf.melon.proximity._abc.NearestAlgorithm[NearestAlgorithm]
liblaf.melon.proximity._abc.NearestAlgorithm --> liblaf.melon.NearestPoint
click liblaf.melon.NearestPoint href "" "liblaf.melon.NearestPoint"
click liblaf.melon.proximity._abc.NearestAlgorithm href "" "liblaf.melon.proximity._abc.NearestAlgorithm"
Parameters:
-
(distance_threshold€float, default:0.1) â -
(ignore_orientation€bool, default:True) â -
(max_k€int, default:32) â -
(normal_threshold€float, default:-inf) â -
(workers€int, default:-1) â
Methods:
-
prepareâ
Attributes:
-
distance_threshold(float) â -
ignore_orientation(bool) â -
max_k(int) â -
normal_threshold(float) â -
workers(int) â
normal_threshold
class-attribute
instance-attribute
€
prepare
€
prepare(source: Any) -> NearestPointPrepared
Source code in src/liblaf/melon/proximity/_nearest_point.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
NearestPointOnSurface
€
Bases: NearestAlgorithm
flowchart TD
liblaf.melon.NearestPointOnSurface[NearestPointOnSurface]
liblaf.melon.proximity._abc.NearestAlgorithm[NearestAlgorithm]
liblaf.melon.proximity._abc.NearestAlgorithm --> liblaf.melon.NearestPointOnSurface
click liblaf.melon.NearestPointOnSurface href "" "liblaf.melon.NearestPointOnSurface"
click liblaf.melon.proximity._abc.NearestAlgorithm href "" "liblaf.melon.proximity._abc.NearestAlgorithm"
Parameters:
-
(distance_threshold€float, default:0.1) â -
(ignore_orientation€bool, default:False) â -
(normal_threshold€float | None, default:0.8) â
Methods:
-
prepareâ
Attributes:
normal_threshold
class-attribute
instance-attribute
€
prepare
€
prepare(source: Any) -> NearestPointOnSurfacePrepared
Source code in src/liblaf/melon/proximity/_nearest_point_on_surface.py
113 114 115 116 117 118 119 120 121 | |
NearestPointOnSurfacePrepared
€
Bases: NearestAlgorithmPrepared
flowchart TD
liblaf.melon.NearestPointOnSurfacePrepared[NearestPointOnSurfacePrepared]
liblaf.melon.proximity._abc.NearestAlgorithmPrepared[NearestAlgorithmPrepared]
liblaf.melon.proximity._abc.NearestAlgorithmPrepared --> liblaf.melon.NearestPointOnSurfacePrepared
click liblaf.melon.NearestPointOnSurfacePrepared href "" "liblaf.melon.NearestPointOnSurfacePrepared"
click liblaf.melon.proximity._abc.NearestAlgorithmPrepared href "" "liblaf.melon.proximity._abc.NearestAlgorithmPrepared"
Parameters:
-
(source_pv€PolyData) â -
(source€Mesh) â -
(distance_threshold€float) â -
(ignore_orientation€bool) â -
(normal_threshold€float | None) â
Methods:
-
queryâ
Attributes:
-
distance_threshold(float) â -
face_normals(Float[ndarray, 'M 3']) â -
ignore_orientation(bool) â -
length(float) â -
normal_threshold(float | None) â -
source(Mesh) â -
source_pv(PolyData) â
query
€
query(query: Any) -> NearestPointOnSurfaceResult
Source code in src/liblaf/melon/proximity/_nearest_point_on_surface.py
37 38 39 40 41 | |
NearestPointOnSurfaceResult
€
Bases: NearestResult
flowchart TD
liblaf.melon.NearestPointOnSurfaceResult[NearestPointOnSurfaceResult]
liblaf.melon.proximity._abc.NearestResult[NearestResult]
liblaf.melon.proximity._abc.NearestResult --> liblaf.melon.NearestPointOnSurfaceResult
click liblaf.melon.NearestPointOnSurfaceResult href "" "liblaf.melon.NearestPointOnSurfaceResult"
click liblaf.melon.proximity._abc.NearestResult href "" "liblaf.melon.proximity._abc.NearestResult"
Parameters:
-
(distance€Float[ndarray, Q]) â -
(missing€Bool[ndarray, Q]) â -
(nearest€Float[ndarray, 'Q 3']) â -
(barycentric€Float[ndarray, 'N 3']) â -
(triangle_id€Integer[ndarray, N]) â
Attributes:
-
barycentric(Float[ndarray, 'N 3']) â -
distance(Float[ndarray, ' Q']) â -
missing(Bool[ndarray, ' Q']) â -
nearest(Float[ndarray, 'Q 3']) â -
triangle_id(Integer[ndarray, ' N']) â
NearestPointPrepared
€
Bases: NearestAlgorithmPrepared
flowchart TD
liblaf.melon.NearestPointPrepared[NearestPointPrepared]
liblaf.melon.proximity._abc.NearestAlgorithmPrepared[NearestAlgorithmPrepared]
liblaf.melon.proximity._abc.NearestAlgorithmPrepared --> liblaf.melon.NearestPointPrepared
click liblaf.melon.NearestPointPrepared href "" "liblaf.melon.NearestPointPrepared"
click liblaf.melon.proximity._abc.NearestAlgorithmPrepared href "" "liblaf.melon.proximity._abc.NearestAlgorithmPrepared"
Parameters:
-
(source€PointSet) â -
(tree€KDTree) â -
(distance_threshold€float) â -
(ignore_orientation€bool) â -
(max_k€int) â -
(normal_threshold€float) â -
(workers€int) â
Methods:
-
queryâ
Attributes:
-
distance_threshold(float) â -
ignore_orientation(bool) â -
max_k(int) â -
normal_threshold(float) â -
source(PointSet) â -
tree(KDTree) â -
workers(int) â
query
€
query(query: Any) -> NearestPointResult
Source code in src/liblaf/melon/proximity/_nearest_point.py
30 31 32 33 34 | |
NearestPointResult
€
Bases: NearestResult
flowchart TD
liblaf.melon.NearestPointResult[NearestPointResult]
liblaf.melon.proximity._abc.NearestResult[NearestResult]
liblaf.melon.proximity._abc.NearestResult --> liblaf.melon.NearestPointResult
click liblaf.melon.NearestPointResult href "" "liblaf.melon.NearestPointResult"
click liblaf.melon.proximity._abc.NearestResult href "" "liblaf.melon.proximity._abc.NearestResult"
Parameters:
-
(distance€Float[ndarray, Q]) â -
(missing€Bool[ndarray, Q]) â -
(nearest€Float[ndarray, 'Q 3']) â -
(vertex_id€Integer[ndarray, N]) â
Attributes:
NearestResult
€
PVDWriter
€
.
References
Parameters:
-
(clear€bool, default:False) â -
(file€Path, default:PosixPath('animation.pvd')) â -
(fps€float, default:30.0) â
Attributes:
-
datasets(list[PVDDataSet]) âBuilt-in mutable sequence.
If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.
Methods:
-
__attrs_post_init__â -
appendâ -
endâ
datasets
class-attribute
instance-attribute
€
file
class-attribute
instance-attribute
€
__attrs_post_init__
€
__attrs_post_init__() -> None
Source code in src/liblaf/melon/io/paraview/_pvd_writer.py
39 40 41 | |
append
€
Source code in src/liblaf/melon/io/paraview/_pvd_writer.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
end
€
end() -> None
Source code in src/liblaf/melon/io/paraview/_pvd_writer.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | |
SeriesReader
€
Bases: Sequence[T]
flowchart TD
liblaf.melon.SeriesReader[SeriesReader]
click liblaf.melon.SeriesReader href "" "liblaf.melon.SeriesReader"
Parameters:
Methods:
-
__getitem__â -
__len__â
Attributes:
-
file(Path) â -
folder(Path) â -
loader(Callable[[Path], T]) â -
series(Series) â -
time_values(list[float]) â
Source code in src/liblaf/melon/io/paraview/series/_reader.py
24 25 26 | |
__getitem__
€
Source code in src/liblaf/melon/io/paraview/series/_reader.py
32 33 34 35 36 37 38 | |
SeriesWriter
€
SeriesWriter(
file: StrPath,
/,
*,
clear: bool = False,
fps: float = 30.0,
step: float | None = None,
)
Bases: Sequence[File], AbstractContextManager
flowchart TD
liblaf.melon.SeriesWriter[SeriesWriter]
click liblaf.melon.SeriesWriter href "" "liblaf.melon.SeriesWriter"
Parameters:
Methods:
-
__enter__â -
__exit__â -
__getitem__â -
__len__â -
appendâ -
endâ -
saveâ -
startâ
Attributes:
-
ext(str) â -
file(Path) â -
folder(Path) â -
fps(float) â -
name(str) â -
series(Series) â -
step(float) â -
time(float) â
Source code in src/liblaf/melon/io/paraview/series/_writer.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
__enter__
€
__enter__() -> Self
Source code in src/liblaf/melon/io/paraview/series/_writer.py
66 67 68 | |
__exit__
€
__exit__(
exc_type: type[BaseException] | None,
exc_value: BaseException | None,
traceback: TracebackType | None,
) -> None
Source code in src/liblaf/melon/io/paraview/series/_writer.py
70 71 72 73 74 75 76 | |
__getitem__
€
Source code in src/liblaf/melon/io/paraview/series/_writer.py
60 61 | |
__len__
€
__len__() -> int
Source code in src/liblaf/melon/io/paraview/series/_writer.py
63 64 | |
append
€
Source code in src/liblaf/melon/io/paraview/series/_writer.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | |
end
€
end() -> None
Source code in src/liblaf/melon/io/paraview/series/_writer.py
116 117 | |
save
€
save() -> None
Source code in src/liblaf/melon/io/paraview/series/_writer.py
119 120 121 122 | |
start
€
start() -> None
Source code in src/liblaf/melon/io/paraview/series/_writer.py
124 125 | |
annotate_landmarks
€
annotate_landmarks(
left: Any,
right: Any,
*,
left_landmarks: Float[ArrayLike, "L 3"] | None = None,
right_landmarks: Float[ArrayLike, "L 3"] | None = None,
) -> tuple[Float[ndarray, "L 3"], Float[ndarray, "L 3"]]
Source code in src/liblaf/melon/ext/wrap/_annotate_landmarks.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |
as_mesh
€
as_mesh(mesh: Any) -> PolyData | UnstructuredGrid
Source code in src/liblaf/melon/io/pyvista/_convert.py
11 12 13 14 15 16 | |
barycentric_to_points
€
barycentric_to_points(
cells: Float[ArrayLike, "*N B D"],
barycentric: Float[ArrayLike, "*N B"],
) -> Float[Array, "*N D"]
Source code in src/liblaf/melon/barycentric/_points.py
6 7 8 9 10 11 12 13 14 | |
bounds_contains
€
bounds_contains(
bounds: Float[ArrayLike, "2 3"]
| Float[ArrayLike, " 6"]
| BoundsTuple,
points: Float[ArrayLike, "N 3"],
) -> Bool[Array, " N"]
Source code in src/liblaf/melon/_src/bounds.py
8 9 10 11 12 13 14 15 16 | |
cell_neighbors
€
cell_neighbors(mesh_or_cells: Any) -> Integer[Array, 'N 2']
Source code in src/liblaf/melon/_src/graph.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | |
compute_edges_length
€
Source code in src/liblaf/melon/_src/edges.py
6 7 8 9 | |
fast_wrapping
€
fast_wrapping(
source: Any,
target: Any,
*,
reflection: bool = True,
translation: bool = True,
scale: bool = True,
source_landmarks: Float[ArrayLike, "L 3"] | None = None,
target_landmarks: Float[ArrayLike, "L 3"] | None = None,
free_polygons_floating: Bool[ArrayLike, " full"]
| Integer[ArrayLike, " free"]
| None = None,
verbose: bool = False,
) -> PolyData
Source code in src/liblaf/melon/tri/_wrapping.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | |
geodesic_distance
€
Source code in src/liblaf/melon/_src/geodesic.py
11 12 13 14 15 16 17 18 19 20 21 | |
geodesic_path
€
Source code in src/liblaf/melon/_src/geodesic.py
24 25 26 27 28 | |
get_landmarks_path
€
Source code in src/liblaf/melon/io/wrap/landmarks/_utils.py
5 6 7 8 9 | |
get_polygons_path
€
Source code in src/liblaf/melon/io/wrap/polygons/_utils.py
5 6 7 8 9 | |
load_landmarks
€
Source code in src/liblaf/melon/io/wrap/landmarks/_reader.py
12 13 14 15 16 17 | |
load_polygons
€
load_polygons(path: StrPath) -> Integer[ndarray, ' N']
Source code in src/liblaf/melon/io/wrap/polygons/_reader.py
17 18 19 20 | |
mesh_fix
€
mesh_fix(
mesh: Any,
*,
check: bool = True,
joincomp: bool = False,
remove_smallest_components: bool = True,
) -> PolyData
Source code in src/liblaf/melon/ext/_mesh_fix.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
nearest
€
Source code in src/liblaf/melon/proximity/_nearest.py
21 22 23 24 25 26 27 | |
nearest_point_on_surface
€
nearest_point_on_surface(
source: Any,
target: Any,
*,
distance_threshold: float = 0.1,
ignore_orientation: bool = True,
normal_threshold: float | None = 0.8,
) -> NearestPointOnSurfaceResult
Source code in src/liblaf/melon/proximity/_nearest_point_on_surface.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |
sample_barycentric_coords
€
sample_barycentric_coords(
shape: Sequence[int], *, seed: int | ArrayLike = 0
) -> Float[Array, "*N D"]
Source code in src/liblaf/melon/barycentric/_sample.py
8 9 10 11 12 13 14 15 16 17 18 | |
save_landmarks
€
Source code in src/liblaf/melon/io/wrap/landmarks/_writer.py
12 13 14 15 16 17 18 19 20 | |
save_polygons
€
save_polygons(
path: str | PathLike[str],
polygons: Bool[ArrayLike, " N"]
| Integer[ArrayLike, " N"],
) -> None
Source code in src/liblaf/melon/io/wrap/polygons/_writer.py
12 13 14 15 16 17 18 19 20 | |
tetwild
€
tetwild(
surface: Any,
*,
fix_winding: bool = True,
lr: float | None = None,
epsr: float | None = None,
level: int | None = None,
color: bool = False,
coarsen: bool = False,
csg: bool = False,
**kwargs,
) -> UnstructuredGrid
Source code in src/liblaf/melon/ext/_tetwild.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |
transfer_tet_cell
€
transfer_tet_cell(
source: UnstructuredGrid,
target: UnstructuredGrid,
data: str | Iterable[str] | None = None,
**kwargs,
) -> UnstructuredGrid
Source code in src/liblaf/melon/transfer/_tet_cell.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | |
transfer_tet_cell_to_point
€
transfer_tet_cell_to_point(
source: UnstructuredGrid,
target: UnstructuredGrid,
data: str | Iterable[str] | None = None,
*,
categorical: bool = False,
snap_to_closest_point: bool = True,
tolerance: float | None = 1e-06,
**kwargs,
) -> UnstructuredGrid
Source code in src/liblaf/melon/transfer/_tet_cell_to_point.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
transfer_tri_cell_to_point_category
€
transfer_tri_cell_to_point_category(
source: Any,
target: Any,
*,
data: str | Iterable[str] | None = None,
fill: Any | Mapping[str, Any] | None = None,
nearest: NearestPointOnSurface | None = None,
) -> Any
Source code in src/liblaf/melon/transfer/_tri_cell_to_point_category.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |
transfer_tri_point
€
transfer_tri_point(
source: Any,
target: Any,
*,
data: str | Iterable[str] | None = None,
fill: Any | Mapping[str, Any] | None = None,
nearest: NearestPointOnSurface | None = None,
) -> Any
Source code in src/liblaf/melon/transfer/_tri_point.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | |
transfer_tri_point_to_tet
€
transfer_tri_point_to_tet(
source: Any,
target: Any,
*,
data: str | Iterable[str] | None = None,
fill: Any | Mapping[str, Any] | None = None,
nearest: NearestPointOnSurface | None = None,
point_id: str | None = None,
) -> UnstructuredGrid
Source code in src/liblaf/melon/transfer/_tri_point_to_tet.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |