Skip to content

Instantly share code, notes, and snippets.

@kintel
Created January 5, 2014 18:30
Show Gist options
  • Save kintel/8271979 to your computer and use it in GitHub Desktop.
Save kintel/8271979 to your computer and use it in GitHub Desktop.
// Polygon with hole
polygon(
points=[
[-2.5,-2.5],
[2.5,-2.5],
[2.5,2.5],
[-2.5,2.5],
[-5,-5],
[5,-5],
[5,5],
[-5,5]],
paths=[
[0,1,2,3],
[7,6,5,4]
]);
// Two Polygons
translate([0,12,0]) polygon(
points=[
[5.5,-2.5],
[10.5,-2.5],
[10.5,2.5],
[5.5,2.5],
[-5,-5],
[5,-5],
[5,5],
[-5,5]],
paths=[
[0,1,2,3],
[4,5,6,7]
]);
// Overlapping Polygons
translate([0,24,0]) polygon(
points=[
[2.5,-2.5],
[7.5,-2.5],
[7.5,2.5],
[2.5,2.5],
[-5,-5],
[5,-5],
[5,5],
[-5,5]],
paths=[
[0,1,2,3],
[4,5,6,7]
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment