2020-01-26 16:26:19 +08:00
|
|
|
include <unittest.scad>;
|
|
|
|
|
2017-06-22 18:17:02 +08:00
|
|
|
module test_bend() {
|
|
|
|
include <bend.scad>;
|
2017-06-19 17:51:28 +08:00
|
|
|
|
2017-06-22 18:17:47 +08:00
|
|
|
x = 9.25;
|
|
|
|
y = 9.55;
|
|
|
|
z = 1;
|
|
|
|
|
2017-06-22 18:17:02 +08:00
|
|
|
module test_bend_tri_frag(points, angle) {
|
|
|
|
echo("==== test_bend_tri_frag ====");
|
2017-06-19 17:51:28 +08:00
|
|
|
|
2017-06-22 18:17:02 +08:00
|
|
|
expected_points = [[0, 0], [0.1927, 1.9566], [0.3854, 0], [0, 0]];
|
|
|
|
expected_angle = 11.25;
|
|
|
|
|
|
|
|
assertEqualPoints(expected_points, points);
|
2019-06-11 14:32:21 +08:00
|
|
|
assertEqualNum(expected_angle, angle);
|
2017-06-22 18:17:02 +08:00
|
|
|
}
|
2017-06-22 15:10:25 +08:00
|
|
|
|
2017-06-22 18:17:02 +08:00
|
|
|
bend(size = [x, y, z], angle = 270)
|
|
|
|
linear_extrude(z) text("A");
|
2017-06-19 17:51:28 +08:00
|
|
|
}
|
|
|
|
|
2017-06-22 18:17:02 +08:00
|
|
|
test_bend();
|