Skip to content

Atomic-Industries/swe-interview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

How to use gmsh/meshio:

Installation

gmsh: sudo apt install gmsh

meshio: pip install "meshio[all]"

Loading a mesh

import meshio
mesh = meshio.read("<your_file>.msh")

Getting the surface triangles

# this makes an Nx3 matrix of the vertices in each triangle
# the vertices can index `mesh.points` to get the vertex coordinates
triangles = np.concatenate([ cell.data for cell in mesh.cells if cell.type == "triangle"])

Writing gmsh files

mesh.write("<your_file>.msh",file_format="gmsh22")

for more detail check out meshio, pyvista, and gmsh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published