wolph / numpy-stl

Simple library to make working with STL files (and 3D objects in general) fast and easy.
http://numpy-stl.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
605 stars 103 forks source link

Help : Best way to compute normals #153

Closed Optimox closed 3 years ago

Optimox commented 3 years ago

Hi, thanks for the library!

I'm trying to construct an stl file from a list of vertices and faces.

The example given in the doc seems ok but:

Thank you!

wolph commented 3 years ago

You can make the mesh recalculate them using mesh.update_normals()

Additionally, all load/open methods support a flag for that as well: https://numpy-stl.readthedocs.io/en/latest/stl.html#stl.Mesh

Optimox commented 3 years ago

Yes thank you, I computed the normals by hand but flags are useful.

Cheers Seb