mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-09-02 20:52:33 +02:00
bug fix
This commit is contained in:
@@ -35,6 +35,21 @@ module test_difference() {
|
||||
R4 = [square(9,center=true), square(3,center=true)];
|
||||
assert(are_regions_equal(difference(R5,R4),
|
||||
[square(10,center=true), square(9, center=true), square(3,center=true)]));
|
||||
|
||||
pathA = [
|
||||
[-9,12], [-6,2], [-3,12], [0,2], [3,10], [5,10], [19,-4], [-8,-4], [-12,0]
|
||||
];
|
||||
|
||||
pathB = [
|
||||
[-12,8], [7,8], [9,6], [7,5], [-3,5], [-5,-6], [-2,-6], [0,-4],
|
||||
[6,-4], [2,-8], [-7,-8], [-15,0]
|
||||
];
|
||||
|
||||
|
||||
right=[[[-10, 8], [-9, 12], [-7.8, 8]], [[0, -4], [-4.63636363636, -4], [-3, 5], [-0.9, 5], [0, 2], [1.125, 5], [7, 5], [9, 6], [19, -4], [6, -4]], [[-4.2, 8], [-1.8, 8], [-3, 12]], [[2.25, 8], [3, 10], [5, 10], [7, 8]]];
|
||||
assert(are_regions_equal(difference(pathA,pathB),right));
|
||||
|
||||
|
||||
}
|
||||
test_difference();
|
||||
|
||||
|
Reference in New Issue
Block a user