summaryrefslogtreecommitdiff
path: root/testdata/scad/features/minkowski2-tests.scad
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-09-06 12:56:04 (GMT)
committerMarius Kintel <marius@kintel.net>2011-09-06 12:56:04 (GMT)
commitfdd96a177c0fb3a94d317cb3e584b4881c09ea0e (patch)
treed4856f935674686ff6c99d7cb10c417edf77d241 /testdata/scad/features/minkowski2-tests.scad
parent5ca65805de57ac160304d2788491be433b04e12e (diff)
Added minkowski and 2d-3d tests
Diffstat (limited to 'testdata/scad/features/minkowski2-tests.scad')
-rw-r--r--testdata/scad/features/minkowski2-tests.scad31
1 files changed, 31 insertions, 0 deletions
diff --git a/testdata/scad/features/minkowski2-tests.scad b/testdata/scad/features/minkowski2-tests.scad
new file mode 100644
index 0000000..08f3d98
--- /dev/null
+++ b/testdata/scad/features/minkowski2-tests.scad
@@ -0,0 +1,31 @@
+module roundedBox2dSimple() {
+ minkowski() {
+ square([10,10]);
+ circle(r=5);
+ }
+}
+
+module roundedBox2dCut() {
+ minkowski() {
+ difference() {
+ square([10,10]);
+ square([5,5]);
+ }
+ circle(r=5);
+ }
+}
+
+// Not quite correct, result does not contain a hole, since the impl currently returns the outer boundary of the polygon_with_holes.
+module roundedBox2dHole() {
+ minkowski() {
+ difference() {
+ square([10,10], center=true);
+ square([8,8], center=true);
+ }
+ circle(r=2);
+ }
+}
+
+translate([-20,5,0]) roundedBox2dHole();
+translate([0,0,0]) roundedBox2dCut();
+translate([25,0,0]) roundedBox2dSimple();
contact: Jan Huwald // Impressum