1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00
dotSCAD/test/test_hexagons.scad
2020-01-28 09:44:36 +08:00

32 lines
676 B
OpenSCAD

use <unittest.scad>;
include <hexagons.scad>;
module test_each_hexagon(hex_r, pts_all_lines) {
// ==== test_hexagons_lv2 ====
assertEqualNum(19, hex_r);
expects = [
[[-34.641, 0], [0, 0], [34.641, 0]],
[[-17.3205, 30], [17.3205, 30]],
[[-17.3205, -30], [17.3205, -30]]
];
for(i = [0:len(pts_all_lines) - 1]) {
assertEqualPoints(
expects[i],
pts_all_lines[i]
);
}
}
module test_hexagons_lv2() {
echo("==== test_hexagons_lv2 ====");
radius = 20;
spacing = 2;
levels = 2;
hexagons(radius, spacing, levels);
}
test_hexagons_lv2();