gustaf.create.faces.vertex_normals#
- gustaf.create.faces.vertex_normals(faces, area_weighting=False, angle_weighting=False, return_original_ids=False)[source]#
Computes vertex normals and saves it in vertex_data. This calls inplace remove_unreferenced_vertices, but original IDs can be retrieved using the flag return_original_ids.
The normals are computed on the face-centers and their contributions are weighted and added to the vertex normals. Per default, all element faces that are adjacent to a vertex are added with equal contributions, but it is also possible to use weightings by area of the adjacent element (area_weighting) or by the angle between edges at the corner vertex.
- Parameters:
faces (Faces)
area_weighting (bool (false)) – Use the element area as a weighting to its respective normal contribution
angle_weighting (bool (false)) – Use the angle of between element edges as a weighting to its respective normal contribution
return_original_ids (bool (false)) – return the original ids in the global mesh
- Returns:
faces – faces with vertex_data[“normals”] computed.
- Return type: