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
628 stars 107 forks source link

Mesh faces #184

Closed AxoyTO closed 2 years ago

AxoyTO commented 2 years ago

Couldn't find any information about extracting the faces of a mesh, how to do it? Is there a function for it? I appreciate the help in advance!

wolph commented 2 years ago

Here's a very similar question: https://github.com/WoLpH/numpy-stl/issues/164

What it comes down to is that a Mesh object has a list of vertices (triangles) which consists of points. Those are effectively the faces.

In addition to that you will probably need the normals as well to know what direction the triangle is pointing to get the face.