Skip to content

Instantly share code, notes, and snippets.

@a-ludi
Last active September 11, 2017 08:59
Show Gist options
  • Save a-ludi/76632913dbd221769f9eb8f9ee749edc to your computer and use it in GitHub Desktop.
Save a-ludi/76632913dbd221769f9eb8f9ee749edc to your computer and use it in GitHub Desktop.
OpenSCAD: minkowski on non-convex objects produces geometry errors
// with errors due to minkowski with non-convex objects
translate([8, 0, 0])
difference() {
cube([15, 15, 1], center=true);
minkowski() {
for (i = [-1 : 1])
for (j = [-1 : 1])
translate(5*[i, j, 0])
cylinder(10, r=1, center=true);
cylinder(1, r=1);
}
}
// individual minkowski - no errors
translate([-8, 0, 0])
difference() {
cube([15, 15, 1], center=true);
for (i = [-1 : 1])
for (j = [-1 : 1])
minkowski() {
translate(5*[i, j, 0])
cylinder(10, r=1, center=true);
cylinder(1, r=1);
}
}
@nophead
Copy link

nophead commented Sep 11, 2017

I don't see any errors with F6. The F5 preview is broken because you haven't set convexity in the minkowski. I think it should be 4 for that shape but anything above 3 looks OK.

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