m3sh.hds.Mesh.
add_vertex#
- Mesh.add_vertex(point, *args, **kwargs)#
Create and add new vertex.
The first vertex added to a mesh determines the dimensionality of the embedding space.
- Parameters:
- pointarray_like or float
Vertex coordinates.
- *args
Variable number of scalars that are interpreted as vertex coordinates, see example.
- **kwargs
Arbitrary number of attribute name and value pairs.
- Returns:
- Vertex
The newly created
Vertexinstance.
Notes
When adding a new vertex all vertex data blocks are extended by a corresponding value: either by using the default value specified when the data block was added, or by using a value provided as keyword argument. Values specified as keyword arguments that don’t fit this pattern are added as ordinary instance attributes.
Examples
The statement
>>> mesh.add_vertex([1.0, 2.0, 3.0])
is equivalent to
>>> mesh.add_vertex(1.0, 2.0, 3.0)