/ test / test_shape_trapezium.scad
test_shape_trapezium.scad
 1  use <unittest.scad>
 2  use <shape_trapezium.scad>
 3  
 4  module test_shape_trapezium() {
 5      echo("==== test_shape_trapezium ====");
 6  
 7      expected = [[16.7639, -10], [18.4469, -9.0806], [18.5825, -7.1677], [18.5528, -7.1056], [10.5528, 8.8944], [8.9778, 9.9885], [8.7639, 10], [-8.7639, 10], [-8.9778, 9.9885], [-10.5528, 8.8944], [-18.5528, -7.1056], [-18.5825, -7.1677], [-18.4469, -9.0806], [-16.7639, -10]];
 8  
 9      actual = shape_trapezium(
10          [40, 20], 
11          h = 20,
12          corner_r = 2
13      );
14  
15      assertEqualPoints(expected, actual);
16  }
17  
18  test_shape_trapezium();