mesh3d_from_stl¶
- formatwriter.mesh3d_from_stl(output_dir: str, output_prefix: str, max_mesh_size: float = 5.0, min_mesh_size: float = 2.5, export_vtk: bool = True, save_centroids: bool = False)¶
Generates a 3D FE mesh using linear tetrahedrons from a 3D .stl file using the GMSH library. It is saved in a .dat file. Returns two arrays containing node coordinates and element connectivity, respectively.
- Parameters:
max_mesh_size (float) – Maximum and minimum size for the elements
min_mesh_size (float) – Maximum and minimum size for the elements
output_prefix (string) – Prefix for output files
output_dir (string) – Destination folder
export_vtk (boolean) – If True exports the mesh as a .vtk file
save_centroids (boolean) – If True saves the element centroids coordinates as a .csv file.