aerosandbox.geometry.mesh_utilities =================================== .. py:module:: aerosandbox.geometry.mesh_utilities Functions --------- .. autoapisummary:: aerosandbox.geometry.mesh_utilities.stack_meshes aerosandbox.geometry.mesh_utilities.convert_mesh_to_polydata_format Module Contents --------------- .. py:function:: stack_meshes(*meshes) Takes in a series of tuples (points, faces) and merges them into a single tuple (points, faces). All (points, faces) tuples are meshes given in standard format. :param \*meshes: Any number of mesh tuples in standard (points, faces) format. Returns: Points and faces of the combined mesh. Standard unstructured mesh format: A tuple of `points` and `faces`, where: * `points` is a `n x 3` array of points, where `n` is the number of points in the mesh. * `faces` is a `m x 3` array of faces if `method` is "tri", or a `m x 4` array of faces if `method` is "quad". * Each row of `faces` is a list of indices into `points`, which specifies a face. .. py:function:: convert_mesh_to_polydata_format(points, faces) PyVista uses a slightly different convention for the standard (points, faces) format as described above. They give `faces` as a single 1D vector of roughly length (M*3), or (M*4) in the case of quadrilateral meshing. Basically, the mesh displayer goes down the `faces` array, and when it sees a number N, it interprets that as the number of vertices in the following face. Then, the next N entries are interpreted as integer references to the vertices of the face. This has the benefit of allowing for mixed tri/quad meshes. :param points: `points` array of the original standard-format mesh :param faces: `faces` array of the original standard-format mesh :returns: (points, faces), except that `faces` is now in a pyvista.PolyData compatible format.