Mesh
- class m3sh.hds.Mesh(points=None, faces=None, *, name=None)[source]
Mesh kernel.
The combinatorics of a mesh can be built by reading from a file or by converting a sequence of vertex coordinates and a sequence of face definitions to its halfedge representation.
- Parameters:
- Raises:
NonManifoldError – When trying to initialize a mesh from non-manifold data.
Note
The NumPy glossary states the following about array_like data representations:
Any scalar or sequence that can be interpreted as
numpy.ndarray. In addition to ndarrays and scalars this category includes lists (possibly nested and with different element types) and tuples. Any argument accepted bynumpy.array()is array_like.Attributes
Face list.
Halfedge dictionary.
Name property.
Vertex coordinate array.
Mesh size.
Vertex list.
Methods
add_face(face, *args, **kwargs)Create and add new face.
add_face_data(name, attr, data[, default])Add face data.
add_halfedge_data(name, attr, data[, default])Add halfedge data.
add_vertex(point, *args, **kwargs)Create and add new vertex.
add_vertex_data(name, attr, data[, default])Add vertex data.
clean()Garbage collection.
clear()Clear all mesh items.
clone(mesh)In-place mesh copy.
collapse_halfedge(halfedge[, point, ...])Perform edge collapse.
copy()Return mesh copy.
delete_face(face[, del_isolated_verts])Delete face.
delete_halfedge(halfedge[, del_isolated_verts])Merge adjacent faces.
delete_vertex(vertex[, fill])Delete vertex.
flip_halfedge(halfedge, *[, check])Flip halfedge.
from_grid(*arr[, triangulate, order, name])Alternative constructor.
insert_halfedge(face, origin, target)Insert face diagonal.
read(filename, *args[, merge, quiet])Read mesh from file.
split_halfedge(halfedge[, point, triangulate])Split halfedge.
write(filename[, quiet])Write mesh to file.
Special methods
__getitem__(index)__iter__()Face iterator.