Skip to content

Instantly share code, notes, and snippets.

@peyloride
Last active January 2, 2019 19:04
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')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment