Skip to content

Instantly share code, notes, and snippets.

@thehans
Created November 24, 2019 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thehans/b7729a1830ae4dd8c89ef450bfe44aa3 to your computer and use it in GitHub Desktop.
Save thehans/b7729a1830ae4dd8c89ef450bfe44aa3 to your computer and use it in GitHub Desktop.
OpenSCAD example for rotating about arbitrary pivot point
module rotate_about(a, v, p=[0,0,0]) {
translate(p) rotate(a,v) translate(-p) children();
}
// example usage
rotate_about([0,45,0],p=[5,0,10])
cylinder(r=5,h=10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment