ThickShell¶
- class ThickShell(init_xyz, normals, width_points, n_layers=2, shift=0.0)[source]¶
Bases:
kokiy.shell.Shell
A 3D shell object build by extruding a xyz mesh in the normals direction.
- Parameters
init_xyz (numpy.ndarray) – 2d mesh (e.g. from Shell2D).
normals (numpy.ndarray) – 2d mesh normals with same shame as init_xyz.
width_points (numpy.ndarray) – Width profile or width matrix.
n_layers (
int
) – Number of layers.shift (
float
) – Additional depth.
- shape¶
Shape of the shell.
- Type
array-like
Methods
__init__
(init_xyz, normals, width_points[, ...])bake_from_shell
(shell, width_points[, ...])dump
([filename, fields])Dump shell geometrical and physical properties into hdf file.
dump_shell
([name, fields])Dump shell geometrical properties into hdf file.
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)Creates a similar instance, but possibly with different shape.
set_mask_on_shell
(point_cloud, tol)Create a mask on the shell from a point cloud.
Attributes
dz
z-direction spacing matrix of shape self.shape.
geom_type
xyz
xyz matrix of shape (*self.shape, 3).
Methods¶
- ThickShell.dump(filename='shell', fields=None)[source]¶
Dump shell geometrical and physical properties into hdf file.
- ThickShell.dump_shell(name='shell', fields=None)[source]¶
Dump shell geometrical properties into hdf file.
- Parameters
Deprecated since version 0.2.0: Use dump instead.
- ThickShell.export_geo(filename, show_all=False, **kwargs)¶
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.
- ThickShell.export_mesh(filename, elem_type, **kwargs)¶
Exports mesh.
- Parameters
Notes
hip does not allow 3d surface meshes.
- ThickShell.get_mesh(elem_type)¶
Returns a yamio.Mesh.
- ThickShell.set_mask_on_shell(point_cloud, tol)¶
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.