- class VolumeMesh(dtcc.Geometry)[source]
Represents an unstructured tetrahedral mesh in 3D.
The VolumeMesh class represents a 3D volumetric mesh, which consists of vertices and tetrahedral cells.
Public members¶
- __str__()[source]
Return a string representation of the DTCC VolumeMesh, containing the number of vertices and cells.
- calculate_bounds() Bounds [source]
Calculate the bounding box of the mesh.
- property num_vertices : int
Get the number of vertices in the volume mesh.
- property num_cells : int
Get the number of cells or elements in the volume mesh.
- from_proto(pb: Geometry | bytes)[source]
Initialize VolumeMesh from a protobuf representation.
- VolumeMesh(...)
Initialize self. See help(type(self)) for accurate signature.
- __repr__()
Return repr(self).
- vertices : ndarray
- cells : ndarray
- markers : ndarray
- to_json() str
Return a JSON representation of the object.
-
classmethod add_methods(module, name=
None
) Adds methods from a module or function to the class.
-
classmethod print_methods(verbose=
False
) Print the methods that have been added to the class.