- class Mesh(dtcc.Geometry)[source]
Represents an unstructured triangular mesh in 3D.
The Mesh class represents a 3D triangular mesh, which consists of vertices and triangular faces.
Public members¶
- property num_vertices : int
Get the number of vertices in the mesh.
- calculate_bounds()[source]
Calculate the bounding box of the mesh.
- property num_faces : int
Calculate the number of faces in the mesh.
- from_proto(pb: Geometry | bytes)[source]
Initialize Mesh from a protobuf representation.
- Mesh(_bounds: ~dtcc_model.geometry.bounds.Bounds = <factory>, ...)
Initialize self. See help(type(self)) for accurate signature.
- __repr__()
Return repr(self).
- __eq__(other)
Return self==value.
- save(path)
- vertices : ndarray
- faces : ndarray
- markers : ndarray
- property bounds
- to_json() str
Return a JSON representation of the object.
- copy(**kwargs)
Return a copy 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.