The Line in BoundingBox
only finds the lines entirely inside the box. Is there any way to find the lines that are just passing through it?
I have generated a mesh using GMSH GUI.
I'd like to open it in python and list the vertices using the following command:
import gmsh
gmsh.initialize()
gmsh.open("test.msh")
# Get all the mesh vertices
vertices = gmsh.model.mesh.getNodes()
# Print the vertex coordinates
for vertex in vertices[1]:
vertex_id = vertex[0]
x = vertex[1]
y = vertex[2]
z = vertex[3]
print(f"Vertex ID: {vertex_id}, Coordinates: ({x}, {y}, {z})")
# Finalize GMSH
gmsh.finalize()
gmsh.open()
reports the followng message:
Info : Reading 'test.msh'...
Info : 6 entities
Info : 30 nodes
Info : 56 elements
Info : Done reading 'test.msh'
but gmsh.model.mesh.getNodes()
returns an empty list.