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

fields

Nodal data.

Type

dict

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.__init__(shape)[source]
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
  • filename (str) – file name. Extension guides file type (any acceptable by yamio).

  • elem_type (str) – ‘tri’, ‘quad’, ‘tetra’, ‘hexahedron’.

  • kwargs – will be passed to writer.write method.

Notes

hip does not allow 3d surface meshes.

Shell.get_mesh(elem_type)[source]

Returns a yamio.Mesh.

abstract Shell.replicate(shape)[source]
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.