Extracting additional OCC entity information (surface normal, vertices, etc..)
Hi,
I was just wondering if it is possible to extract entity information such as vertices and normals from a 2d face geometry imported from a step file?
In the following example I am looping over the different faces from an imported step file. I would like to identify each entity based on entity information such as entity name (if I am able to give a specific face a name before export), vertices and normal vector. I found a way to extract center of mass, but that was about it. I have tried looking at the documentation and previous issues, but so far I've been unable to find exactly what I am looking for.
import gmsh
# Import model from step file
gmsh.open("myfile.stp")
model = gmsh.model
# loop over all 2d faces
for ent in model.occ.getEntities(2):
# I am able to get center of mass.
r = model.occ.getCenterOfMass(2, ent)
# But how do I grab information such as vertices and normal vector from the entity?
Alternatively I guess I could make 3 different step files and merge them 1 by 1 and hope that each imported geometry can be contained in a single physical group? If that is the only option I would appreciate any help or advice to do that as I've tried but I was unsuccessful in merging my geometries. The ultimate goal is to identify which part of a beam cross section (using shell elements) has a given section thickness and property.
Best regards Kristoffer