Problem with getting normals with pré-created MSH file.
I'm trying to get normals at surface using getNormals, and inpired by 'x5.py' tutorial, i'm using gmsh.model.mesh.getNodes() to get the nodes parametric coordinates of each surface, but i'm getting an empty array for parametrics coordinates and therefore, getNormals() is returning another empty array. Here is a minimal code to replicate my issue:
import gmsh
gmsh.initialize()
gmsh.open('slab_3D.msh')
for e in gmsh.model.getEntities(2):
s = e[1]
tags, coord, param = gmsh.model.mesh.getNodes(2, s, True)
norm = gmsh.model.getNormal(s, param)
I'm attaching the .msh file i'm using. It is called 'slab_3D.msh' and it is a cube with 4 hexahedrons as elements.slab_3D.msh
What is causing this behavior? Do i need to use getNormals soon after i create my geometry and mesh?
Also, i'm create internal faces using another tutorial (x7.py) and i'm getting the same issue: parametric coordinates array is returned empty.
Edited by Lamparejo