Last active
June 3, 2023 12:19
-
-
Save thehans/c30c259e83da4e89ccbd975a511dab68 to your computer and use it in GitHub Desktop.
OpenSCAD shear example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// shear such that point will translate by [p.x,p.y] as z-axis is traversed by p.z units | |
module shearAlongZ(p) { | |
multmatrix([ | |
[1,0,p.x/p.z,0], | |
[0,1,p.y/p.z,0], | |
[0,0,1,0] | |
]) children(); | |
} | |
rotate([0,0,0]) | |
shearAlongZ([0,2,5]) | |
linear_extrude(5, scale=1/2) | |
square(2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment