1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-16 13:50:05 +01:00
dotSCAD/test/test_archimedean_spiral_extrude.scad
2022-06-06 13:11:46 +08:00

37 lines
23 KiB
OpenSCAD

use <unittest.scad>
include <archimedean_spiral_extrude.scad>
module test_archimedean_spiral_extrude(sections) {
expected = [[[-12.5, -1.8602e-14, 0], [-12.5, -1.8602e-14, 4], [-11.5, -1.71138e-14, 4], [-11.5, -1.71138e-14, 2], [-3.5, -5.20855e-15, 2], [-3.5, -5.20855e-15, 4], [-2.5, -3.72039e-15, 4], [-2.5, -3.72039e-15, 0]], [[-10.9842, -8.87661, 0], [-10.9842, -8.87661, 4.16162], [-10.2065, -8.24807, 4.16162], [-10.2065, -8.24807, 2.08081], [-3.98425, -3.21976, 2.08081], [-3.98425, -3.21976, 4.16162], [-3.20647, -2.59122, 4.16162], [-3.20647, -2.59122, 0]], [[-5.0924, -14.5845, 0], [-5.0924, -14.5845, 4.32323], [-4.76276, -13.6404, 4.32323], [-4.76276, -13.6404, 2.16162], [-2.12558, -6.08761, 2.16162], [-2.12558, -6.08761, 4.32323], [-1.79593, -5.1435, 4.32323], [-1.79593, -5.1435, 0]], [[2.43688, -16.4219, 0], [2.43688, -16.4219, 4.48485], [2.2901, -15.4327, 4.48485], [2.2901, -15.4327, 2.24242], [1.11582, -7.51936, 2.24242], [1.11582, -7.51936, 4.48485], [0.969032, -6.53019, 4.48485], [0.969032, -6.53019, 0]], [[9.69144, -14.7377, 0], [9.69144, -14.7377, 4.64646], [9.142, -13.9022, 4.64646], [9.142, -13.9022, 2.32323], [4.74646, -7.21791, 2.32323], [4.74646, -7.21791, 4.64646], [4.19702, -6.38238, 4.64646], [4.19702, -6.38238, 0]], [[15.4378, -10.3558, 0], [15.4378, -10.3558, 4.80808], [14.6073, -9.79868, 4.80808], [14.6073, -9.79868, 2.40404], [7.96363, -5.34206, 2.40404], [7.96363, -5.34206, 4.80808], [7.13317, -4.78498, 4.80808], [7.13317, -4.78498, 0]], [[19, -4.26518, 0], [19, -4.26518, 4.9697], [18.0243, -4.04614, 4.9697], [18.0243, -4.04614, 2.48485], [10.2185, -2.29389, 2.48485], [10.2185, -2.29389, 4.9697], [9.2428, -2.07485, 4.9697], [9.2428, -2.07485, 0]], [[20.1398, 2.55919, 0], [20.1398, 2.55919, 5.13131], [19.1478, 2.43314, 5.13131], [19.1478, 2.43314, 2.56566], [11.2116, 1.42467, 2.56566], [11.2116, 1.42467, 5.13131], [10.2196, 1.29862, 5.13131], [10.2196, 1.29862, 0]], [[18.9436, 9.25912, 0], [18.9436, 9.25912, 5.29293], [18.0452, 8.82, 5.29293], [18.0452, 8.82, 2.64646], [10.8578, 5.30699, 2.64646], [10.8578, 5.30699, 5.29293], [9.95935, 4.86786, 5.29293], [9.95935, 4.86786, 0]], [[15.7219, 15.1457, 0], [15.7219, 15.1457, 5.45455], [15.0017, 14.4519, 5.45455], [15.0017, 14.4519, 2.72727], [9.24024, 8.90158, 2.72727], [9.24024, 8.90158, 5.45455], [8.52006, 8.2078, 5.45455], [8.52006, 8.2078, 0]], [[10.9235, 19.7189, 0], [10.9235, 19.7189, 5.61616], [10.4389, 18.8441, 5.61616], [10.4389, 18.8441, 2.80808], [6.56228, 11.8461, 2.80808], [6.56228, 11.8461, 5.61616], [6.07771, 10.9714, 5.61616], [6.07771, 10.9714, 0]], [[5.06568, 22.6659, 0], [5.06568, 22.6659, 5.77778], [4.84757, 21.69, 5.77778], [4.84757, 21.69, 2.88889], [3.10267, 13.8826, 2.88889], [3.10267, 13.8826, 5.77778], [2.88456, 12.9067, 5.77778], [2.88456, 12.9067, 0]], [[-1.32084, 23.8455, 0], [-1.32084, 23.8455, 5.93939], [-1.26553, 22.8471, 5.93939], [-1.26553, 22.8471, 2.9697], [-0.82308, 14.8593, 2.9697], [-0.82308, 14.8593, 5.93939], [-0.767774, 13.8609, 5.93939], [-0.767774, 13.8609, 0]], [[-7.73326, 23.2645, 0], [-7.73326, 23.2645, 6.10101], [-7.41783, 22.3156, 6.10101], [-7.41783, 22.3156, 3.05051], [-4.89434, 14.724, 3.05051], [-4.89434, 14.724, 6.10101], [-4.57891, 13.775, 6.10101], [-4.57891, 13.775, 0]], [[-13.7257, 21.0498, 0], [-13.7257, 21.0498, 6.26263], [-13.1795, 20.2122, 6.26263], [-13.1795, 20.2122, 3.13131], [-8.80989, 13.5109, 3.13131], [-8.80989, 13.5109, 6.26263], [-8.26369, 12.6733, 6.26263], [-8.26369, 12.6733, 0]], [[-18.9278, 17.4201, 0], [-18.9278, 17.4201, 6.42424], [-18.192, 16.7429, 6.42424], [-18.192, 16.7429, 3.21212], [-12.3056, 11.3254, 3.21212], [-12.3056, 11.3254, 6.42424], [-11.5698, 10.6482, 6.42424], [-11.5698, 10.6482, 0]], [[-23.0553, 12.6576, 0], [-23.0553, 12.6576, 6.58586], [-22.1787, 12.1764, 6.58586], [-22.1787, 12.1764, 3.29293], [-15.166, 8.32636, 3.29293], [-15.166, 8.32636, 6.58586], [-14.2895, 7.8451, 6.58586], [-14.2895, 7.8451, 0]], [[-25.9125, 7.08275, 0], [-25.9125, 7.08275, 6.74747], [-24.9479, 6.81909, 6.74747], [-24.9479, 6.81909, 3.37374], [-17.2309, 4.7098, 3.37374], [-17.2309, 4.7098, 6.74747], [-16.2663, 4.44613, 6.74747], [-16.2663, 4.44613, 0]], [[-27.3908, 1.03088, 0], [-27.3908, 1.03088, 6.90909], [-26.3915, 0.993273, 6.90909], [-26.3915, 0.993273, 3.45455], [-18.3972, 0.692398, 3.45455], [-18.3972, 0.692398, 6.90909], [-17.3979, 0.654788, 6.90909], [-17.3979, 0.654788, 0]], [[-27.4622, -5.16655, 0], [-27.4622, -5.16655, 7.07071], [-26.4794, -4.98166, 7.07071], [-26.4794, -4.98166, 3.53535], [-18.6173, -3.50254, 3.53535], [-18.6173, -3.50254, 7.07071], [-17.6346, -3.31765, 7.07071], [-17.6346, -3.31765, 0]], [[-26.1701, -11.1979, 0], [-26.1701, -11.1979, 7.23232], [-25.2508, -10.8045, 7.23232], [-25.2508, -10.8045, 3.61616], [-17.8958, -7.65742, 3.61616], [-17.8958, -7.65742, 7.23232], [-16.9764, -7.26403, 7.23232], [-16.9764, -7.26403, 0]], [[-23.619, -16.7836, 0], [-23.619, -16.7836, 7.39394], [-22.8038, -16.2043, 7.39394], [-22.8038, -16.2043, 3.69697], [-16.2826, -11.5704, 3.69697], [-16.2826, -11.5704, 7.39394], [-15.4675, -10.9911, 7.39394], [-15.4675, -10.9911, 0]], [[-19.962, -21.6845, 0], [-19.962, -21.6845, 7.55556], [-19.2847, -20.9487, 7.55556], [-19.2847, -20.9487, 3.77778], [-13.8665, -15.063, 3.77778], [-13.8665, -15.063, 7.55556], [-13.1892, -14.3272, 7.55556], [-13.1892, -14.3272, 0]], [[-15.3894, -25.7081, 0], [-15.3894, -25.7081, 7.71717], [-14.8758, -24.85, 7.71717], [-14.8758, -24.85, 3.85859], [-10.7668, -17.9859, 3.85859], [-10.7668, -17.9859, 7.71717], [-10.2531, -17.1279, 7.71717], [-10.2531, -17.1279, 0]], [[-10.1163, -28.7111, 0], [-10.1163, -28.7111, 7.87879], [-9.78402, -27.768, 7.87879], [-9.78402, -27.768, 3.93939], [-7.12543, -20.2227, 3.93939], [-7.12543, -20.2227, 7.87879], [-6.79311, -19.2795, 7.87879], [-6.79311, -19.2795, 0]], [[-4.37212, -30.6004, 0], [-4.37212, -30.6004, 8.0404], [-4.23068, -29.6105, 8.0404], [-4.23068, -29.6105, 4.0202], [-3.09915, -21.6909, 4.0202], [-3.09915, -21.6909, 8.0404], [-2.95771, -20.701, 8.0404], [-2.95771, -20.701, 0]], [[1.61028, -31.3312, 0], [1.61028, -31.3312, 8.20202], [1.55895, -30.3326, 8.20202], [1.55895, -30.3326, 4.10101], [1.14833, -22.3431, 4.10101], [1.14833, -22.3431, 8.20202], [1.097, -21.3444, 8.20202], [1.097, -21.3444, 0]], [[7.60299, -30.9044, 0], [7.60299, -30.9044, 8.36364], [7.3641, -29.9333, 8.36364], [7.3641, -29.9333, 4.18182], [5.45295, -22.165, 4.18182], [5.45295, -22.165, 8.36364], [5.21406, -21.1939, 8.36364], [5.21406, -21.1939, 0]], [[13.3909, -29.3621, 0], [13.3909, -29.3621, 8.52525], [12.976, -28.4522, 8.52525], [12.976, -28.4522, 4.26263], [9.65643, -21.1735, 4.26263], [9.65643, -21.1735, 8.52525], [9.24148, -20.2636, 8.52525], [9.24148, -20.2636, 0]], [[18.7781, -26.7827, 0], [18.7781, -26.7827, 8.68687], [18.2041, -25.9639, 8.68687], [18.2041, -25.9639, 4.34343], [13.6114, -19.4135, 4.34343], [13.6114, -19.4135, 8.68687], [13.0373, -18.5947, 8.68687], [13.0373, -18.5947, 0]], [[23.5925, -23.2751, 0], [23.5925, -23.2751, 8.84848], [22.8806, -22.5728, 8.84848], [22.8806, -22.5728, 4.42424], [17.1856, -16.9544, 4.42424], [17.1856, -16.9544, 8.84848], [16.4737, -16.2521, 8.84848], [16.4737, -16.2521, 0]], [[27.6896, -18.9725, 0], [27.6896, -18.9725, 9.0101], [26.8646, -18.4073, 9.0101], [26.8646, -18.4073, 4.50505], [20.2652, -13.8855, 4.50505], [20.2652, -13.8855, 9.0101], [19.4402, -13.3202, 9.0101], [19.4402, -13.3202, 0]], [[30.9546, -14.0266, 0], [30.9546, -14.0266, 9.17172], [30.0437, -13.6139, 9.17172], [30.0437, -13.6139, 4.58586], [22.7569, -10.312, 4.58586], [22.7569, -10.312, 9.17172], [21.8461, -9.89922, 9.17172], [21.8461, -9.89922, 0]], [[33.3039, -8.601, 0], [33.3039, -8.601, 9.33333], [32.3357, -8.35095, 9.33333], [32.3357, -8.35095, 4.66667], [24.5898, -6.35052, 4.66667], [24.5898, -6.35052, 9.33333], [23.6216, -6.10047, 9.33333], [23.6216, -6.10047, 0]], [[34.685, -2.86601, 0], [34.685, -2.86601, 9.49495], [33.6884, -2.78366, 9.49495], [33.6884, -2.78366, 4.74747], [25.7155, -2.12487, 4.74747], [25.7155, -2.12487, 9.49495], [24.7189, -2.04252, 9.49495], [24.7189, -2.04252, 0]], [[35.0755, 3.00707, 0], [35.0755, 3.00707, 9.65657], [34.0792, 2.92165, 9.65657], [34.0792, 2.92165, 4.82828], [26.1084, 2.23831, 4.82828], [26.1084, 2.23831, 9.65657], [25.1121, 2.15289, 9.65657], [25.1121, 2.15289, 0]], [[34.4821, 8.85071, 0], [34.4821, 8.85071, 9.81818], [33.5135, 8.6021, 9.81818], [33.5135, 8.6021, 4.90909], [25.7646, 6.61316, 4.90909], [25.7646, 6.61316, 9.81818], [24.796, 6.36454, 9.81818], [24.796, 6.36454, 0]], [[32.9378, 14.5055, 0], [32.9378, 14.5055, 9.9798], [32.0226, 14.1024, 9.9798], [32.0226, 14.1024, 4.9899], [24.7011, 10.8781, 4.9899], [24.7011, 10.8781, 9.9798], [23.7859, 10.4751, 9.9798], [23.7859, 10.4751, 0]], [[30.4997, 19.8237, 0], [30.4997, 19.8237, 10.1414], [29.6612, 19.2787, 10.1414], [29.6612, 19.2787, 5.07071], [22.9536, 14.919, 5.07071], [22.9536, 14.919, 10.1414], [22.1151, 14.374, 10.1414], [22.1151, 14.374, 0]], [[27.2457, 24.6725, 0], [27.2457, 24.6725, 10.303], [26.5044, 24.0013, 10.303], [26.5044, 24.0013, 5.15152], [20.5745, 18.6314, 5.15152], [20.5745, 18.6314, 10.303], [19.8333, 17.9601, 10.303], [19.8333, 17.9601, 0]], [[23.2712, 28.9364, 0], [23.2712, 28.9364, 10.4646], [22.6445, 28.1571, 10.4646], [22.6445, 28.1571, 5.23232], [17.6309, 21.923, 5.23232], [17.6309, 21.923, 10.4646], [17.0042, 21.1437, 10.4646], [17.0042, 21.1437, 0]], [[18.6858, 32.5186, 0], [18.6858, 32.5186, 10.6263], [18.1876, 31.6515, 10.6263], [18.1876, 31.6515, 5.31313], [14.2018, 24.7151, 5.31313], [14.2018, 24.7151, 10.6263], [13.7036, 23.8481, 10.6263], [13.7036, 23.8481, 0]], [[13.6096, 35.3427, 0], [13.6096, 35.3427, 10.7879], [13.2502, 34.4095, 10.7879], [13.2502, 34.4095, 5.39394], [10.3754, 26.9439, 5.39394], [10.3754, 26.9439, 10.7879], [10.016, 26.0107, 10.7879], [10.016, 26.0107, 0]], [[8.16965, 37.353, 0], [8.16965, 37.353, 10.9495], [7.95599, 36.3761, 10.9495], [7.95599, 36.3761, 5.47475], [6.24667, 28.5608, 5.47475], [6.24667, 28.5608, 10.9495], [6.03301, 27.5839, 10.9495], [6.03301, 27.5839, 0]], [[2.49702, 38.5146, 0], [2.49702, 38.5146, 11.1111], [2.43232, 37.5167, 11.1111], [2.43232, 37.5167, 5.55556], [1.91474, 29.5334, 5.55556], [1.91474, 29.5334, 11.1111], [1.85005, 28.5355, 11.1111], [1.85005, 28.5355, 0]], [[-3.27678, 38.813, 0], [-3.27678, 38.813, 11.2727], [-3.19265, 37.8165, 11.2727], [-3.19265, 37.8165, 5.63636], [-2.51965, 29.8449, 5.63636], [-2.51965, 29.8449, 11.2727], [-2.43552, 28.8484, 11.2727], [-2.43552, 28.8484, 0]], [[-9.02253, 38.2533, 0], [-9.02253, 38.2533, 11.4343], [-8.79296, 37.28, 11.4343], [-8.79296, 37.28, 5.71717], [-6.95646, 29.4937, 5.71717], [-6.95646, 29.4937, 11.4343], [-6.72689, 28.5204, 11.4343], [-6.72689, 28.5204, 0]], [[-14.616, 36.8591, 0], [-14.616, 36.8591, 11.596], [-14.2474, 35.9295, 11.596], [-14.2474, 35.9295, 5.79798], [-11.2985, 28.4929, 5.79798], [-11.2985, 28.4929, 11.596], [-10.9299, 27.5633, 11.596], [-10.9299, 27.5633, 0]], [[-19.9405, 34.6707, 0], [-19.9405, 34.6707, 11.7576], [-19.4419, 33.8039, 11.7576], [-19.4419, 33.8039, 5.87879], [-15.4534, 26.869, 5.87879], [-15.4534, 26.869, 11.7576], [-14.9549, 26.0022, 11.7576], [-14.9549, 26.0022, 0]], [[-24.8885, 31.7438, 0], [-24.8885, 31.7438, 11.9192], [-24.2715, 30.9569, 11.9192], [-24.2715, 30.9569, 5.9596], [-19.3354, 24.6612, 5.9596], [-19.3354, 24.6612, 11.9192], [-18.7184, 23.8743, 11.9192], [-18.7184, 23.8743, 0]], [[-29.3637, 28.1473, 0], [-29.3637, 28.1473, 12.0808], [-28.6418, 27.4553, 12.0808], [-28.6418, 27.4553, 6.0404], [-22.8666, 21.9193, 6.0404], [-22.8666, 21.9193, 12.0808], [-22.1447, 21.2273, 12.0808], [-22.1447, 21.2273, 0]], [[-33.2822, 23.9612, 0], [-33.2822, 23.9612, 12.2424], [-32.4707, 23.377, 12.2424], [-32.4707, 23.377, 6.12121], [-25.9782, 18.7028, 6.12121], [-25.9782, 18.7028, 12.2424], [-25.1667, 18.1185, 12.2424], [-25.1667, 18.1185, 0]], [[-36.5739, 19.2749, 0], [-36.5739, 19.2749, 12.404], [-35.6892, 18.8086, 12.404], [-35.6892, 18.8086, 6.20202], [-28.6119, 15.0788, 6.20202], [-28.6119, 15.0788, 12.404], [-27.7272, 14.6126, 12.404], [-27.7272, 14.6126, 0]], [[-39.1824, 14.1844, 0], [-39.1824, 14.1844, 12.5657], [-38.2421, 13.844, 12.5657], [-38.2421, 13.844, 6.28283], [-30.7198, 11.1208, 6.28283], [-30.7198, 11.1208, 12.5657], [-29.7795, 10.7805, 12.5657], [-29.7795, 10.7805, 0]], [[-41.0662, 8.79069, 0], [-41.0662, 8.79069, 12.7273], [-40.0884, 8.58137, 12.7273], [-40.0884, 8.58137, 6.36364], [-32.2656, 6.90681, 6.36364], [-32.2656, 6.90681, 12.7273], [-31.2878, 6.6975, 12.7273], [-31.2878, 6.6975, 0]], [[-42.1985, 3.19748, 0], [-42.1985, 3.19748, 12.8889], [-41.2013, 3.12193, 12.8889], [-41.2013, 3.12193, 6.44444], [-33.2242, 2.51748, 6.44444], [-33.2242, 2.51748, 12.8889], [-32.2271, 2.44192, 12.8889], [-32.2271, 2.44192, 0]], [[-42.5667, -2.4909, 0], [-42.5667, -2.4909, 13.0505], [-41.5684, -2.43248, 13.0505], [-41.5684, -2.43248, 6.52525], [-33.5821, -1.96514, 6.52525], [-33.5821, -1.96514, 13.0505], [-32.5838, -1.90672, 13.0505], [-32.5838, -1.90672, 0]], [[-42.1726, -8.17133, 0], [-42.1726, -8.17133, 13.2121], [-41.1908, -7.98111, 13.2121], [-41.1908, -7.98111, 6.60606], [-33.3369, -6.45933, 6.60606], [-33.3369, -6.45933, 13.2121], [-32.3552, -6.26911, 13.2121], [-32.3552, -6.26911, 0]], [[-41.031, -13.7436, 0], [-41.031, -13.7436, 13.3737], [-40.0828, -13.426, 13.3737], [-40.0828, -13.426, 6.68687], [-32.497, -10.8851, 6.68687], [-32.497, -10.8851, 13.3737], [-31.5488, -10.5675, 13.3737], [-31.5488, -10.5675, 0]], [[-39.1697, -19.1123, 0], [-39.1697, -19.1123, 13.5354], [-38.2709, -18.6738, 13.5354], [-38.2709, -18.6738, 6.76768], [-31.0812, -15.1656, 6.76768], [-31.0812, -15.1656, 13.5354], [-30.1824, -14.7271, 13.5354], [-30.1824, -14.7271, 0]], [[-36.6276, -24.1877, 0], [-36.6276, -24.1877, 13.697], [-35.7931, -23.6366, 13.697], [-35.7931, -23.6366, 6.84848], [-29.1174, -19.2282, 6.84848], [-29.1174, -19.2282, 13.697], [-28.2829, -18.6771, 13.697], [-28.2829, -18.6771, 0]], [[-33.4543, -28.8875, 0], [-33.4543, -28.8875, 13.8586], [-32.6974, -28.2339, 13.8586], [-32.6974, -28.2339, 6.92929], [-26.6424, -23.0055, 6.92929], [-26.6424, -23.0055, 13.8586], [-25.8855, -22.3519, 13.8586], [-25.8855, -22.3519, 0]], [[-29.7085, -33.1378, 0], [-29.7085, -33.1378, 14.0202], [-29.041, -32.3932, 14.0202], [-29.041, -32.3932, 7.0101], [-23.7007, -26.4365, 7.0101], [-23.7007, -26.4365, 14.0202], [-23.0332, -25.692, 14.0202], [-23.0332, -25.692, 0]], [[-25.4566, -36.8737, 0], [-25.4566, -36.8737, 14.1818], [-24.8885, -36.0508, 14.1818], [-24.8885, -36.0508, 7.09091], [-20.3434, -29.4673, 7.09091], [-20.3434, -29.4673, 14.1818], [-19.7753, -28.6444, 14.1818], [-19.7753, -28.6444, 0]], [[-20.7716, -40.0404, 0], [-20.7716, -40.0404, 14.3434], [-20.3111, -39.1527, 14.3434], [-20.3111, -39.1527, 7.17172], [-16.6272, -32.0514, 7.17172], [-16.6272, -32.0514, 14.3434], [-16.1667, -31.1637, 14.3434], [-16.1667, -31.1637, 0]], [[-15.7315, -42.593, 0], [-15.7315, -42.593, 14.5051], [-15.385, -41.655, 14.5051], [-15.385, -41.655, 7.25253], [-12.6133, -34.1505, 7.25253], [-12.6133, -34.1505, 14.5051], [-12.2668, -33.2124, 14.5051], [-12.2668, -33.2124, 0]], [[-10.4178, -44.4977, 0], [-10.4178, -44.4977, 14.6667], [-10.1898, -43.5241, 14.6667], [-10.1898, -43.5241, 7.33333], [-8.36618, -35.7347, 7.33333], [-8.36618, -35.7347, 14.6667], [-8.13823, -34.761, 14.6667], [-8.13823, -34.761, 0]], [[-4.91443, -45.7311, 0], [-4.91443, -45.7311, 14.8283], [-4.80758, -44.7369, 14.8283], [-4.80758, -44.7369, 7.41414], [-3.95279, -36.7826, 7.41414], [-3.95279, -36.7826, 14.8283], [-3.84595, -35.7884, 14.8283], [-3.84595, -35.7884, 0]], [[0.693835, -46.2806, 0], [0.693835, -46.2806, 14.9899], [0.678844, -45.2807, 14.9899], [0.678844, -45.2807, 7.49495], [0.558923, -37.2816, 7.49495], [0.558923, -37.2816, 14.9899], [0.543932, -36.2817, 14.9899], [0.543932, -36.2817, 0]], [[6.32264, -46.1439, 0], [6.32264, -46.1439, 15.1515], [6.18689, -45.1532, 15.1515], [6.18689, -45.1532, 7.57576], [5.10088, -37.2273, 7.57576], [5.10088, -37.2273, 15.1515], [4.96512, -36.2365, 15.1515], [4.96512, -36.2365, 0]], [[11.8892, -45.3291, 0], [11.8892, -45.3291, 15.3131], [11.6355, -44.3618, 15.3131], [11.6355, -44.3618, 7.65657], [9.60588, -36.6236, 7.65657], [9.60588, -36.6236, 15.3131], [9.35218, -35.6563, 15.3131], [9.35218, -35.6563, 0]], [[17.3136, -43.8537, 0], [17.3136, -43.8537, 15.4747], [16.9464, -42.9235, 15.4747], [16.9464, -42.9235, 7.73737], [14.0086, -35.4824, 7.73737], [14.0086, -35.4824, 15.4747], [13.6414, -34.5523, 15.4747], [13.6414, -34.5523, 0]], [[22.5195, -41.7442, 0], [22.5195, -41.7442, 15.6364], [22.0447, -40.8641, 15.6364], [22.0447, -40.8641, 7.81818], [18.2465, -33.8233, 7.81818], [18.2465, -33.8233, 15.6364], [17.7717, -32.9431, 15.6364], [17.7717, -32.9431, 0]], [[27.4355, -39.0356, 0], [27.4355, -39.0356, 15.798], [26.8605, -38.2174, 15.798], [26.8605, -38.2174, 7.89899], [22.2604, -31.6723, 7.89899], [22.2604, -31.6723, 15.798], [21.6854, -30.8542, 15.798], [21.6854, -30.8542, 0]], [[31.9957, -35.7704, 0], [31.9957, -35.7704, 15.9596], [31.329, -35.0251, 15.9596], [31.329, -35.0251, 7.9798], [25.9955, -29.0623, 7.9798], [25.9955, -29.0623, 15.9596], [25.3289, -28.317, 15.9596], [25.3289, -28.317, 0]], [[36.1404, -31.9978, 0], [36.1404, -31.9978, 16.1212], [35.3917, -31.3349, 16.1212], [35.3917, -31.3349, 8.06061], [29.402, -26.0318, 8.06061], [29.402, -26.0318, 16.1212], [28.6533, -25.3689, 16.1212], [28.6533, -25.3689, 0]], [[39.8168, -27.7729, 0], [39.8168, -27.7729, 16.2828], [38.9966, -27.2008, 16.2828], [38.9966, -27.2008, 8.14141], [32.4351, -22.6241, 8.14141], [32.4351, -22.6241, 16.2828], [31.6149, -22.052, 16.2828], [31.6149, -22.052, 0]], [[42.9794, -23.1557, 0], [42.9794, -23.1557, 16.4444], [42.0991, -22.6814, 16.4444], [42.0991, -22.6814, 8.22222], [35.0562, -18.8869, 8.22222], [35.0562, -18.8869, 16.4444], [34.1758, -18.4126, 16.4444], [34.1758, -18.4126, 0]], [[45.5906, -18.2099, 0], [45.5906, -18.2099, 16.6061], [44.6619, -17.839, 16.6061], [44.6619, -17.839, 8.30303], [37.2326, -14.8716, 8.30303], [37.2326, -14.8716, 16.6061], [36.304, -14.5007, 16.6061], [36.304, -14.5007, 0]], [[47.6204, -13.0027, 0], [47.6204, -13.0027, 16.7677], [46.6557, -12.7393, 16.7677], [46.6557, -12.7393, 8.38384], [38.9382, -10.632, 8.38384], [38.9382, -10.632, 16.7677], [37.9735, -10.3686, 16.7677], [37.9735, -10.3686, 0]], [[49.0471, -7.60282, 0], [49.0471, -7.60282, 16.9293], [48.0589, -7.44964, 16.9293], [48.0589, -7.44964, 8.46465], [40.1533, -6.22419, 8.46465], [40.1533, -6.22419, 16.9293], [39.1651, -6.07101, 16.9293], [39.1651, -6.07101, 0]], [[49.8571, -2.08039, 0], [49.8571, -2.08039, 17.0909], [48.8579, -2.0387, 17.0909], [48.8579, -2.0387, 8.54545], [40.8649, -1.70517, 8.54545], [40.8649, -1.70517, 17.0909], [39.8658, -1.66348, 17.0909], [39.8658, -1.66348, 0]], [[50.0446, 3.49438, 0], [50.0446, 3.49438, 17.2525], [49.047, 3.42472, 17.2525], [49.047, 3.42472, 8.62626], [41.0664, 2.86748, 8.62626], [41.0664, 2.86748, 17.2525], [40.0689, 2.79782, 17.2525], [40.0689, 2.79782, 0]], [[49.6118, 9.05196, 0], [49.6118, 9.05196, 17.4141], [48.6281, 8.87246, 17.4141], [48.6281, 8.87246, 8.70707], [40.758, 7.43652, 8.70707], [40.758, 7.43652, 17.4141], [39.7742, 7.25703, 17.4141], [39.7742, 7.25703, 0]], [[48.5685, 14.5243, 0], [48.5685, 14.5243, 17.5758], [47.6104, 14.2378, 17.5758], [47.6104, 14.2378, 8.78788], [39.9458, 11.9457, 8.78788], [39.9458, 11.9457, 17.5758], [38.9877, 11.6592, 17.5758], [38.9877, 11.6592, 0]], [[46.9315, 19.8458, 0], [46.9315, 19.8458, 17.7374], [46.0105, 19.4563, 17.7374], [46.0105, 19.4563, 8.86869], [38.6422, 16.3405, 8.86869], [38.6422, 16.3405, 17.7374], [37.7211, 15.951, 17.7374], [37.7211, 15.951, 0]], [[44.7246, 24.9536, 0], [44.7246, 24.9536, 17.899], [43.8513, 24.4664, 17.899], [43.8513, 24.4664, 8.94949], [36.8651, 20.5685, 8.94949], [36.8651, 20.5685, 17.899], [35.9919, 20.0813, 17.899], [35.9919, 20.0813, 0]], [[41.9778, 29.7888, 0], [41.9778, 29.7888, 18.0606], [41.1623, 29.2101, 18.0606], [41.1623, 29.2101, 9.0303], [34.6381, 24.5803, 9.0303], [34.6381, 24.5803, 18.0606], [33.8226, 24.0016, 18.0606], [33.8226, 24.0016, 0]], [[38.7269, 34.2965, 0], [38.7269, 34.2965, 18.2222], [37.9783, 33.6335, 18.2222], [37.9783, 33.6335, 9.11111], [31.9893, 28.3296, 9.11111], [31.9893, 28.3296, 18.2222], [31.2406, 27.6667, 18.2222], [31.2406, 27.6667, 0]], [[35.013, 38.4268, 0], [35.013, 38.4268, 18.3838], [34.3395, 37.6877, 18.3838], [34.3395, 37.6877, 9.19192], [28.9514, 31.7742, 9.19192], [28.9514, 31.7742, 18.3838], [28.2779, 31.0351, 18.3838], [28.2779, 31.0351, 0]], [[30.8816, 42.1349, 0], [30.8816, 42.1349, 18.5455], [30.2905, 41.3283, 18.5455], [30.2905, 41.3283, 9.27273], [25.5613, 34.8758, 9.27273], [25.5613, 34.8758, 18.5455], [24.9701, 34.0693, 18.5455], [24.9701, 34.0693, 0]], [[26.3823, 45.3814, 0], [26.3823, 45.3814, 18.7071], [25.8797, 44.5169, 18.7071], [25.8797, 44.5169, 9.35354], [21.859, 37.6007, 9.35354], [21.859, 37.6007, 18.7071], [21.3564, 36.7362, 18.7071], [21.3564, 36.7362, 0]], [[21.5678, 48.1331, 0], [21.5678, 48.1331, 18.8687], [21.1589, 47.2205, 18.8687], [21.1589, 47.2205, 9.43434], [17.8876, 39.9199, 9.43434], [17.8876, 39.9199, 18.8687], [17.4787, 39.0073, 18.8687], [17.4787, 39.0073, 0]], [[16.4936, 50.3624, 0], [16.4936, 50.3624, 19.0303], [16.1824, 49.4121, 19.0303], [16.1824, 49.4121, 9.51515], [13.6925, 41.8094, 9.51515], [13.6925, 41.8094, 19.0303], [13.3813, 40.8591, 19.0303], [13.3813, 40.8591, 0]], [[11.2169, 52.0483, 0], [11.2169, 52.0483, 19.1919], [11.0063, 51.0707, 19.1919], [11.0063, 51.0707, 9.59596], [9.32088, 43.2503, 9.59596], [9.32088, 43.2503, 19.1919], [9.11021, 42.2727, 19.1919], [9.11021, 42.2727, 0]], [[5.79641, 53.1758, 0], [5.79641, 53.1758, 19.3535], [5.68805, 52.1817, 19.3535], [5.68805, 52.1817, 9.67677], [4.82115, 44.2288, 9.67677], [4.82115, 44.2288, 19.3535], [4.71278, 43.2347, 19.3535], [4.71278, 43.2347, 0]], [[0.291141, 53.7363, 0], [0.291141, 53.7363, 19.5152], [0.285723, 52.7363, 19.5152], [0.285723, 52.7363, 9.75758], [0.24238, 44.7364, 9.75758], [0.24238, 44.7364, 19.5152], [0.236962, 43.7364, 19.5152], [0.236962, 43.7364, 0]], [[-5.23979, 53.7272, 0], [-5.23979, 53.7272, 19.6768], [-5.14273, 52.7319, 19.6768], [-5.14273, 52.7319, 9.83838], [-4.3662, 44.7697, 9.83838], [-4.3662, 44.7697, 19.6768], [-4.26914, 43.7744, 19.6768], [-4.26914, 43.7744, 0]], [[-10.738, 53.1521, 0], [-10.738, 53.1521, 19.8384], [-10.54, 52.1719, 19.8384], [-10.54, 52.1719, 9.91919], [-8.95578, 44.3303, 9.91919], [-8.95578, 44.3303, 19.8384], [-8.75776, 43.3501, 19.8384], [-8.75776, 43.3501, 0]], [[-16.1463, 52.0203, 0], [-16.1463, 52.0203, 20], [-15.8499, 51.0652, 20], [-15.8499, 51.0652, 10], [-13.4784, 43.4248, 10], [-13.4784, 43.4248, 20], [-13.182, 42.4698, 20], [-13.182, 42.4698, 0]]];
for(i = [0:len(expected) - 1]) {
assertEqualPoints(expected[i], sections[i]);
}
}
module test_archimedean_spiral_extrude_slide() {
echo("==== test_archimedean_spiral_extrude_slide ====");
shape_pts = [
[5, 0],
[5, 4],
[4, 4],
[4, 2],
[-4, 2],
[-4, 4],
[-5, 4],
[-5, 0]
];
archimedean_spiral_extrude(
shape_pts,
arm_distance = 15,
init_angle = 180,
point_distance = 5,
num_of_points = 100,
scale = [1, 5]
);
}
test_archimedean_spiral_extrude_slide();