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

Scale method? #136

Closed lwanger closed 3 years ago

lwanger commented 4 years ago

There is a rotate and a translate method on meshes. Does anyone have either a scale function or a function to transform the mesh by a transformation matrix?

wolph commented 4 years ago

Scaling is a fairly simple operation so you can simply do this to make it double the size:

mesh.vectors *= 2

Or to double in the X direction:

mesh.x *= 2
lwanger commented 4 years ago

Thanks!