Corresponds to C++ class walberla::geometry::TriangleMesh
Number of triangles.
Number of vertices.
Number of vertex normals.
Returns the axis aligned bounding box of the mesh.
Volume of the Mesh.
Scales the complete mesh by the given factor.
Scales the mesh by different factors in x,y,z direction.
Parameters: factors – tuple or list with 3 entries corresponding to x,y,z factors
exchangeAxes(xAxisId, yAxisId, zAxisId)¶
Permutes the coordinate order of each vertex. e.g.
m.exchangeAxes(0,2,1)exchanges z and y axis.
removeDuplicateVertices(tolerance = 1e-4)¶
Merges vertices with a distance smaller than tolerance
merge(other, offset=(0, 0, 0 ))¶
Merges another mesh into the current mesh. During the merging all vertices of the other mesh are shifted by the given offset.
Saves the mesh to a file. The mesh format is deduced using the filename extension. Supported formats are: obj,pov,off and vtp.
Loads mesh from a file. The mesh format is deduced using the filename extension. Supported formats are obj, pov and off.
Parameters: broadcast – If True the mesh is read on the root system only and broadcasted to all other processes using MPI to reduce file system load.