Skip to content

Instantly share code, notes, and snippets.

@peyloride
Last active September 25, 2024 16:45
Show Gist options
  • Save peyloride/68b94473354621955962e3589c4d35ab to your computer and use it in GitHub Desktop.
Save peyloride/68b94473354621955962e3589c4d35ab to your computer and use it in GitHub Desktop.
Numpy scale and rotate stl file
my_mesh = mesh.Mesh.from_file('wheel.stl')
my_mesh.vectors *= 5 # Scale mesh to 5 times bigger
my_mesh.rotate([0.5, 0.0, 0.0], math.radians(90)) # Rotate mesh 90° on x axis
my_mesh.save('scaled_wheel.stl')
@shreekumar3d
Copy link

Found this useful. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment