base.py¶
denest
¶
Recursively search a nested MultiBlock for the data MultiBlock.
Parameters¶
nested_mesh: MultiBlock
Source MultiBlock assumed to be nested to an unknown level.
Returns¶
MultiBlock:
The lowest-level denested MultiBlock whose child is actual data.
Source code in erosionfront/topo/analysis.py
patch_up
¶
Rebuild the raw multipart mesh into a single mesh with z vertical.
The 3D topo mesh is assumed exported from Blender, with actual mesh doubly nested and with y axis vertical.
This PyVista-format mesh is a multiblock polydata object, meaning that the mesh is in multiple pieces. As a result, the mesh rotation and assembly has to be done by rotating and appending one block at a time to a fresh multiblock object.
Parameters¶
raw_mesh: MultiBlock
Mesh in multiple pieces as pyvista MultiBlock.
Returns¶
MultiBlock: Single mesh object with correct orientation (z up).
Source code in erosionfront/topo/analysis.py
Geometry
dataclass
¶
Geometry(
mesh: MultiBlock,
x_vector: NDArray | None = None,
y_vector: NDArray | None = None,
rotation_matrix: Callable[[float], NDArray] | None = None,
grid: tuple[dict, dict] | None = None,
)
Slicing geometry.
Parameters¶
mesh: MultiBlock
3D topo as pyvista MultiBlock
Attributes¶
x_vector: NDArray | None = None X y_vector: NDArray | None = None X rotation_matrix: Callable[[float], NDArray] | None = None X grid: tuple[dict, dict] | None = None X
Methods:
__post_init__
¶
Source code in erosionfront/topo/analysis.py
ProfileData
dataclass
¶
ProfileData(
mesh: MultiBlock,
geometry: Geometry,
name: str,
orientation: float,
offset: tuple[float, float, float],
mid_points: NDArray | None = None,
normals: NDArray | None = None,
parallels: NDArray | None = None,
tilts: list[float | None] | None = None,
tilts_r: list[float | None] | None = None,
)
XXX
Parameters¶
mesh: MultiBlock X geometry: Geometry X name: str X orientation: float X offset: tuple[float,float,float] X
Attributes¶
mid_points: NDArray | None = None X normals: NDArray | None = None X parallels: NDArray | None = None X tilts: list[float | None] | None = None X tilts_r: list[float | None] | None = None X
-
Python package
topo
Profiles
Methods:
compute_angles
¶
X
Parameters¶
use_normals: bool=False X do_flip_orientation: bool=False X
Source code in erosionfront/topo/analysis.py
extract_slice_chords
¶
Source code in erosionfront/topo/analysis.py
slicing
¶
Source code in erosionfront/topo/analysis.py
Profiles
dataclass
¶
Profiles(
mesh: MultiBlock,
geometry: Geometry,
info: dict[int, dict],
data: dict[int:ProfileData] | None = None,
)
Tools for generating 2D slices through 3D topo in MultiBlock mesh format.
Parameters¶
mesh: MultiBlock 3D topo mesh. geometry: Geometry Basic geometry of 3D topo mesh. info: dict[int, dict] Info on each desired profile, inc. name, orientation, offset.
Attributes¶
data: dict[int: ProfileData] | None = None Instances of profiles.
- Python package visualization
Methods:
-
__post_init__–Generate profiles per the name/orientation/offset info provided.
-
perform_angles_computation–Compute surface angle information at chords along profiles.
-
perform_chord_extraction–Extract sets of chords (point sequences) along profiles.
-
perform_slicing–Perform slicing along chosen profiles.
__post_init__
¶
Generate profiles per the name/orientation/offset info provided.
Attributes¶
data: dict[int: ProfileData] Instances of profiles.
Source code in erosionfront/topo/analysis.py
perform_angles_computation
¶
Compute surface angle information at chords along profiles.