mesh_tools¶
This file contains a selection of useful vector operations and mesh operations such as io, cleaning, converting etc.
This file is imported by carto_mesh.
Functions
|
Calculates the average normal of a dataframe of triangles. |
|
Uses built-in PyVista and PyMesh methods to clean the mesh. |
|
Calls upon meshtool in a shell command to clean a mesh. |
|
Makes mesh from VerticesSection.csv and TrianglesSection.csv Assigns tags in .mesh file as scalar data on this mesh Returns mesh with this scalar data. |
|
Calls upon meshtool in a shell command to convert a mesh. |
|
Calculates the distance between two coordinates. |
|
Gets all edge lengths from a PyMesh mesh (used in |
|
Extract the tags from TrianglesSection.csv as generated by |
|
Iterates mesh and replades points in the middle of two colinear edges. |
|
Converts PyVista mesh to PyMesh mesh |
|
Converts PyMesh mesh to PyVista mesh (PolyData) |
|
Normalizes a vector such that its length equals 1. |
|
Given an array of pymesh triangles, where these triangles are arrays of the form [ind1, ind2, ind3], converts these faces to the PyVista representation of the form [3, ind1_0, ind2_0, ind3_0, 3, ind1_1, ind2_1, ind3_1, 3 ...] |
|
Takes a pts file, adds point ID as extra data to each point, writes out to csv file. |
|
Given an array of pyvista faces, converts these faces to the Pymesh representation. |
|
Given an array of pyvista triangles, converts these faces to the PyMesh representation. |
|
Writes out a .smesh file with a hole in the middle. |
