New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create mesh-complete folder using Python API #1049
Comments
I've modified the Note that mesh faces don't have a |
Thanks @ktbolt! Does this also add |
@menon-karthik I can add normals, do you need Cell or Point normals? I can also add |
The normals written out by the GUI are cell normals, so let's do that. My meshes also have |
I've added creating a |
Is your feature request related to a problem? Please describe.
We don't currently seem to have a way to create an equivalent
mesh-complete
folder using the python API like you can with the GUI. We can use the API to import a model, generate a mesh, and write out the full volume (.vtu) and surface (.vtp) meshes. For example, this can be done using the below code snippet:But there doesn't seem to be functionality to write out the surface meshes corresponding to
walls-combined.vtp
and all the other mesh faces while easily preserving theNormals
,ModelFaceID
andModelRegionID
arrays that are already inmesh-complete.mesh.vtu
andmesh-complete.exterior.vtp
. For example, I tried usingmesher.get_face_polydata(wall_face_id)
to extract the surface mesh forwalls-combined.vtp
but this does not retain the arrays mentioned above.Describe the solution you'd like
It would be great to have functionality that can go from the mesh generated with
mesher.generate_mesh(options)
to a fullmesh-complete
folder that is analogous to what you would get from using the GUI.Describe alternatives you've considered
An alternative is to manually create the
Normals
,ModelFaceID
andModelRegionID
arrays for each face by copying the data from the full surface mesh returned bymesher.get_surface()
. But this is clunky.The text was updated successfully, but these errors were encountered: