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

More info needed on stl atributes #218

Closed cdinea closed 7 months ago

cdinea commented 8 months ago

hi.

Can you add more information on what v0,v1,v2 ..represent in this code?

your_mesh.v0, your_mesh.v1, your_mesh.v2

Thanks.

wolph commented 8 months ago

The v0, v1 and v2 are the vectors and they come straight from the STL files.

Simply put, a triangle consists of 3 points and the vectors contain those 3 points. For ease of use you can also use your_mesh.points which reshapes the data into x0, y0, z0, x1, y1, z1, x2, y2, z2 Or you can use your_mesh.x for all of the x coordinates and so on for y and z.

wolph commented 8 months ago

Perhaps this bit of the documentation might help a little: https://numpy-stl.readthedocs.io/en/latest/stl.html#stl.base.BaseMesh

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days