mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-16 13:50:05 +01:00
19 lines
1.6 KiB
OpenSCAD
19 lines
1.6 KiB
OpenSCAD
use <unittest.scad>
|
|
use <shape_glued2circles.scad>
|
|
|
|
module test_shape_glued2circles() {
|
|
echo("==== test_shape_glued2circles ====");
|
|
|
|
$fn = 36;
|
|
|
|
radius = 10;
|
|
centre_dist = 30;
|
|
|
|
expected = [[0, -6.49519], [2.24, -6.58179], [4.42, -6.8416], [6.48, -7.27461], [8.36, -7.88083], [10, -8.66025], [10, -8.66025], [11.5798, -9.39693], [13.2635, -9.84808], [15, -10], [16.7365, -9.84808], [18.4202, -9.39693], [20, -8.66025], [21.4279, -7.66044], [22.6604, -6.42788], [23.6603, -5], [24.3969, -3.4202], [24.8481, -1.73648], [25, 0], [24.8481, 1.73648], [24.3969, 3.4202], [23.6603, 5], [22.6604, 6.42788], [21.4279, 7.66044], [20, 8.66025], [18.4202, 9.39693], [16.7365, 9.84808], [15, 10], [13.2635, 9.84808], [11.5798, 9.39693], [10, 8.66025], [10, 8.66025], [8.36, 7.88083], [6.48, 7.27461], [4.42, 6.8416], [2.24, 6.58179], [0, 6.49519], [0, 6.49519], [-2.24, 6.58179], [-4.42, 6.8416], [-6.48, 7.27461], [-8.36, 7.88083], [-10, 8.66025], [-10, 8.66025], [-11.5798, 9.39693], [-13.2635, 9.84808], [-15, 10], [-16.7365, 9.84808], [-18.4202, 9.39693], [-20, 8.66025], [-21.4279, 7.66044], [-22.6604, 6.42788], [-23.6603, 5], [-24.3969, 3.4202], [-24.8481, 1.73648], [-25, 0], [-24.8481, -1.73648], [-24.3969, -3.4202], [-23.6603, -5], [-22.6604, -6.42788], [-21.4279, -7.66044], [-20, -8.66025], [-18.4202, -9.39693], [-16.7365, -9.84808], [-15, -10], [-13.2635, -9.84808], [-11.5798, -9.39693], [-10, -8.66025], [-10, -8.66025], [-8.36, -7.88083], [-6.48, -7.27461], [-4.42, -6.8416], [-2.24, -6.58179], [0, -6.49519]];
|
|
|
|
actual = shape_glued2circles(radius, centre_dist);
|
|
|
|
assertEqualPoints(expected, actual);
|
|
}
|
|
|
|
test_shape_glued2circles(); |