Added and updated tests for minkowski2 with holes

527olive
Marius Kintel 2014-01-12 19:39:20 -05:00
parent dd113ae0f1
commit e0e0319ec6
5 changed files with 83 additions and 0 deletions

View File

@ -0,0 +1,41 @@
// HolePoly & Poly
minkowski() {
difference() {
square([20,20], center=true);
square([10,10], center=true);
}
circle(r=1, $fn=16);
}
// Poly & HolePoly
translate([25,0]) minkowski() {
circle(r=1, $fn=16);
difference() {
square([20,20], center=true);
square([10,10], center=true);
}
}
// IslandHolePoly
translate([0,25]) minkowski() {
union() {
difference() {
square([20,20], center=true);
square([10,10], center=true);
}
square([2,2], center=true);
}
circle(r=1, $fn=16);
}
// HolePoly & HolePoly
translate([25,25]) minkowski() {
difference() {
square([18,18], center=true);
square([12,12], center=true);
}
difference() {
circle(2, $fn=16);
circle(1, $fn=16);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

@ -0,0 +1,42 @@
group() {
minkowski(convexity = 0) {
difference() {
square(size = [20, 20], center = true);
square(size = [10, 10], center = true);
}
circle($fn = 16, $fa = 12, $fs = 2, r = 1);
}
multmatrix([[1, 0, 0, 25], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
minkowski(convexity = 0) {
circle($fn = 16, $fa = 12, $fs = 2, r = 1);
difference() {
square(size = [20, 20], center = true);
square(size = [10, 10], center = true);
}
}
}
multmatrix([[1, 0, 0, 0], [0, 1, 0, 25], [0, 0, 1, 0], [0, 0, 0, 1]]) {
minkowski(convexity = 0) {
union() {
difference() {
square(size = [20, 20], center = true);
square(size = [10, 10], center = true);
}
square(size = [2, 2], center = true);
}
circle($fn = 16, $fa = 12, $fs = 2, r = 1);
}
}
multmatrix([[1, 0, 0, 25], [0, 1, 0, 25], [0, 0, 1, 0], [0, 0, 0, 1]]) {
minkowski(convexity = 0) {
difference() {
square(size = [18, 18], center = true);
square(size = [12, 12], center = true);
}
difference() {
circle($fn = 16, $fa = 12, $fs = 2, r = 2);
circle($fn = 16, $fa = 12, $fs = 2, r = 1);
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB