mirror of https://github.com/vitalif/openscad
Added test for polygon with hole
parent
ab102cec85
commit
7b526bc27a
|
@ -15,4 +15,10 @@ translate([-2,0,0]) polygon(points);
|
|||
translate([-2,-2,0]) polygon(points=points, paths=[[0,1,2,3], [4,5,6,7]]);
|
||||
translate([2,-4,0]) polygon([[0,0], [1,0], [1,1], [0,0]]);
|
||||
|
||||
// With hole
|
||||
translate([-2,-4,0])
|
||||
polygon(points=[[0,0], [1,0], [1,1], [0,1], [0.2,0.2], [0.8,0.2], [0.8,0.8], [0.2,0.8]],
|
||||
paths=[[0,1,2,3],[4,5,6,7]]
|
||||
);
|
||||
|
||||
// FIXME: convexity
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 8.1 KiB |
|
@ -33,4 +33,7 @@ group() {
|
|||
multmatrix([[1, 0, 0, 2], [0, 1, 0, -4], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
polygon(points = [[0, 0], [1, 0], [1, 1], [0, 0]], paths = undef, convexity = 1);
|
||||
}
|
||||
multmatrix([[1, 0, 0, -2], [0, 1, 0, -4], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
polygon(points = [[0, 0], [1, 0], [1, 1], [0, 1], [0.2, 0.2], [0.8, 0.2], [0.8, 0.8], [0.2, 0.8]], paths = [[0, 1, 2, 3], [4, 5, 6, 7]], convexity = 1);
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 9.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 9.4 KiB |
Loading…
Reference in New Issue