-
-
Save odyzzeus/7ff76fad035e36600c47c6662e1fe4bb to your computer and use it in GitHub Desktop.
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
module minkowskiCorr(x,y,r,h) | |
{ | |
difference() | |
{ | |
translate([r,r,0]) // corrects for origin shift | |
{ | |
minkowski() | |
{ | |
cube([x-2*r,y-2*r,h]); //cube reduced by twice the radius which is added by minkowski method | |
cylinder(h=h,r=r); | |
} | |
} | |
translate([0,0,h]) // cuts off the top, since minkowski method doubles the height | |
{ | |
cube([x,y,h]); | |
} | |
} | |
} | |
// example | |
minkowskiCorr(40,30,6,10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment