summaryrefslogtreecommitdiff
path: root/testdata/scad/features/minkowski2-tests.scad
blob: 37fad27c0b64adb453ecd979cc49a119f6fd17a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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();

// One child
translate([0,-20,0]) minkowski() { square(10); }
contact: Jan Huwald // Impressum