mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 22:28:16 +01:00
37 lines
23 KiB
OpenSCAD
37 lines
23 KiB
OpenSCAD
use <unittest.scad>;
|
|
include <archimedean_spiral_extrude.scad>;
|
|
|
|
module test_archimedean_spiral_extrude(sections) {
|
|
expected = [[[-12.5, -0.0000140415, 0], [-12.5, -0.0000140415, 4], [-11.5, -0.0000129182, 4], [-11.5, -0.0000129182, 2], [-3.5, -3.93162e-6, 2], [-3.5, -3.93162e-6, 4], [-2.5, -2.8083e-6, 4], [-2.5, -2.8083e-6, 0]], [[-10.9842, -8.87663, 0], [-10.9842, -8.87663, 4.16162], [-10.2065, -8.24809, 4.16162], [-10.2065, -8.24809, 2.08081], [-3.98424, -3.21976, 2.08081], [-3.98424, -3.21976, 4.16162], [-3.20646, -2.59122, 4.16162], [-3.20646, -2.59122, 0]], [[-5.09238, -14.5846, 0], [-5.09238, -14.5846, 4.32323], [-4.76273, -13.6404, 4.32323], [-4.76273, -13.6404, 2.16162], [-2.12557, -6.08761, 2.16162], [-2.12557, -6.08761, 4.32323], [-1.79592, -5.14351, 4.32323], [-1.79592, -5.14351, 0]], [[2.43691, -16.4219, 0], [2.43691, -16.4219, 4.48485], [2.29013, -15.4327, 4.48485], [2.29013, -15.4327, 2.24242], [1.11583, -7.51935, 2.24242], [1.11583, -7.51935, 4.48485], [0.969043, -6.53019, 4.48485], [0.969043, -6.53019, 0]], [[9.69147, -14.7377, 0], [9.69147, -14.7377, 4.64646], [9.14202, -13.9021, 4.64646], [9.14202, -13.9021, 2.32323], [4.74648, -7.2179, 2.32323], [4.74648, -7.2179, 4.64646], [4.19703, -6.38237, 4.64646], [4.19703, -6.38237, 0]], [[15.4378, -10.3557, 0], [15.4378, -10.3557, 4.80808], [14.6073, -9.79865, 4.80808], [14.6073, -9.79865, 2.40404], [7.96364, -5.34204, 2.40404], [7.96364, -5.34204, 4.80808], [7.13318, -4.78496, 4.80808], [7.13318, -4.78496, 0]], [[19, -4.26514, 0], [19, -4.26514, 4.9697], [18.0243, -4.04611, 4.9697], [18.0243, -4.04611, 2.48485], [10.2185, -2.29386, 2.48485], [10.2185, -2.29386, 4.9697], [9.24281, -2.07483, 4.9697], [9.24281, -2.07483, 0]], [[20.1398, 2.55924, 0], [20.1398, 2.55924, 5.13131], [19.1478, 2.43318, 5.13131], [19.1478, 2.43318, 2.56566], [11.2116, 1.4247, 2.56566], [11.2116, 1.4247, 5.13131], [10.2196, 1.29864, 5.13131], [10.2196, 1.29864, 0]], [[18.9436, 9.25917, 0], [18.9436, 9.25917, 5.29293], [18.0452, 8.82004, 5.29293], [18.0452, 8.82004, 2.64646], [10.8578, 5.30701, 2.64646], [10.8578, 5.30701, 5.29293], [9.95934, 4.86789, 5.29293], [9.95934, 4.86789, 0]], [[15.7218, 15.1457, 0], [15.7218, 15.1457, 5.45455], [15.0017, 14.4519, 5.45455], [15.0017, 14.4519, 2.72727], [9.24022, 8.9016, 2.72727], [9.24022, 8.9016, 5.45455], [8.52004, 8.20782, 5.45455], [8.52004, 8.20782, 0]], [[10.9234, 19.7189, 0], [10.9234, 19.7189, 5.61616], [10.4388, 18.8441, 5.61616], [10.4388, 18.8441, 2.80808], [6.56225, 11.8461, 2.80808], [6.56225, 11.8461, 5.61616], [6.07768, 10.9714, 5.61616], [6.07768, 10.9714, 0]], [[5.06562, 22.6659, 0], [5.06562, 22.6659, 5.77778], [4.84751, 21.69, 5.77778], [4.84751, 21.69, 2.88889], [3.10263, 13.8826, 2.88889], [3.10263, 13.8826, 5.77778], [2.88452, 12.9067, 5.77778], [2.88452, 12.9067, 0]], [[-1.32091, 23.8455, 0], [-1.32091, 23.8455, 5.93939], [-1.2656, 22.8471, 5.93939], [-1.2656, 22.8471, 2.9697], [-0.823122, 14.8593, 2.9697], [-0.823122, 14.8593, 5.93939], [-0.767813, 13.8609, 5.93939], [-0.767813, 13.8609, 0]], [[-7.73333, 23.2645, 0], [-7.73333, 23.2645, 6.10101], [-7.41789, 22.3155, 6.10101], [-7.41789, 22.3155, 3.05051], [-4.89439, 14.724, 3.05051], [-4.89439, 14.724, 6.10101], [-4.57895, 13.775, 6.10101], [-4.57895, 13.775, 0]], [[-13.7257, 21.0498, 0], [-13.7257, 21.0498, 6.26263], [-13.1795, 20.2121, 6.26263], [-13.1795, 20.2121, 3.13131], [-8.80993, 13.5109, 3.13131], [-8.80993, 13.5109, 6.26263], [-8.26373, 12.6732, 6.26263], [-8.26373, 12.6732, 0]], [[-18.9279, 17.42, 0], [-18.9279, 17.42, 6.42424], [-18.1921, 16.7428, 6.42424], [-18.1921, 16.7428, 3.21212], [-12.3056, 11.3253, 3.21212], [-12.3056, 11.3253, 6.42424], [-11.5698, 10.6481, 6.42424], [-11.5698, 10.6481, 0]], [[-23.0553, 12.6576, 0], [-23.0553, 12.6576, 6.58586], [-22.1787, 12.1763, 6.58586], [-22.1787, 12.1763, 3.29293], [-15.1661, 8.32631, 3.29293], [-15.1661, 8.32631, 6.58586], [-14.2895, 7.84506, 6.58586], [-14.2895, 7.84506, 0]], [[-25.9125, 7.08267, 0], [-25.9125, 7.08267, 6.74747], [-24.9479, 6.81901, 6.74747], [-24.9479, 6.81901, 3.37374], [-17.231, 4.70974, 3.37374], [-17.231, 4.70974, 6.74747], [-16.2663, 4.44608, 6.74747], [-16.2663, 4.44608, 0]], [[-27.3908, 1.03079, 0], [-27.3908, 1.03079, 6.90909], [-26.3915, 0.993185, 6.90909], [-26.3915, 0.993185, 3.45455], [-18.3972, 0.692336, 3.45455], [-18.3972, 0.692336, 6.90909], [-17.3979, 0.65473, 6.90909], [-17.3979, 0.65473, 0]], [[-27.4622, -5.16665, 0], [-27.4622, -5.16665, 7.07071], [-26.4794, -4.98175, 7.07071], [-26.4794, -4.98175, 3.53535], [-18.6173, -3.50261, 3.53535], [-18.6173, -3.50261, 7.07071], [-17.6346, -3.31771, 7.07071], [-17.6346, -3.31771, 0]], [[-26.1701, -11.198, 0], [-26.1701, -11.198, 7.23232], [-25.2507, -10.8046, 7.23232], [-25.2507, -10.8046, 3.61616], [-17.8958, -7.65749, 3.61616], [-17.8958, -7.65749, 7.23232], [-16.9764, -7.26409, 7.23232], [-16.9764, -7.26409, 0]], [[-23.6189, -16.7836, 0], [-23.6189, -16.7836, 7.39394], [-22.8038, -16.2044, 7.39394], [-22.8038, -16.2044, 3.69697], [-16.2826, -11.5704, 3.69697], [-16.2826, -11.5704, 7.39394], [-15.4674, -10.9912, 7.39394], [-15.4674, -10.9912, 0]], [[-19.9619, -21.6845, 0], [-19.9619, -21.6845, 7.55556], [-19.2847, -20.9488, 7.55556], [-19.2847, -20.9488, 3.77778], [-13.8664, -15.063, 3.77778], [-13.8664, -15.063, 7.55556], [-13.1891, -14.3273, 7.55556], [-13.1891, -14.3273, 0]], [[-15.3893, -25.7081, 0], [-15.3893, -25.7081, 7.71717], [-14.8757, -24.8501, 7.71717], [-14.8757, -24.8501, 3.85859], [-10.7667, -17.986, 3.85859], [-10.7667, -17.986, 7.71717], [-10.2531, -17.128, 7.71717], [-10.2531, -17.128, 0]], [[-10.1162, -28.7112, 0], [-10.1162, -28.7112, 7.87879], [-9.78392, -27.768, 7.87879], [-9.78392, -27.768, 3.93939], [-7.12536, -20.2227, 3.93939], [-7.12536, -20.2227, 7.87879], [-6.79304, -19.2795, 7.87879], [-6.79304, -19.2795, 0]], [[-4.372, -30.6005, 0], [-4.372, -30.6005, 8.0404], [-4.23057, -29.6105, 8.0404], [-4.23057, -29.6105, 4.0202], [-3.09907, -21.6909, 4.0202], [-3.09907, -21.6909, 8.0404], [-2.95763, -20.701, 8.0404], [-2.95763, -20.701, 0]], [[1.6104, -31.3312, 0], [1.6104, -31.3312, 8.20202], [1.55907, -30.3325, 8.20202], [1.55907, -30.3325, 4.10101], [1.14842, -22.3431, 4.10101], [1.14842, -22.3431, 8.20202], [1.09709, -21.3444, 8.20202], [1.09709, -21.3444, 0]], [[7.60312, -30.9044, 0], [7.60312, -30.9044, 8.36364], [7.36422, -29.9333, 8.36364], [7.36422, -29.9333, 4.18182], [5.45304, -22.165, 4.18182], [5.45304, -22.165, 8.36364], [5.21414, -21.1939, 8.36364], [5.21414, -21.1939, 0]], [[13.3911, -29.362, 0], [13.3911, -29.362, 8.52525], [12.9761, -28.4522, 8.52525], [12.9761, -28.4522, 4.26263], [9.65651, -21.1734, 4.26263], [9.65651, -21.1734, 8.52525], [9.24156, -20.2636, 8.52525], [9.24156, -20.2636, 0]], [[18.7782, -26.7826, 0], [18.7782, -26.7826, 8.68687], [18.2042, -25.9638, 8.68687], [18.2042, -25.9638, 4.34343], [13.6115, -19.4135, 4.34343], [13.6115, -19.4135, 8.68687], [13.0374, -18.5947, 8.68687], [13.0374, -18.5947, 0]], [[23.5926, -23.275, 0], [23.5926, -23.275, 8.84848], [22.8807, -22.5727, 8.84848], [22.8807, -22.5727, 4.42424], [17.1857, -16.9543, 4.42424], [17.1857, -16.9543, 8.84848], [16.4738, -16.252, 8.84848], [16.4738, -16.252, 0]], [[27.6896, -18.9724, 0], [27.6896, -18.9724, 9.0101], [26.8647, -18.4072, 9.0101], [26.8647, -18.4072, 4.50505], [20.2652, -13.8854, 4.50505], [20.2652, -13.8854, 9.0101], [19.4403, -13.3201, 9.0101], [19.4403, -13.3201, 0]], [[30.9547, -14.0265, 0], [30.9547, -14.0265, 9.17172], [30.0438, -13.6137, 9.17172], [30.0438, -13.6137, 4.58586], [22.757, -10.3119, 4.58586], [22.757, -10.3119, 9.17172], [21.8461, -9.89912, 9.17172], [21.8461, -9.89912, 0]], [[33.304, -8.60086, 0], [33.304, -8.60086, 9.33333], [32.3357, -8.35081, 9.33333], [32.3357, -8.35081, 4.66667], [24.5899, -6.35041, 4.66667], [24.5899, -6.35041, 9.33333], [23.6216, -6.10036, 9.33333], [23.6216, -6.10036, 0]], [[34.685, -2.86586, 0], [34.685, -2.86586, 9.49495], [33.6884, -2.78351, 9.49495], [33.6884, -2.78351, 4.74747], [25.7156, -2.12475, 4.74747], [25.7156, -2.12475, 9.49495], [24.7189, -2.04241, 9.49495], [24.7189, -2.04241, 0]], [[35.0755, 3.00723, 0], [35.0755, 3.00723, 9.65657], [34.0791, 2.92181, 9.65657], [34.0791, 2.92181, 4.82828], [26.1084, 2.23843, 4.82828], [26.1084, 2.23843, 9.65657], [25.112, 2.153, 9.65657], [25.112, 2.153, 0]], [[34.482, 8.85087, 0], [34.482, 8.85087, 9.81818], [33.5134, 8.60225, 9.81818], [33.5134, 8.60225, 4.90909], [25.7646, 6.61328, 4.90909], [25.7646, 6.61328, 9.81818], [24.796, 6.36466, 9.81818], [24.796, 6.36466, 0]], [[32.9377, 14.5056, 0], [32.9377, 14.5056, 9.9798], [32.0225, 14.1026, 9.9798], [32.0225, 14.1026, 4.9899], [24.7011, 10.8782, 4.9899], [24.7011, 10.8782, 9.9798], [23.7859, 10.4752, 9.9798], [23.7859, 10.4752, 0]], [[30.4996, 19.8238, 0], [30.4996, 19.8238, 10.1414], [29.6611, 19.2789, 10.1414], [29.6611, 19.2789, 5.07071], [22.9535, 14.9191, 5.07071], [22.9535, 14.9191, 10.1414], [22.115, 14.3741, 10.1414], [22.115, 14.3741, 0]], [[27.2456, 24.6727, 0], [27.2456, 24.6727, 10.303], [26.5043, 24.0014, 10.303], [26.5043, 24.0014, 5.15152], [20.5744, 18.6315, 5.15152], [20.5744, 18.6315, 10.303], [19.8332, 17.9602, 10.303], [19.8332, 17.9602, 0]], [[23.2711, 28.9365, 0], [23.2711, 28.9365, 10.4646], [22.6444, 28.1572, 10.4646], [22.6444, 28.1572, 5.23232], [17.6308, 21.9231, 5.23232], [17.6308, 21.9231, 10.4646], [17.0041, 21.1438, 10.4646], [17.0041, 21.1438, 0]], [[18.6857, 32.5186, 0], [18.6857, 32.5186, 10.6263], [18.1875, 31.6516, 10.6263], [18.1875, 31.6516, 5.31313], [14.2017, 24.7152, 5.31313], [14.2017, 24.7152, 10.6263], [13.7035, 23.8481, 10.6263], [13.7035, 23.8481, 0]], [[13.6094, 35.3427, 0], [13.6094, 35.3427, 10.7879], [13.2501, 34.4095, 10.7879], [13.2501, 34.4095, 5.39394], [10.3753, 26.9439, 5.39394], [10.3753, 26.9439, 10.7879], [10.0159, 26.0107, 10.7879], [10.0159, 26.0107, 0]], [[8.16947, 37.353, 0], [8.16947, 37.353, 10.9495], [7.95581, 36.3761, 10.9495], [7.95581, 36.3761, 5.47475], [6.24653, 28.5608, 5.47475], [6.24653, 28.5608, 10.9495], [6.03287, 27.5839, 10.9495], [6.03287, 27.5839, 0]], [[2.49682, 38.5146, 0], [2.49682, 38.5146, 11.1111], [2.43213, 37.5167, 11.1111], [2.43213, 37.5167, 5.55556], [1.91459, 29.5334, 5.55556], [1.91459, 29.5334, 11.1111], [1.8499, 28.5355, 11.1111], [1.8499, 28.5355, 0]], [[-3.27697, 38.813, 0], [-3.27697, 38.813, 11.2727], [-3.19284, 37.8165, 11.2727], [-3.19284, 37.8165, 5.63636], [-2.5198, 29.8449, 5.63636], [-2.5198, 29.8449, 11.2727], [-2.43567, 28.8484, 11.2727], [-2.43567, 28.8484, 0]], [[-9.02272, 38.2533, 0], [-9.02272, 38.2533, 11.4343], [-8.79315, 37.28, 11.4343], [-8.79315, 37.28, 5.71717], [-6.95661, 29.4937, 5.71717], [-6.95661, 29.4937, 11.4343], [-6.72704, 28.5204, 11.4343], [-6.72704, 28.5204, 0]], [[-14.6162, 36.859, 0], [-14.6162, 36.859, 11.596], [-14.2476, 35.9294, 11.596], [-14.2476, 35.9294, 5.79798], [-11.2987, 28.4928, 5.79798], [-11.2987, 28.4928, 11.596], [-10.93, 27.5632, 11.596], [-10.93, 27.5632, 0]], [[-19.9407, 34.6706, 0], [-19.9407, 34.6706, 11.7576], [-19.4421, 33.8038, 11.7576], [-19.4421, 33.8038, 5.87879], [-15.4536, 26.869, 5.87879], [-15.4536, 26.869, 11.7576], [-14.955, 26.0021, 11.7576], [-14.955, 26.0021, 0]], [[-24.8886, 31.7437, 0], [-24.8886, 31.7437, 11.9192], [-24.2716, 30.9567, 11.9192], [-24.2716, 30.9567, 5.9596], [-19.3355, 24.6611, 5.9596], [-19.3355, 24.6611, 11.9192], [-18.7185, 23.8742, 11.9192], [-18.7185, 23.8742, 0]], [[-29.3638, 28.1471, 0], [-29.3638, 28.1471, 12.0808], [-28.6419, 27.4551, 12.0808], [-28.6419, 27.4551, 6.0404], [-22.8667, 21.9192, 6.0404], [-22.8667, 21.9192, 12.0808], [-22.1448, 21.2272, 12.0808], [-22.1448, 21.2272, 0]], [[-33.2824, 23.9611, 0], [-33.2824, 23.9611, 12.2424], [-32.4708, 23.3768, 12.2424], [-32.4708, 23.3768, 6.12121], [-25.9783, 18.7026, 6.12121], [-25.9783, 18.7026, 12.2424], [-25.1668, 18.1184, 12.2424], [-25.1668, 18.1184, 0]], [[-36.574, 19.2747, 0], [-36.574, 19.2747, 12.404], [-35.6893, 18.8084, 12.404], [-35.6893, 18.8084, 6.20202], [-28.612, 15.0787, 6.20202], [-28.612, 15.0787, 12.404], [-27.7273, 14.6124, 12.404], [-27.7273, 14.6124, 0]], [[-39.1825, 14.1842, 0], [-39.1825, 14.1842, 12.5657], [-38.2422, 13.8438, 12.5657], [-38.2422, 13.8438, 6.28283], [-30.7199, 11.1207, 6.28283], [-30.7199, 11.1207, 12.5657], [-29.7796, 10.7803, 12.5657], [-29.7796, 10.7803, 0]], [[-41.0663, 8.79046, 0], [-41.0663, 8.79046, 12.7273], [-40.0884, 8.58115, 12.7273], [-40.0884, 8.58115, 6.36364], [-32.2656, 6.90664, 6.36364], [-32.2656, 6.90664, 12.7273], [-31.2878, 6.69732, 12.7273], [-31.2878, 6.69732, 0]], [[-42.1985, 3.19725, 0], [-42.1985, 3.19725, 12.8889], [-41.2014, 3.1217, 12.8889], [-41.2014, 3.1217, 6.44444], [-33.2242, 2.51729, 6.44444], [-33.2242, 2.51729, 12.8889], [-32.2271, 2.44174, 12.8889], [-32.2271, 2.44174, 0]], [[-42.5667, -2.49114, 0], [-42.5667, -2.49114, 13.0505], [-41.5684, -2.43272, 13.0505], [-41.5684, -2.43272, 6.52525], [-33.5821, -1.96533, 6.52525], [-33.5821, -1.96533, 13.0505], [-32.5838, -1.90691, 13.0505], [-32.5838, -1.90691, 0]], [[-42.1725, -8.17157, 0], [-42.1725, -8.17157, 13.2121], [-41.1908, -7.98134, 13.2121], [-41.1908, -7.98134, 6.60606], [-33.3369, -6.45952, 6.60606], [-33.3369, -6.45952, 13.2121], [-32.3551, -6.2693, 13.2121], [-32.3551, -6.2693, 0]], [[-41.0309, -13.7439, 0], [-41.0309, -13.7439, 13.3737], [-40.0827, -13.4263, 13.3737], [-40.0827, -13.4263, 6.68687], [-32.497, -10.8853, 6.68687], [-32.497, -10.8853, 13.3737], [-31.5488, -10.5677, 13.3737], [-31.5488, -10.5677, 0]], [[-39.1695, -19.1125, 0], [-39.1695, -19.1125, 13.5354], [-38.2708, -18.674, 13.5354], [-38.2708, -18.674, 6.76768], [-31.0811, -15.1658, 6.76768], [-31.0811, -15.1658, 13.5354], [-30.1824, -14.7273, 13.5354], [-30.1824, -14.7273, 0]], [[-36.6274, -24.1879, 0], [-36.6274, -24.1879, 13.697], [-35.793, -23.6368, 13.697], [-35.793, -23.6368, 6.84848], [-29.1173, -19.2283, 6.84848], [-29.1173, -19.2283, 13.697], [-28.2828, -18.6773, 13.697], [-28.2828, -18.6773, 0]], [[-33.4541, -28.8877, 0], [-33.4541, -28.8877, 13.8586], [-32.6973, -28.2341, 13.8586], [-32.6973, -28.2341, 6.92929], [-26.6423, -23.0056, 6.92929], [-26.6423, -23.0056, 13.8586], [-25.8854, -22.3521, 13.8586], [-25.8854, -22.3521, 0]], [[-29.7083, -33.138, 0], [-29.7083, -33.138, 14.0202], [-29.0408, -32.3934, 14.0202], [-29.0408, -32.3934, 7.0101], [-23.7006, -26.4367, 7.0101], [-23.7006, -26.4367, 14.0202], [-23.033, -25.6921, 14.0202], [-23.033, -25.6921, 0]], [[-25.4564, -36.8739, 0], [-25.4564, -36.8739, 14.1818], [-24.8883, -36.0509, 14.1818], [-24.8883, -36.0509, 7.09091], [-20.3432, -29.4674, 7.09091], [-20.3432, -29.4674, 14.1818], [-19.7751, -28.6445, 14.1818], [-19.7751, -28.6445, 0]], [[-20.7714, -40.0405, 0], [-20.7714, -40.0405, 14.3434], [-20.3109, -39.1528, 14.3434], [-20.3109, -39.1528, 7.17172], [-16.627, -32.0515, 7.17172], [-16.627, -32.0515, 14.3434], [-16.1665, -31.1638, 14.3434], [-16.1665, -31.1638, 0]], [[-15.7312, -42.5931, 0], [-15.7312, -42.5931, 14.5051], [-15.3847, -41.6551, 14.5051], [-15.3847, -41.6551, 7.25253], [-12.6131, -34.1506, 7.25253], [-12.6131, -34.1506, 14.5051], [-12.2666, -33.2125, 14.5051], [-12.2666, -33.2125, 0]], [[-10.4175, -44.4978, 0], [-10.4175, -44.4978, 14.6667], [-10.1896, -43.5241, 14.6667], [-10.1896, -43.5241, 7.33333], [-8.36597, -35.7347, 7.33333], [-8.36597, -35.7347, 14.6667], [-8.13802, -34.7611, 14.6667], [-8.13802, -34.7611, 0]], [[-4.91415, -45.7312, 0], [-4.91415, -45.7312, 14.8283], [-4.80731, -44.7369, 14.8283], [-4.80731, -44.7369, 7.41414], [-3.95257, -36.7827, 7.41414], [-3.95257, -36.7827, 14.8283], [-3.84573, -35.7884, 14.8283], [-3.84573, -35.7884, 0]], [[0.694121, -46.2806, 0], [0.694121, -46.2806, 14.9899], [0.679124, -45.2807, 14.9899], [0.679124, -45.2807, 7.49495], [0.559153, -37.2816, 7.49495], [0.559153, -37.2816, 14.9899], [0.544157, -36.2817, 14.9899], [0.544157, -36.2817, 0]], [[6.32293, -46.1439, 0], [6.32293, -46.1439, 15.1515], [6.18717, -45.1532, 15.1515], [6.18717, -45.1532, 7.57576], [5.10111, -37.2272, 7.57576], [5.10111, -37.2272, 15.1515], [4.96535, -36.2365, 15.1515], [4.96535, -36.2365, 0]], [[11.8895, -45.329, 0], [11.8895, -45.329, 15.3131], [11.6358, -44.3618, 15.3131], [11.6358, -44.3618, 7.65657], [9.60611, -36.6235, 7.65657], [9.60611, -36.6235, 15.3131], [9.3524, -35.6562, 15.3131], [9.3524, -35.6562, 0]], [[17.3139, -43.8535, 0], [17.3139, -43.8535, 15.4747], [16.9466, -42.9234, 15.4747], [16.9466, -42.9234, 7.73737], [14.0088, -35.4824, 7.73737], [14.0088, -35.4824, 15.4747], [13.6416, -34.5522, 15.4747], [13.6416, -34.5522, 0]], [[22.5198, -41.744, 0], [22.5198, -41.744, 15.6364], [22.045, -40.8639, 15.6364], [22.045, -40.8639, 7.81818], [18.2467, -33.8231, 7.81818], [18.2467, -33.8231, 15.6364], [17.7719, -32.943, 15.6364], [17.7719, -32.943, 0]], [[27.4358, -39.0354, 0], [27.4358, -39.0354, 15.798], [26.8608, -38.2173, 15.798], [26.8608, -38.2173, 7.89899], [22.2606, -31.6722, 7.89899], [22.2606, -31.6722, 15.798], [21.6856, -30.854, 15.798], [21.6856, -30.854, 0]], [[31.996, -35.7702, 0], [31.996, -35.7702, 15.9596], [31.3293, -35.0249, 15.9596], [31.3293, -35.0249, 7.9798], [25.9957, -29.0622, 7.9798], [25.9957, -29.0622, 15.9596], [25.329, -28.3168, 15.9596], [25.329, -28.3168, 0]], [[36.1406, -31.9976, 0], [36.1406, -31.9976, 16.1212], [35.3919, -31.3347, 16.1212], [35.3919, -31.3347, 8.06061], [29.4021, -26.0316, 8.06061], [29.4021, -26.0316, 16.1212], [28.6534, -25.3687, 16.1212], [28.6534, -25.3687, 0]], [[39.817, -27.7727, 0], [39.817, -27.7727, 16.2828], [38.9968, -27.2006, 16.2828], [38.9968, -27.2006, 8.14141], [32.4353, -22.6239, 8.14141], [32.4353, -22.6239, 16.2828], [31.6151, -22.0518, 16.2828], [31.6151, -22.0518, 0]], [[42.9796, -23.1554, 0], [42.9796, -23.1554, 16.4444], [42.0992, -22.6811, 16.4444], [42.0992, -22.6811, 8.22222], [35.0563, -18.8867, 8.22222], [35.0563, -18.8867, 16.4444], [34.1759, -18.4124, 16.4444], [34.1759, -18.4124, 0]], [[45.5907, -18.2096, 0], [45.5907, -18.2096, 16.6061], [44.662, -17.8387, 16.6061], [44.662, -17.8387, 8.30303], [37.2327, -14.8713, 8.30303], [37.2327, -14.8713, 16.6061], [36.3041, -14.5004, 16.6061], [36.3041, -14.5004, 0]], [[47.6205, -13.0024, 0], [47.6205, -13.0024, 16.7677], [46.6558, -12.739, 16.7677], [46.6558, -12.739, 8.38384], [38.9383, -10.6318, 8.38384], [38.9383, -10.6318, 16.7677], [37.9736, -10.3684, 16.7677], [37.9736, -10.3684, 0]], [[49.0472, -7.60249, 0], [49.0472, -7.60249, 16.9293], [48.059, -7.44932, 16.9293], [48.059, -7.44932, 8.46465], [40.1534, -6.22392, 8.46465], [40.1534, -6.22392, 16.9293], [39.1652, -6.07075, 16.9293], [39.1652, -6.07075, 0]], [[49.8571, -2.08005, 0], [49.8571, -2.08005, 17.0909], [48.8579, -2.03837, 17.0909], [48.8579, -2.03837, 8.54545], [40.8649, -1.7049, 8.54545], [40.8649, -1.7049, 17.0909], [39.8658, -1.66321, 17.0909], [39.8658, -1.66321, 0]], [[50.0446, 3.49472, 0], [50.0446, 3.49472, 17.2525], [49.047, 3.42506, 17.2525], [49.047, 3.42506, 8.62626], [41.0664, 2.86776, 8.62626], [41.0664, 2.86776, 17.2525], [40.0688, 2.79809, 17.2525], [40.0688, 2.79809, 0]], [[49.6118, 9.05229, 0], [49.6118, 9.05229, 17.4141], [48.628, 8.87279, 17.4141], [48.628, 8.87279, 8.70707], [40.7579, 7.4368, 8.70707], [40.7579, 7.4368, 17.4141], [39.7742, 7.2573, 17.4141], [39.7742, 7.2573, 0]], [[48.5684, 14.5247, 0], [48.5684, 14.5247, 17.5758], [47.6103, 14.2381, 17.5758], [47.6103, 14.2381, 8.78788], [39.9457, 11.946, 8.78788], [39.9457, 11.946, 17.5758], [38.9876, 11.6595, 17.5758], [38.9876, 11.6595, 0]], [[46.9314, 19.8461, 0], [46.9314, 19.8461, 17.7374], [46.0103, 19.4566, 17.7374], [46.0103, 19.4566, 8.86869], [38.6421, 16.3408, 8.86869], [38.6421, 16.3408, 17.7374], [37.721, 15.9513, 17.7374], [37.721, 15.9513, 0]], [[44.7244, 24.9539, 0], [44.7244, 24.9539, 17.899], [43.8512, 24.4667, 17.899], [43.8512, 24.4667, 8.94949], [36.865, 20.5688, 8.94949], [36.865, 20.5688, 17.899], [35.9917, 20.0815, 17.899], [35.9917, 20.0815, 0]], [[41.9776, 29.7891, 0], [41.9776, 29.7891, 18.0606], [41.1621, 29.2103, 18.0606], [41.1621, 29.2103, 9.0303], [34.6379, 24.5805, 9.0303], [34.6379, 24.5805, 18.0606], [33.8224, 24.0018, 18.0606], [33.8224, 24.0018, 0]], [[38.7267, 34.2968, 0], [38.7267, 34.2968, 18.2222], [37.9781, 33.6338, 18.2222], [37.9781, 33.6338, 9.11111], [31.9891, 28.3299, 9.11111], [31.9891, 28.3299, 18.2222], [31.2404, 27.6669, 18.2222], [31.2404, 27.6669, 0]], [[35.0127, 38.4271, 0], [35.0127, 38.4271, 18.3838], [34.3392, 37.6879, 18.3838], [34.3392, 37.6879, 9.19192], [28.9512, 31.7744, 9.19192], [28.9512, 31.7744, 18.3838], [28.2777, 31.0353, 18.3838], [28.2777, 31.0353, 0]], [[30.8813, 42.1351, 0], [30.8813, 42.1351, 18.5455], [30.2902, 41.3285, 18.5455], [30.2902, 41.3285, 9.27273], [25.561, 34.876, 9.27273], [25.561, 34.876, 18.5455], [24.9699, 34.0694, 18.5455], [24.9699, 34.0694, 0]], [[26.382, 45.3816, 0], [26.382, 45.3816, 18.7071], [25.8794, 44.5171, 18.7071], [25.8794, 44.5171, 9.35354], [21.8587, 37.6009, 9.35354], [21.8587, 37.6009, 18.7071], [21.3561, 36.7363, 18.7071], [21.3561, 36.7363, 0]], [[21.5675, 48.1332, 0], [21.5675, 48.1332, 18.8687], [21.1586, 47.2206, 18.8687], [21.1586, 47.2206, 9.43434], [17.8873, 39.92, 9.43434], [17.8873, 39.92, 18.8687], [17.4784, 39.0075, 18.8687], [17.4784, 39.0075, 0]], [[16.4932, 50.3625, 0], [16.4932, 50.3625, 19.0303], [16.182, 49.4122, 19.0303], [16.182, 49.4122, 9.51515], [13.6922, 41.8095, 9.51515], [13.6922, 41.8095, 19.0303], [13.381, 40.8592, 19.0303], [13.381, 40.8592, 0]], [[11.2166, 52.0484, 0], [11.2166, 52.0484, 19.1919], [11.0059, 51.0708, 19.1919], [11.0059, 51.0708, 9.59596], [9.32057, 43.2504, 9.59596], [9.32057, 43.2504, 19.1919], [9.1099, 42.2728, 19.1919], [9.1099, 42.2728, 0]], [[5.79603, 53.1759, 0], [5.79603, 53.1759, 19.3535], [5.68767, 52.1817, 19.3535], [5.68767, 52.1817, 9.67677], [4.82083, 44.2288, 9.67677], [4.82083, 44.2288, 19.3535], [4.71247, 43.2347, 19.3535], [4.71247, 43.2347, 0]], [[0.290748, 53.7363, 0], [0.290748, 53.7363, 19.5152], [0.285338, 52.7363, 19.5152], [0.285338, 52.7363, 9.75758], [0.242053, 44.7364, 9.75758], [0.242053, 44.7364, 19.5152], [0.236643, 43.7364, 19.5152], [0.236643, 43.7364, 0]], [[-5.24019, 53.7272, 0], [-5.24019, 53.7272, 19.6768], [-5.14311, 52.7319, 19.6768], [-5.14311, 52.7319, 9.83838], [-4.36653, 44.7697, 9.83838], [-4.36653, 44.7697, 19.6768], [-4.26946, 43.7744, 19.6768], [-4.26946, 43.7744, 0]], [[-10.7384, 53.152, 0], [-10.7384, 53.152, 19.8384], [-10.5404, 52.1718, 19.8384], [-10.5404, 52.1718, 9.91919], [-8.95611, 44.3302, 9.91919], [-8.95611, 44.3302, 19.8384], [-8.75808, 43.35, 19.8384], [-8.75808, 43.35, 0]], [[-16.1467, 52.0202, 0], [-16.1467, 52.0202, 20], [-15.8503, 51.0651, 20], [-15.8503, 51.0651, 10], [-13.4788, 43.4247, 10], [-13.4788, 43.4247, 20], [-13.1823, 42.4697, 20], [-13.1823, 42.4697, 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(); |