Shell¶
- class Shell(shape)[source]¶
Bases:
object
Abstract shell.
- Parameters
shape (numpy.ndarray) – Shape of the shell.
- shape¶
Shape of the shell.
- Type
array-like
Methods
__init__
(shape)export_geo
(filename[, show_all])Exports simplified boundary representation for visualization.
export_mesh
(filename, elem_type, **kwargs)Exports mesh.
get_mesh
(elem_type)Returns a yamio.Mesh.
replicate
(shape)set_mask_on_shell
(point_cloud, tol)Create a mask on the shell from a point cloud.
Methods¶
- Shell.export_geo(filename, show_all=False, **kwargs)[source]¶
Exports simplified boundary representation for visualization.
Uses ensight gold format.
- Parameters
show_all (
bool
) – Show all boundary edges?kwargs – will be passed to writer.write method.
Notes
If goal is to proper export original mesh use export_mesh.
- Shell.export_mesh(filename, elem_type, **kwargs)[source]¶
Exports mesh.
- Parameters
Notes
hip does not allow 3d surface meshes.
- Shell.set_mask_on_shell(point_cloud, tol)[source]¶
Create a mask on the shell from a point cloud.
- Parameters
point_cloud (numpy.ndarray) – Coordinates with shape (n, 3).
tol (
float
) – Tolerance.Notes
The mask value is 0 for shell points located near cloud points. Otherwise the mask value is 1.