#1527 Added testcases
This commit is contained in:
parent
d6d7e1b183
commit
06147d81ea
9 changed files with 241 additions and 0 deletions
53
testdata/scad/3D/features/background-modifier2.scad
vendored
Normal file
53
testdata/scad/3D/features/background-modifier2.scad
vendored
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
color("Blue") {
|
||||
translate([-30,-10,-10]) cube([70,50,2]);
|
||||
translate([40,-10,-10]) cube([2,50,30]);
|
||||
translate([-30,40,-10]) cube([70,2,30]);
|
||||
}
|
||||
|
||||
translate([-20,0,0]) difference() {
|
||||
intersection() {
|
||||
sphere(10);
|
||||
cube(15, center=true);
|
||||
}
|
||||
cylinder(h=20, r=5, center=true);
|
||||
}
|
||||
|
||||
%translate([-20,20,0]) difference() {
|
||||
intersection() {
|
||||
sphere(10);
|
||||
cube(15, center=true);
|
||||
}
|
||||
cylinder(h=20, r=5, center=true);
|
||||
}
|
||||
|
||||
difference() {
|
||||
intersection() {
|
||||
sphere(10);
|
||||
cube(15, center=true);
|
||||
}
|
||||
%cylinder(h=20, r=5, center=true);
|
||||
}
|
||||
|
||||
translate([20,0,0]) difference() {
|
||||
%intersection() {
|
||||
sphere(10);
|
||||
cube(15, center=true);
|
||||
}
|
||||
cylinder(h=20, r=5, center=true);
|
||||
}
|
||||
|
||||
translate([0,20,0]) difference() {
|
||||
intersection() {
|
||||
%sphere(10);
|
||||
cube(15, center=true);
|
||||
}
|
||||
cylinder(h=20, r=5, center=true);
|
||||
}
|
||||
|
||||
translate([20,20,0]) difference() {
|
||||
intersection() {
|
||||
sphere(10);
|
||||
%cube(15, center=true);
|
||||
}
|
||||
cylinder(h=20, r=5, center=true);
|
||||
}
|
||||
54
testdata/scad/3D/features/highlight-modifier2.scad
vendored
Normal file
54
testdata/scad/3D/features/highlight-modifier2.scad
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
color("Blue") {
|
||||
translate([-30,-10,-10]) cube([70,50,2]);
|
||||
translate([40,-10,-10]) cube([2,50,30]);
|
||||
translate([-30,40,-10]) cube([70,2,30]);
|
||||
}
|
||||
|
||||
translate([-20,0,0]) difference() {
|
||||
intersection() {
|
||||
sphere(10);
|
||||
cube(15, center=true);
|
||||
}
|
||||
cylinder(h=20, r=5, center=true);
|
||||
}
|
||||
|
||||
difference() {
|
||||
intersection() {
|
||||
sphere(10);
|
||||
cube(15, center=true);
|
||||
}
|
||||
#cylinder(h=20, r=5, center=true);
|
||||
}
|
||||
|
||||
translate([0,20,0]) difference() {
|
||||
intersection() {
|
||||
#sphere(10);
|
||||
cube(15, center=true);
|
||||
}
|
||||
cylinder(h=20, r=5, center=true);
|
||||
}
|
||||
|
||||
translate([20,20,0]) difference() {
|
||||
intersection() {
|
||||
sphere(10);
|
||||
#cube(15, center=true);
|
||||
}
|
||||
cylinder(h=20, r=5, center=true);
|
||||
}
|
||||
|
||||
translate([20,0,0]) difference() {
|
||||
#intersection() {
|
||||
sphere(10);
|
||||
cube(15, center=true);
|
||||
}
|
||||
cylinder(h=20, r=5, center=true);
|
||||
}
|
||||
|
||||
translate([-20,20,0]) #difference() {
|
||||
intersection() {
|
||||
sphere(10);
|
||||
cube(15, center=true);
|
||||
}
|
||||
cylinder(h=20, r=5, center=true);
|
||||
}
|
||||
|
||||
|
|
@ -1265,9 +1265,13 @@ disable_tests(opencsgtest_child-background)
|
|||
# These tests only makes sense in OpenCSG mode
|
||||
disable_tests(cgalpngtest_child-background
|
||||
cgalpngtest_highlight-and-background-modifier
|
||||
cgalpngtest_highlight-modifier2
|
||||
cgalpngtest_background-modifier2
|
||||
cgalpngtest_testcolornames
|
||||
csgpngtest_child-background
|
||||
csgpngtest_highlight-and-background-modifier
|
||||
csgpngtest_highlight-modifier2
|
||||
csgpngtest_background-modifier2
|
||||
csgpngtest_testcolornames
|
||||
throwntogethertest_testcolornames)
|
||||
|
||||
|
|
|
|||
65
tests/regression/dumptest/background-modifier2-expected.csg
Normal file
65
tests/regression/dumptest/background-modifier2-expected.csg
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
group() {
|
||||
color([0, 0, 1, 1]) {
|
||||
multmatrix([[1, 0, 0, -30], [0, 1, 0, -10], [0, 0, 1, -10], [0, 0, 0, 1]]) {
|
||||
cube(size = [70, 50, 2], center = false);
|
||||
}
|
||||
multmatrix([[1, 0, 0, 40], [0, 1, 0, -10], [0, 0, 1, -10], [0, 0, 0, 1]]) {
|
||||
cube(size = [2, 50, 30], center = false);
|
||||
}
|
||||
multmatrix([[1, 0, 0, -30], [0, 1, 0, 40], [0, 0, 1, -10], [0, 0, 0, 1]]) {
|
||||
cube(size = [70, 2, 30], center = false);
|
||||
}
|
||||
}
|
||||
multmatrix([[1, 0, 0, -20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
difference() {
|
||||
intersection() {
|
||||
sphere($fn = 0, $fa = 12, $fs = 2, r = 10);
|
||||
cube(size = [15, 15, 15], center = true);
|
||||
}
|
||||
cylinder($fn = 0, $fa = 12, $fs = 2, h = 20, r1 = 5, r2 = 5, center = true);
|
||||
}
|
||||
}
|
||||
% multmatrix([[1, 0, 0, -20], [0, 1, 0, 20], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
difference() {
|
||||
intersection() {
|
||||
sphere($fn = 0, $fa = 12, $fs = 2, r = 10);
|
||||
cube(size = [15, 15, 15], center = true);
|
||||
}
|
||||
cylinder($fn = 0, $fa = 12, $fs = 2, h = 20, r1 = 5, r2 = 5, center = true);
|
||||
}
|
||||
}
|
||||
difference() {
|
||||
intersection() {
|
||||
sphere($fn = 0, $fa = 12, $fs = 2, r = 10);
|
||||
cube(size = [15, 15, 15], center = true);
|
||||
}
|
||||
% cylinder($fn = 0, $fa = 12, $fs = 2, h = 20, r1 = 5, r2 = 5, center = true);
|
||||
}
|
||||
multmatrix([[1, 0, 0, 20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
difference() {
|
||||
% intersection() {
|
||||
sphere($fn = 0, $fa = 12, $fs = 2, r = 10);
|
||||
cube(size = [15, 15, 15], center = true);
|
||||
}
|
||||
cylinder($fn = 0, $fa = 12, $fs = 2, h = 20, r1 = 5, r2 = 5, center = true);
|
||||
}
|
||||
}
|
||||
multmatrix([[1, 0, 0, 0], [0, 1, 0, 20], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
difference() {
|
||||
intersection() {
|
||||
% sphere($fn = 0, $fa = 12, $fs = 2, r = 10);
|
||||
cube(size = [15, 15, 15], center = true);
|
||||
}
|
||||
cylinder($fn = 0, $fa = 12, $fs = 2, h = 20, r1 = 5, r2 = 5, center = true);
|
||||
}
|
||||
}
|
||||
multmatrix([[1, 0, 0, 20], [0, 1, 0, 20], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
difference() {
|
||||
intersection() {
|
||||
sphere($fn = 0, $fa = 12, $fs = 2, r = 10);
|
||||
% cube(size = [15, 15, 15], center = true);
|
||||
}
|
||||
cylinder($fn = 0, $fa = 12, $fs = 2, h = 20, r1 = 5, r2 = 5, center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
65
tests/regression/dumptest/highlight-modifier2-expected.csg
Normal file
65
tests/regression/dumptest/highlight-modifier2-expected.csg
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
group() {
|
||||
color([0, 0, 1, 1]) {
|
||||
multmatrix([[1, 0, 0, -30], [0, 1, 0, -10], [0, 0, 1, -10], [0, 0, 0, 1]]) {
|
||||
cube(size = [70, 50, 2], center = false);
|
||||
}
|
||||
multmatrix([[1, 0, 0, 40], [0, 1, 0, -10], [0, 0, 1, -10], [0, 0, 0, 1]]) {
|
||||
cube(size = [2, 50, 30], center = false);
|
||||
}
|
||||
multmatrix([[1, 0, 0, -30], [0, 1, 0, 40], [0, 0, 1, -10], [0, 0, 0, 1]]) {
|
||||
cube(size = [70, 2, 30], center = false);
|
||||
}
|
||||
}
|
||||
multmatrix([[1, 0, 0, -20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
difference() {
|
||||
intersection() {
|
||||
sphere($fn = 0, $fa = 12, $fs = 2, r = 10);
|
||||
cube(size = [15, 15, 15], center = true);
|
||||
}
|
||||
cylinder($fn = 0, $fa = 12, $fs = 2, h = 20, r1 = 5, r2 = 5, center = true);
|
||||
}
|
||||
}
|
||||
difference() {
|
||||
intersection() {
|
||||
sphere($fn = 0, $fa = 12, $fs = 2, r = 10);
|
||||
cube(size = [15, 15, 15], center = true);
|
||||
}
|
||||
# cylinder($fn = 0, $fa = 12, $fs = 2, h = 20, r1 = 5, r2 = 5, center = true);
|
||||
}
|
||||
multmatrix([[1, 0, 0, 0], [0, 1, 0, 20], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
difference() {
|
||||
intersection() {
|
||||
# sphere($fn = 0, $fa = 12, $fs = 2, r = 10);
|
||||
cube(size = [15, 15, 15], center = true);
|
||||
}
|
||||
cylinder($fn = 0, $fa = 12, $fs = 2, h = 20, r1 = 5, r2 = 5, center = true);
|
||||
}
|
||||
}
|
||||
multmatrix([[1, 0, 0, 20], [0, 1, 0, 20], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
difference() {
|
||||
intersection() {
|
||||
sphere($fn = 0, $fa = 12, $fs = 2, r = 10);
|
||||
# cube(size = [15, 15, 15], center = true);
|
||||
}
|
||||
cylinder($fn = 0, $fa = 12, $fs = 2, h = 20, r1 = 5, r2 = 5, center = true);
|
||||
}
|
||||
}
|
||||
multmatrix([[1, 0, 0, 20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
difference() {
|
||||
# intersection() {
|
||||
sphere($fn = 0, $fa = 12, $fs = 2, r = 10);
|
||||
cube(size = [15, 15, 15], center = true);
|
||||
}
|
||||
cylinder($fn = 0, $fa = 12, $fs = 2, h = 20, r1 = 5, r2 = 5, center = true);
|
||||
}
|
||||
}
|
||||
multmatrix([[1, 0, 0, -20], [0, 1, 0, 20], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
# difference() {
|
||||
intersection() {
|
||||
sphere($fn = 0, $fa = 12, $fs = 2, r = 10);
|
||||
cube(size = [15, 15, 15], center = true);
|
||||
}
|
||||
cylinder($fn = 0, $fa = 12, $fs = 2, h = 20, r1 = 5, r2 = 5, center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
tests/regression/opencsgtest/background-modifier2-expected.png
Normal file
BIN
tests/regression/opencsgtest/background-modifier2-expected.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
BIN
tests/regression/opencsgtest/highlight-modifier2-expected.png
Normal file
BIN
tests/regression/opencsgtest/highlight-modifier2-expected.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
Loading…
Reference in a new issue