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

the centroids of a stl file was not update after i rotated the stl file #219

Closed xuwenhua4202 closed 7 months ago

github-actions[bot] commented 9 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

wolph commented 9 months ago

The centroids are not updated automatically for performance reasons. You can easily update it using the update_centroids method though: https://github.com/wolph/numpy-stl/blob/26c9332427de1d49aefb6831b1073e3d3ed71ce3/stl/base.py#L348-L349

Or call the update_normals method which updates the centroids as well by default

github-actions[bot] commented 8 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