1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00

update test

This commit is contained in:
Justin Lin 2022-04-16 17:07:49 +08:00
parent 276405c478
commit a56f451b26
4 changed files with 5 additions and 4 deletions

View File

@ -12,7 +12,7 @@ module test_archimedean_spiral() {
);
expected_points = [[-5, -5.6166e-6], [-3.33332, -5.77351], [1.91533, -7.65424], [6.92877, -5.61211], [9.7591, -1.1017], [9.79062, 4.16668], [7.28945, 8.75883], [3.01356, 11.7181], [-2.09019, 12.5895], [-7.09946, 11.3523], [-11.25, 8.31153], [-14.0047, 3.9801], [-15.0734, -1.03017], [-14.399, -6.09976], [-12.1214, -10.6704], [-8.52998, -14.2915], [-4.01284, -16.6467], [0.993248, -17.5618], [6.04659, -17.0006], [10.7369, -15.0487], [14.7128, -11.8923], [17.7006, -7.79251], [19.5144, -3.05819], [20.0591, 1.97944], [19.327, 6.99059], [17.3893, 11.6669], [14.3848, 15.7379], [10.5052, 18.9825], [5.98025, 21.2372], [1.06198, 22.3994], [-3.98996, 22.4281], [-8.92185, 21.3403], [-13.4977, 19.2064], [-17.5088, 16.1424], [-20.7814, 12.3014], [-23.1818, 7.86423], [-24.6194, 3.02975], [-25.0472, -1.9946], [-24.4613, -7.0019], [-22.8982, -11.7938], [-20.4306, -16.1878], [-17.163, -20.0231], [-13.2252, -23.165], [-8.76686, -25.5087], [-3.95086, -26.9808], [1.05313, -27.5407], [6.07462, -27.1794], [10.948, -25.9187], [15.5175, -23.8089], [19.6418, -20.9253], [23.1977, -17.3652], [26.0827, -13.2433], [28.2174, -8.68809], [29.5464, -3.8368], [30.0391, 1.16851], [29.6894, 6.18531], [28.5145, 11.0746], [26.5536, 15.7045], [23.866, 19.9533], [20.5287, 23.7128], [16.6332, 26.8897], [12.2835, 29.408], [7.59187, 31.2101], [2.6768, 32.2573], [-2.34079, 32.5302], [-7.34027, 32.0282], [-12.2042, 30.769], [-16.8208, 28.7875], [-21.0866, 26.1344], [-24.9081, 22.8741], [-28.2036, 19.0834], [-30.9049, 14.8491], [-32.9577, 10.2655], [-34.3229, 5.43264], [-34.9764, 0.453654], [-34.9095, -4.56731], [-34.1284, -9.52732], [-32.6534, -14.3266], [-30.5184, -18.8707], [-27.7696, -23.0716], [-24.4643, -26.8501], [-20.6694, -30.136], [-16.4598, -32.8703], [-11.9169, -35.0049], [-7.12684, -36.5039], [-2.17866, -37.3437], [2.83721, -37.513], [7.83071, -37.0125], [12.7137, -35.855], [17.4014, -34.0643], [21.814, -31.675], [25.8775, -28.7313], [29.525, -25.2858], [32.6978, -21.399], [35.3459, -17.1377], [37.4287, -12.5734], [38.9154, -7.78198], [39.7852, -2.84131], [40.0274, 2.16931], [39.6415, 7.17075]];
expected_points = [[-5, -7.44079e-15], [-3.33333, -5.7735], [1.91532, -7.65424], [6.92876, -5.61213], [9.7591, -1.10172], [9.79063, 4.16666], [7.28947, 8.75881], [3.01359, 11.7181], [-2.09016, 12.5895], [-7.09943, 11.3523], [-11.25, 8.31156], [-14.0047, 3.98014], [-15.0734, -1.03012], [-14.399, -6.09971], [-12.1214, -10.6703], [-8.53004, -14.2915], [-4.01291, -16.6467], [0.993179, -17.5619], [6.04652, -17.0006], [10.7368, -15.0487], [14.7127, -11.8924], [17.7006, -7.79258], [19.5144, -3.05828], [20.0591, 1.97935], [19.327, 6.9905], [17.3893, 11.6669], [14.3849, 15.7378], [10.5053, 18.9825], [5.98036, 21.2372], [1.06209, 22.3994], [-3.98985, 22.4281], [-8.92173, 21.3403], [-13.4975, 19.2065], [-17.5087, 16.1425], [-20.7813, 12.3015], [-23.1818, 7.86435], [-24.6194, 3.02989], [-25.0472, -1.99446], [-24.4613, -7.00176], [-22.8982, -11.7937], [-20.4307, -16.1877], [-17.1631, -20.023], [-13.2253, -23.1649], [-8.76701, -25.5086], [-3.95103, -26.9808], [1.05296, -27.5407], [6.07445, -27.1794], [10.9478, -25.9188], [15.5173, -23.809], [19.6417, -20.9254], [23.1976, -17.3653], [26.0826, -13.2435], [28.2173, -8.68828], [29.5464, -3.83699], [30.0392, 1.16831], [29.6895, 6.18511], [28.5146, 11.0744], [26.5537, 15.7043], [23.8662, 19.9532], [20.5288, 23.7126], [16.6334, 26.8895], [12.2837, 29.4079], [7.5921, 31.2101], [2.67704, 32.2573], [-2.34055, 32.5302], [-7.34003, 32.0282], [-12.204, 30.7691], [-16.8206, 28.7877], [-21.0864, 26.1345], [-24.9079, 22.8743], [-28.2035, 19.0837], [-30.9048, 14.8493], [-32.9576, 10.2658], [-34.3228, 5.43291], [-34.9764, 0.453929], [-34.9096, -4.56704], [-34.1284, -9.52705], [-32.6535, -14.3264], [-30.5185, -18.8704], [-27.7698, -23.0714], [-24.4645, -26.8499], [-20.6696, -30.1359], [-16.4601, -32.8701], [-11.9172, -35.0048], [-7.12715, -36.5039], [-2.17897, -37.3437], [2.83689, -37.513], [7.8304, -37.0126], [12.7134, -35.8551], [17.4011, -34.0645], [21.8137, -31.6752], [25.8772, -28.7315], [29.5248, -25.2861], [32.6976, -21.3993], [35.3458, -17.138], [37.4286, -12.5738], [38.9153, -7.78232], [39.7852, -2.84167], [40.0274, 2.16895], [39.6415, 7.17039]];
expected_angles = [180, 240, 284.049, 320.993, 353.559, 383.054, 410.231, 435.578, 459.427, 482.021, 503.543, 524.135, 543.91, 562.959, 581.357, 599.169, 616.447, 633.237, 649.579, 665.507, 681.051, 696.239, 711.093, 725.636, 739.885, 753.859, 767.572, 781.039, 794.273, 807.286, 820.087, 832.689, 845.098, 857.325, 869.377, 881.261, 892.984, 904.553, 915.973, 927.251, 938.391, 949.398, 960.277, 971.033, 981.669, 992.19, 1002.6, 1012.9, 1023.09, 1033.19, 1043.18, 1053.08, 1062.89, 1072.6, 1082.23, 1091.77, 1101.23, 1110.6, 1119.9, 1129.12, 1138.26, 1147.33, 1156.33, 1165.26, 1174.12, 1182.91, 1191.64, 1200.3, 1208.9, 1217.44, 1225.92, 1234.34, 1242.7, 1251.01, 1259.26, 1267.45, 1275.6, 1283.69, 1291.73, 1299.72, 1307.66, 1315.55, 1323.4, 1331.2, 1338.95, 1346.66, 1354.33, 1361.95, 1369.52, 1377.06, 1384.55, 1392.01, 1399.42, 1406.8, 1414.13, 1421.43, 1428.69, 1435.92, 1443.1, 1450.25];
actual_points = [for(pa = points_angles) pa[0]];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -30,7 +30,7 @@ module test_shape_path_extend_stroke2() {
num_of_points = 85
);
expected = [[-4.50112, 0.0946668], [-8.40532, -3.99889], [-12.4989, -0.0946859], [-12.3642, -5.78176], [-8.52426, -12.4798], [-2.25652, -16.2117], [4.73389, -16.8348], [11.2186, -14.7228], [16.3807, -10.5002], [19.7496, -4.88353], [21.1345, 1.41768], [20.5616, 7.76153], [18.2155, 13.6082], [14.3889, 18.5363], [9.43865, 22.2465], [3.75054, 24.5569], [-2.2895, 25.3921], [-8.31717, 24.7692], [-14.0057, 22.7824], [-19.0769, 19.586], [-23.3069, 15.3792], [-26.5298, 10.3901], [-28.6367, 4.86291], [-29.5736, -0.954708], [-29.3372, -6.82151], [-27.969, -12.5112], [-25.5492, -17.8192], [-22.1901, -22.5673], [-18.0289, -26.6075], [-13.2208, -29.8236], [-7.93264, -32.132], [-2.33684, -33.4815], [3.39434, -33.8521], [9.09361, -33.2527], [14.6029, -31.7188], [19.7769, -29.3091], [24.4858, -26.103], [28.6176, -22.1962], [32.0795, -17.6975], [34.799, -12.7256], [36.7238, -7.40514], [37.8222, -1.86377], [38.0821, 3.77099], [37.5102, 9.37453], [36.1307, 14.8276], [33.9838, 20.0184], [31.1237, 24.8447], [27.6173, 29.2148], [23.5413, 33.0494], [18.9812, 36.2819], [14.0284, 38.8591], [8.7787, 40.7419], [3.33025, 41.9044], [-2.21838, 42.3346], [-7.76988, 42.0335], [-13.2298, 41.0143], [-18.5078, 39.302], [-23.5194, 36.9322], [-28.1866, 33.9499], [-32.4391, 30.4088], [-36.2148, 26.3697], [-39.4606, 21.8995], [-42.133, 17.0697], [-44.1978, 11.9554], [-45.6306, 6.63376], [-46.4169, 1.18325], [-46.5513, -4.31793], [-46.038, -9.79273], [-44.8896, -15.1663], [-43.1273, -20.3669], [-40.7798, -25.3268], [-37.8829, -29.9828], [-34.4786, -34.2773], [-30.6145, -38.1583], [-26.3431, -41.5805], [-21.7206, -44.5048], [-16.8064, -46.8994], [-11.6623, -48.7395], [-6.35131, -50.0073], [-0.937338, -50.6921], [4.51586, -50.7903], [9.94533, -50.3052], [15.2896, -49.2463], [20.4895, -47.6298], [25.4883, -45.4773], [30.2327, -42.8162], [34.6733, -39.6788], [35.6098, -34.1], [30.031, -33.1634], [30.031, -33.1634], [26.2913, -35.8546], [22.2946, -38.1424], [18.0832, -40.0002], [13.7023, -41.4054], [9.19983, -42.34], [4.62594, -42.7911], [0.032421, -42.7511], [-4.52778, -42.2179], [-9.00115, -41.1951], [-13.3342, -39.6922], [-17.4742, -37.7248], [-21.3698, -35.3142], [-24.9715, -32.4876], [-28.2329, -29.2781], [-31.1106, -25.7242], [-33.5655, -21.8694], [-35.5632, -17.7623], [-37.0747, -13.4555], [-38.0768, -9.0057], [-38.5528, -4.47244], [-38.493, 0.082213], [-37.8949, 4.59457], [-36.7636, 9.00019], [-35.1121, 13.2347], [-32.9613, 17.2349], [-30.34, 20.9395], [-27.2849, 24.2905], [-23.8401, 27.2337], [-20.057, 29.7203], [-15.9936, 31.7074], [-11.7138, 33.1593], [-7.28699, 34.0481], [-2.78643, 34.3548], [1.71125, 34.0699], [6.12748, 33.1939], [10.383, 31.7379], [14.3994, 29.7239], [18.1003, 27.1847], [21.4132, 24.1641], [24.2711, 20.7165], [26.6139, 16.9062], [28.3901, 12.8071], [29.558, 8.50082], [30.0879, 4.07644], [29.9625, -0.3718], [29.1787, -4.74591], [27.748, -8.94627], [25.6973, -12.8738], [23.0695, -16.4325], [19.923, -19.5318], [16.3314, -22.0891], [12.3826, -24.033], [8.17771, -25.3053], [3.82872, -25.8639], [-0.543495, -25.6851], [-4.81221, -24.7656], [-8.84815, -23.1243], [-12.5234, -20.8033], [-15.7154, -17.8686], [-18.312, -14.41], [-20.2157, -10.5399], [-21.3488, -6.3915], [-21.6583, -2.11558], [-21.1204, 2.12341], [-19.7441, 6.15281], [-17.5752, 9.79825], [-14.6974, 12.8912], [-11.2339, 15.2779], [-7.34541, 16.8284], [-3.22705, 17.4472], [0.897907, 17.0828], [4.78711, 15.7378], [8.19166, 13.4772], [10.8721, 10.4343], [12.618, 6.81346], [13.2708, 2.8876], [12.749, -1.01163], [11.0749, -4.51283], [8.39894, -7.23614], [5.01789, -8.83984], [1.37862, -9.08532], [-1.9491, -7.92267]];
expected = [[-4.50112, 0.094671], [-8.40533, -3.99888], [-12.4989, -0.094671], [-12.3642, -5.78174], [-8.52427, -12.4798], [-2.25654, -16.2117], [4.73386, -16.8348], [11.2186, -14.7228], [16.3807, -10.5002], [19.7496, -4.88358], [21.1346, 1.41763], [20.5616, 7.76149], [18.2156, 13.6082], [14.3889, 18.5362], [9.43871, 22.2465], [3.75061, 24.5569], [-2.28942, 25.3921], [-8.31709, 24.7692], [-14.0057, 22.7824], [-19.0768, 19.5861], [-23.3069, 15.3793], [-26.5297, 10.3902], [-28.6367, 4.86301], [-29.5737, -0.954608], [-29.3372, -6.82141], [-27.969, -12.5111], [-25.5493, -17.8191], [-22.1902, -22.5673], [-18.029, -26.6075], [-13.2209, -29.8235], [-7.93276, -32.132], [-2.33697, -33.4815], [3.3942, -33.8522], [9.09348, -33.2528], [14.6028, -31.7188], [19.7767, -29.3092], [24.4857, -26.1031], [28.6175, -22.1963], [32.0794, -17.6976], [34.7989, -12.7257], [36.7238, -7.4053], [37.8222, -1.86394], [38.0821, 3.77082], [37.5102, 9.37436], [36.1308, 14.8274], [33.9839, 20.0183], [31.1239, 24.8445], [27.6174, 29.2147], [23.5415, 33.0493], [18.9814, 36.2818], [14.0286, 38.8591], [8.7789, 40.7418], [3.33046, 41.9044], [-2.21817, 42.3347], [-7.76966, 42.0336], [-13.2295, 41.0144], [-18.5076, 39.3021], [-23.5192, 36.9323], [-28.1865, 33.9501], [-32.4389, 30.409], [-36.2146, 26.3699], [-39.4605, 21.8997], [-42.1329, 17.0699], [-44.1977, 11.9556], [-45.6306, 6.63401], [-46.4169, 1.18351], [-46.5514, -4.31766], [-46.038, -9.79247], [-44.8897, -15.166], [-43.1274, -20.3667], [-40.7799, -25.3265], [-37.883, -29.9826], [-34.4788, -34.2771], [-30.6148, -38.1581], [-26.3434, -41.5803], [-21.7209, -44.5047], [-16.8067, -46.8993], [-11.6626, -48.7394], [-6.35161, -50.0072], [-0.937651, -50.6921], [4.51554, -50.7904], [9.94502, -50.3052], [15.2893, -49.2464], [20.4892, -47.6299], [25.488, -45.4775], [30.2325, -42.8164], [34.673, -39.679], [35.6096, -34.1002], [30.0308, -33.1636], [30.0308, -33.1636], [26.291, -35.8547], [22.2943, -38.1426], [18.0829, -40.0004], [13.702, -41.4055], [9.19957, -42.3401], [4.62568, -42.7911], [0.032157, -42.7511], [-4.52804, -42.2178], [-9.0014, -41.195], [-13.3345, -39.6922], [-17.4745, -37.7247], [-21.37, -35.3141], [-24.9717, -32.4875], [-28.233, -29.278], [-31.1107, -25.724], [-33.5656, -21.8692], [-35.5633, -17.7621], [-37.0748, -13.4553], [-38.0768, -9.00548], [-38.5528, -4.47222], [-38.493, 0.082429], [-37.8949, 4.59478], [-36.7636, 9.00039], [-35.112, 13.2349], [-32.9612, 17.2351], [-30.3399, 20.9397], [-27.2847, 24.2906], [-23.8399, 27.2338], [-20.0568, 29.7204], [-15.9934, 31.7075], [-11.7137, 33.1593], [-7.28682, 34.0481], [-2.78626, 34.3549], [1.71143, 34.0699], [6.12765, 33.1939], [10.3832, 31.7379], [14.3995, 29.7238], [18.1004, 27.1846], [21.4133, 24.164], [24.2712, 20.7164], [26.614, 16.9061], [28.3901, 12.8069], [29.5581, 8.50069], [30.0879, 4.0763], [29.9625, -0.371934], [29.1787, -4.74604], [27.7479, -8.94639], [25.6973, -12.874], [23.0695, -16.4326], [19.9229, -19.5319], [16.3313, -22.0892], [12.3825, -24.0331], [8.1776, -25.3054], [3.82862, -25.864], [-0.543596, -25.6851], [-4.8123, -24.7656], [-8.84824, -23.1243], [-12.5234, -20.8032], [-15.7155, -17.8686], [-18.312, -14.41], [-20.2157, -10.5399], [-21.3488, -6.39142], [-21.6583, -2.11551], [-21.1204, 2.12348], [-19.7441, 6.15287], [-17.5751, 9.7983], [-14.6974, 12.8913], [-11.2339, 15.2779], [-7.34536, 16.8285], [-3.227, 17.4472], [0.897954, 17.0828], [4.78715, 15.7378], [8.19169, 13.4772], [10.8721, 10.4343], [12.618, 6.81343], [13.2708, 2.88757], [12.749, -1.01165], [11.0749, -4.51285], [8.39893, -7.23616], [5.01787, -8.83985], [1.37861, -9.08532], [-1.94911, -7.92267]];
actual = shape_path_extend(
stroke2,