designix 0.5.24 → 0.5.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +10 -2
- package/dist/index.js +1512 -610
- package/dist/pgdsvg/heliostat.svg +1 -1
- package/dist/pgdsvg/heliostat_overview.svg +1 -1
- package/dist/pgdsvg/heliostat_side.svg +1 -1
- package/dist/pgdsvg/ring.svg +1 -0
- package/dist/pgdsvg/ring_guidance.svg +1 -0
- package/dist/pgdsvg/ring_guidance_top.svg +1 -0
- package/dist/pgdsvg/ring_section.svg +1 -0
- package/dist/pgdsvg/ring_top.svg +1 -0
- package/dist/pgdsvg/vaxis.svg +1 -0
- package/dist/pgdsvg/vaxis_guidance.svg +1 -0
- package/dist/pgdsvg/vaxis_guidance_spring.svg +1 -0
- package/dist/pgdsvg/vaxis_guidance_top.svg +1 -0
- package/dist/pgdsvg/vaxis_holder.svg +1 -0
- package/dist/pgdsvg/vaxis_holder_section.svg +1 -0
- package/dist/pgdsvg/vaxis_holder_top.svg +1 -0
- package/package.json +12 -11
- package/dist/pgdsvg/pole_rotor.svg +0 -1
- /package/dist/pgdsvg/{pole_rotor_cut.svg → vaxis_cut.svg} +0 -0
- /package/dist/pgdsvg/{pole_rotor_ends.svg → vaxis_ends.svg} +0 -0
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
pNumber,
|
|
8
8
|
pCheckbox,
|
|
9
9
|
pDropdown,
|
|
10
|
+
pSectionSeparator,
|
|
10
11
|
initGeom,
|
|
11
12
|
EExtrude,
|
|
12
13
|
EBVolume
|
|
@@ -914,6 +915,7 @@ var pDef = {
|
|
|
914
915
|
pNumber("addInterAxis", "mm", 0, 0, 100, 0.05),
|
|
915
916
|
pNumber("c1x", "mm", 0, -200, 200, 1),
|
|
916
917
|
pNumber("c1y", "mm", 0, -200, 200, 1),
|
|
918
|
+
pSectionSeparator("Tooth Profile"),
|
|
917
919
|
pNumber("ah1", "scalar", 1, 0.1, 2, 0.05),
|
|
918
920
|
pNumber("dh1", "scalar", 1, 0.1, 2, 0.05),
|
|
919
921
|
pNumber("bh1", "scalar", 0.25, 0.1, 2, 0.05),
|
|
@@ -937,6 +939,7 @@ var pDef = {
|
|
|
937
939
|
pNumber("skinThickness2", "mm", 0, -3, 3, 0.01),
|
|
938
940
|
pNumber("initAngle1", "degree", 0, -180, 180, 1),
|
|
939
941
|
pDropdown("gw2Position", ["right", "left", "center"]),
|
|
942
|
+
pSectionSeparator("Inner"),
|
|
940
943
|
pCheckbox("centralAxis", true),
|
|
941
944
|
pNumber("axisRadius", "mm", 10, 0.1, 200, 0.1),
|
|
942
945
|
pNumber("ribNb", "scalar", 5, 0, 32, 1),
|
|
@@ -950,6 +953,8 @@ var pDef = {
|
|
|
950
953
|
pNumber("spokeNb", "scalar", 5, 1, 18, 1),
|
|
951
954
|
pNumber("spokeWidth", "mm", 15, 1, 200, 0.1),
|
|
952
955
|
pNumber("spokeRound", "mm", 10, 0, 20, 0.1),
|
|
956
|
+
pSectionSeparator("Axis"),
|
|
957
|
+
pCheckbox("centralAxis", true),
|
|
953
958
|
pCheckbox("wheelAxis", true),
|
|
954
959
|
pNumber("wheelHeight", "mm", 40, 0.1, 400, 0.1),
|
|
955
960
|
pNumber("wheelMidExtra", "mm", 6, 0, 10, 0.1),
|
|
@@ -1341,7 +1346,7 @@ function pGeom2(t, param, suffix = "") {
|
|
|
1341
1346
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
1342
1347
|
`;
|
|
1343
1348
|
try {
|
|
1344
|
-
const gearWWParam = designParam(gearWheelWheelDef.pDef, "
|
|
1349
|
+
const gearWWParam = designParam(gearWheelWheelDef.pDef, "_ref1");
|
|
1345
1350
|
gearWWParam.setVal("module", param.module);
|
|
1346
1351
|
gearWWParam.setVal("N1", param.N1);
|
|
1347
1352
|
gearWWParam.setVal("c1x", param.c1x);
|
|
@@ -1384,7 +1389,7 @@ function pGeom2(t, param, suffix = "") {
|
|
|
1384
1389
|
inherits: [
|
|
1385
1390
|
{
|
|
1386
1391
|
outName: `inpax_${designName}_gearWW`,
|
|
1387
|
-
subdesign: "
|
|
1392
|
+
subdesign: "pax_gear_wheel_wheel_ref1",
|
|
1388
1393
|
subgeom: gearWWGeom,
|
|
1389
1394
|
rotate: [0, 0, 0],
|
|
1390
1395
|
translate: [0, 0, 0]
|
|
@@ -1431,6 +1436,7 @@ import {
|
|
|
1431
1436
|
radToDeg as radToDeg5,
|
|
1432
1437
|
ffix as ffix8,
|
|
1433
1438
|
pNumber as pNumber7,
|
|
1439
|
+
pSectionSeparator as pSectionSeparator6,
|
|
1434
1440
|
initGeom as initGeom7,
|
|
1435
1441
|
EBVolume as EBVolume7
|
|
1436
1442
|
} from "geometrix";
|
|
@@ -1443,6 +1449,7 @@ import {
|
|
|
1443
1449
|
radToDeg as radToDeg2,
|
|
1444
1450
|
ffix as ffix4,
|
|
1445
1451
|
pNumber as pNumber3,
|
|
1452
|
+
pSectionSeparator as pSectionSeparator2,
|
|
1446
1453
|
initGeom as initGeom3,
|
|
1447
1454
|
EExtrude as EExtrude2,
|
|
1448
1455
|
EBVolume as EBVolume3
|
|
@@ -1456,11 +1463,14 @@ var pDef3 = {
|
|
|
1456
1463
|
pNumber3("D3", "mm", 800, 10, 4e3, 1),
|
|
1457
1464
|
pNumber3("H1", "mm", 3e3, 10, 4e4, 10),
|
|
1458
1465
|
pNumber3("H2", "mm", 7e3, 50, 4e4, 10),
|
|
1466
|
+
pSectionSeparator2("thickness"),
|
|
1459
1467
|
pNumber3("E1", "mm", 30, 1, 80, 1),
|
|
1460
1468
|
pNumber3("E2", "mm", 5, 1, 80, 1),
|
|
1469
|
+
pSectionSeparator2("base holes"),
|
|
1461
1470
|
pNumber3("N1", "", 32, 3, 100, 1),
|
|
1462
1471
|
pNumber3("D5", "mm", 40, 1, 100, 1),
|
|
1463
1472
|
pNumber3("L1", "mm", 45, 1, 300, 1),
|
|
1473
|
+
pSectionSeparator2("door"),
|
|
1464
1474
|
pNumber3("D4", "mm", 600, 1, 1200, 1),
|
|
1465
1475
|
pNumber3("H3", "mm", 300, 5, 1200, 1),
|
|
1466
1476
|
pNumber3("H4", "mm", 1800, 10, 2500, 1),
|
|
@@ -1667,6 +1677,7 @@ import {
|
|
|
1667
1677
|
radToDeg as radToDeg3,
|
|
1668
1678
|
ffix as ffix5,
|
|
1669
1679
|
pNumber as pNumber4,
|
|
1680
|
+
pSectionSeparator as pSectionSeparator3,
|
|
1670
1681
|
initGeom as initGeom4,
|
|
1671
1682
|
EExtrude as EExtrude3,
|
|
1672
1683
|
EBVolume as EBVolume4
|
|
@@ -1683,6 +1694,7 @@ var pDef4 = {
|
|
|
1683
1694
|
pNumber4("H3", "mm", 400, 0, 4e3, 10),
|
|
1684
1695
|
pNumber4("E1", "mm", 20, 1, 80, 1),
|
|
1685
1696
|
pNumber4("E3", "mm", 30, 1, 80, 1),
|
|
1697
|
+
pSectionSeparator3("transversal"),
|
|
1686
1698
|
pNumber4("H4", "mm", 400, 10, 1e3, 10),
|
|
1687
1699
|
pNumber4("D4", "mm", 300, 10, 1e3, 10),
|
|
1688
1700
|
pNumber4("E4", "mm", 20, 1, 80, 1),
|
|
@@ -1691,14 +1703,17 @@ var pDef4 = {
|
|
|
1691
1703
|
pNumber4("L4", "mm", 300, 1, 1e3, 10),
|
|
1692
1704
|
pNumber4("L5", "mm", 2e3, 10, 4e3, 10),
|
|
1693
1705
|
pNumber4("L6", "mm", 2e3, 1, 4e3, 10),
|
|
1706
|
+
pNumber4("D8", "mm", 400, 1, 1e3, 10),
|
|
1707
|
+
pSectionSeparator3("diagonal"),
|
|
1694
1708
|
pNumber4("D6", "mm", 100, 1, 600, 10),
|
|
1695
1709
|
pNumber4("E6", "mm", 10, 1, 80, 1),
|
|
1696
1710
|
pNumber4("L7", "mm", 100, 1, 1e3, 1),
|
|
1697
1711
|
pNumber4("L8", "mm", 200, 1, 1e3, 1),
|
|
1712
|
+
pSectionSeparator3("base"),
|
|
1698
1713
|
pNumber4("N1", "", 24, 3, 100, 1),
|
|
1699
1714
|
pNumber4("D7", "mm", 40, 1, 100, 1),
|
|
1700
1715
|
pNumber4("L1", "mm", 30, 1, 300, 1),
|
|
1701
|
-
|
|
1716
|
+
pSectionSeparator3("door"),
|
|
1702
1717
|
pNumber4("H6", "mm", 100, 1, 1e3, 10),
|
|
1703
1718
|
pNumber4("H7", "mm", 600, 10, 2e3, 10),
|
|
1704
1719
|
pNumber4("L9", "mm", 300, 1, 1e3, 10),
|
|
@@ -2071,7 +2086,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2071
2086
|
}
|
|
2072
2087
|
var rakeDef = {
|
|
2073
2088
|
pTitle: "Heliostat rake",
|
|
2074
|
-
pDescription: "The rake on top of the
|
|
2089
|
+
pDescription: "The rake on top of the V-Axis of the heliostat",
|
|
2075
2090
|
pDef: pDef4,
|
|
2076
2091
|
pGeom: pGeom4
|
|
2077
2092
|
};
|
|
@@ -2084,6 +2099,7 @@ import {
|
|
|
2084
2099
|
radToDeg as radToDeg4,
|
|
2085
2100
|
ffix as ffix6,
|
|
2086
2101
|
pNumber as pNumber5,
|
|
2102
|
+
pSectionSeparator as pSectionSeparator4,
|
|
2087
2103
|
initGeom as initGeom5,
|
|
2088
2104
|
EExtrude as EExtrude4,
|
|
2089
2105
|
EBVolume as EBVolume5
|
|
@@ -2097,13 +2113,15 @@ var pDef5 = {
|
|
|
2097
2113
|
pNumber5("L2", "mm", 400, 1, 1e3, 1),
|
|
2098
2114
|
pNumber5("L3", "mm", 100, 1, 400, 1),
|
|
2099
2115
|
pNumber5("L4", "mm", 3e3, 10, 8e3, 10),
|
|
2116
|
+
pSectionSeparator4("longitude"),
|
|
2100
2117
|
pNumber5("L5", "mm", 2e3, 1, 8e3, 1),
|
|
2118
|
+
pNumber5("N1", "", 6, 1, 20, 1),
|
|
2101
2119
|
pNumber5("L6", "mm", 30, 1, 100, 1),
|
|
2120
|
+
pSectionSeparator4("thickness"),
|
|
2102
2121
|
pNumber5("E1", "mm", 3, 1, 80, 1),
|
|
2103
2122
|
pNumber5("E2", "mm", 50, 1, 200, 1),
|
|
2104
2123
|
pNumber5("E3", "mm", 3, 1, 80, 1),
|
|
2105
|
-
pNumber5("R2", "mm", 100, 0, 400, 10)
|
|
2106
|
-
pNumber5("N1", "", 6, 1, 20, 1)
|
|
2124
|
+
pNumber5("R2", "mm", 100, 0, 400, 10)
|
|
2107
2125
|
],
|
|
2108
2126
|
paramSvg: {
|
|
2109
2127
|
D1: "spider_profile.svg",
|
|
@@ -2270,6 +2288,7 @@ import {
|
|
|
2270
2288
|
figure as figure6,
|
|
2271
2289
|
ffix as ffix7,
|
|
2272
2290
|
pNumber as pNumber6,
|
|
2291
|
+
pSectionSeparator as pSectionSeparator5,
|
|
2273
2292
|
initGeom as initGeom6,
|
|
2274
2293
|
EExtrude as EExtrude5,
|
|
2275
2294
|
EBVolume as EBVolume6
|
|
@@ -2280,18 +2299,21 @@ var pDef6 = {
|
|
|
2280
2299
|
//pNumber(name, unit, init, min, max, step)
|
|
2281
2300
|
pNumber6("L1", "mm", 12500, 100, 4e4, 10),
|
|
2282
2301
|
pNumber6("L2", "mm", 6e3, 100, 4e4, 10),
|
|
2302
|
+
pSectionSeparator5("radial"),
|
|
2303
|
+
pNumber6("D1", "mm", 400, 1, 1e3, 1),
|
|
2304
|
+
pNumber6("E1", "mm", 5, 1, 80, 1),
|
|
2305
|
+
pNumber6("H2", "mm", 100, 1, 400, 1),
|
|
2306
|
+
pNumber6("H4", "mm", 100, 1, 400, 1),
|
|
2307
|
+
pNumber6("E2", "mm", 3, 1, 80, 1),
|
|
2283
2308
|
pNumber6("L3", "mm", 500, 1, 4e3, 1),
|
|
2309
|
+
pSectionSeparator5("radial"),
|
|
2284
2310
|
pNumber6("L4", "mm", 600, 1, 4e3, 1),
|
|
2285
2311
|
pNumber6("L5", "mm", 2e3, 1, 1e4, 1),
|
|
2286
2312
|
pNumber6("L6", "mm", 2e3, 1, 1e4, 1),
|
|
2287
|
-
pNumber6("D1", "mm", 400, 1, 1e3, 1),
|
|
2288
2313
|
pNumber6("H1", "mm", 100, 1, 400, 1),
|
|
2289
|
-
pNumber6("H2", "mm", 100, 1, 400, 1),
|
|
2290
2314
|
pNumber6("H3", "mm", 100, 1, 400, 1),
|
|
2291
|
-
pNumber6("H4", "mm", 100, 1, 400, 1),
|
|
2292
|
-
pNumber6("E1", "mm", 5, 1, 80, 1),
|
|
2293
|
-
pNumber6("E2", "mm", 3, 1, 80, 1),
|
|
2294
2315
|
pNumber6("E3", "mm", 3, 1, 80, 1),
|
|
2316
|
+
pSectionSeparator5("rod overlay"),
|
|
2295
2317
|
pNumber6("rod1", "", 10, 1, 40, 1),
|
|
2296
2318
|
pNumber6("rod2", "mm", 1300, 10, 4e3, 10),
|
|
2297
2319
|
pNumber6("rod3", "mm", 400, 10, 1e3, 10),
|
|
@@ -2473,34 +2495,39 @@ var pDef7 = {
|
|
|
2473
2495
|
//pNumber(name, unit, init, min, max, step)
|
|
2474
2496
|
pNumber7("H1", "mm", 3e3, 10, 4e4, 10),
|
|
2475
2497
|
pNumber7("H2", "mm", 2500, 50, 4e4, 10),
|
|
2498
|
+
pNumber7("D1", "mm", 1e3, 20, 4e3, 10),
|
|
2499
|
+
pNumber7("D2", "mm", 700, 20, 4e3, 10),
|
|
2500
|
+
pNumber7("E1", "mm", 30, 1, 80, 1),
|
|
2501
|
+
pSectionSeparator6("rake"),
|
|
2476
2502
|
pNumber7("H3", "mm", 200, 1, 500, 1),
|
|
2477
2503
|
pNumber7("H4", "mm", 800, 1, 4e3, 1),
|
|
2478
2504
|
pNumber7("H5", "mm", 3e3, 50, 6e3, 10),
|
|
2479
2505
|
pNumber7("H6", "mm", 200, 1, 4e3, 1),
|
|
2480
2506
|
pNumber7("H7", "mm", 800, 1, 4e3, 1),
|
|
2481
2507
|
pNumber7("H8", "mm", 200, 1, 4e3, 1),
|
|
2482
|
-
pNumber7("H9", "mm", 100, 1, 400, 1),
|
|
2483
|
-
pNumber7("D1", "mm", 1e3, 20, 4e3, 10),
|
|
2484
|
-
pNumber7("D2", "mm", 700, 20, 4e3, 10),
|
|
2485
2508
|
pNumber7("D3", "mm", 900, 20, 4e3, 10),
|
|
2486
2509
|
pNumber7("D4", "mm", 400, 20, 4e3, 10),
|
|
2487
2510
|
pNumber7("D5", "mm", 300, 20, 1e3, 10),
|
|
2488
2511
|
pNumber7("D6", "mm", 200, 10, 1e3, 10),
|
|
2489
2512
|
pNumber7("D7", "mm", 400, 10, 1e3, 10),
|
|
2490
|
-
|
|
2513
|
+
pSectionSeparator6("rake diagonal"),
|
|
2491
2514
|
pNumber7("D9", "mm", 100, 1, 1e3, 1),
|
|
2515
|
+
pNumber7("L7", "mm", 100, 1, 1e3, 1),
|
|
2516
|
+
pNumber7("L8", "mm", 200, 1, 1e3, 1),
|
|
2517
|
+
pSectionSeparator6("spider"),
|
|
2518
|
+
pNumber7("D8", "mm", 100, 1, 1e3, 1),
|
|
2492
2519
|
pNumber7("S1", "mm", 250, 1, 800, 1),
|
|
2493
2520
|
pNumber7("S2", "mm", 200, 1, 800, 1),
|
|
2494
|
-
pNumber7("E1", "mm", 30, 1, 80, 1),
|
|
2495
2521
|
pNumber7("E2", "mm", 50, 1, 80, 1),
|
|
2522
|
+
pSectionSeparator6("swing"),
|
|
2496
2523
|
pNumber7("L1", "mm", 12500, 100, 4e4, 10),
|
|
2497
2524
|
pNumber7("L2", "mm", 6e3, 100, 4e4, 10),
|
|
2498
2525
|
pNumber7("L3", "mm", 100, 1, 500, 1),
|
|
2499
2526
|
pNumber7("L4", "mm", 600, 1, 4e3, 1),
|
|
2500
2527
|
pNumber7("L5", "mm", 2e3, 10, 6e3, 1),
|
|
2501
2528
|
pNumber7("L6", "mm", 2e3, 1, 6e3, 1),
|
|
2502
|
-
pNumber7("
|
|
2503
|
-
|
|
2529
|
+
pNumber7("H9", "mm", 100, 1, 400, 1),
|
|
2530
|
+
pSectionSeparator6("motion amplitude"),
|
|
2504
2531
|
pNumber7("al", "degree", 80, 0, 95, 1),
|
|
2505
2532
|
pNumber7("ar", "degree", 80, 0, 95, 1)
|
|
2506
2533
|
],
|
|
@@ -2787,6 +2814,7 @@ import {
|
|
|
2787
2814
|
radToDeg as radToDeg7,
|
|
2788
2815
|
ffix as ffix10,
|
|
2789
2816
|
pNumber as pNumber9,
|
|
2817
|
+
pSectionSeparator as pSectionSeparator8,
|
|
2790
2818
|
initGeom as initGeom9,
|
|
2791
2819
|
EBVolume as EBVolume9
|
|
2792
2820
|
} from "geometrix";
|
|
@@ -2802,6 +2830,7 @@ import {
|
|
|
2802
2830
|
radToDeg as radToDeg6,
|
|
2803
2831
|
ffix as ffix9,
|
|
2804
2832
|
pNumber as pNumber8,
|
|
2833
|
+
pSectionSeparator as pSectionSeparator7,
|
|
2805
2834
|
initGeom as initGeom8,
|
|
2806
2835
|
EExtrude as EExtrude6,
|
|
2807
2836
|
EBVolume as EBVolume8
|
|
@@ -2818,6 +2847,7 @@ var pDef8 = {
|
|
|
2818
2847
|
pNumber8("H3", "mm", 400, 0, 4e3, 1),
|
|
2819
2848
|
pNumber8("E1", "mm", 20, 1, 80, 1),
|
|
2820
2849
|
pNumber8("E3", "mm", 30, 1, 80, 1),
|
|
2850
|
+
pSectionSeparator7("transversal"),
|
|
2821
2851
|
pNumber8("H4", "mm", 200, 1, 1e3, 1),
|
|
2822
2852
|
pNumber8("D4", "mm", 300, 1, 1e3, 1),
|
|
2823
2853
|
pNumber8("E4", "mm", 20, 1, 80, 1),
|
|
@@ -2826,18 +2856,22 @@ var pDef8 = {
|
|
|
2826
2856
|
pNumber8("L4", "mm", 300, 1, 1e3, 1),
|
|
2827
2857
|
pNumber8("L5", "mm", 2e3, 1, 4e3, 1),
|
|
2828
2858
|
pNumber8("L6", "mm", 2e3, 1, 4e3, 1),
|
|
2859
|
+
pNumber8("D8", "mm", 400, 1, 1e3, 1),
|
|
2860
|
+
pSectionSeparator7("diagonal"),
|
|
2829
2861
|
pNumber8("D6", "mm", 100, 1, 600, 1),
|
|
2830
2862
|
pNumber8("E6", "mm", 10, 1, 80, 1),
|
|
2831
2863
|
pNumber8("L7", "mm", 100, 1, 1e3, 1),
|
|
2832
2864
|
pNumber8("L8", "mm", 200, 1, 1e3, 1),
|
|
2865
|
+
pSectionSeparator7("base"),
|
|
2833
2866
|
pNumber8("N1", "", 24, 3, 100, 1),
|
|
2834
2867
|
pNumber8("D7", "mm", 40, 1, 100, 1),
|
|
2835
2868
|
pNumber8("L1", "mm", 30, 1, 300, 1),
|
|
2836
|
-
|
|
2869
|
+
pSectionSeparator7("door"),
|
|
2837
2870
|
pNumber8("H6", "mm", 100, 1, 1e3, 1),
|
|
2838
2871
|
pNumber8("H7", "mm", 600, 1, 2e3, 1),
|
|
2839
2872
|
pNumber8("L9", "mm", 300, 1, 1e3, 1),
|
|
2840
2873
|
pNumber8("R9", "mm", 50, 0, 300, 1),
|
|
2874
|
+
pSectionSeparator7("stopper"),
|
|
2841
2875
|
pNumber8("S1", "mm", 100, 1, 300, 1),
|
|
2842
2876
|
pNumber8("S2", "mm", 2e3, 1, 8e3, 1),
|
|
2843
2877
|
pNumber8("E7", "mm", 5, 1, 80, 1)
|
|
@@ -3155,7 +3189,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3155
3189
|
}
|
|
3156
3190
|
var rakeStopperDef = {
|
|
3157
3191
|
pTitle: "Heliostat rake with stopper",
|
|
3158
|
-
pDescription: "The rake-stopper on top of the
|
|
3192
|
+
pDescription: "The rake-stopper on top of the V-Axis of the heliostat",
|
|
3159
3193
|
pDef: pDef8,
|
|
3160
3194
|
pGeom: pGeom8
|
|
3161
3195
|
};
|
|
@@ -3167,31 +3201,36 @@ var pDef9 = {
|
|
|
3167
3201
|
//pNumber(name, unit, init, min, max, step)
|
|
3168
3202
|
pNumber9("H1", "mm", 3e3, 10, 4e4, 10),
|
|
3169
3203
|
pNumber9("H2", "mm", 2500, 50, 4e4, 10),
|
|
3204
|
+
pNumber9("D1", "mm", 1e3, 20, 4e3, 10),
|
|
3205
|
+
pNumber9("D2", "mm", 700, 20, 4e3, 10),
|
|
3206
|
+
pNumber9("E1", "mm", 30, 1, 80, 1),
|
|
3207
|
+
pSectionSeparator8("rake"),
|
|
3170
3208
|
pNumber9("H3", "mm", 200, 1, 500, 1),
|
|
3171
3209
|
pNumber9("H4", "mm", 800, 1, 4e3, 1),
|
|
3172
3210
|
pNumber9("H5", "mm", 3e3, 50, 6e3, 10),
|
|
3173
3211
|
pNumber9("H6", "mm", 200, 1, 4e3, 1),
|
|
3174
3212
|
pNumber9("H7", "mm", 400, 1, 4e3, 1),
|
|
3175
|
-
pNumber9("H9", "mm", 100, 1, 400, 1),
|
|
3176
|
-
pNumber9("D1", "mm", 1e3, 20, 4e3, 10),
|
|
3177
|
-
pNumber9("D2", "mm", 700, 20, 4e3, 10),
|
|
3178
3213
|
pNumber9("D3", "mm", 900, 20, 4e3, 10),
|
|
3179
3214
|
pNumber9("D4", "mm", 400, 20, 4e3, 10),
|
|
3180
3215
|
pNumber9("D5", "mm", 300, 20, 1e3, 10),
|
|
3181
3216
|
pNumber9("D6", "mm", 200, 10, 1e3, 10),
|
|
3182
3217
|
pNumber9("D7", "mm", 400, 10, 1e3, 10),
|
|
3218
|
+
pSectionSeparator8("rake diagonal"),
|
|
3183
3219
|
pNumber9("D9", "mm", 100, 1, 1e3, 1),
|
|
3184
|
-
pNumber9("
|
|
3220
|
+
pNumber9("L7", "mm", 100, 1, 1e3, 1),
|
|
3221
|
+
pNumber9("L8", "mm", 200, 1, 1e3, 1),
|
|
3222
|
+
pSectionSeparator8("rake stopper"),
|
|
3223
|
+
pNumber9("S1", "mm", 100, 1, 800, 1),
|
|
3224
|
+
pSectionSeparator8("swing"),
|
|
3185
3225
|
pNumber9("L1", "mm", 12500, 100, 4e4, 10),
|
|
3186
3226
|
pNumber9("L2", "mm", 6e3, 100, 4e4, 10),
|
|
3187
3227
|
pNumber9("L3", "mm", 100, 1, 500, 1),
|
|
3188
3228
|
pNumber9("L4", "mm", 600, 1, 4e3, 1),
|
|
3189
3229
|
pNumber9("L5", "mm", 2e3, 10, 6e3, 10),
|
|
3190
3230
|
pNumber9("L6", "mm", 2e3, 1, 6e3, 1),
|
|
3191
|
-
pNumber9("
|
|
3192
|
-
|
|
3193
|
-
pNumber9("al", "degree", 80, 0, 95, 1)
|
|
3194
|
-
pNumber9("S1", "mm", 100, 1, 800, 1)
|
|
3231
|
+
pNumber9("H9", "mm", 100, 1, 400, 1),
|
|
3232
|
+
pSectionSeparator8("motion amplitude"),
|
|
3233
|
+
pNumber9("al", "degree", 80, 0, 95, 1)
|
|
3195
3234
|
],
|
|
3196
3235
|
paramSvg: {
|
|
3197
3236
|
H1: "heliostat_overview.svg",
|
|
@@ -3439,6 +3478,7 @@ import {
|
|
|
3439
3478
|
figure as figure10,
|
|
3440
3479
|
ffix as ffix11,
|
|
3441
3480
|
pNumber as pNumber10,
|
|
3481
|
+
pSectionSeparator as pSectionSeparator9,
|
|
3442
3482
|
initGeom as initGeom10,
|
|
3443
3483
|
EExtrude as EExtrude7,
|
|
3444
3484
|
EBVolume as EBVolume10
|
|
@@ -3456,9 +3496,11 @@ var pDef10 = {
|
|
|
3456
3496
|
pNumber10("E3", "mm", 30, 1, 80, 1),
|
|
3457
3497
|
pNumber10("H1", "mm", 800, 10, 4e3, 10),
|
|
3458
3498
|
pNumber10("H2", "mm", 50, 1, 4e3, 1),
|
|
3499
|
+
pSectionSeparator9("side holes"),
|
|
3459
3500
|
pNumber10("H3", "mm", 400, 10, 4e3, 10),
|
|
3460
3501
|
pNumber10("N2", "", 12, 1, 100, 1),
|
|
3461
3502
|
pNumber10("L2", "mm", 100, 1, 400, 1),
|
|
3503
|
+
pSectionSeparator9("base holes"),
|
|
3462
3504
|
pNumber10("N1", "", 24, 3, 100, 1),
|
|
3463
3505
|
pNumber10("D5", "mm", 40, 1, 100, 1),
|
|
3464
3506
|
pNumber10("L1", "mm", 34, 1, 300, 1)
|
|
@@ -3642,19 +3684,20 @@ var baseDef = {
|
|
|
3642
3684
|
pGeom: pGeom10
|
|
3643
3685
|
};
|
|
3644
3686
|
|
|
3645
|
-
// src/heliostat/
|
|
3687
|
+
// src/heliostat/vaxis.ts
|
|
3646
3688
|
import {
|
|
3647
3689
|
contour as contour10,
|
|
3648
3690
|
contourCircle as contourCircle9,
|
|
3649
3691
|
figure as figure11,
|
|
3650
3692
|
ffix as ffix12,
|
|
3651
3693
|
pNumber as pNumber11,
|
|
3694
|
+
pSectionSeparator as pSectionSeparator10,
|
|
3652
3695
|
initGeom as initGeom11,
|
|
3653
3696
|
EExtrude as EExtrude8,
|
|
3654
3697
|
EBVolume as EBVolume11
|
|
3655
3698
|
} from "geometrix";
|
|
3656
3699
|
var pDef11 = {
|
|
3657
|
-
partName: "
|
|
3700
|
+
partName: "vaxis",
|
|
3658
3701
|
params: [
|
|
3659
3702
|
//pNumber(name, unit, init, min, max, step)
|
|
3660
3703
|
pNumber11("D1", "mm", 600, 1, 4e3, 1),
|
|
@@ -3662,19 +3705,20 @@ var pDef11 = {
|
|
|
3662
3705
|
pNumber11("H1", "mm", 8e3, 10, 4e4, 10),
|
|
3663
3706
|
pNumber11("E1", "mm", 5, 1, 80, 1),
|
|
3664
3707
|
pNumber11("E2", "mm", 30, 1, 80, 1),
|
|
3708
|
+
pSectionSeparator10("base holes"),
|
|
3665
3709
|
pNumber11("N1", "", 24, 3, 100, 1),
|
|
3666
3710
|
pNumber11("D3", "mm", 40, 1, 100, 1),
|
|
3667
3711
|
pNumber11("L1", "mm", 45, 1, 300, 1)
|
|
3668
3712
|
],
|
|
3669
3713
|
paramSvg: {
|
|
3670
|
-
D1: "
|
|
3671
|
-
D2: "
|
|
3672
|
-
H1: "
|
|
3673
|
-
E1: "
|
|
3674
|
-
E2: "
|
|
3675
|
-
N1: "
|
|
3676
|
-
D3: "
|
|
3677
|
-
L1: "
|
|
3714
|
+
D1: "vaxis_cut.svg",
|
|
3715
|
+
D2: "vaxis_cut.svg",
|
|
3716
|
+
H1: "vaxis_cut.svg",
|
|
3717
|
+
E1: "vaxis_cut.svg",
|
|
3718
|
+
E2: "vaxis_cut.svg",
|
|
3719
|
+
N1: "vaxis_ends.svg",
|
|
3720
|
+
D3: "vaxis_ends.svg",
|
|
3721
|
+
L1: "vaxis_ends.svg"
|
|
3678
3722
|
},
|
|
3679
3723
|
sim: {
|
|
3680
3724
|
tMax: 180,
|
|
@@ -3694,7 +3738,7 @@ function pGeom11(t, param, suffix = "") {
|
|
|
3694
3738
|
const R1 = param.D1 / 2;
|
|
3695
3739
|
const R2 = param.D2 / 2;
|
|
3696
3740
|
const R3 = param.D3 / 2;
|
|
3697
|
-
rGeome.logstr += `
|
|
3741
|
+
rGeome.logstr += `vaxis-height: ${ffix12(param.H1)} mm
|
|
3698
3742
|
`;
|
|
3699
3743
|
const ctrCylinder = contour10(R1, 0).addSegStrokeA(R1, param.H1).addSegStrokeA(R1 - param.E1, param.H1).addSegStrokeA(R1 - param.E1, 0).closeSegStroke();
|
|
3700
3744
|
figCut.addMain(ctrCylinder);
|
|
@@ -3758,7 +3802,7 @@ function pGeom11(t, param, suffix = "") {
|
|
|
3758
3802
|
]
|
|
3759
3803
|
};
|
|
3760
3804
|
rGeome.sub = {};
|
|
3761
|
-
rGeome.logstr += "
|
|
3805
|
+
rGeome.logstr += "V-Axis drawn successfully!\n";
|
|
3762
3806
|
rGeome.calcErr = false;
|
|
3763
3807
|
} catch (emsg) {
|
|
3764
3808
|
rGeome.logstr += emsg;
|
|
@@ -3766,56 +3810,53 @@ function pGeom11(t, param, suffix = "") {
|
|
|
3766
3810
|
}
|
|
3767
3811
|
return rGeome;
|
|
3768
3812
|
}
|
|
3769
|
-
var
|
|
3770
|
-
pTitle: "Heliostat
|
|
3813
|
+
var vaxisDef = {
|
|
3814
|
+
pTitle: "Heliostat V-Axis",
|
|
3771
3815
|
pDescription: "The vertical axis inside the pole of an heliostat",
|
|
3772
3816
|
pDef: pDef11,
|
|
3773
3817
|
pGeom: pGeom11
|
|
3774
3818
|
};
|
|
3775
3819
|
|
|
3776
|
-
// src/heliostat/
|
|
3820
|
+
// src/heliostat/ring.ts
|
|
3777
3821
|
import {
|
|
3778
3822
|
contour as contour11,
|
|
3779
3823
|
contourCircle as contourCircle10,
|
|
3780
3824
|
figure as figure12,
|
|
3781
3825
|
ffix as ffix13,
|
|
3782
3826
|
pNumber as pNumber12,
|
|
3827
|
+
pSectionSeparator as pSectionSeparator11,
|
|
3783
3828
|
initGeom as initGeom12,
|
|
3784
3829
|
EExtrude as EExtrude9,
|
|
3785
3830
|
EBVolume as EBVolume12
|
|
3786
3831
|
} from "geometrix";
|
|
3787
3832
|
var pDef12 = {
|
|
3788
|
-
partName: "
|
|
3833
|
+
partName: "ring",
|
|
3789
3834
|
params: [
|
|
3790
3835
|
//pNumber(name, unit, init, min, max, step)
|
|
3791
|
-
pNumber12("
|
|
3792
|
-
pNumber12("
|
|
3793
|
-
pNumber12("
|
|
3794
|
-
pNumber12("
|
|
3795
|
-
|
|
3796
|
-
pNumber12("
|
|
3797
|
-
pNumber12("
|
|
3798
|
-
pNumber12("
|
|
3799
|
-
|
|
3800
|
-
pNumber12("
|
|
3801
|
-
pNumber12("
|
|
3802
|
-
pNumber12("
|
|
3803
|
-
pNumber12("L7", "mm", 10, 1, 300, 1)
|
|
3836
|
+
pNumber12("D1", "mm", 400, 1, 2e3, 1),
|
|
3837
|
+
pNumber12("D3", "mm", 800, 1, 4e3, 1),
|
|
3838
|
+
pNumber12("H1", "mm", 20, 1, 100, 1),
|
|
3839
|
+
pNumber12("H2", "mm", 100, 1, 600, 1),
|
|
3840
|
+
pSectionSeparator11("ring holes"),
|
|
3841
|
+
pNumber12("N2", "", 24, 3, 100, 1),
|
|
3842
|
+
pNumber12("D2", "mm", 40, 1, 100, 1),
|
|
3843
|
+
pNumber12("L1", "mm", 45, 1, 300, 1),
|
|
3844
|
+
pSectionSeparator11("ring fake teeth"),
|
|
3845
|
+
pNumber12("N1", "", 100, 3, 1e4, 1),
|
|
3846
|
+
pNumber12("L2", "mm", 30, 1, 200, 1),
|
|
3847
|
+
pNumber12("L3", "mm", 30, 1, 200, 1)
|
|
3804
3848
|
],
|
|
3805
3849
|
paramSvg: {
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
N1: "
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
R3: "rod_top.svg",
|
|
3817
|
-
D2: "rod_plate.svg",
|
|
3818
|
-
L7: "rod_plate.svg"
|
|
3850
|
+
D1: "ring_top.svg",
|
|
3851
|
+
D3: "ring_top.svg",
|
|
3852
|
+
H1: "ring_section.svg",
|
|
3853
|
+
H2: "ring_section.svg",
|
|
3854
|
+
N2: "ring_top.svg",
|
|
3855
|
+
D2: "ring_top.svg",
|
|
3856
|
+
L1: "ring_top.svg",
|
|
3857
|
+
N1: "ring_top.svg",
|
|
3858
|
+
L2: "ring_top.svg",
|
|
3859
|
+
L3: "ring_top.svg"
|
|
3819
3860
|
},
|
|
3820
3861
|
sim: {
|
|
3821
3862
|
tMax: 180,
|
|
@@ -3826,94 +3867,109 @@ var pDef12 = {
|
|
|
3826
3867
|
};
|
|
3827
3868
|
function pGeom12(t, param, suffix = "") {
|
|
3828
3869
|
const rGeome = initGeom12(pDef12.partName + suffix);
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
const
|
|
3832
|
-
const figPlate = figure12();
|
|
3833
|
-
const figTop = figure12();
|
|
3870
|
+
const figRingBase = figure12();
|
|
3871
|
+
const figRingTeeth = figure12();
|
|
3872
|
+
const figSection = figure12();
|
|
3834
3873
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
3835
3874
|
`;
|
|
3836
3875
|
try {
|
|
3876
|
+
const R1 = param.D1 / 2;
|
|
3837
3877
|
const R2 = param.D2 / 2;
|
|
3838
|
-
const
|
|
3839
|
-
const
|
|
3840
|
-
|
|
3841
|
-
`;
|
|
3842
|
-
|
|
3843
|
-
|
|
3878
|
+
const R3 = param.D3 / 2;
|
|
3879
|
+
const ringHeight = param.H1 + param.H2;
|
|
3880
|
+
if (param.L1 < R2) {
|
|
3881
|
+
throw `err203: L1 ${param.L1} too small compare to D2 ${param.D2}`;
|
|
3882
|
+
}
|
|
3883
|
+
if (R1 + param.L1 + R2 > R3 - param.L2 - param.L3) {
|
|
3884
|
+
throw `err204: D3 ${param.D3} too small compare to D1 ${param.D1}, L1 ${param.L1}, L2 ${param.L2}, L3 ${param.L3}`;
|
|
3885
|
+
}
|
|
3886
|
+
if (2 * Math.atan2(R2, R1 + param.L1) > 2 * Math.PI / param.N2) {
|
|
3887
|
+
throw `err205: D2 ${param.D2} too large compare to N2 ${param.N2}`;
|
|
3888
|
+
}
|
|
3889
|
+
rGeome.logstr += `ring-height: ${ffix13(ringHeight)} mm
|
|
3844
3890
|
`;
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3891
|
+
const tR1 = R3 - param.L2;
|
|
3892
|
+
const tR2 = tR1 - param.L3;
|
|
3893
|
+
const tA = 2 * Math.PI / (2 * param.N1);
|
|
3894
|
+
const ctrTeeth = contour11(tR1, 0);
|
|
3895
|
+
for (let i = 0; i < param.N1; i++) {
|
|
3896
|
+
const ti1 = 2 * i + 1;
|
|
3897
|
+
const ti2 = 2 * i + 2;
|
|
3898
|
+
const p1X = tR2 * Math.cos(ti1 * tA);
|
|
3899
|
+
const p1Y = tR2 * Math.sin(ti1 * tA);
|
|
3900
|
+
const p2X = tR1 * Math.cos(ti2 * tA);
|
|
3901
|
+
const p2Y = tR1 * Math.sin(ti2 * tA);
|
|
3902
|
+
ctrTeeth.addSegStrokeA(p1X, p1Y).addSegStrokeA(p2X, p2Y);
|
|
3903
|
+
}
|
|
3904
|
+
figRingBase.addMain(contourCircle10(0, 0, R3));
|
|
3905
|
+
figRingBase.addMain(contourCircle10(0, 0, R1));
|
|
3906
|
+
const posR = R1 + param.L1;
|
|
3907
|
+
const posA = 2 * Math.PI / param.N2;
|
|
3908
|
+
for (let i = 0; i < param.N2; i++) {
|
|
3909
|
+
const posX = posR * Math.cos(i * posA);
|
|
3910
|
+
const posY = posR * Math.sin(i * posA);
|
|
3911
|
+
figRingBase.addMain(contourCircle10(posX, posY, R2));
|
|
3912
|
+
figRingTeeth.addSecond(contourCircle10(posX, posY, R2));
|
|
3913
|
+
}
|
|
3914
|
+
figRingBase.addSecond(ctrTeeth);
|
|
3915
|
+
figRingTeeth.addMain(contourCircle10(0, 0, R3));
|
|
3916
|
+
figRingTeeth.addMain(ctrTeeth);
|
|
3917
|
+
figRingTeeth.addSecond(contourCircle10(0, 0, R1));
|
|
3918
|
+
const ctrInner = contour11(R1, 0).addSegStrokeA(-R1, 0).addSegStrokeA(-R1, -param.H1).addSegStrokeA(R1, -param.H1).closeSegStroke();
|
|
3919
|
+
const ctrScrewHole = function(rnl) {
|
|
3920
|
+
const rCtr = contour11(rnl * (R1 + param.L1) + R2, 0).addSegStrokeR(-2 * R2, 0).addSegStrokeR(0, -param.H1).addSegStrokeR(2 * R2, 0).closeSegStroke();
|
|
3921
|
+
return rCtr;
|
|
3860
3922
|
};
|
|
3861
|
-
|
|
3862
|
-
const
|
|
3863
|
-
return
|
|
3923
|
+
const ctrGearTeeth = function(rnl) {
|
|
3924
|
+
const rCtr = contour11(rnl * (R3 - param.L2), -param.H1).addSegStrokeR(-rnl * param.L3, 0).addSegStrokeR(0, -param.H2).addSegStrokeR(rnl * param.L3, 0).closeSegStroke();
|
|
3925
|
+
return rCtr;
|
|
3864
3926
|
};
|
|
3865
|
-
const
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
figPlate.addSecond(ctrRod(-param.L3 / 2, 2 * param.L3));
|
|
3877
|
-
const plateStep = (param.L1 - param.L3) / (param.N1 - 1);
|
|
3878
|
-
for (let i = 0; i < param.N1; i++) {
|
|
3879
|
-
ctrPlate(i * plateStep).forEach((ctr) => figTop.addMain(ctr));
|
|
3880
|
-
}
|
|
3881
|
-
figTop.addSecond(ctrRod(0, param.L1));
|
|
3927
|
+
const ctrL = function(rnl) {
|
|
3928
|
+
const rCtr = contour11(rnl * R3, 0).addSegStrokeR(-rnl * (R3 - R1), 0).addSegStrokeR(0, -param.H1).addSegStrokeR(rnl * (R3 - param.L2 - param.L3 - R1), 0).addSegStrokeR(0, -param.H2).addSegStrokeR(rnl * (param.L2 + param.L3), 0).closeSegStroke();
|
|
3929
|
+
return rCtr;
|
|
3930
|
+
};
|
|
3931
|
+
figSection.addSecond(ctrInner);
|
|
3932
|
+
figSection.addSecond(ctrScrewHole(1));
|
|
3933
|
+
figSection.addSecond(ctrScrewHole(-1));
|
|
3934
|
+
figSection.addSecond(ctrGearTeeth(1));
|
|
3935
|
+
figSection.addSecond(ctrGearTeeth(-1));
|
|
3936
|
+
figSection.addMain(ctrL(1));
|
|
3937
|
+
figSection.addSecond(ctrL(-1));
|
|
3882
3938
|
rGeome.fig = {
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3939
|
+
faceRingBase: figRingBase,
|
|
3940
|
+
faceRingTeeth: figRingTeeth,
|
|
3941
|
+
faceSection: figSection
|
|
3886
3942
|
};
|
|
3887
3943
|
const designName = rGeome.partName;
|
|
3888
3944
|
rGeome.vol = {
|
|
3889
3945
|
extrudes: [
|
|
3890
3946
|
{
|
|
3891
|
-
outName: `subpax_${designName}
|
|
3892
|
-
face: `${designName}
|
|
3947
|
+
outName: `subpax_${designName}_base`,
|
|
3948
|
+
face: `${designName}_faceRingBase`,
|
|
3893
3949
|
extrudeMethod: EExtrude9.eLinearOrtho,
|
|
3894
|
-
length: param.
|
|
3950
|
+
length: param.H1,
|
|
3895
3951
|
rotate: [0, 0, 0],
|
|
3896
3952
|
translate: [0, 0, 0]
|
|
3897
3953
|
},
|
|
3898
3954
|
{
|
|
3899
|
-
outName: `subpax_${designName}
|
|
3900
|
-
face: `${designName}
|
|
3955
|
+
outName: `subpax_${designName}_teeth`,
|
|
3956
|
+
face: `${designName}_faceRingTeeth`,
|
|
3901
3957
|
extrudeMethod: EExtrude9.eLinearOrtho,
|
|
3902
|
-
length:
|
|
3903
|
-
rotate: [
|
|
3904
|
-
translate: [0,
|
|
3958
|
+
length: ringHeight,
|
|
3959
|
+
rotate: [0, 0, 0],
|
|
3960
|
+
translate: [0, 0, 0]
|
|
3905
3961
|
}
|
|
3906
3962
|
],
|
|
3907
3963
|
volumes: [
|
|
3908
3964
|
{
|
|
3909
3965
|
outName: `pax_${designName}`,
|
|
3910
3966
|
boolMethod: EBVolume12.eUnion,
|
|
3911
|
-
inList: [`subpax_${designName}
|
|
3967
|
+
inList: [`subpax_${designName}_base`, `subpax_${designName}_teeth`]
|
|
3912
3968
|
}
|
|
3913
3969
|
]
|
|
3914
3970
|
};
|
|
3915
3971
|
rGeome.sub = {};
|
|
3916
|
-
rGeome.logstr += "
|
|
3972
|
+
rGeome.logstr += "ring drawn successfully!\n";
|
|
3917
3973
|
rGeome.calcErr = false;
|
|
3918
3974
|
} catch (emsg) {
|
|
3919
3975
|
rGeome.logstr += emsg;
|
|
@@ -3921,73 +3977,218 @@ function pGeom12(t, param, suffix = "") {
|
|
|
3921
3977
|
}
|
|
3922
3978
|
return rGeome;
|
|
3923
3979
|
}
|
|
3924
|
-
var
|
|
3925
|
-
pTitle: "Heliostat
|
|
3926
|
-
pDescription: "The
|
|
3980
|
+
var ringDef = {
|
|
3981
|
+
pTitle: "Heliostat ring",
|
|
3982
|
+
pDescription: "The gear ring for adjusting the azimuth of the heliostat",
|
|
3927
3983
|
pDef: pDef12,
|
|
3928
3984
|
pGeom: pGeom12
|
|
3929
3985
|
};
|
|
3930
3986
|
|
|
3931
|
-
// src/heliostat/
|
|
3987
|
+
// src/heliostat/vaxis_holder.ts
|
|
3932
3988
|
import {
|
|
3933
|
-
|
|
3989
|
+
point as point4,
|
|
3990
|
+
contour as contour13,
|
|
3934
3991
|
contourCircle as contourCircle11,
|
|
3935
3992
|
figure as figure13,
|
|
3936
|
-
|
|
3937
|
-
ffix as
|
|
3993
|
+
degToRad as degToRad5,
|
|
3994
|
+
ffix as ffix15,
|
|
3938
3995
|
pNumber as pNumber13,
|
|
3996
|
+
pSectionSeparator as pSectionSeparator12,
|
|
3939
3997
|
initGeom as initGeom13,
|
|
3998
|
+
transform3d,
|
|
3940
3999
|
EExtrude as EExtrude10,
|
|
3941
4000
|
EBVolume as EBVolume13
|
|
3942
4001
|
} from "geometrix";
|
|
4002
|
+
|
|
4003
|
+
// src/heliostat/common_spring_and_petal.ts
|
|
4004
|
+
import { point as point3, contour as contour12, degToRad as degToRad4, radToDeg as radToDeg8, ffix as ffix14 } from "geometrix";
|
|
4005
|
+
function ctrHolderPetal(param) {
|
|
4006
|
+
let rLog = "";
|
|
4007
|
+
const R1 = param.PHD1 / 2;
|
|
4008
|
+
const R5 = param.PHD5 / 2;
|
|
4009
|
+
const petalA1 = 2 * Math.asin(param.PHR4 / R1);
|
|
4010
|
+
const petalA2 = 2 * Math.asin(param.PHL2 / (2 * R5));
|
|
4011
|
+
const hollowA = 2 * Math.PI / param.PHN1 - petalA2;
|
|
4012
|
+
const lCD = param.PHL2 / 2;
|
|
4013
|
+
const lAD = Math.sqrt(R5 ** 2 - lCD ** 2) - R1;
|
|
4014
|
+
const lAC = Math.sqrt(lCD ** 2 + lAD ** 2);
|
|
4015
|
+
const aDAC = Math.acos(lAD / lAC);
|
|
4016
|
+
const aCAB = Math.acos(param.PHR4 / lAC);
|
|
4017
|
+
const aTan = Math.PI - aDAC - aCAB;
|
|
4018
|
+
if (R5 < R1 + param.PHR4) {
|
|
4019
|
+
throw `err211: PHD5 ${param.PHD5} too small compare to PHD1 ${param.PHD1} or PHR4 ${param.PHR4}`;
|
|
4020
|
+
}
|
|
4021
|
+
if (hollowA < petalA2) {
|
|
4022
|
+
throw `err212: PHL2 ${param.PHL2} too large compare to PHN1 ${param.PHN1}`;
|
|
4023
|
+
}
|
|
4024
|
+
if (param.PHD3 > 2 * param.PHR4) {
|
|
4025
|
+
throw `err213: PHD3 ${param.PHD3} too large compare to PHR4 ${param.PHR4}`;
|
|
4026
|
+
}
|
|
4027
|
+
if (aTan > Math.PI / 2 - petalA1) {
|
|
4028
|
+
rLog += `warn345: PHL2 is quiet small ${ffix14(param.PHL2)} mm
|
|
4029
|
+
`;
|
|
4030
|
+
}
|
|
4031
|
+
rLog += `petal angle: ${ffix14(radToDeg8(petalA2))} degree
|
|
4032
|
+
`;
|
|
4033
|
+
rLog += `hollow angle: ${ffix14(radToDeg8(hollowA))} degree
|
|
4034
|
+
`;
|
|
4035
|
+
const p0 = point3(0, 0);
|
|
4036
|
+
const p1 = point3(R5, 0);
|
|
4037
|
+
const p2 = p1.rotate(p0, -petalA2 / 2);
|
|
4038
|
+
const p10 = point3(R1, 0);
|
|
4039
|
+
const p11 = point3(R1 - param.PHR4, 0);
|
|
4040
|
+
const p12 = p11.rotate(p10, aTan);
|
|
4041
|
+
const p13 = p11.rotate(p10, -aTan);
|
|
4042
|
+
const ctrPetalPartial = contour12(p2.cx, p2.cy).addCornerRounded(param.PHR6).addSegStrokeA(p12.cx, p12.cy).addPointA(R1 - param.PHR4, 0).addPointA(p13.cx, p13.cy).addSegArc2().addSegStrokeAP(petalA2 / 2, R5).addCornerRounded(param.PHR6).addPointAP(petalA2 / 2 + hollowA / 2, R5).addPointAP(petalA2 / 2 + hollowA, R5).addSegArc2();
|
|
4043
|
+
const rCtr = contour12(p2.cx, p2.cy);
|
|
4044
|
+
const petalAngles = [...Array(param.PHN1).keys()].map((i) => i * (petalA2 + hollowA));
|
|
4045
|
+
for (const rota of petalAngles) {
|
|
4046
|
+
rCtr.addPartial(ctrPetalPartial.rotate(0, 0, rota));
|
|
4047
|
+
}
|
|
4048
|
+
return [rLog, rCtr, petalAngles];
|
|
4049
|
+
}
|
|
4050
|
+
function ctrGuidanceOuter(param) {
|
|
4051
|
+
const rLog = "";
|
|
4052
|
+
const R1 = param.D1 / 2;
|
|
4053
|
+
const R2 = param.D2 / 2;
|
|
4054
|
+
const R4 = param.D4 / 2;
|
|
4055
|
+
const stepA1 = 2 * Math.PI / param.N1;
|
|
4056
|
+
const L12 = param.L1 / 2;
|
|
4057
|
+
const L3b = Math.sqrt(R2 ** 2 - L12 ** 2);
|
|
4058
|
+
const aAOD = Math.asin(L12 / R2);
|
|
4059
|
+
const L3 = R1 - L3b;
|
|
4060
|
+
const aABD = Math.atan2(L12, L3);
|
|
4061
|
+
const lBD = Math.sqrt(L12 ** 2 + L3 ** 2);
|
|
4062
|
+
const aDBC = Math.acos(R4 / lBD);
|
|
4063
|
+
const aABC = aABD + aDBC;
|
|
4064
|
+
const larcA2 = (stepA1 - 2 * aAOD) / 2;
|
|
4065
|
+
if (larcA2 < 0) {
|
|
4066
|
+
throw `err464: N1 ${param.N1} is too large compare to D2 ${param.D2}, L1 ${param.L1}`;
|
|
4067
|
+
}
|
|
4068
|
+
if (R1 < R2) {
|
|
4069
|
+
throw `err465: D2 ${param.D2} is too large compare to D1 ${param.D1}`;
|
|
4070
|
+
}
|
|
4071
|
+
const rCtr = contour12(L3b, -L12);
|
|
4072
|
+
const pO = point3(0, 0);
|
|
4073
|
+
const pA = point3(R2, 0);
|
|
4074
|
+
const pB = point3(R1, 0);
|
|
4075
|
+
const pE = point3(R1 - R4, 0);
|
|
4076
|
+
const pC = pE.rotate(pB, aABC);
|
|
4077
|
+
const pA2 = pA.rotate(pO, aAOD + larcA2);
|
|
4078
|
+
const pA3 = pA.rotate(pO, stepA1 - aAOD);
|
|
4079
|
+
const ctrOuterPartial = contour12(L3b, -L12).addCornerRounded(param.R5).addSegStrokeA(pC.cx, pC.cy).addPointA(R1 + R4, 0).addPointA(pC.cx, -pC.cy).addSegArc2().addSegStrokeA(L3b, L12).addCornerRounded(param.R5).addPointA(pA2.cx, pA2.cy).addPointA(pA3.cx, pA3.cy).addSegArc2();
|
|
4080
|
+
for (let i = 0; i < param.N1; i++) {
|
|
4081
|
+
rCtr.addPartial(ctrOuterPartial.rotate(0, 0, i * stepA1));
|
|
4082
|
+
}
|
|
4083
|
+
return [rLog, rCtr, stepA1];
|
|
4084
|
+
}
|
|
4085
|
+
function ctrGuidanceInner(param) {
|
|
4086
|
+
const rLog = "";
|
|
4087
|
+
const R6 = param.D6 / 2;
|
|
4088
|
+
const stepA2 = 2 * Math.PI / param.N2;
|
|
4089
|
+
const E22 = param.E2 / 2;
|
|
4090
|
+
const aE2 = 2 * Math.asin(E22 / R6);
|
|
4091
|
+
const iarcA2 = (stepA2 - aE2) / 2;
|
|
4092
|
+
const a1Plus = param.N2 < 3 ? 0 : Math.PI / (2 * param.N2);
|
|
4093
|
+
const a1 = Math.PI / 2 + a1Plus + degToRad4(param.a1);
|
|
4094
|
+
if (iarcA2 < 0) {
|
|
4095
|
+
throw `err564: N2 ${param.N2} is too large compare to D6 ${param.D6}, E2 ${param.E2}`;
|
|
4096
|
+
}
|
|
4097
|
+
const rCtr = contour12(R6, 0);
|
|
4098
|
+
const pF = point3(0, -R6);
|
|
4099
|
+
const pO = point3(0, 0);
|
|
4100
|
+
const pG = pF.rotate(pO, -aE2);
|
|
4101
|
+
const pH = pF.translatePolar(a1, param.L2);
|
|
4102
|
+
const pI = pH.translatePolar(a1 + Math.PI / 2, param.E1);
|
|
4103
|
+
const pH2 = pF.translatePolar(a1, param.L2 + param.L4);
|
|
4104
|
+
const pI2 = pH2.translatePolar(a1 + Math.PI / 2, param.E1);
|
|
4105
|
+
const ctrSpring = contour12(pG.cx, pG.cy).addSegStrokeA(pI.cx, pI.cy);
|
|
4106
|
+
if (param.N3 > 0) {
|
|
4107
|
+
let pK1 = pI;
|
|
4108
|
+
const W12 = param.W1 / 2;
|
|
4109
|
+
const E1W12 = param.E1 + W12;
|
|
4110
|
+
for (let i = 0; i < param.N3; i++) {
|
|
4111
|
+
const pK1b = pK1.translatePolar(a1 - Math.PI / 2, E1W12);
|
|
4112
|
+
const pK2 = pK1b.translatePolar(a1, E1W12);
|
|
4113
|
+
const pK3 = pK1.translatePolar(a1 - Math.PI / 2, 2 * E1W12);
|
|
4114
|
+
const pK4 = pK3.translatePolar(a1 + Math.PI, param.L3);
|
|
4115
|
+
const pK4b = pK4.translatePolar(a1 - Math.PI / 2, W12);
|
|
4116
|
+
const pK5 = pK4b.translatePolar(a1 + Math.PI, W12);
|
|
4117
|
+
const pK6 = pK4.translatePolar(a1 - Math.PI / 2, 2 * W12);
|
|
4118
|
+
let L4end = 0;
|
|
4119
|
+
if (i === param.N3 - 1) {
|
|
4120
|
+
L4end = param.L4;
|
|
4121
|
+
}
|
|
4122
|
+
const pK7 = pK6.translatePolar(a1, param.L3 + L4end);
|
|
4123
|
+
ctrSpring.addPointA(pK2.cx, pK2.cy).addPointA(pK3.cx, pK3.cy).addSegArc2().addSegStrokeA(pK4.cx, pK4.cy).addPointA(pK5.cx, pK5.cy).addPointA(pK6.cx, pK6.cy).addSegArc2().addSegStrokeA(pK7.cx, pK7.cy);
|
|
4124
|
+
pK1 = pK7;
|
|
4125
|
+
}
|
|
4126
|
+
const pK8 = pK1.translatePolar(a1 - Math.PI / 2, param.E1);
|
|
4127
|
+
ctrSpring.addSegStrokeA(pK8.cx, pK8.cy);
|
|
4128
|
+
pK1 = pK8;
|
|
4129
|
+
for (let i = 0; i < param.N3; i++) {
|
|
4130
|
+
let L4end = 0;
|
|
4131
|
+
if (i === 0) {
|
|
4132
|
+
L4end = param.L4;
|
|
4133
|
+
}
|
|
4134
|
+
const pK2 = pK1.translatePolar(a1 + Math.PI, param.L3 + L4end);
|
|
4135
|
+
const pK2b = pK2.translatePolar(a1 + Math.PI / 2, E1W12);
|
|
4136
|
+
const pK3 = pK2b.translatePolar(a1 + Math.PI, E1W12);
|
|
4137
|
+
const pK4 = pK2.translatePolar(a1 + Math.PI / 2, 2 * E1W12);
|
|
4138
|
+
const pK5 = pK4.translatePolar(a1, param.L3);
|
|
4139
|
+
const pK5b = pK5.translatePolar(a1 + Math.PI / 2, W12);
|
|
4140
|
+
const pK6 = pK5b.translatePolar(a1, W12);
|
|
4141
|
+
const pK7 = pK5.translatePolar(a1 + Math.PI / 2, 2 * W12);
|
|
4142
|
+
ctrSpring.addSegStrokeA(pK2.cx, pK2.cy).addPointA(pK3.cx, pK3.cy).addPointA(pK4.cx, pK4.cy).addSegArc2().addSegStrokeA(pK5.cx, pK5.cy).addPointA(pK6.cx, pK6.cy).addPointA(pK7.cx, pK7.cy).addSegArc2();
|
|
4143
|
+
pK1 = pK7;
|
|
4144
|
+
}
|
|
4145
|
+
} else {
|
|
4146
|
+
ctrSpring.addSegStrokeA(pI2.cx, pI2.cy).addSegStrokeA(pH2.cx, pH2.cy);
|
|
4147
|
+
}
|
|
4148
|
+
ctrSpring.addSegStrokeA(pF.cx, pF.cy);
|
|
4149
|
+
for (let i = 0; i < param.N2; i++) {
|
|
4150
|
+
rCtr.addPointAP(i * stepA2 + iarcA2, R6).addPointAP(i * stepA2 + 2 * iarcA2, R6).addSegArc2().addCornerRounded(param.R7).addPartial(ctrSpring.rotate(0, 0, Math.PI / 2 + (i + 1) * stepA2)).addCornerRounded(param.R7);
|
|
4151
|
+
}
|
|
4152
|
+
return [rLog, rCtr];
|
|
4153
|
+
}
|
|
4154
|
+
|
|
4155
|
+
// src/heliostat/vaxis_holder.ts
|
|
3943
4156
|
var pDef13 = {
|
|
3944
|
-
partName: "
|
|
4157
|
+
partName: "vaxis_holder",
|
|
3945
4158
|
params: [
|
|
3946
4159
|
//pNumber(name, unit, init, min, max, step)
|
|
3947
|
-
pNumber13("
|
|
3948
|
-
pNumber13("
|
|
3949
|
-
pNumber13("
|
|
3950
|
-
pNumber13("
|
|
3951
|
-
|
|
3952
|
-
pNumber13("
|
|
3953
|
-
pNumber13("
|
|
3954
|
-
pNumber13("
|
|
3955
|
-
pNumber13("
|
|
3956
|
-
|
|
3957
|
-
pNumber13("
|
|
3958
|
-
pNumber13("
|
|
3959
|
-
pNumber13("
|
|
3960
|
-
pNumber13("
|
|
3961
|
-
pNumber13("
|
|
3962
|
-
pNumber13("
|
|
3963
|
-
pNumber13("R2", "mm", 20, 1, 400, 1),
|
|
3964
|
-
pNumber13("R3", "mm", 20, 1, 400, 1),
|
|
3965
|
-
pNumber13("H1", "mm", 300, 0.5, 800, 0.5),
|
|
3966
|
-
pNumber13("H2", "mm", 2, 0.5, 800, 0.5),
|
|
3967
|
-
pNumber13("H3", "mm", 5, 0.5, 800, 0.5)
|
|
4160
|
+
pNumber13("PHD1", "mm", 700, 1, 2e3, 1),
|
|
4161
|
+
pNumber13("PHD2", "mm", 900, 1, 4e3, 1),
|
|
4162
|
+
pNumber13("PHD5", "mm", 800, 1, 4e3, 1),
|
|
4163
|
+
pNumber13("PHN1", "holes", 6, 1, 24, 1),
|
|
4164
|
+
pSectionSeparator12("screw holes"),
|
|
4165
|
+
pNumber13("PHD3", "mm", 40, 2, 100, 1),
|
|
4166
|
+
pNumber13("PHR4", "mm", 40, 2, 100, 1),
|
|
4167
|
+
pNumber13("PHL2", "mm", 120, 5, 400, 1),
|
|
4168
|
+
pNumber13("PHR6", "mm", 20, 0, 400, 1),
|
|
4169
|
+
pSectionSeparator12("section"),
|
|
4170
|
+
pNumber13("PHE1", "mm", 10, 1, 80, 1),
|
|
4171
|
+
pNumber13("PHH1", "mm", 50, 1, 200, 1),
|
|
4172
|
+
pNumber13("PHA", "degree", 5, -45, 45, 0.1),
|
|
4173
|
+
pNumber13("PHL1", "mm", 300, 1, 500, 1),
|
|
4174
|
+
pNumber13("PHE2", "mm", 10, 1, 80, 1),
|
|
4175
|
+
pNumber13("PHE3", "mm", 10, 1, 80, 1)
|
|
3968
4176
|
],
|
|
3969
4177
|
paramSvg: {
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
D4: "trapeze_rod.svg",
|
|
3985
|
-
R1: "trapeze_top.svg",
|
|
3986
|
-
R2: "trapeze_top.svg",
|
|
3987
|
-
R3: "trapeze_top.svg",
|
|
3988
|
-
H1: "trapeze_side.svg",
|
|
3989
|
-
H2: "trapeze_side.svg",
|
|
3990
|
-
H3: "trapeze_side.svg"
|
|
4178
|
+
PHD1: "vaxis_holder_top.svg",
|
|
4179
|
+
PHD2: "vaxis_holder_top.svg",
|
|
4180
|
+
PHD5: "vaxis_holder_top.svg",
|
|
4181
|
+
PHD3: "vaxis_holder_top.svg",
|
|
4182
|
+
PHR4: "vaxis_holder_top.svg",
|
|
4183
|
+
PHN1: "vaxis_holder_top.svg",
|
|
4184
|
+
PHL2: "vaxis_holder_top.svg",
|
|
4185
|
+
PHR6: "vaxis_holder_top.svg",
|
|
4186
|
+
PHE1: "vaxis_holder_section.svg",
|
|
4187
|
+
PHH1: "vaxis_holder_section.svg",
|
|
4188
|
+
PHA: "vaxis_holder_section.svg",
|
|
4189
|
+
PHL1: "vaxis_holder_section.svg",
|
|
4190
|
+
PHE2: "vaxis_holder_section.svg",
|
|
4191
|
+
PHE3: "vaxis_holder_top.svg"
|
|
3991
4192
|
},
|
|
3992
4193
|
sim: {
|
|
3993
4194
|
tMax: 180,
|
|
@@ -3998,122 +4199,814 @@ var pDef13 = {
|
|
|
3998
4199
|
};
|
|
3999
4200
|
function pGeom13(t, param, suffix = "") {
|
|
4000
4201
|
const rGeome = initGeom13(pDef13.partName + suffix);
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
const
|
|
4004
|
-
const
|
|
4005
|
-
const figRod = figure13();
|
|
4006
|
-
const figRodHollow = figure13();
|
|
4007
|
-
const figCutRod = figure13();
|
|
4202
|
+
const figOuter = figure13();
|
|
4203
|
+
const figPetal = figure13();
|
|
4204
|
+
const figButtress1 = figure13();
|
|
4205
|
+
const figButtress2 = figure13();
|
|
4008
4206
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4009
4207
|
`;
|
|
4010
4208
|
try {
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
const
|
|
4021
|
-
const
|
|
4022
|
-
const
|
|
4023
|
-
const
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
const rod_xy_angle = Math.atan2(rod_y, rod_x);
|
|
4029
|
-
rGeome.logstr += `rod-slope: length: ${ffix14(rod_slope_length)} mm, angle: ${ffix14(
|
|
4030
|
-
radToDeg8(rod_slope_angle)
|
|
4031
|
-
)} degree
|
|
4209
|
+
const outerA = degToRad5(param.PHA);
|
|
4210
|
+
const R1 = param.PHD1 / 2;
|
|
4211
|
+
const R2 = param.PHD2 / 2;
|
|
4212
|
+
const R3 = param.PHD3 / 2;
|
|
4213
|
+
const R5 = param.PHD5 / 2;
|
|
4214
|
+
const outerR1 = R2 + param.PHL1 / 2 * Math.sin(outerA);
|
|
4215
|
+
const outerR2 = R2 - param.PHL1 / 2 * Math.sin(outerA);
|
|
4216
|
+
const vaxisHolderHeight = param.PHL1 * Math.cos(outerA);
|
|
4217
|
+
const innerR1 = R2 - param.PHE2 / Math.cos(outerA) + param.PHE1 / 2 * Math.tan(outerA);
|
|
4218
|
+
const innerR2 = R2 - param.PHE2 / Math.cos(outerA) - param.PHE1 / 2 * Math.tan(outerA);
|
|
4219
|
+
const innerR = Math.min(innerR1, innerR2);
|
|
4220
|
+
const innerL2 = (param.PHL1 - param.PHE1 / Math.cos(outerA)) / 2;
|
|
4221
|
+
const R2next = R2 - param.PHE2 / Math.cos(outerA);
|
|
4222
|
+
if (innerR < R5) {
|
|
4223
|
+
throw `err210: PHD5 ${param.PHD5} too large compare to PHE2 ${param.PHE2} or PHA ${param.PHA}`;
|
|
4224
|
+
}
|
|
4225
|
+
rGeome.logstr += `vaxis_holder's height: ${ffix15(vaxisHolderHeight)} mm
|
|
4032
4226
|
`;
|
|
4033
|
-
rGeome.logstr += `
|
|
4227
|
+
rGeome.logstr += `vaxis_holder outerD1: ${ffix15(2 * outerR1)} mm
|
|
4034
4228
|
`;
|
|
4035
|
-
|
|
4036
|
-
rGeome.logstr += `rod-footprint-length: ${ffix14(rodFootprintLength)} mm
|
|
4229
|
+
rGeome.logstr += `vaxis_holder outerD2: ${ffix15(2 * outerR2)} mm
|
|
4037
4230
|
`;
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4231
|
+
rGeome.logstr += `vaxis_holder innerD: ${ffix15(param.PHD1 - 2 * param.PHR4)} mm
|
|
4232
|
+
`;
|
|
4233
|
+
rGeome.logstr += `vaxis_holder D2-next: ${ffix15(2 * R2next)} mm
|
|
4234
|
+
`;
|
|
4235
|
+
const ctrOuter = function(rnl) {
|
|
4236
|
+
const rCtr = contour13(rnl * R5, -param.PHE1 / 2).addSegStrokeR(rnl * (innerR1 - R5), 0).addSegStrokeRP(-Math.PI / 2 + rnl * outerA, innerL2).addSegStrokeRP(-Math.PI / 2 + rnl * (Math.PI / 2 + outerA), param.PHE2).addSegStrokeRP(Math.PI / 2 + rnl * outerA, param.PHL1).addSegStrokeRP(Math.PI / 2 + rnl * (Math.PI / 2 + outerA), param.PHE2).addSegStrokeRP(-Math.PI / 2 + rnl * outerA, innerL2).addSegStrokeA(rnl * R5, param.PHE1 / 2).closeSegStroke();
|
|
4042
4237
|
return rCtr;
|
|
4043
4238
|
};
|
|
4044
|
-
|
|
4045
|
-
const
|
|
4046
|
-
const py0 = py + rodFPl * Math.sin(angle + Math.PI - rodFPa);
|
|
4047
|
-
const rCtr = contour12(px0, py0).addSegStrokeRP(angle + Math.PI, rod_xy).addSegStrokeRP(angle - Math.PI / 2, param.D3).addSegStrokeRP(angle, rod_xy).closeSegStroke();
|
|
4239
|
+
const ctrLeg = function(rnl) {
|
|
4240
|
+
const rCtr = contour13(rnl * innerR, -param.PHE1 / 2).addSegStrokeA(rnl * innerR, param.PHE1 / 2).addSegStrokeA(rnl * (R1 - param.PHR4), param.PHE1 / 2).addSegStrokeA(rnl * (R1 - param.PHR4), -param.PHE1 / 2).closeSegStroke();
|
|
4048
4241
|
return rCtr;
|
|
4049
4242
|
};
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
);
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
);
|
|
4091
|
-
lFrameHole.push(
|
|
4092
|
-
contourCircle11(-param.L2 / 2 + i * step2, -param.L1 / 2 + param.L6, param.D1 / 2)
|
|
4093
|
-
);
|
|
4094
|
-
}
|
|
4095
|
-
const lPlateHole = [];
|
|
4096
|
-
for (let i = 1; i < param.N3 + 1; i++) {
|
|
4097
|
-
lPlateHole.push(
|
|
4098
|
-
contourCircle11(param.L4 / 2 - param.L7, -param.L3 / 2 + i * step3, param.D2 / 2)
|
|
4099
|
-
);
|
|
4100
|
-
lPlateHole.push(
|
|
4101
|
-
contourCircle11(-param.L4 / 2 + param.L7, -param.L3 / 2 + i * step3, param.D2 / 2)
|
|
4102
|
-
);
|
|
4103
|
-
}
|
|
4104
|
-
for (let i = 1; i < param.N4 + 1; i++) {
|
|
4105
|
-
lPlateHole.push(
|
|
4106
|
-
contourCircle11(-param.L4 / 2 + i * step4, param.L3 / 2 - param.L7, param.D2 / 2)
|
|
4107
|
-
);
|
|
4108
|
-
lPlateHole.push(
|
|
4109
|
-
contourCircle11(-param.L4 / 2 + i * step4, -param.L3 / 2 + param.L7, param.D2 / 2)
|
|
4110
|
-
);
|
|
4243
|
+
const ctrLegHole = function(rnl) {
|
|
4244
|
+
const rCtr = contour13(rnl * (R1 + R3), -param.PHE1 / 2).addSegStrokeA(rnl * (R1 + R3), param.PHE1 / 2).addSegStrokeA(rnl * (R1 - R3), param.PHE1 / 2).addSegStrokeA(rnl * (R1 - R3), -param.PHE1 / 2).closeSegStroke();
|
|
4245
|
+
return rCtr;
|
|
4246
|
+
};
|
|
4247
|
+
figOuter.addMain(ctrOuter(1));
|
|
4248
|
+
figOuter.addSecond(ctrOuter(-1));
|
|
4249
|
+
figOuter.addSecond(ctrLeg(1));
|
|
4250
|
+
figOuter.addSecond(ctrLegHole(1));
|
|
4251
|
+
figOuter.addSecond(ctrLeg(-1));
|
|
4252
|
+
figOuter.addSecond(ctrLegHole(-1));
|
|
4253
|
+
const ctrButtress1 = function(rnl) {
|
|
4254
|
+
const rCtr = contour13(rnl * (R1 + param.PHR4), -param.PHE1 / 2).addSegStrokeA(rnl * innerR1, -param.PHE1 / 2).addSegStrokeRP(-Math.PI / 2 + rnl * outerA, innerL2).closeSegStroke();
|
|
4255
|
+
return rCtr;
|
|
4256
|
+
};
|
|
4257
|
+
const ctrButtress2 = function(rnl) {
|
|
4258
|
+
const rCtr = contour13(rnl * (R1 + param.PHR4), param.PHE1 / 2).addSegStrokeA(rnl * innerR2, param.PHE1 / 2).addSegStrokeRP(Math.PI / 2 + rnl * outerA, innerL2).addSegStrokeA(rnl * (R1 + param.PHR4), param.PHE1 + param.PHH1).closeSegStroke();
|
|
4259
|
+
return rCtr;
|
|
4260
|
+
};
|
|
4261
|
+
figOuter.addSecond(ctrButtress1(-1));
|
|
4262
|
+
figOuter.addSecond(ctrButtress2(-1));
|
|
4263
|
+
figButtress1.mergeFigure(figOuter, true);
|
|
4264
|
+
figButtress2.mergeFigure(figOuter, true);
|
|
4265
|
+
figOuter.addSecond(ctrButtress1(1));
|
|
4266
|
+
figOuter.addSecond(ctrButtress2(1));
|
|
4267
|
+
figButtress1.addMain(ctrButtress1(1));
|
|
4268
|
+
figButtress1.addSecond(ctrButtress2(1));
|
|
4269
|
+
figButtress2.addSecond(ctrButtress1(1));
|
|
4270
|
+
figButtress2.addMain(ctrButtress2(1));
|
|
4271
|
+
figPetal.addMain(contourCircle11(0, 0, innerR));
|
|
4272
|
+
figPetal.addSecond(contourCircle11(0, 0, R2));
|
|
4273
|
+
figPetal.addSecond(contourCircle11(0, 0, Math.max(outerR1, outerR2)));
|
|
4274
|
+
const [petalLog, petalCtr, petalAngles] = ctrHolderPetal(param);
|
|
4275
|
+
rGeome.logstr += petalLog;
|
|
4276
|
+
figPetal.addMain(petalCtr);
|
|
4277
|
+
for (const rota of petalAngles) {
|
|
4278
|
+
const p4 = point4(0, 0).translatePolar(rota, R1);
|
|
4279
|
+
figPetal.addMain(contourCircle11(p4.cx, p4.cy, param.PHD3 / 2));
|
|
4280
|
+
}
|
|
4281
|
+
const ctrButtress = contour13(R1 + param.PHR4, -param.PHE3).addSegStrokeA(innerR, -param.PHE3).addSegStrokeA(innerR, param.PHE3).addSegStrokeA(R1 + param.PHR4, param.PHE3).closeSegStroke();
|
|
4282
|
+
for (const rota of petalAngles) {
|
|
4283
|
+
figPetal.addSecond(ctrButtress.rotate(0, 0, rota));
|
|
4111
4284
|
}
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4285
|
+
rGeome.fig = {
|
|
4286
|
+
facePetal: figPetal,
|
|
4287
|
+
faceOuter: figOuter,
|
|
4288
|
+
faceButtress1: figButtress1,
|
|
4289
|
+
faceButtress2: figButtress2
|
|
4290
|
+
};
|
|
4291
|
+
const designName = rGeome.partName;
|
|
4292
|
+
const tm = transform3d();
|
|
4293
|
+
tm.addRotation(Math.PI / 2, 0, 0);
|
|
4294
|
+
tm.addTranslation(0, param.PHE3 / 2, 0);
|
|
4295
|
+
const preExtrude1 = petalAngles.map((rota, idx) => {
|
|
4296
|
+
const tm1 = transform3d(tm.getMatrix());
|
|
4297
|
+
tm1.addRotation(0, 0, rota);
|
|
4298
|
+
const rElem = {
|
|
4299
|
+
outName: `subpax_${designName}_b1_${idx}`,
|
|
4300
|
+
face: `${designName}_faceButtress1`,
|
|
4301
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4302
|
+
length: param.PHE3,
|
|
4303
|
+
rotate: tm1.getRotation(),
|
|
4304
|
+
translate: tm1.getTranslation()
|
|
4305
|
+
};
|
|
4306
|
+
return rElem;
|
|
4307
|
+
});
|
|
4308
|
+
const preExtrude2 = petalAngles.map((rota, idx) => {
|
|
4309
|
+
const tm2 = transform3d(tm.getMatrix());
|
|
4310
|
+
tm2.addRotation(0, 0, rota);
|
|
4311
|
+
const rElem = {
|
|
4312
|
+
outName: `subpax_${designName}_b2_${idx}`,
|
|
4313
|
+
face: `${designName}_faceButtress2`,
|
|
4314
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4315
|
+
length: param.PHE3,
|
|
4316
|
+
rotate: tm2.getRotation(),
|
|
4317
|
+
translate: tm2.getTranslation()
|
|
4318
|
+
};
|
|
4319
|
+
return rElem;
|
|
4320
|
+
});
|
|
4321
|
+
const b1List = petalAngles.map((elem, idx) => {
|
|
4322
|
+
const subElem = `subpax_${designName}_b1_${idx}`;
|
|
4323
|
+
return subElem;
|
|
4324
|
+
});
|
|
4325
|
+
const b2List = petalAngles.map((elem, idx) => {
|
|
4326
|
+
const subElem = `subpax_${designName}_b2_${idx}`;
|
|
4327
|
+
return subElem;
|
|
4328
|
+
});
|
|
4329
|
+
rGeome.vol = {
|
|
4330
|
+
extrudes: [
|
|
4331
|
+
{
|
|
4332
|
+
outName: `subpax_${designName}_outer`,
|
|
4333
|
+
face: `${designName}_faceOuter`,
|
|
4334
|
+
extrudeMethod: EExtrude10.eRotate,
|
|
4335
|
+
rotate: [0, 0, 0],
|
|
4336
|
+
translate: [0, 0, 0]
|
|
4337
|
+
},
|
|
4338
|
+
{
|
|
4339
|
+
outName: `subpax_${designName}_petal`,
|
|
4340
|
+
face: `${designName}_facePetal`,
|
|
4341
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4342
|
+
length: param.PHE1,
|
|
4343
|
+
rotate: [0, 0, 0],
|
|
4344
|
+
translate: [0, 0, -param.PHE1 / 2]
|
|
4345
|
+
},
|
|
4346
|
+
...preExtrude1,
|
|
4347
|
+
...preExtrude2
|
|
4348
|
+
],
|
|
4349
|
+
volumes: [
|
|
4350
|
+
{
|
|
4351
|
+
outName: `pax_${designName}`,
|
|
4352
|
+
boolMethod: EBVolume13.eUnion,
|
|
4353
|
+
inList: [
|
|
4354
|
+
`subpax_${designName}_petal`,
|
|
4355
|
+
`subpax_${designName}_outer`,
|
|
4356
|
+
...b1List,
|
|
4357
|
+
...b2List
|
|
4358
|
+
]
|
|
4359
|
+
}
|
|
4360
|
+
]
|
|
4361
|
+
};
|
|
4362
|
+
rGeome.sub = {};
|
|
4363
|
+
rGeome.logstr += "vaxis_holder drawn successfully!\n";
|
|
4364
|
+
rGeome.calcErr = false;
|
|
4365
|
+
} catch (emsg) {
|
|
4366
|
+
rGeome.logstr += emsg;
|
|
4367
|
+
console.log(emsg);
|
|
4368
|
+
}
|
|
4369
|
+
return rGeome;
|
|
4370
|
+
}
|
|
4371
|
+
var vaxisHolderDef = {
|
|
4372
|
+
pTitle: "Heliostat vaxis_holder",
|
|
4373
|
+
pDescription: "The holders of the guidance mechanism for azimuth motion",
|
|
4374
|
+
pDef: pDef13,
|
|
4375
|
+
pGeom: pGeom13
|
|
4376
|
+
};
|
|
4377
|
+
|
|
4378
|
+
// src/heliostat/ring_guidance.ts
|
|
4379
|
+
import {
|
|
4380
|
+
contour as contour14,
|
|
4381
|
+
contourCircle as contourCircle12,
|
|
4382
|
+
figure as figure14,
|
|
4383
|
+
ffix as ffix16,
|
|
4384
|
+
pNumber as pNumber14,
|
|
4385
|
+
pSectionSeparator as pSectionSeparator13,
|
|
4386
|
+
initGeom as initGeom14,
|
|
4387
|
+
EExtrude as EExtrude11,
|
|
4388
|
+
EBVolume as EBVolume14
|
|
4389
|
+
} from "geometrix";
|
|
4390
|
+
var pDef14 = {
|
|
4391
|
+
partName: "ring_guidance",
|
|
4392
|
+
params: [
|
|
4393
|
+
//pNumber(name, unit, init, min, max, step)
|
|
4394
|
+
pNumber14("D1", "mm", 700, 100, 2500, 1),
|
|
4395
|
+
pNumber14("N1", "legs", 6, 1, 24, 1),
|
|
4396
|
+
pNumber14("D2", "mm", 600, 100, 2e3, 1),
|
|
4397
|
+
pSectionSeparator13("leg details"),
|
|
4398
|
+
pNumber14("D3", "mm", 30, 1, 200, 1),
|
|
4399
|
+
pNumber14("D4", "mm", 50, 1, 200, 1),
|
|
4400
|
+
pNumber14("L1", "mm", 90, 1, 900, 1),
|
|
4401
|
+
pNumber14("R5", "mm", 20, 0, 500, 1),
|
|
4402
|
+
pSectionSeparator13("inner"),
|
|
4403
|
+
pNumber14("D6", "mm", 300, 1, 1e3, 1),
|
|
4404
|
+
pNumber14("N2", "motors", 8, 1, 200, 1),
|
|
4405
|
+
pNumber14("L2", "mm", 50, 1, 200, 1),
|
|
4406
|
+
pNumber14("D7", "mm", 80, 1, 200, 1),
|
|
4407
|
+
pSectionSeparator13("thickness"),
|
|
4408
|
+
pNumber14("T1", "mm", 10, 1, 200, 1)
|
|
4409
|
+
],
|
|
4410
|
+
paramSvg: {
|
|
4411
|
+
D1: "ring_guidance_top.svg",
|
|
4412
|
+
D2: "ring_guidance_top.svg",
|
|
4413
|
+
D3: "ring_guidance_top.svg",
|
|
4414
|
+
D4: "ring_guidance_top.svg",
|
|
4415
|
+
R5: "ring_guidance_top.svg",
|
|
4416
|
+
D6: "ring_guidance_top.svg",
|
|
4417
|
+
D7: "ring_guidance_top.svg",
|
|
4418
|
+
N1: "ring_guidance_top.svg",
|
|
4419
|
+
N2: "ring_guidance_top.svg",
|
|
4420
|
+
L1: "ring_guidance_top.svg",
|
|
4421
|
+
L2: "ring_guidance_top.svg",
|
|
4422
|
+
T1: "ring_guidance_top.svg"
|
|
4423
|
+
},
|
|
4424
|
+
sim: {
|
|
4425
|
+
tMax: 100,
|
|
4426
|
+
tStep: 0.5,
|
|
4427
|
+
tUpdate: 500
|
|
4428
|
+
// every 0.5 second
|
|
4429
|
+
}
|
|
4430
|
+
};
|
|
4431
|
+
function pGeom14(t, param, suffix = "") {
|
|
4432
|
+
const rGeome = initGeom14(pDef14.partName + suffix);
|
|
4433
|
+
const figTop = figure14();
|
|
4434
|
+
const figSection = figure14();
|
|
4435
|
+
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4436
|
+
`;
|
|
4437
|
+
try {
|
|
4438
|
+
const R1 = param.D1 / 2;
|
|
4439
|
+
const R3 = param.D3 / 2;
|
|
4440
|
+
const R4 = param.D4 / 2;
|
|
4441
|
+
const R6 = param.D6 / 2;
|
|
4442
|
+
const R7 = param.D7 / 2;
|
|
4443
|
+
const stepA2 = 2 * Math.PI / param.N2;
|
|
4444
|
+
if (R7 > param.L2) {
|
|
4445
|
+
throw `err461: D7 ${param.D7} is too large compare to L2 ${param.L2}`;
|
|
4446
|
+
}
|
|
4447
|
+
if (param.N2 * param.D7 > (param.D6 + 2 * param.L2) * Math.PI) {
|
|
4448
|
+
throw `err462: N2 ${param.N2} is too large compare to D6 ${param.D6}, D7 ${param.D7} and L2 ${param.L2}`;
|
|
4449
|
+
}
|
|
4450
|
+
if (param.D2 < param.D6 + 2 * param.L2 + 2 * R7) {
|
|
4451
|
+
throw `err463: D2 ${param.D2} is too small compare to D6 ${param.D6}, L2 ${param.L2} and D7 ${param.D7}`;
|
|
4452
|
+
}
|
|
4453
|
+
rGeome.logstr += `ring_guidance: Dmax ${ffix16(param.D1 + 2 * R4)} mm
|
|
4454
|
+
`;
|
|
4455
|
+
const [outerLog, outerCtr, stepA1] = ctrGuidanceOuter(param);
|
|
4456
|
+
rGeome.logstr += outerLog;
|
|
4457
|
+
figTop.addMain(outerCtr);
|
|
4458
|
+
figTop.addMain(contourCircle12(0, 0, R6));
|
|
4459
|
+
for (let i = 0; i < param.N2; i++) {
|
|
4460
|
+
figTop.addMain(contourCircle12(R6 + param.L2, 0, R7).rotate(0, 0, i * stepA2));
|
|
4461
|
+
}
|
|
4462
|
+
for (let i = 0; i < param.N1; i++) {
|
|
4463
|
+
figTop.addMain(contourCircle12(R1, 0, R3).rotate(0, 0, i * stepA1));
|
|
4464
|
+
}
|
|
4465
|
+
const rect = function(xbl, ybl, width, height) {
|
|
4466
|
+
const rCtr = contour14(xbl, ybl).addSegStrokeR(width, 0).addSegStrokeR(0, height).addSegStrokeR(-width, 0).closeSegStroke();
|
|
4467
|
+
return rCtr;
|
|
4468
|
+
};
|
|
4469
|
+
const w1 = R1 - R6 + R4;
|
|
4470
|
+
figSection.addMain(rect(R6, 0, w1, param.T1));
|
|
4471
|
+
figSection.addMain(rect(-R6 - w1, 0, w1, param.T1));
|
|
4472
|
+
figSection.addSecond(rect(R1 - R3, 0, 2 * R3, param.T1));
|
|
4473
|
+
figSection.addSecond(rect(-R1 - R3, 0, 2 * R3, param.T1));
|
|
4474
|
+
const px2 = R6 + param.L2;
|
|
4475
|
+
figSection.addSecond(rect(px2 - R7, 0, 2 * R7, param.T1));
|
|
4476
|
+
figSection.addSecond(rect(-px2 - R7, 0, 2 * R7, param.T1));
|
|
4477
|
+
rGeome.fig = {
|
|
4478
|
+
faceTop: figTop,
|
|
4479
|
+
faceSection: figSection
|
|
4480
|
+
};
|
|
4481
|
+
const designName = rGeome.partName;
|
|
4482
|
+
rGeome.vol = {
|
|
4483
|
+
extrudes: [
|
|
4484
|
+
{
|
|
4485
|
+
outName: `subpax_${designName}_top`,
|
|
4486
|
+
face: `${designName}_faceTop`,
|
|
4487
|
+
extrudeMethod: EExtrude11.eLinearOrtho,
|
|
4488
|
+
length: param.T1,
|
|
4489
|
+
rotate: [0, 0, 0],
|
|
4490
|
+
translate: [0, 0, 0]
|
|
4491
|
+
}
|
|
4492
|
+
],
|
|
4493
|
+
volumes: [
|
|
4494
|
+
{
|
|
4495
|
+
outName: `pax_${designName}`,
|
|
4496
|
+
boolMethod: EBVolume14.eIdentity,
|
|
4497
|
+
inList: [`subpax_${designName}_top`]
|
|
4498
|
+
}
|
|
4499
|
+
]
|
|
4500
|
+
};
|
|
4501
|
+
rGeome.sub = {};
|
|
4502
|
+
rGeome.logstr += "ring_guidance drawn successfully!\n";
|
|
4503
|
+
rGeome.calcErr = false;
|
|
4504
|
+
} catch (emsg) {
|
|
4505
|
+
rGeome.logstr += emsg;
|
|
4506
|
+
console.log(emsg);
|
|
4507
|
+
}
|
|
4508
|
+
return rGeome;
|
|
4509
|
+
}
|
|
4510
|
+
var ringGuidanceDef = {
|
|
4511
|
+
pTitle: "Ring-guidance",
|
|
4512
|
+
pDescription: "The guidance of the gear-ring for the heliostat azimuth",
|
|
4513
|
+
pDef: pDef14,
|
|
4514
|
+
pGeom: pGeom14
|
|
4515
|
+
};
|
|
4516
|
+
|
|
4517
|
+
// src/heliostat/vaxis_guidance.ts
|
|
4518
|
+
import {
|
|
4519
|
+
contour as contour15,
|
|
4520
|
+
contourCircle as contourCircle13,
|
|
4521
|
+
figure as figure15,
|
|
4522
|
+
ffix as ffix17,
|
|
4523
|
+
pNumber as pNumber15,
|
|
4524
|
+
pSectionSeparator as pSectionSeparator14,
|
|
4525
|
+
initGeom as initGeom15,
|
|
4526
|
+
EExtrude as EExtrude12,
|
|
4527
|
+
EBVolume as EBVolume15
|
|
4528
|
+
} from "geometrix";
|
|
4529
|
+
var pDef15 = {
|
|
4530
|
+
partName: "vaxis_guidance",
|
|
4531
|
+
params: [
|
|
4532
|
+
//pNumber(name, unit, init, min, max, step)
|
|
4533
|
+
pNumber15("D1", "mm", 700, 100, 2500, 1),
|
|
4534
|
+
pNumber15("N1", "legs", 6, 1, 24, 1),
|
|
4535
|
+
pNumber15("D2", "mm", 600, 100, 2e3, 1),
|
|
4536
|
+
pSectionSeparator14("leg details"),
|
|
4537
|
+
pNumber15("D3", "mm", 30, 1, 200, 1),
|
|
4538
|
+
pNumber15("D4", "mm", 50, 1, 200, 1),
|
|
4539
|
+
pNumber15("L1", "mm", 90, 1, 900, 1),
|
|
4540
|
+
pNumber15("R5", "mm", 20, 0, 500, 1),
|
|
4541
|
+
pSectionSeparator14("inner spring"),
|
|
4542
|
+
pNumber15("D6", "mm", 540, 1, 1e3, 1),
|
|
4543
|
+
pNumber15("N2", "springs", 6, 1, 24, 1),
|
|
4544
|
+
pNumber15("R7", "mm", 10, 0, 100, 1),
|
|
4545
|
+
pNumber15("a1", "degree", 0, -45, 45, 1),
|
|
4546
|
+
pNumber15("E2", "mm", 50, 1, 200, 1),
|
|
4547
|
+
pNumber15("E1", "mm", 10, 1, 200, 1),
|
|
4548
|
+
pNumber15("W1", "mm", 20, 1, 200, 1),
|
|
4549
|
+
pNumber15("L2", "mm", 100, 1, 900, 1),
|
|
4550
|
+
pNumber15("L3", "mm", 40, 1, 900, 1),
|
|
4551
|
+
pNumber15("N3", "loops", 2, 0, 8, 1),
|
|
4552
|
+
pNumber15("L4", "mm", 40, 0, 900, 1),
|
|
4553
|
+
pSectionSeparator14("thickness"),
|
|
4554
|
+
pNumber15("T1", "mm", 10, 1, 200, 1),
|
|
4555
|
+
pNumber15("Dvaxis", "mm", 260, 5, 1e3, 1)
|
|
4556
|
+
],
|
|
4557
|
+
paramSvg: {
|
|
4558
|
+
D1: "vaxis_guidance_top.svg",
|
|
4559
|
+
N1: "vaxis_guidance_top.svg",
|
|
4560
|
+
D2: "vaxis_guidance_top.svg",
|
|
4561
|
+
D3: "vaxis_guidance_top.svg",
|
|
4562
|
+
D4: "vaxis_guidance_top.svg",
|
|
4563
|
+
L1: "vaxis_guidance_top.svg",
|
|
4564
|
+
R5: "vaxis_guidance_top.svg",
|
|
4565
|
+
D6: "vaxis_guidance_top.svg",
|
|
4566
|
+
N2: "vaxis_guidance_top.svg",
|
|
4567
|
+
R7: "vaxis_guidance_top.svg",
|
|
4568
|
+
a1: "vaxis_guidance_spring.svg",
|
|
4569
|
+
E2: "vaxis_guidance_top.svg",
|
|
4570
|
+
E1: "vaxis_guidance_spring.svg",
|
|
4571
|
+
W1: "vaxis_guidance_spring.svg",
|
|
4572
|
+
L2: "vaxis_guidance_spring.svg",
|
|
4573
|
+
L3: "vaxis_guidance_spring.svg",
|
|
4574
|
+
N3: "vaxis_guidance_spring.svg",
|
|
4575
|
+
L4: "vaxis_guidance_spring.svg",
|
|
4576
|
+
T1: "vaxis_guidance_top.svg",
|
|
4577
|
+
Dvaxis: "vaxis_guidance_top.svg"
|
|
4578
|
+
},
|
|
4579
|
+
sim: {
|
|
4580
|
+
tMax: 100,
|
|
4581
|
+
tStep: 0.5,
|
|
4582
|
+
tUpdate: 500
|
|
4583
|
+
// every 0.5 second
|
|
4584
|
+
}
|
|
4585
|
+
};
|
|
4586
|
+
function pGeom15(t, param, suffix = "") {
|
|
4587
|
+
const rGeome = initGeom15(pDef15.partName + suffix);
|
|
4588
|
+
const figTop = figure15();
|
|
4589
|
+
const figSection = figure15();
|
|
4590
|
+
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4591
|
+
`;
|
|
4592
|
+
try {
|
|
4593
|
+
const R1 = param.D1 / 2;
|
|
4594
|
+
const R2 = param.D2 / 2;
|
|
4595
|
+
const R3 = param.D3 / 2;
|
|
4596
|
+
const R4 = param.D4 / 2;
|
|
4597
|
+
const R6 = param.D6 / 2;
|
|
4598
|
+
if (R2 < R6) {
|
|
4599
|
+
throw `err466: D6 ${param.D6} is too large compare to D2 ${param.D2}`;
|
|
4600
|
+
}
|
|
4601
|
+
rGeome.logstr += `vaxis_guidance: Dmax ${ffix17(param.D1 + 2 * R4)} mm
|
|
4602
|
+
`;
|
|
4603
|
+
const [outerLog, outerCtr, stepA1] = ctrGuidanceOuter(param);
|
|
4604
|
+
rGeome.logstr += outerLog;
|
|
4605
|
+
figTop.addMain(outerCtr);
|
|
4606
|
+
for (let i = 0; i < param.N1; i++) {
|
|
4607
|
+
figTop.addMain(contourCircle13(R1, 0, R3).rotate(0, 0, i * stepA1));
|
|
4608
|
+
}
|
|
4609
|
+
const [innerLog, innerCtr] = ctrGuidanceInner(param);
|
|
4610
|
+
rGeome.logstr += innerLog;
|
|
4611
|
+
figTop.addMain(innerCtr);
|
|
4612
|
+
figTop.addSecond(contourCircle13(0, 0, param.Dvaxis / 2));
|
|
4613
|
+
const rect = function(xbl, ybl, width, height) {
|
|
4614
|
+
const rCtr = contour15(xbl, ybl).addSegStrokeR(width, 0).addSegStrokeR(0, height).addSegStrokeR(-width, 0).closeSegStroke();
|
|
4615
|
+
return rCtr;
|
|
4616
|
+
};
|
|
4617
|
+
const w1 = R1 - R6 + R4;
|
|
4618
|
+
figSection.addMain(rect(R6, 0, w1, param.T1));
|
|
4619
|
+
figSection.addMain(rect(-R6 - w1, 0, w1, param.T1));
|
|
4620
|
+
figSection.addSecond(rect(R1 - R3, 0, 2 * R3, param.T1));
|
|
4621
|
+
figSection.addSecond(rect(-R1 - R3, 0, 2 * R3, param.T1));
|
|
4622
|
+
rGeome.fig = {
|
|
4623
|
+
faceTop: figTop,
|
|
4624
|
+
faceSection: figSection
|
|
4625
|
+
};
|
|
4626
|
+
const designName = rGeome.partName;
|
|
4627
|
+
rGeome.vol = {
|
|
4628
|
+
extrudes: [
|
|
4629
|
+
{
|
|
4630
|
+
outName: `subpax_${designName}_top`,
|
|
4631
|
+
face: `${designName}_faceTop`,
|
|
4632
|
+
extrudeMethod: EExtrude12.eLinearOrtho,
|
|
4633
|
+
length: param.T1,
|
|
4634
|
+
rotate: [0, 0, 0],
|
|
4635
|
+
translate: [0, 0, 0]
|
|
4636
|
+
}
|
|
4637
|
+
],
|
|
4638
|
+
volumes: [
|
|
4639
|
+
{
|
|
4640
|
+
outName: `pax_${designName}`,
|
|
4641
|
+
boolMethod: EBVolume15.eIdentity,
|
|
4642
|
+
inList: [`subpax_${designName}_top`]
|
|
4643
|
+
}
|
|
4644
|
+
]
|
|
4645
|
+
};
|
|
4646
|
+
rGeome.sub = {};
|
|
4647
|
+
rGeome.logstr += "vaxis_guidance drawn successfully!\n";
|
|
4648
|
+
rGeome.calcErr = false;
|
|
4649
|
+
} catch (emsg) {
|
|
4650
|
+
rGeome.logstr += emsg;
|
|
4651
|
+
console.log(emsg);
|
|
4652
|
+
}
|
|
4653
|
+
return rGeome;
|
|
4654
|
+
}
|
|
4655
|
+
var vaxisGuidanceDef = {
|
|
4656
|
+
pTitle: "Vaxis-guidance",
|
|
4657
|
+
pDescription: "The guidance of the V-Axis for the heliostat azimuth",
|
|
4658
|
+
pDef: pDef15,
|
|
4659
|
+
pGeom: pGeom15
|
|
4660
|
+
};
|
|
4661
|
+
|
|
4662
|
+
// src/heliostat/rod.ts
|
|
4663
|
+
import {
|
|
4664
|
+
contour as contour16,
|
|
4665
|
+
contourCircle as contourCircle14,
|
|
4666
|
+
figure as figure16,
|
|
4667
|
+
ffix as ffix18,
|
|
4668
|
+
pNumber as pNumber16,
|
|
4669
|
+
pSectionSeparator as pSectionSeparator15,
|
|
4670
|
+
initGeom as initGeom16,
|
|
4671
|
+
EExtrude as EExtrude13,
|
|
4672
|
+
EBVolume as EBVolume16
|
|
4673
|
+
} from "geometrix";
|
|
4674
|
+
var pDef16 = {
|
|
4675
|
+
partName: "rod",
|
|
4676
|
+
params: [
|
|
4677
|
+
//pNumber(name, unit, init, min, max, step)
|
|
4678
|
+
pNumber16("L1", "mm", 1e4, 100, 4e4, 10),
|
|
4679
|
+
pNumber16("L2", "mm", 100, 2, 400, 1),
|
|
4680
|
+
pNumber16("L3", "mm", 400, 10, 1e3, 1),
|
|
4681
|
+
pNumber16("L4", "mm", 600, 10, 1e3, 1),
|
|
4682
|
+
pNumber16("N1", "", 10, 2, 50, 1),
|
|
4683
|
+
pSectionSeparator15("section"),
|
|
4684
|
+
pNumber16("H1", "mm", 200, 5, 4e3, 1),
|
|
4685
|
+
pNumber16("E1", "mm", 2, 1, 80, 1),
|
|
4686
|
+
pNumber16("E2", "mm", 10, 1, 80, 1),
|
|
4687
|
+
pSectionSeparator15("pad"),
|
|
4688
|
+
pNumber16("N3", "", 2, 1, 20, 1),
|
|
4689
|
+
pNumber16("N4", "", 4, 1, 20, 1),
|
|
4690
|
+
pNumber16("R3", "mm", 100, 1, 500, 1),
|
|
4691
|
+
pNumber16("D2", "mm", 10, 1, 100, 1),
|
|
4692
|
+
pNumber16("L7", "mm", 10, 1, 300, 1)
|
|
4693
|
+
],
|
|
4694
|
+
paramSvg: {
|
|
4695
|
+
L1: "rod_top.svg",
|
|
4696
|
+
L2: "rod_top.svg",
|
|
4697
|
+
L3: "rod_top.svg",
|
|
4698
|
+
L4: "rod_top.svg",
|
|
4699
|
+
H1: "rod_cut.svg",
|
|
4700
|
+
E1: "rod_cut.svg",
|
|
4701
|
+
E2: "rod_cut.svg",
|
|
4702
|
+
N1: "rod_top.svg",
|
|
4703
|
+
N3: "rod_top.svg",
|
|
4704
|
+
N4: "rod_top.svg",
|
|
4705
|
+
R3: "rod_top.svg",
|
|
4706
|
+
D2: "rod_plate.svg",
|
|
4707
|
+
L7: "rod_plate.svg"
|
|
4708
|
+
},
|
|
4709
|
+
sim: {
|
|
4710
|
+
tMax: 180,
|
|
4711
|
+
tStep: 0.5,
|
|
4712
|
+
tUpdate: 500
|
|
4713
|
+
// every 0.5 second
|
|
4714
|
+
}
|
|
4715
|
+
};
|
|
4716
|
+
function pGeom16(t, param, suffix = "") {
|
|
4717
|
+
const rGeome = initGeom16(pDef16.partName + suffix);
|
|
4718
|
+
let ctrPlate;
|
|
4719
|
+
let ctrRod;
|
|
4720
|
+
const figCut = figure16();
|
|
4721
|
+
const figPlate = figure16();
|
|
4722
|
+
const figTop = figure16();
|
|
4723
|
+
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4724
|
+
`;
|
|
4725
|
+
try {
|
|
4726
|
+
const R2 = param.D2 / 2;
|
|
4727
|
+
const n3step = param.L3 / (param.N3 + 1);
|
|
4728
|
+
const n4step = param.L4 / (param.N4 + 1);
|
|
4729
|
+
rGeome.logstr += `rod-length: ${ffix18(param.L1)} mm
|
|
4730
|
+
`;
|
|
4731
|
+
const space_length = (param.L1 - param.L3) / (param.N1 - 1);
|
|
4732
|
+
rGeome.logstr += `space-length: ${ffix18(space_length)} mm
|
|
4733
|
+
`;
|
|
4734
|
+
ctrPlate = function(py) {
|
|
4735
|
+
const rPlate = [];
|
|
4736
|
+
const plateExt = contour16(param.L4 / 2, py).addCornerRounded(param.R3).addSegStrokeA(param.L4 / 2, py + param.L3).addCornerRounded(param.R3).addSegStrokeA(-param.L4 / 2, py + param.L3).addCornerRounded(param.R3).addSegStrokeA(-param.L4 / 2, py).addCornerRounded(param.R3).closeSegStroke();
|
|
4737
|
+
rPlate.push(plateExt);
|
|
4738
|
+
for (let i = 1; i < param.N3 + 1; i++) {
|
|
4739
|
+
rPlate.push(contourCircle14(param.L4 / 2 - param.L7, py + i * n3step, R2));
|
|
4740
|
+
rPlate.push(contourCircle14(-param.L4 / 2 + param.L7, py + i * n3step, R2));
|
|
4741
|
+
}
|
|
4742
|
+
for (let i = 1; i < param.N4 + 1; i++) {
|
|
4743
|
+
rPlate.push(contourCircle14(-param.L4 / 2 + i * n4step, py + param.L7, R2));
|
|
4744
|
+
rPlate.push(
|
|
4745
|
+
contourCircle14(-param.L4 / 2 + i * n4step, py + param.L3 - param.L7, R2)
|
|
4746
|
+
);
|
|
4747
|
+
}
|
|
4748
|
+
return rPlate;
|
|
4749
|
+
};
|
|
4750
|
+
ctrRod = function(py, ly) {
|
|
4751
|
+
const rRod = contour16(param.L2 / 2, py).addSegStrokeA(param.L2 / 2, py + ly).addSegStrokeA(-param.L2 / 2, py + ly).addSegStrokeA(-param.L2 / 2, py).closeSegStroke();
|
|
4752
|
+
return rRod;
|
|
4753
|
+
};
|
|
4754
|
+
const L2h = param.L2 / 2;
|
|
4755
|
+
const L4h = param.L4 / 2;
|
|
4756
|
+
const L2hi = (param.L2 - 2 * param.E1) / 2;
|
|
4757
|
+
const H1i = param.H1 - param.E1;
|
|
4758
|
+
const ctrRodExt = contour16(L2h, 0).addSegStrokeA(L2h, param.H1).addSegStrokeA(-L2h, param.H1).addSegStrokeA(-L2h, 0).closeSegStroke();
|
|
4759
|
+
const ctrRodInt = contour16(L2hi, param.E1).addSegStrokeA(L2hi, H1i).addSegStrokeA(-L2hi, H1i).addSegStrokeA(-L2hi, param.E1).closeSegStroke();
|
|
4760
|
+
const ctrPlateSide = contour16(L4h, param.H1).addSegStrokeA(L4h, param.H1 + param.E2).addSegStrokeA(-L4h, param.H1 + param.E2).addSegStrokeA(-L4h, param.H1).closeSegStroke();
|
|
4761
|
+
figCut.addMain(ctrRodExt);
|
|
4762
|
+
figCut.addMain(ctrRodInt);
|
|
4763
|
+
figCut.addSecond(ctrPlateSide);
|
|
4764
|
+
ctrPlate(0).forEach((ctr) => figPlate.addMain(ctr));
|
|
4765
|
+
figPlate.addSecond(ctrRod(-param.L3 / 2, 2 * param.L3));
|
|
4766
|
+
const plateStep = (param.L1 - param.L3) / (param.N1 - 1);
|
|
4767
|
+
for (let i = 0; i < param.N1; i++) {
|
|
4768
|
+
ctrPlate(i * plateStep).forEach((ctr) => figTop.addMain(ctr));
|
|
4769
|
+
}
|
|
4770
|
+
figTop.addSecond(ctrRod(0, param.L1));
|
|
4771
|
+
rGeome.fig = {
|
|
4772
|
+
faceCut: figCut,
|
|
4773
|
+
facePlate: figPlate,
|
|
4774
|
+
faceTop: figTop
|
|
4775
|
+
};
|
|
4776
|
+
const designName = rGeome.partName;
|
|
4777
|
+
rGeome.vol = {
|
|
4778
|
+
extrudes: [
|
|
4779
|
+
{
|
|
4780
|
+
outName: `subpax_${designName}_rod`,
|
|
4781
|
+
face: `${designName}_faceCut`,
|
|
4782
|
+
extrudeMethod: EExtrude13.eLinearOrtho,
|
|
4783
|
+
length: param.L1,
|
|
4784
|
+
rotate: [0, 0, 0],
|
|
4785
|
+
translate: [0, 0, 0]
|
|
4786
|
+
},
|
|
4787
|
+
{
|
|
4788
|
+
outName: `subpax_${designName}_plates`,
|
|
4789
|
+
face: `${designName}_faceTop`,
|
|
4790
|
+
extrudeMethod: EExtrude13.eLinearOrtho,
|
|
4791
|
+
length: param.E2,
|
|
4792
|
+
rotate: [Math.PI / 2, 0, 0],
|
|
4793
|
+
translate: [0, param.E2 + param.H1, 0]
|
|
4794
|
+
}
|
|
4795
|
+
],
|
|
4796
|
+
volumes: [
|
|
4797
|
+
{
|
|
4798
|
+
outName: `pax_${designName}`,
|
|
4799
|
+
boolMethod: EBVolume16.eUnion,
|
|
4800
|
+
inList: [`subpax_${designName}_rod`, `subpax_${designName}_plates`]
|
|
4801
|
+
}
|
|
4802
|
+
]
|
|
4803
|
+
};
|
|
4804
|
+
rGeome.sub = {};
|
|
4805
|
+
rGeome.logstr += "heliostat-rod drawn successfully!\n";
|
|
4806
|
+
rGeome.calcErr = false;
|
|
4807
|
+
} catch (emsg) {
|
|
4808
|
+
rGeome.logstr += emsg;
|
|
4809
|
+
console.log(emsg);
|
|
4810
|
+
}
|
|
4811
|
+
return rGeome;
|
|
4812
|
+
}
|
|
4813
|
+
var rodDef = {
|
|
4814
|
+
pTitle: "Heliostat rod",
|
|
4815
|
+
pDescription: "The rod of an heliostat-surface",
|
|
4816
|
+
pDef: pDef16,
|
|
4817
|
+
pGeom: pGeom16
|
|
4818
|
+
};
|
|
4819
|
+
|
|
4820
|
+
// src/heliostat/trapeze.ts
|
|
4821
|
+
import {
|
|
4822
|
+
contour as contour17,
|
|
4823
|
+
contourCircle as contourCircle15,
|
|
4824
|
+
figure as figure17,
|
|
4825
|
+
radToDeg as radToDeg9,
|
|
4826
|
+
ffix as ffix19,
|
|
4827
|
+
pNumber as pNumber17,
|
|
4828
|
+
pSectionSeparator as pSectionSeparator16,
|
|
4829
|
+
initGeom as initGeom17,
|
|
4830
|
+
EExtrude as EExtrude14,
|
|
4831
|
+
EBVolume as EBVolume17
|
|
4832
|
+
} from "geometrix";
|
|
4833
|
+
var pDef17 = {
|
|
4834
|
+
partName: "trapeze",
|
|
4835
|
+
params: [
|
|
4836
|
+
//pNumber(name, unit, init, min, max, step)
|
|
4837
|
+
pNumber17("L1", "mm", 1600, 10, 4e3, 1),
|
|
4838
|
+
pNumber17("L2", "mm", 1e3, 10, 4e3, 1),
|
|
4839
|
+
pNumber17("L3", "mm", 400, 5, 800, 1),
|
|
4840
|
+
pNumber17("L4", "mm", 300, 5, 800, 1),
|
|
4841
|
+
pSectionSeparator16("outer frame"),
|
|
4842
|
+
pNumber17("N1", "", 7, 1, 20, 1),
|
|
4843
|
+
pNumber17("N2", "", 4, 1, 20, 1),
|
|
4844
|
+
pNumber17("D1", "mm", 10, 1, 40, 1),
|
|
4845
|
+
pNumber17("L5", "mm", 100, 1, 400, 1),
|
|
4846
|
+
pNumber17("L6", "mm", 20, 1, 400, 1),
|
|
4847
|
+
pNumber17("R1", "mm", 60, 1, 400, 1),
|
|
4848
|
+
pNumber17("R2", "mm", 20, 1, 400, 1),
|
|
4849
|
+
pSectionSeparator16("inner pad"),
|
|
4850
|
+
pNumber17("N3", "", 2, 1, 20, 1),
|
|
4851
|
+
pNumber17("N4", "", 2, 1, 20, 1),
|
|
4852
|
+
pNumber17("D2", "mm", 10, 1, 40, 1),
|
|
4853
|
+
pNumber17("L7", "mm", 20, 1, 400, 1),
|
|
4854
|
+
pNumber17("R3", "mm", 20, 1, 400, 1),
|
|
4855
|
+
pSectionSeparator16("diagonal shaft"),
|
|
4856
|
+
pNumber17("D3", "mm", 30, 1, 100, 1),
|
|
4857
|
+
pNumber17("D4", "mm", 26, 1, 100, 1),
|
|
4858
|
+
pNumber17("H1", "mm", 300, 0.5, 800, 0.5),
|
|
4859
|
+
pNumber17("H2", "mm", 2, 0.5, 800, 0.5),
|
|
4860
|
+
pNumber17("H3", "mm", 5, 0.5, 800, 0.5)
|
|
4861
|
+
],
|
|
4862
|
+
paramSvg: {
|
|
4863
|
+
L1: "trapeze_top.svg",
|
|
4864
|
+
L2: "trapeze_top.svg",
|
|
4865
|
+
L3: "trapeze_top.svg",
|
|
4866
|
+
L4: "trapeze_top.svg",
|
|
4867
|
+
N1: "trapeze_top.svg",
|
|
4868
|
+
N2: "trapeze_top.svg",
|
|
4869
|
+
N3: "trapeze_top.svg",
|
|
4870
|
+
N4: "trapeze_top.svg",
|
|
4871
|
+
L5: "trapeze_top.svg",
|
|
4872
|
+
L6: "trapeze_top.svg",
|
|
4873
|
+
L7: "trapeze_top.svg",
|
|
4874
|
+
D1: "trapeze_top.svg",
|
|
4875
|
+
D2: "trapeze_top.svg",
|
|
4876
|
+
D3: "trapeze_rod.svg",
|
|
4877
|
+
D4: "trapeze_rod.svg",
|
|
4878
|
+
R1: "trapeze_top.svg",
|
|
4879
|
+
R2: "trapeze_top.svg",
|
|
4880
|
+
R3: "trapeze_top.svg",
|
|
4881
|
+
H1: "trapeze_side.svg",
|
|
4882
|
+
H2: "trapeze_side.svg",
|
|
4883
|
+
H3: "trapeze_side.svg"
|
|
4884
|
+
},
|
|
4885
|
+
sim: {
|
|
4886
|
+
tMax: 180,
|
|
4887
|
+
tStep: 0.5,
|
|
4888
|
+
tUpdate: 500
|
|
4889
|
+
// every 0.5 second
|
|
4890
|
+
}
|
|
4891
|
+
};
|
|
4892
|
+
function pGeom17(t, param, suffix = "") {
|
|
4893
|
+
const rGeome = initGeom17(pDef17.partName + suffix);
|
|
4894
|
+
let ctrRodFootprint;
|
|
4895
|
+
let ctrRod;
|
|
4896
|
+
const figFrame = figure17();
|
|
4897
|
+
const figPlate = figure17();
|
|
4898
|
+
const figRod = figure17();
|
|
4899
|
+
const figRodHollow = figure17();
|
|
4900
|
+
const figCutRod = figure17();
|
|
4901
|
+
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4902
|
+
`;
|
|
4903
|
+
try {
|
|
4904
|
+
if (param.L3 > param.L1 - param.L5) {
|
|
4905
|
+
throw `err595: L3 ${param.L3} too large compare to L1 ${param.L1} and L5 ${param.L5}`;
|
|
4906
|
+
}
|
|
4907
|
+
if (param.L4 > param.L2 - param.L5) {
|
|
4908
|
+
throw `err596: L4 ${param.L4} too large compare to L2 ${param.L2} and L5 ${param.L5}`;
|
|
4909
|
+
}
|
|
4910
|
+
if (param.H1 - param.H2 - param.H3 < 4 * param.D3) {
|
|
4911
|
+
throw `err597: H1 ${param.H1} too small compare to H2 ${param.H2}, H3 ${param.H3} and D3 ${param.D3}`;
|
|
4912
|
+
}
|
|
4913
|
+
const pad1 = param.R1 * (1 - 1 / Math.sqrt(2));
|
|
4914
|
+
const pad3 = param.R3 * (1 - 1 / Math.sqrt(2));
|
|
4915
|
+
const rod_x = param.L2 / 2 - pad1 - (param.L4 / 2 - pad3);
|
|
4916
|
+
const rod_y = param.L1 / 2 - pad1 - (param.L3 / 2 - pad3);
|
|
4917
|
+
const rod_xy = Math.sqrt(rod_x ** 2 + rod_y ** 2);
|
|
4918
|
+
const rod_z = param.H1 - param.H2 - param.H3;
|
|
4919
|
+
const rod_slope_length = Math.sqrt(rod_xy ** 2 + rod_z ** 2);
|
|
4920
|
+
const rod_slope_angle = Math.atan2(rod_z, rod_xy);
|
|
4921
|
+
const rod_xy_angle = Math.atan2(rod_y, rod_x);
|
|
4922
|
+
rGeome.logstr += `rod-slope: length: ${ffix19(rod_slope_length)} mm, angle: ${ffix19(
|
|
4923
|
+
radToDeg9(rod_slope_angle)
|
|
4924
|
+
)} degree
|
|
4925
|
+
`;
|
|
4926
|
+
rGeome.logstr += `rod-xy-angle: ${ffix19(radToDeg9(rod_xy_angle))} degree
|
|
4927
|
+
`;
|
|
4928
|
+
const rodFootprintLength = param.D3 / Math.cos(Math.PI / 2 - rod_slope_angle);
|
|
4929
|
+
rGeome.logstr += `rod-footprint-length: ${ffix19(rodFootprintLength)} mm
|
|
4930
|
+
`;
|
|
4931
|
+
const rodFPl = Math.sqrt((rodFootprintLength / 2) ** 2 + (param.D3 / 2) ** 2);
|
|
4932
|
+
const rodFPa = Math.atan2(param.D3, rodFootprintLength);
|
|
4933
|
+
ctrRodFootprint = function(px, py, angle) {
|
|
4934
|
+
const rCtr = contour17(px, py).addPointRP(angle + Math.PI - rodFPa, rodFPl).addSeg2Arcs(angle + Math.PI / 2, angle).addPointRP(angle + Math.PI + rodFPa, rodFPl).addSeg2Arcs(angle + Math.PI, angle + Math.PI / 2).addPointRP(angle - rodFPa, rodFPl).addSeg2Arcs(angle + 3 * Math.PI / 2, angle + Math.PI).addPointRP(angle + rodFPa, rodFPl).addSeg2Arcs(angle, angle - Math.PI / 2);
|
|
4935
|
+
return rCtr;
|
|
4936
|
+
};
|
|
4937
|
+
ctrRod = function(px, py, angle) {
|
|
4938
|
+
const px0 = px + rodFPl * Math.cos(angle + Math.PI - rodFPa);
|
|
4939
|
+
const py0 = py + rodFPl * Math.sin(angle + Math.PI - rodFPa);
|
|
4940
|
+
const rCtr = contour17(px0, py0).addSegStrokeRP(angle + Math.PI, rod_xy).addSegStrokeRP(angle - Math.PI / 2, param.D3).addSegStrokeRP(angle, rod_xy).closeSegStroke();
|
|
4941
|
+
return rCtr;
|
|
4942
|
+
};
|
|
4943
|
+
if (param.R1 > param.L1 / 4 || param.R1 > param.L2 / 4) {
|
|
4944
|
+
throw `err614: R1 ${param.R1} too large compare to L1 ${param.L1} or L2 ${param.L2}`;
|
|
4945
|
+
}
|
|
4946
|
+
const ctrFrameExt = contour17(param.L2 / 2, param.L1 / 2).addSegStrokeA(-param.L2 / 2, param.L1 / 2).addCornerRounded(param.R1).addSegStrokeA(-param.L2 / 2, -param.L1 / 2).addCornerRounded(param.R1).addSegStrokeA(param.L2 / 2, -param.L1 / 2).addCornerRounded(param.R1).closeSegStroke().addCornerRounded(param.R1);
|
|
4947
|
+
if (param.R2 > (param.L1 - 2 * param.L5) / 4 || param.R2 > (param.L2 - 2 * param.L5) / 4) {
|
|
4948
|
+
throw `err627: R2 ${param.R2} too large compare to L1 ${param.L1}, L2 ${param.L2} and L5 ${param.L5}`;
|
|
4949
|
+
}
|
|
4950
|
+
const ctrFrameInt = contour17(param.L2 / 2 - param.L5, param.L1 / 2 - param.L5).addSegStrokeA(-param.L2 / 2 + param.L5, param.L1 / 2 - param.L5).addCornerRounded(param.R2).addSegStrokeA(-param.L2 / 2 + param.L5, -param.L1 / 2 + param.L5).addCornerRounded(param.R2).addSegStrokeA(param.L2 / 2 - param.L5, -param.L1 / 2 + param.L5).addCornerRounded(param.R2).closeSegStroke().addCornerRounded(param.R2);
|
|
4951
|
+
if (param.R3 > param.L3 / 4 || param.R3 > param.L4 / 4) {
|
|
4952
|
+
throw `err639: R3 ${param.R3} too large compare to L3 ${param.L3} or L4 ${param.L4}`;
|
|
4953
|
+
}
|
|
4954
|
+
const ctrPlate = contour17(param.L4 / 2, param.L3 / 2).addSegStrokeA(-param.L4 / 2, param.L3 / 2).addCornerRounded(param.R3).addSegStrokeA(-param.L4 / 2, -param.L3 / 2).addCornerRounded(param.R3).addSegStrokeA(param.L4 / 2, -param.L3 / 2).addCornerRounded(param.R3).closeSegStroke().addCornerRounded(param.R3);
|
|
4955
|
+
figFrame.addMain(ctrFrameExt);
|
|
4956
|
+
figFrame.addMain(ctrFrameInt);
|
|
4957
|
+
figFrame.addSecond(ctrPlate);
|
|
4958
|
+
const step1 = param.L1 / (param.N1 + 1);
|
|
4959
|
+
const step2 = param.L2 / (param.N2 + 1);
|
|
4960
|
+
const step3 = param.L3 / (param.N3 + 1);
|
|
4961
|
+
const step4 = param.L4 / (param.N4 + 1);
|
|
4962
|
+
if (param.L5 < param.D1 / 2 + param.L6) {
|
|
4963
|
+
throw `err658: L5 ${param.L5} too small compare to D1 ${param.D1} or L6 ${param.L6}`;
|
|
4964
|
+
}
|
|
4965
|
+
if (step3 < param.D2 / 2 + param.L7) {
|
|
4966
|
+
throw `err661: D2 ${param.D2} or L7 ${param.L7} too large compare to L3 ${param.l3}`;
|
|
4967
|
+
}
|
|
4968
|
+
if (step4 < param.D2 / 2 + param.L7) {
|
|
4969
|
+
throw `err664: D2 ${param.D2} or L7 ${param.L7} too large compare to L4 ${param.l4}`;
|
|
4970
|
+
}
|
|
4971
|
+
const lFrameHole = [];
|
|
4972
|
+
for (let i = 1; i < param.N1 + 1; i++) {
|
|
4973
|
+
lFrameHole.push(
|
|
4974
|
+
contourCircle15(param.L2 / 2 - param.L6, -param.L1 / 2 + i * step1, param.D1 / 2)
|
|
4975
|
+
);
|
|
4976
|
+
lFrameHole.push(
|
|
4977
|
+
contourCircle15(-param.L2 / 2 + param.L6, -param.L1 / 2 + i * step1, param.D1 / 2)
|
|
4978
|
+
);
|
|
4979
|
+
}
|
|
4980
|
+
for (let i = 1; i < param.N2 + 1; i++) {
|
|
4981
|
+
lFrameHole.push(
|
|
4982
|
+
contourCircle15(-param.L2 / 2 + i * step2, param.L1 / 2 - param.L6, param.D1 / 2)
|
|
4983
|
+
);
|
|
4984
|
+
lFrameHole.push(
|
|
4985
|
+
contourCircle15(-param.L2 / 2 + i * step2, -param.L1 / 2 + param.L6, param.D1 / 2)
|
|
4986
|
+
);
|
|
4987
|
+
}
|
|
4988
|
+
const lPlateHole = [];
|
|
4989
|
+
for (let i = 1; i < param.N3 + 1; i++) {
|
|
4990
|
+
lPlateHole.push(
|
|
4991
|
+
contourCircle15(param.L4 / 2 - param.L7, -param.L3 / 2 + i * step3, param.D2 / 2)
|
|
4992
|
+
);
|
|
4993
|
+
lPlateHole.push(
|
|
4994
|
+
contourCircle15(-param.L4 / 2 + param.L7, -param.L3 / 2 + i * step3, param.D2 / 2)
|
|
4995
|
+
);
|
|
4996
|
+
}
|
|
4997
|
+
for (let i = 1; i < param.N4 + 1; i++) {
|
|
4998
|
+
lPlateHole.push(
|
|
4999
|
+
contourCircle15(-param.L4 / 2 + i * step4, param.L3 / 2 - param.L7, param.D2 / 2)
|
|
5000
|
+
);
|
|
5001
|
+
lPlateHole.push(
|
|
5002
|
+
contourCircle15(-param.L4 / 2 + i * step4, -param.L3 / 2 + param.L7, param.D2 / 2)
|
|
5003
|
+
);
|
|
5004
|
+
}
|
|
5005
|
+
lFrameHole.forEach((ctr) => {
|
|
5006
|
+
figFrame.addMain(ctr);
|
|
5007
|
+
});
|
|
5008
|
+
lPlateHole.forEach((ctr) => {
|
|
5009
|
+
figFrame.addSecond(ctr);
|
|
4117
5010
|
});
|
|
4118
5011
|
const lRodFP = [];
|
|
4119
5012
|
lRodFP.push(ctrRodFootprint(param.L2 / 2 - pad1, param.L1 / 2 - pad1, rod_xy_angle));
|
|
@@ -4161,17 +5054,17 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4161
5054
|
if (param.D4 >= param.D3) {
|
|
4162
5055
|
throw `err218: D4 ${param.D4} larger than D3 ${param.D3}`;
|
|
4163
5056
|
}
|
|
4164
|
-
figRod.addMain(
|
|
4165
|
-
figRod.addSecond(
|
|
4166
|
-
figRodHollow.addMain(
|
|
4167
|
-
figRodHollow.addSecond(
|
|
5057
|
+
figRod.addMain(contourCircle15(0, 0, param.D3 / 2));
|
|
5058
|
+
figRod.addSecond(contourCircle15(0, 0, param.D4 / 2));
|
|
5059
|
+
figRodHollow.addMain(contourCircle15(0, 0, param.D4 / 2));
|
|
5060
|
+
figRodHollow.addSecond(contourCircle15(0, 0, param.D3 / 2));
|
|
4168
5061
|
const rodFootprintHeight = param.D3 * Math.cos(rod_slope_angle);
|
|
4169
5062
|
const rodFootprintBack = rodFootprintHeight / Math.tan(rod_slope_angle);
|
|
4170
5063
|
const pad3x = pad3 + (rodFootprintLength / 2 + rodFootprintBack) * Math.cos(rod_xy_angle);
|
|
4171
5064
|
const pad3y = pad3 + (rodFootprintLength / 2 + rodFootprintBack) * Math.sin(rod_xy_angle);
|
|
4172
5065
|
const rodExtrudeLength = rod_slope_length + 2 * (rodFootprintLength + rodFootprintBack + rodFootprintHeight);
|
|
4173
5066
|
const cutL = rodExtrudeLength + param.L3 + param.L4 + rodFootprintHeight;
|
|
4174
|
-
const ctrCutRod =
|
|
5067
|
+
const ctrCutRod = contour17(cutL, cutL).addSegStrokeA(-cutL, cutL).addSegStrokeA(-cutL, -cutL).addSegStrokeA(cutL, -cutL).closeSegStroke();
|
|
4175
5068
|
figCutRod.addMain(ctrCutRod);
|
|
4176
5069
|
rGeome.fig = {
|
|
4177
5070
|
faceFrame: figFrame,
|
|
@@ -4186,7 +5079,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4186
5079
|
{
|
|
4187
5080
|
outName: `subpax_${designName}_frame`,
|
|
4188
5081
|
face: `${designName}_faceFrame`,
|
|
4189
|
-
extrudeMethod:
|
|
5082
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4190
5083
|
length: param.H2,
|
|
4191
5084
|
rotate: [0, 0, 0],
|
|
4192
5085
|
translate: [0, 0, param.H1 - param.H2]
|
|
@@ -4194,7 +5087,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4194
5087
|
{
|
|
4195
5088
|
outName: `subpax_${designName}_plate`,
|
|
4196
5089
|
face: `${designName}_facePlate`,
|
|
4197
|
-
extrudeMethod:
|
|
5090
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4198
5091
|
length: param.H3,
|
|
4199
5092
|
rotate: [0, 0, 0],
|
|
4200
5093
|
translate: [0, 0, 0]
|
|
@@ -4202,7 +5095,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4202
5095
|
{
|
|
4203
5096
|
outName: `subpax_${designName}_rod1`,
|
|
4204
5097
|
face: `${designName}_faceRod`,
|
|
4205
|
-
extrudeMethod:
|
|
5098
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4206
5099
|
length: rodExtrudeLength,
|
|
4207
5100
|
rotate: [0, Math.PI / 2 - rod_slope_angle, rod_xy_angle],
|
|
4208
5101
|
translate: [
|
|
@@ -4214,7 +5107,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4214
5107
|
{
|
|
4215
5108
|
outName: `subpax_${designName}_rod2`,
|
|
4216
5109
|
face: `${designName}_faceRod`,
|
|
4217
|
-
extrudeMethod:
|
|
5110
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4218
5111
|
length: rodExtrudeLength,
|
|
4219
5112
|
rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI - rod_xy_angle],
|
|
4220
5113
|
translate: [
|
|
@@ -4226,7 +5119,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4226
5119
|
{
|
|
4227
5120
|
outName: `subpax_${designName}_rod3`,
|
|
4228
5121
|
face: `${designName}_faceRod`,
|
|
4229
|
-
extrudeMethod:
|
|
5122
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4230
5123
|
length: rodExtrudeLength,
|
|
4231
5124
|
rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI + rod_xy_angle],
|
|
4232
5125
|
translate: [
|
|
@@ -4238,7 +5131,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4238
5131
|
{
|
|
4239
5132
|
outName: `subpax_${designName}_rod4`,
|
|
4240
5133
|
face: `${designName}_faceRod`,
|
|
4241
|
-
extrudeMethod:
|
|
5134
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4242
5135
|
length: rodExtrudeLength,
|
|
4243
5136
|
rotate: [0, Math.PI / 2 - rod_slope_angle, -rod_xy_angle],
|
|
4244
5137
|
translate: [
|
|
@@ -4250,7 +5143,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4250
5143
|
{
|
|
4251
5144
|
outName: `subpax_${designName}_rodH1`,
|
|
4252
5145
|
face: `${designName}_faceRodHollow`,
|
|
4253
|
-
extrudeMethod:
|
|
5146
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4254
5147
|
length: rodExtrudeLength,
|
|
4255
5148
|
rotate: [0, Math.PI / 2 - rod_slope_angle, rod_xy_angle],
|
|
4256
5149
|
translate: [
|
|
@@ -4262,7 +5155,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4262
5155
|
{
|
|
4263
5156
|
outName: `subpax_${designName}_rodH2`,
|
|
4264
5157
|
face: `${designName}_faceRodHollow`,
|
|
4265
|
-
extrudeMethod:
|
|
5158
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4266
5159
|
length: rodExtrudeLength,
|
|
4267
5160
|
rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI - rod_xy_angle],
|
|
4268
5161
|
translate: [
|
|
@@ -4274,7 +5167,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4274
5167
|
{
|
|
4275
5168
|
outName: `subpax_${designName}_rodH3`,
|
|
4276
5169
|
face: `${designName}_faceRodHollow`,
|
|
4277
|
-
extrudeMethod:
|
|
5170
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4278
5171
|
length: rodExtrudeLength,
|
|
4279
5172
|
rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI + rod_xy_angle],
|
|
4280
5173
|
translate: [
|
|
@@ -4286,7 +5179,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4286
5179
|
{
|
|
4287
5180
|
outName: `subpax_${designName}_rodH4`,
|
|
4288
5181
|
face: `${designName}_faceRodHollow`,
|
|
4289
|
-
extrudeMethod:
|
|
5182
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4290
5183
|
length: rodExtrudeLength,
|
|
4291
5184
|
rotate: [0, Math.PI / 2 - rod_slope_angle, -rod_xy_angle],
|
|
4292
5185
|
translate: [
|
|
@@ -4298,7 +5191,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4298
5191
|
{
|
|
4299
5192
|
outName: `subpax_${designName}_cut1`,
|
|
4300
5193
|
face: `${designName}_faceCutRod`,
|
|
4301
|
-
extrudeMethod:
|
|
5194
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4302
5195
|
length: cutL,
|
|
4303
5196
|
rotate: [0, 0, 0],
|
|
4304
5197
|
translate: [0, 0, -cutL]
|
|
@@ -4306,7 +5199,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4306
5199
|
{
|
|
4307
5200
|
outName: `subpax_${designName}_cut2`,
|
|
4308
5201
|
face: `${designName}_faceCutRod`,
|
|
4309
|
-
extrudeMethod:
|
|
5202
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4310
5203
|
length: cutL,
|
|
4311
5204
|
rotate: [0, 0, 0],
|
|
4312
5205
|
translate: [0, 0, param.H1]
|
|
@@ -4315,7 +5208,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4315
5208
|
volumes: [
|
|
4316
5209
|
{
|
|
4317
5210
|
outName: `ipax_${designName}_rawRod`,
|
|
4318
|
-
boolMethod:
|
|
5211
|
+
boolMethod: EBVolume17.eUnion,
|
|
4319
5212
|
inList: [
|
|
4320
5213
|
`subpax_${designName}_rod1`,
|
|
4321
5214
|
`subpax_${designName}_rod2`,
|
|
@@ -4325,7 +5218,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4325
5218
|
},
|
|
4326
5219
|
{
|
|
4327
5220
|
outName: `ipax_${designName}_rodHollow`,
|
|
4328
|
-
boolMethod:
|
|
5221
|
+
boolMethod: EBVolume17.eUnion,
|
|
4329
5222
|
inList: [
|
|
4330
5223
|
`subpax_${designName}_rodH1`,
|
|
4331
5224
|
`subpax_${designName}_rodH2`,
|
|
@@ -4335,17 +5228,17 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4335
5228
|
},
|
|
4336
5229
|
{
|
|
4337
5230
|
outName: `ipax_${designName}_halfRods`,
|
|
4338
|
-
boolMethod:
|
|
5231
|
+
boolMethod: EBVolume17.eSubstraction,
|
|
4339
5232
|
inList: [`ipax_${designName}_rawRod`, `subpax_${designName}_cut1`]
|
|
4340
5233
|
},
|
|
4341
5234
|
{
|
|
4342
5235
|
outName: `ipax_${designName}_rods`,
|
|
4343
|
-
boolMethod:
|
|
5236
|
+
boolMethod: EBVolume17.eSubstraction,
|
|
4344
5237
|
inList: [`ipax_${designName}_halfRods`, `subpax_${designName}_cut2`]
|
|
4345
5238
|
},
|
|
4346
5239
|
{
|
|
4347
5240
|
outName: `ipax_${designName}_plus`,
|
|
4348
|
-
boolMethod:
|
|
5241
|
+
boolMethod: EBVolume17.eUnion,
|
|
4349
5242
|
inList: [
|
|
4350
5243
|
`subpax_${designName}_frame`,
|
|
4351
5244
|
`subpax_${designName}_plate`,
|
|
@@ -4354,7 +5247,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4354
5247
|
},
|
|
4355
5248
|
{
|
|
4356
5249
|
outName: `pax_${designName}`,
|
|
4357
|
-
boolMethod:
|
|
5250
|
+
boolMethod: EBVolume17.eSubstraction,
|
|
4358
5251
|
inList: [`ipax_${designName}_plus`, `ipax_${designName}_rodHollow`]
|
|
4359
5252
|
}
|
|
4360
5253
|
]
|
|
@@ -4371,49 +5264,54 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4371
5264
|
var trapezeDef = {
|
|
4372
5265
|
pTitle: "Heliostat trapeze",
|
|
4373
5266
|
pDescription: "The support of one solar panel. Made out of aluminium for lightness and cooling",
|
|
4374
|
-
pDef:
|
|
4375
|
-
pGeom:
|
|
5267
|
+
pDef: pDef17,
|
|
5268
|
+
pGeom: pGeom17
|
|
4376
5269
|
};
|
|
4377
5270
|
|
|
4378
5271
|
// src/heliostat/surface.ts
|
|
4379
5272
|
import {
|
|
4380
|
-
contour as
|
|
4381
|
-
figure as
|
|
4382
|
-
ffix as
|
|
4383
|
-
pNumber as
|
|
5273
|
+
contour as contour18,
|
|
5274
|
+
figure as figure18,
|
|
5275
|
+
ffix as ffix20,
|
|
5276
|
+
pNumber as pNumber18,
|
|
4384
5277
|
pCheckbox as pCheckbox3,
|
|
4385
5278
|
pDropdown as pDropdown2,
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
5279
|
+
pSectionSeparator as pSectionSeparator17,
|
|
5280
|
+
initGeom as initGeom18,
|
|
5281
|
+
EExtrude as EExtrude15,
|
|
5282
|
+
EBVolume as EBVolume18
|
|
4389
5283
|
} from "geometrix";
|
|
4390
|
-
var
|
|
5284
|
+
var pDef18 = {
|
|
4391
5285
|
partName: "surface",
|
|
4392
5286
|
params: [
|
|
4393
5287
|
//pNumber(name, unit, init, min, max, step)
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
5288
|
+
pNumber18("LH", "mm", 1600, 10, 4e3, 1),
|
|
5289
|
+
pNumber18("LV", "mm", 1e3, 10, 4e3, 1),
|
|
5290
|
+
pNumber18("LZ", "mm", 40, 0, 100, 1),
|
|
5291
|
+
pNumber18("nx", "", 9, 1, 40, 1),
|
|
5292
|
+
pNumber18("ny", "", 9, 1, 40, 1),
|
|
5293
|
+
pSectionSeparator17("main fantasia"),
|
|
4399
5294
|
pDropdown2("main_direction", ["horizontal", "vertical"]),
|
|
4400
5295
|
pCheckbox3("crenel", false),
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
5296
|
+
pNumber18("first_row", "", 9, 1, 40, 1),
|
|
5297
|
+
pNumber18("second_row", "", 9, 1, 40, 1),
|
|
5298
|
+
pSectionSeparator17("horizontal spacing"),
|
|
5299
|
+
pNumber18("EH", "mm", 10, 0, 1e3, 1),
|
|
4404
5300
|
pCheckbox3("EH_gradient", false),
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
5301
|
+
pNumber18("EH_sup", "mm", 500, 0, 1e3, 1),
|
|
5302
|
+
pNumber18("EH_cycle", "", 1, 0, 3, 0.05),
|
|
5303
|
+
pNumber18("EH_start", "", 0, 0, 1, 0.05),
|
|
4408
5304
|
pDropdown2("EH_shape", ["sinusoid", "triangle", "sawUp", "sawDown"]),
|
|
4409
|
-
|
|
5305
|
+
pSectionSeparator17("vertical spacing"),
|
|
5306
|
+
pNumber18("EV", "mm", 10, 0, 1e3, 1),
|
|
4410
5307
|
pCheckbox3("EV_gradient", false),
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
5308
|
+
pNumber18("EV_sup", "mm", 500, 0, 1e3, 1),
|
|
5309
|
+
pNumber18("EV_cycle", "", 1, 0, 3, 0.05),
|
|
5310
|
+
pNumber18("EV_start", "", 0, 0, 1, 0.05),
|
|
4414
5311
|
pDropdown2("EV_shape", ["sinusoid", "triangle", "sawUp", "sawDown"]),
|
|
4415
|
-
|
|
4416
|
-
|
|
5312
|
+
pSectionSeparator17("solar power"),
|
|
5313
|
+
pNumber18("power_efficiency", "%", 16, 0, 100, 0.1),
|
|
5314
|
+
pNumber18("solar_power", "W/m2", 816, 100, 2e3, 1)
|
|
4417
5315
|
// 1361*0.6=816 W/m2
|
|
4418
5316
|
],
|
|
4419
5317
|
paramSvg: {
|
|
@@ -4448,26 +5346,26 @@ var pDef14 = {
|
|
|
4448
5346
|
// every 0.5 second
|
|
4449
5347
|
}
|
|
4450
5348
|
};
|
|
4451
|
-
function
|
|
4452
|
-
const rGeome =
|
|
5349
|
+
function pGeom18(t, param, suffix = "") {
|
|
5350
|
+
const rGeome = initGeom18(pDef18.partName + suffix);
|
|
4453
5351
|
let ctrPanelProfile;
|
|
4454
|
-
const figSurface =
|
|
4455
|
-
const figOnePanel =
|
|
5352
|
+
const figSurface = figure18();
|
|
5353
|
+
const figOnePanel = figure18();
|
|
4456
5354
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4457
5355
|
`;
|
|
4458
5356
|
try {
|
|
4459
5357
|
const panel_surface = param.LH * param.LV / 10 ** 6;
|
|
4460
5358
|
const panel_power = param.solar_power * panel_surface * param.power_efficiency / 100;
|
|
4461
|
-
rGeome.logstr += `panel surface: ${
|
|
5359
|
+
rGeome.logstr += `panel surface: ${ffix20(panel_surface)} m2
|
|
4462
5360
|
`;
|
|
4463
|
-
rGeome.logstr += `panel power: ${
|
|
5361
|
+
rGeome.logstr += `panel power: ${ffix20(panel_power)} W
|
|
4464
5362
|
`;
|
|
4465
5363
|
const max_panel_nb = param.nx * param.ny;
|
|
4466
5364
|
rGeome.logstr += `max panel number: ${max_panel_nb}
|
|
4467
5365
|
`;
|
|
4468
|
-
rGeome.logstr += `max panel surface: ${
|
|
5366
|
+
rGeome.logstr += `max panel surface: ${ffix20(max_panel_nb * panel_surface)} m2
|
|
4469
5367
|
`;
|
|
4470
|
-
rGeome.logstr += `max panel power: ${
|
|
5368
|
+
rGeome.logstr += `max panel power: ${ffix20(max_panel_nb * panel_power)} W
|
|
4471
5369
|
`;
|
|
4472
5370
|
const lenMain = param.main_direction === 1 ? param.ny : param.nx;
|
|
4473
5371
|
const lenLateral = param.main_direction === 1 ? param.nx : param.ny;
|
|
@@ -4500,13 +5398,13 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4500
5398
|
lenRow.forEach((oneRow) => {
|
|
4501
5399
|
panelNb += oneRow;
|
|
4502
5400
|
});
|
|
4503
|
-
rGeome.logstr += `actual panel number: ${panelNb} (${
|
|
5401
|
+
rGeome.logstr += `actual panel number: ${panelNb} (${ffix20(
|
|
4504
5402
|
100 * panelNb / max_panel_nb
|
|
4505
5403
|
)} %)
|
|
4506
5404
|
`;
|
|
4507
|
-
rGeome.logstr += `actual panel surface: ${
|
|
5405
|
+
rGeome.logstr += `actual panel surface: ${ffix20(panelNb * panel_surface)} m2
|
|
4508
5406
|
`;
|
|
4509
|
-
rGeome.logstr += `actual panel power: ${
|
|
5407
|
+
rGeome.logstr += `actual panel power: ${ffix20(panelNb * panel_power)} W
|
|
4510
5408
|
`;
|
|
4511
5409
|
const eMain = [];
|
|
4512
5410
|
for (let i = 0; i < lenMain - 1; i++) {
|
|
@@ -4582,18 +5480,18 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4582
5480
|
gLenVertical = lenMain * param.LV + eMainTotal;
|
|
4583
5481
|
}
|
|
4584
5482
|
const gArea = gLenHorizontal * gLenVertical / 10 ** 6;
|
|
4585
|
-
rGeome.logstr += `global horizontal width: ${
|
|
5483
|
+
rGeome.logstr += `global horizontal width: ${ffix20(gLenHorizontal / 1e3)} m
|
|
4586
5484
|
`;
|
|
4587
|
-
rGeome.logstr += `global vertical height: ${
|
|
5485
|
+
rGeome.logstr += `global vertical height: ${ffix20(gLenVertical / 1e3)} m
|
|
4588
5486
|
`;
|
|
4589
|
-
rGeome.logstr += `global area: ${
|
|
5487
|
+
rGeome.logstr += `global area: ${ffix20(gArea)} m2
|
|
4590
5488
|
`;
|
|
4591
|
-
rGeome.logstr += `area efficiency: ${
|
|
5489
|
+
rGeome.logstr += `area efficiency: ${ffix20(100 * panelNb * panel_surface / gArea)} %
|
|
4592
5490
|
`;
|
|
4593
5491
|
const ox = -gLenHorizontal / 2;
|
|
4594
5492
|
const oy = -gLenVertical / 2;
|
|
4595
5493
|
ctrPanelProfile = function(px, py) {
|
|
4596
|
-
const rPanelProfile =
|
|
5494
|
+
const rPanelProfile = contour18(px, py).addSegStrokeA(px + param.LH, py).addSegStrokeA(px + param.LH, py + param.LV).addSegStrokeA(px, py + param.LV).closeSegStroke();
|
|
4597
5495
|
return rPanelProfile;
|
|
4598
5496
|
};
|
|
4599
5497
|
const panelPositions = [];
|
|
@@ -4633,7 +5531,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4633
5531
|
const rElem = {
|
|
4634
5532
|
outName: `subpax_${designName}_panel_${idx}`,
|
|
4635
5533
|
face: `${designName}_faceOnePanel`,
|
|
4636
|
-
extrudeMethod:
|
|
5534
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
4637
5535
|
length: param.LZ,
|
|
4638
5536
|
rotate: [0, 0, 0],
|
|
4639
5537
|
translate: [elem[0], elem[1], 0]
|
|
@@ -4644,7 +5542,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4644
5542
|
{
|
|
4645
5543
|
outName: `pax_${designName}`,
|
|
4646
5544
|
//boolMethod: EBVolume.eIdentity,
|
|
4647
|
-
boolMethod:
|
|
5545
|
+
boolMethod: EBVolume18.eUnion,
|
|
4648
5546
|
inList: panelPositions.map((elem, idx) => {
|
|
4649
5547
|
const subElem = `subpax_${designName}_panel_${idx}`;
|
|
4650
5548
|
return subElem;
|
|
@@ -4664,19 +5562,19 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4664
5562
|
var surfaceDef = {
|
|
4665
5563
|
pTitle: "Heliostat panel-surface",
|
|
4666
5564
|
pDescription: "The surface collecting the solar power",
|
|
4667
|
-
pDef:
|
|
4668
|
-
pGeom:
|
|
5565
|
+
pDef: pDef18,
|
|
5566
|
+
pGeom: pGeom18
|
|
4669
5567
|
};
|
|
4670
5568
|
|
|
4671
5569
|
// src/dummy/circles.ts
|
|
4672
|
-
import { degToRad as
|
|
4673
|
-
var
|
|
5570
|
+
import { degToRad as degToRad6, point as point5, figure as figure19, pNumber as pNumber19, initGeom as initGeom19 } from "geometrix";
|
|
5571
|
+
var pDef19 = {
|
|
4674
5572
|
partName: "circles",
|
|
4675
5573
|
params: [
|
|
4676
5574
|
//pNumber(name, unit, init, min, max, step)
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
5575
|
+
pNumber19("angle", "degree", 15, 5, 45, 1),
|
|
5576
|
+
pNumber19("amplitude-offset", "mm", 1, 0.5, 4, 0.1),
|
|
5577
|
+
pNumber19("amplitude-scale", "scalar", 0.2, 0.1, 0.5, 0.01)
|
|
4680
5578
|
],
|
|
4681
5579
|
paramSvg: {
|
|
4682
5580
|
angle: "circles_angle.svg",
|
|
@@ -4689,18 +5587,18 @@ var pDef15 = {
|
|
|
4689
5587
|
tUpdate: 500
|
|
4690
5588
|
}
|
|
4691
5589
|
};
|
|
4692
|
-
function
|
|
4693
|
-
const rGeome =
|
|
5590
|
+
function pGeom19(t, param, suffix = "") {
|
|
5591
|
+
const rGeome = initGeom19(pDef19.partName + suffix);
|
|
4694
5592
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4695
5593
|
`;
|
|
4696
5594
|
try {
|
|
4697
|
-
const figOne =
|
|
4698
|
-
const p1 =
|
|
4699
|
-
const p2 =
|
|
5595
|
+
const figOne = figure19();
|
|
5596
|
+
const p1 = point5(10, 10);
|
|
5597
|
+
const p2 = point5(10, 30);
|
|
4700
5598
|
figOne.addPoint(p2);
|
|
4701
5599
|
for (let i = 0; i < 20; i++) {
|
|
4702
5600
|
figOne.addPoint(
|
|
4703
|
-
p1.scale(p2, param["amplitude-offset"] + param["amplitude-scale"] * i).rotate(p2, i *
|
|
5601
|
+
p1.scale(p2, param["amplitude-offset"] + param["amplitude-scale"] * i).rotate(p2, i * degToRad6(param.angle) + t * Math.PI / 2 / pDef19.sim.tMax)
|
|
4704
5602
|
);
|
|
4705
5603
|
}
|
|
4706
5604
|
rGeome.fig = { one: figOne };
|
|
@@ -4715,18 +5613,18 @@ function pGeom15(t, param, suffix = "") {
|
|
|
4715
5613
|
var circlesDef = {
|
|
4716
5614
|
pTitle: "Circles",
|
|
4717
5615
|
pDescription: "A spiral made by points.",
|
|
4718
|
-
pDef:
|
|
4719
|
-
pGeom:
|
|
5616
|
+
pDef: pDef19,
|
|
5617
|
+
pGeom: pGeom19
|
|
4720
5618
|
};
|
|
4721
5619
|
|
|
4722
5620
|
// src/dummy/rectangle.ts
|
|
4723
|
-
import { point as
|
|
4724
|
-
var
|
|
5621
|
+
import { point as point6, figure as figure20, pNumber as pNumber20, initGeom as initGeom20 } from "geometrix";
|
|
5622
|
+
var pDef20 = {
|
|
4725
5623
|
partName: "rectangle",
|
|
4726
5624
|
params: [
|
|
4727
5625
|
//pNumber(name, unit, init, min, max, step)
|
|
4728
|
-
|
|
4729
|
-
|
|
5626
|
+
pNumber20("width", "mm", 15, 3, 40, 0.5),
|
|
5627
|
+
pNumber20("height", "mm", 10, 3, 40, 0.5)
|
|
4730
5628
|
],
|
|
4731
5629
|
paramSvg: {
|
|
4732
5630
|
width: "rectangle_width.svg",
|
|
@@ -4738,16 +5636,16 @@ var pDef16 = {
|
|
|
4738
5636
|
tUpdate: 500
|
|
4739
5637
|
}
|
|
4740
5638
|
};
|
|
4741
|
-
function
|
|
4742
|
-
const rGeome =
|
|
5639
|
+
function pGeom20(t, param, suffix = "") {
|
|
5640
|
+
const rGeome = initGeom20(pDef20.partName + suffix);
|
|
4743
5641
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4744
5642
|
`;
|
|
4745
5643
|
try {
|
|
4746
|
-
const figOne =
|
|
4747
|
-
const p1 =
|
|
4748
|
-
const p2 =
|
|
4749
|
-
const p3 =
|
|
4750
|
-
const p4 =
|
|
5644
|
+
const figOne = figure20();
|
|
5645
|
+
const p1 = point6(10, 10);
|
|
5646
|
+
const p2 = point6(10 + param.width, 10);
|
|
5647
|
+
const p3 = point6(10 + param.width, 10 + param.height);
|
|
5648
|
+
const p4 = point6(10, 10 + param.height);
|
|
4751
5649
|
const angle = t * Math.PI / 180;
|
|
4752
5650
|
figOne.addPoint(p1);
|
|
4753
5651
|
figOne.addPoint(p2.rotate(p1, angle));
|
|
@@ -4765,25 +5663,25 @@ function pGeom16(t, param, suffix = "") {
|
|
|
4765
5663
|
var rectangleDef = {
|
|
4766
5664
|
pTitle: "Rectangle",
|
|
4767
5665
|
pDescription: "Just a rectangle.",
|
|
4768
|
-
pDef:
|
|
4769
|
-
pGeom:
|
|
5666
|
+
pDef: pDef20,
|
|
5667
|
+
pGeom: pGeom20
|
|
4770
5668
|
};
|
|
4771
5669
|
|
|
4772
5670
|
// src/dummy/pole_static.ts
|
|
4773
5671
|
import {
|
|
4774
|
-
contour as
|
|
4775
|
-
contourCircle as
|
|
4776
|
-
figure as
|
|
4777
|
-
pNumber as
|
|
4778
|
-
initGeom as
|
|
5672
|
+
contour as contour19,
|
|
5673
|
+
contourCircle as contourCircle16,
|
|
5674
|
+
figure as figure21,
|
|
5675
|
+
pNumber as pNumber21,
|
|
5676
|
+
initGeom as initGeom21
|
|
4779
5677
|
} from "geometrix";
|
|
4780
|
-
var
|
|
5678
|
+
var pDef21 = {
|
|
4781
5679
|
partName: "pole_static",
|
|
4782
5680
|
params: [
|
|
4783
5681
|
//pNumber(name, unit, init, min, max, step)
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
5682
|
+
pNumber21("H1", "mm", 4e3, 100, 4e4, 10),
|
|
5683
|
+
pNumber21("H2", "mm", 5e3, 100, 4e4, 10),
|
|
5684
|
+
pNumber21("radius", "mm", 1e3, 100, 4e4, 10)
|
|
4787
5685
|
],
|
|
4788
5686
|
paramSvg: {
|
|
4789
5687
|
H1: "dummy_pole_static_face.svg",
|
|
@@ -4797,15 +5695,15 @@ var pDef17 = {
|
|
|
4797
5695
|
// every 0.5 second
|
|
4798
5696
|
}
|
|
4799
5697
|
};
|
|
4800
|
-
function
|
|
4801
|
-
const rGeome =
|
|
4802
|
-
const figFace =
|
|
5698
|
+
function pGeom21(t, param, suffix = "") {
|
|
5699
|
+
const rGeome = initGeom21(pDef21.partName + suffix);
|
|
5700
|
+
const figFace = figure21();
|
|
4803
5701
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4804
5702
|
`;
|
|
4805
5703
|
try {
|
|
4806
|
-
const ctrPoleFace =
|
|
5704
|
+
const ctrPoleFace = contour19(-param.H1 / 2, -param.H2 / 2).addSegStrokeA(param.H1 / 2, -param.H2 / 2).addSegStrokeA(param.H1 / 2, param.H2 / 2).addSegStrokeA(-param.H1 / 2, param.H2 / 2).closeSegStroke();
|
|
4807
5705
|
figFace.addMain(ctrPoleFace);
|
|
4808
|
-
figFace.addMain(
|
|
5706
|
+
figFace.addMain(contourCircle16(0, 0, param.radius));
|
|
4809
5707
|
rGeome.fig = {
|
|
4810
5708
|
poleFace: figFace
|
|
4811
5709
|
};
|
|
@@ -4821,22 +5719,22 @@ function pGeom17(t, param, suffix = "") {
|
|
|
4821
5719
|
var dummyPoleStaticDef = {
|
|
4822
5720
|
pTitle: "Dummy pole static",
|
|
4823
5721
|
pDescription: "Testing two design with identical name",
|
|
4824
|
-
pDef:
|
|
4825
|
-
pGeom:
|
|
5722
|
+
pDef: pDef21,
|
|
5723
|
+
pGeom: pGeom21
|
|
4826
5724
|
};
|
|
4827
5725
|
|
|
4828
5726
|
// src/geometrix_verification/verify_point.ts
|
|
4829
|
-
import { degToRad as
|
|
4830
|
-
var
|
|
5727
|
+
import { degToRad as degToRad7, point as point7, figure as figure22, pNumber as pNumber22, initGeom as initGeom22 } from "geometrix";
|
|
5728
|
+
var pDef22 = {
|
|
4831
5729
|
partName: "verify_point",
|
|
4832
5730
|
params: [
|
|
4833
5731
|
//pNumber(name, unit, init, min, max, step)
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
5732
|
+
pNumber22("p1x", "mm", 30, -200, 200, 1),
|
|
5733
|
+
pNumber22("p1y", "mm", 50, -200, 200, 1),
|
|
5734
|
+
pNumber22("p2a", "degree", 30, -200, 200, 1),
|
|
5735
|
+
pNumber22("p2l", "mm", 60, 0, 200, 1),
|
|
5736
|
+
pNumber22("rotateOrig", "degree", 45, -200, 200, 1),
|
|
5737
|
+
pNumber22("scaleOrig", "scalar", 1.5, 0.1, 2, 0.1)
|
|
4840
5738
|
],
|
|
4841
5739
|
paramSvg: {
|
|
4842
5740
|
p1x: "verify_point_p1x.svg",
|
|
@@ -4853,15 +5751,15 @@ var pDef18 = {
|
|
|
4853
5751
|
// every 0.5 second
|
|
4854
5752
|
}
|
|
4855
5753
|
};
|
|
4856
|
-
function
|
|
4857
|
-
const rGeome =
|
|
5754
|
+
function pGeom22(t, param, suffix = "") {
|
|
5755
|
+
const rGeome = initGeom22(pDef22.partName + suffix);
|
|
4858
5756
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4859
5757
|
`;
|
|
4860
5758
|
try {
|
|
4861
|
-
const figOne =
|
|
4862
|
-
const p1 =
|
|
4863
|
-
const p2 =
|
|
4864
|
-
const p3 = p1.rotateOrig(
|
|
5759
|
+
const figOne = figure22();
|
|
5760
|
+
const p1 = point7(param.p1x, param.p1y + t);
|
|
5761
|
+
const p2 = point7(0, 0).setPolar(degToRad7(param.p2a), param.p2l);
|
|
5762
|
+
const p3 = p1.rotateOrig(degToRad7(param.rotateOrig));
|
|
4865
5763
|
const p4 = p1.scaleOrig(param.scaleOrig);
|
|
4866
5764
|
figOne.addPoint(p1);
|
|
4867
5765
|
figOne.addPoint(p2);
|
|
@@ -4879,23 +5777,23 @@ function pGeom18(t, param, suffix = "") {
|
|
|
4879
5777
|
var verifyPoint1Def = {
|
|
4880
5778
|
pTitle: "Verify point",
|
|
4881
5779
|
pDescription: "Debugging point.ts",
|
|
4882
|
-
pDef:
|
|
4883
|
-
pGeom:
|
|
5780
|
+
pDef: pDef22,
|
|
5781
|
+
pGeom: pGeom22
|
|
4884
5782
|
};
|
|
4885
5783
|
|
|
4886
5784
|
// src/geometrix_verification/verify_point_2.ts
|
|
4887
|
-
import { point as
|
|
4888
|
-
var
|
|
5785
|
+
import { point as point8, figure as figure23, pNumber as pNumber23, initGeom as initGeom23 } from "geometrix";
|
|
5786
|
+
var pDef23 = {
|
|
4889
5787
|
partName: "verify_point_2",
|
|
4890
5788
|
params: [
|
|
4891
5789
|
//pNumber(name, unit, init, min, max, step)
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
5790
|
+
pNumber23("p1x", "mm", 30, -200, 200, 1),
|
|
5791
|
+
pNumber23("p1y", "mm", 50, -200, 200, 1),
|
|
5792
|
+
pNumber23("p2x", "mm", -10, -200, 200, 1),
|
|
5793
|
+
pNumber23("p2y", "mm", 60, -200, 200, 1),
|
|
5794
|
+
pNumber23("p3x", "mm", 70, -200, 200, 1),
|
|
5795
|
+
pNumber23("p3y", "mm", -20, -200, 200, 1),
|
|
5796
|
+
pNumber23("dist", "mm", 50, 0, 200, 1)
|
|
4899
5797
|
],
|
|
4900
5798
|
paramSvg: {
|
|
4901
5799
|
p1x: "verify_line_p1x.svg",
|
|
@@ -4913,15 +5811,15 @@ var pDef19 = {
|
|
|
4913
5811
|
// every 0.5 second
|
|
4914
5812
|
}
|
|
4915
5813
|
};
|
|
4916
|
-
function
|
|
4917
|
-
const rGeome =
|
|
5814
|
+
function pGeom23(t, param, suffix = "") {
|
|
5815
|
+
const rGeome = initGeom23(pDef23.partName + suffix);
|
|
4918
5816
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4919
5817
|
`;
|
|
4920
5818
|
try {
|
|
4921
|
-
const figOne =
|
|
4922
|
-
const p1 =
|
|
4923
|
-
const p2 =
|
|
4924
|
-
const p3 =
|
|
5819
|
+
const figOne = figure23();
|
|
5820
|
+
const p1 = point8(param.p1x, param.p1y + t);
|
|
5821
|
+
const p2 = point8(param.p2x, param.p2y);
|
|
5822
|
+
const p3 = point8(param.p3x, param.p3y);
|
|
4925
5823
|
const mp1p2 = p1.middlePoint(p2);
|
|
4926
5824
|
const ep1p2 = p1.equidistantPoint(p2, param.dist, p3);
|
|
4927
5825
|
figOne.addPoint(p1);
|
|
@@ -4941,22 +5839,22 @@ function pGeom19(t, param, suffix = "") {
|
|
|
4941
5839
|
var verifyPoint2Def = {
|
|
4942
5840
|
pTitle: "Verify point 2",
|
|
4943
5841
|
pDescription: "Debugging more point.ts",
|
|
4944
|
-
pDef:
|
|
4945
|
-
pGeom:
|
|
5842
|
+
pDef: pDef23,
|
|
5843
|
+
pGeom: pGeom23
|
|
4946
5844
|
};
|
|
4947
5845
|
|
|
4948
5846
|
// src/geometrix_verification/verify_line.ts
|
|
4949
|
-
import { point as
|
|
4950
|
-
var
|
|
5847
|
+
import { point as point9, line, linePP, figure as figure24, pNumber as pNumber24, initGeom as initGeom24 } from "geometrix";
|
|
5848
|
+
var pDef24 = {
|
|
4951
5849
|
partName: "verify_line",
|
|
4952
5850
|
params: [
|
|
4953
5851
|
//pNumber(name, unit, init, min, max, step)
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
5852
|
+
pNumber24("p1x", "mm", 30, -200, 200, 1),
|
|
5853
|
+
pNumber24("p1y", "mm", 50, -200, 200, 1),
|
|
5854
|
+
pNumber24("p2x", "mm", 40, -200, 200, 1),
|
|
5855
|
+
pNumber24("p2y", "mm", -20, -200, 200, 1),
|
|
5856
|
+
pNumber24("p3x", "mm", -30, -200, 200, 1),
|
|
5857
|
+
pNumber24("p3y", "mm", 30, -200, 200, 1)
|
|
4960
5858
|
],
|
|
4961
5859
|
paramSvg: {
|
|
4962
5860
|
p1x: "verify_line_p1x.svg",
|
|
@@ -4973,25 +5871,25 @@ var pDef20 = {
|
|
|
4973
5871
|
// every 0.5 second
|
|
4974
5872
|
}
|
|
4975
5873
|
};
|
|
4976
|
-
function
|
|
4977
|
-
const rGeome =
|
|
5874
|
+
function pGeom24(t, param, suffix = "") {
|
|
5875
|
+
const rGeome = initGeom24(pDef24.partName + suffix);
|
|
4978
5876
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4979
5877
|
`;
|
|
4980
5878
|
try {
|
|
4981
|
-
const figOne =
|
|
4982
|
-
const p1 =
|
|
4983
|
-
const p2 =
|
|
4984
|
-
const p3 =
|
|
5879
|
+
const figOne = figure24();
|
|
5880
|
+
const p1 = point9(param.p1x, param.p1y + t);
|
|
5881
|
+
const p2 = point9(param.p2x, param.p2y);
|
|
5882
|
+
const p3 = point9(param.p3x, param.p3y);
|
|
4985
5883
|
figOne.addPoint(p1);
|
|
4986
5884
|
figOne.addPoint(p2);
|
|
4987
5885
|
figOne.addPoint(p3);
|
|
4988
5886
|
const l1 = line(0, 0, 0).setFromPoints(p1, p2);
|
|
4989
5887
|
figOne.addLine(l1);
|
|
4990
|
-
figOne.addPoint(
|
|
4991
|
-
figOne.addPoint(
|
|
5888
|
+
figOne.addPoint(point9(l1.getAxisXIntersection(), 0));
|
|
5889
|
+
figOne.addPoint(point9(0, l1.getAxisYIntersection()));
|
|
4992
5890
|
const p4 = l1.projectOrig();
|
|
4993
5891
|
figOne.addPoint(p4);
|
|
4994
|
-
const p0 =
|
|
5892
|
+
const p0 = point9(0, 0);
|
|
4995
5893
|
if (!p0.isEqual(p4)) {
|
|
4996
5894
|
const l2 = linePP(p0, p4);
|
|
4997
5895
|
figOne.addLine(l2);
|
|
@@ -5013,24 +5911,24 @@ function pGeom20(t, param, suffix = "") {
|
|
|
5013
5911
|
var verifyLine1Def = {
|
|
5014
5912
|
pTitle: "Verify line",
|
|
5015
5913
|
pDescription: "Debugging line.ts",
|
|
5016
|
-
pDef:
|
|
5017
|
-
pGeom:
|
|
5914
|
+
pDef: pDef24,
|
|
5915
|
+
pGeom: pGeom24
|
|
5018
5916
|
};
|
|
5019
5917
|
|
|
5020
5918
|
// src/geometrix_verification/verify_line_2.ts
|
|
5021
|
-
import { degToRad as
|
|
5022
|
-
var
|
|
5919
|
+
import { degToRad as degToRad8, point as point10, line as line2, figure as figure25, pNumber as pNumber25, initGeom as initGeom25 } from "geometrix";
|
|
5920
|
+
var pDef25 = {
|
|
5023
5921
|
partName: "verify_line_2",
|
|
5024
5922
|
params: [
|
|
5025
5923
|
//pNumber(name, unit, init, min, max, step)
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5924
|
+
pNumber25("l1cx", "mm", 10, -200, 200, 1),
|
|
5925
|
+
pNumber25("l1cy", "mm", 20, -200, 200, 1),
|
|
5926
|
+
pNumber25("l1ca", "degree", 15, -200, 200, 1),
|
|
5927
|
+
pNumber25("l2cx", "mm", 30, -200, 200, 1),
|
|
5928
|
+
pNumber25("l2cy", "mm", 50, -200, 200, 1),
|
|
5929
|
+
pNumber25("l2ca", "degree", 35, -200, 200, 1),
|
|
5930
|
+
pNumber25("p3x", "mm", -30, -200, 200, 1),
|
|
5931
|
+
pNumber25("p3y", "mm", 30, -200, 200, 1)
|
|
5034
5932
|
],
|
|
5035
5933
|
paramSvg: {
|
|
5036
5934
|
l1cx: "verify_line_2_l1cx.svg",
|
|
@@ -5049,20 +5947,20 @@ var pDef21 = {
|
|
|
5049
5947
|
// every 0.5 second
|
|
5050
5948
|
}
|
|
5051
5949
|
};
|
|
5052
|
-
function
|
|
5053
|
-
const rGeome =
|
|
5950
|
+
function pGeom25(t, param, suffix = "") {
|
|
5951
|
+
const rGeome = initGeom25(pDef25.partName + suffix);
|
|
5054
5952
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5055
5953
|
`;
|
|
5056
5954
|
try {
|
|
5057
|
-
const figOne =
|
|
5058
|
-
const p1 =
|
|
5059
|
-
const p2 =
|
|
5060
|
-
const p3 =
|
|
5955
|
+
const figOne = figure25();
|
|
5956
|
+
const p1 = point10(param.l1cx, param.l1cy);
|
|
5957
|
+
const p2 = point10(param.l2cx, param.l2cy);
|
|
5958
|
+
const p3 = point10(param.p3x, param.p3y);
|
|
5061
5959
|
figOne.addPoint(p1);
|
|
5062
5960
|
figOne.addPoint(p2);
|
|
5063
5961
|
figOne.addPoint(p3);
|
|
5064
|
-
const l1 = line2(param.l1cx, param.l1cy,
|
|
5065
|
-
const l2 = line2(param.l2cx, param.l2cy,
|
|
5962
|
+
const l1 = line2(param.l1cx, param.l1cy, degToRad8(param.l1ca + t));
|
|
5963
|
+
const l2 = line2(param.l2cx, param.l2cy, degToRad8(param.l2ca));
|
|
5066
5964
|
figOne.addLine(l1);
|
|
5067
5965
|
figOne.addLine(l2);
|
|
5068
5966
|
figOne.addPoint(l1.intersection(l2));
|
|
@@ -5073,7 +5971,7 @@ function pGeom21(t, param, suffix = "") {
|
|
|
5073
5971
|
rGeome.logstr += `dist(l2, p3) = ${l2.distanceToPoint(p3)}
|
|
5074
5972
|
`;
|
|
5075
5973
|
const bisector2 = l1.bisector(l2, p3);
|
|
5076
|
-
const pBisec =
|
|
5974
|
+
const pBisec = point10(bisector2.cx, bisector2.cy).translatePolar(bisector2.ca, 30);
|
|
5077
5975
|
figOne.addPoint(pBisec);
|
|
5078
5976
|
rGeome.fig = { one: figOne };
|
|
5079
5977
|
rGeome.logstr += "verify_line_2 drawn successfully!\n";
|
|
@@ -5087,22 +5985,22 @@ function pGeom21(t, param, suffix = "") {
|
|
|
5087
5985
|
var verifyLine2Def = {
|
|
5088
5986
|
pTitle: "Verify line 2",
|
|
5089
5987
|
pDescription: "Debugging more line.ts",
|
|
5090
|
-
pDef:
|
|
5091
|
-
pGeom:
|
|
5988
|
+
pDef: pDef25,
|
|
5989
|
+
pGeom: pGeom25
|
|
5092
5990
|
};
|
|
5093
5991
|
|
|
5094
5992
|
// src/geometrix_verification/verify_line_3.ts
|
|
5095
|
-
import { point as
|
|
5096
|
-
var
|
|
5993
|
+
import { point as point11, bisector, circleCenter, figure as figure26, pNumber as pNumber26, initGeom as initGeom26 } from "geometrix";
|
|
5994
|
+
var pDef26 = {
|
|
5097
5995
|
partName: "verify_line_3",
|
|
5098
5996
|
params: [
|
|
5099
5997
|
//pNumber(name, unit, init, min, max, step)
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5998
|
+
pNumber26("p1x", "mm", 30, -200, 200, 1),
|
|
5999
|
+
pNumber26("p1y", "mm", 50, -200, 200, 1),
|
|
6000
|
+
pNumber26("p2x", "mm", 40, -200, 200, 1),
|
|
6001
|
+
pNumber26("p2y", "mm", -20, -200, 200, 1),
|
|
6002
|
+
pNumber26("p3x", "mm", -30, -200, 200, 1),
|
|
6003
|
+
pNumber26("p3y", "mm", 30, -200, 200, 1)
|
|
5106
6004
|
],
|
|
5107
6005
|
paramSvg: {
|
|
5108
6006
|
p1x: "verify_line_p1x.svg",
|
|
@@ -5119,15 +6017,15 @@ var pDef22 = {
|
|
|
5119
6017
|
// every 0.5 second
|
|
5120
6018
|
}
|
|
5121
6019
|
};
|
|
5122
|
-
function
|
|
5123
|
-
const rGeome =
|
|
6020
|
+
function pGeom26(t, param, suffix = "") {
|
|
6021
|
+
const rGeome = initGeom26(pDef26.partName + suffix);
|
|
5124
6022
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5125
6023
|
`;
|
|
5126
6024
|
try {
|
|
5127
|
-
const figOne =
|
|
5128
|
-
const p1 =
|
|
5129
|
-
const p2 =
|
|
5130
|
-
const p3 =
|
|
6025
|
+
const figOne = figure26();
|
|
6026
|
+
const p1 = point11(param.p1x, param.p1y + t);
|
|
6027
|
+
const p2 = point11(param.p2x, param.p2y);
|
|
6028
|
+
const p3 = point11(param.p3x, param.p3y);
|
|
5131
6029
|
figOne.addPoint(p1);
|
|
5132
6030
|
figOne.addPoint(p2);
|
|
5133
6031
|
figOne.addPoint(p3);
|
|
@@ -5147,24 +6045,24 @@ function pGeom22(t, param, suffix = "") {
|
|
|
5147
6045
|
var verifyLine3Def = {
|
|
5148
6046
|
pTitle: "Verify line 3",
|
|
5149
6047
|
pDescription: "Debugging more more line.ts",
|
|
5150
|
-
pDef:
|
|
5151
|
-
pGeom:
|
|
6048
|
+
pDef: pDef26,
|
|
6049
|
+
pGeom: pGeom26
|
|
5152
6050
|
};
|
|
5153
6051
|
|
|
5154
6052
|
// src/geometrix_verification/verify_vector.ts
|
|
5155
|
-
import { degToRad as
|
|
5156
|
-
var
|
|
6053
|
+
import { degToRad as degToRad9, point as point12, vector, figure as figure27, pNumber as pNumber27, initGeom as initGeom27 } from "geometrix";
|
|
6054
|
+
var pDef27 = {
|
|
5157
6055
|
partName: "verify_vector",
|
|
5158
6056
|
params: [
|
|
5159
6057
|
//pNumber(name, unit, init, min, max, step)
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
6058
|
+
pNumber27("p1x", "mm", 30, -200, 200, 1),
|
|
6059
|
+
pNumber27("p1y", "mm", 50, -200, 200, 1),
|
|
6060
|
+
pNumber27("p2x", "mm", 80, -200, 200, 1),
|
|
6061
|
+
pNumber27("p2y", "mm", -30, -200, 200, 1),
|
|
6062
|
+
pNumber27("v1a", "degree", 30, -200, 200, 1),
|
|
6063
|
+
pNumber27("v1l", "mm", 60, 0, 200, 1),
|
|
6064
|
+
pNumber27("v2a", "degree", 30, -200, 200, 1),
|
|
6065
|
+
pNumber27("v2l", "mm", 60, 0, 200, 1)
|
|
5168
6066
|
],
|
|
5169
6067
|
paramSvg: {
|
|
5170
6068
|
p1x: "verify_vector_p1x.svg",
|
|
@@ -5183,16 +6081,16 @@ var pDef23 = {
|
|
|
5183
6081
|
// every 0.5 second
|
|
5184
6082
|
}
|
|
5185
6083
|
};
|
|
5186
|
-
function
|
|
5187
|
-
const rGeome =
|
|
6084
|
+
function pGeom27(t, param, suffix = "") {
|
|
6085
|
+
const rGeome = initGeom27(pDef27.partName + suffix);
|
|
5188
6086
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5189
6087
|
`;
|
|
5190
6088
|
try {
|
|
5191
|
-
const figOne =
|
|
5192
|
-
const p1 =
|
|
5193
|
-
const p2 =
|
|
5194
|
-
const v1 = vector(
|
|
5195
|
-
const v2 = vector(
|
|
6089
|
+
const figOne = figure27();
|
|
6090
|
+
const p1 = point12(param.p1x, param.p1y + t);
|
|
6091
|
+
const p2 = point12(param.p2x, param.p2y);
|
|
6092
|
+
const v1 = vector(degToRad9(param.v1a), param.v1l, p1);
|
|
6093
|
+
const v2 = vector(degToRad9(param.v2a), param.v2l, p1);
|
|
5196
6094
|
figOne.addPoint(p1);
|
|
5197
6095
|
figOne.addPoint(p2);
|
|
5198
6096
|
figOne.addVector(v1);
|
|
@@ -5213,22 +6111,22 @@ function pGeom23(t, param, suffix = "") {
|
|
|
5213
6111
|
var verifyVector1Def = {
|
|
5214
6112
|
pTitle: "Verify vector",
|
|
5215
6113
|
pDescription: "Debugging vector.ts",
|
|
5216
|
-
pDef:
|
|
5217
|
-
pGeom:
|
|
6114
|
+
pDef: pDef27,
|
|
6115
|
+
pGeom: pGeom27
|
|
5218
6116
|
};
|
|
5219
6117
|
|
|
5220
6118
|
// src/geometrix_verification/verify_contour_1.ts
|
|
5221
|
-
import { contour as
|
|
5222
|
-
var
|
|
6119
|
+
import { contour as contour20, contourCircle as contourCircle17, figure as figure28, pNumber as pNumber28, initGeom as initGeom28 } from "geometrix";
|
|
6120
|
+
var pDef28 = {
|
|
5223
6121
|
partName: "verify_contour_1",
|
|
5224
6122
|
params: [
|
|
5225
6123
|
//pNumber(name, unit, init, min, max, step)
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
6124
|
+
pNumber28("r1", "mm", 30, 10, 200, 1),
|
|
6125
|
+
pNumber28("d1", "mm", 20, 10, 200, 1),
|
|
6126
|
+
pNumber28("w1", "mm", 100, 10, 200, 1),
|
|
6127
|
+
pNumber28("r2", "mm", 60, 10, 200, 1),
|
|
6128
|
+
pNumber28("l1", "mm", 10, 5, 200, 1),
|
|
6129
|
+
pNumber28("l2", "mm", 30, 5, 200, 1)
|
|
5232
6130
|
],
|
|
5233
6131
|
paramSvg: {
|
|
5234
6132
|
r1: "verify_contour_1_r1.svg",
|
|
@@ -5245,12 +6143,12 @@ var pDef24 = {
|
|
|
5245
6143
|
// every 0.5 second
|
|
5246
6144
|
}
|
|
5247
6145
|
};
|
|
5248
|
-
function
|
|
5249
|
-
const rGeome =
|
|
6146
|
+
function pGeom28(t, param, suffix = "") {
|
|
6147
|
+
const rGeome = initGeom28(pDef28.partName + suffix);
|
|
5250
6148
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5251
6149
|
`;
|
|
5252
6150
|
try {
|
|
5253
|
-
const figOne =
|
|
6151
|
+
const figOne = figure28();
|
|
5254
6152
|
const r1 = param.r1;
|
|
5255
6153
|
const d1 = param.d1;
|
|
5256
6154
|
const w1 = param.w1;
|
|
@@ -5263,20 +6161,20 @@ function pGeom24(t, param, suffix = "") {
|
|
|
5263
6161
|
const c12 = 2 * r1 + d1;
|
|
5264
6162
|
const c2 = c1 + c12;
|
|
5265
6163
|
const c3 = c1 + 2 * c12;
|
|
5266
|
-
const ctr1 =
|
|
6164
|
+
const ctr1 = contour20(0, 0);
|
|
5267
6165
|
ctr1.addSegStrokeA(w1, 0);
|
|
5268
6166
|
ctr1.addSegStrokeA(w1, h1);
|
|
5269
6167
|
ctr1.addSegStrokeA(0, h1);
|
|
5270
6168
|
ctr1.closeSegStroke();
|
|
5271
6169
|
ctr1.check();
|
|
5272
6170
|
figOne.addMain(ctr1);
|
|
5273
|
-
figOne.addMain(
|
|
5274
|
-
figOne.addMain(
|
|
5275
|
-
figOne.addMain(
|
|
5276
|
-
const ctr2 =
|
|
6171
|
+
figOne.addMain(contourCircle17(w12, c1, r1));
|
|
6172
|
+
figOne.addMain(contourCircle17(w12, c2, r1 + t));
|
|
6173
|
+
figOne.addMain(contourCircle17(w12, c3, r1));
|
|
6174
|
+
const ctr2 = contourCircle17(w1 + r2, 3 * c1, r2);
|
|
5277
6175
|
ctr2.check();
|
|
5278
6176
|
figOne.addSecond(ctr2);
|
|
5279
|
-
const ctr3 =
|
|
6177
|
+
const ctr3 = contour20(200 + l1, 200).addSegStrokeA(200 + l1 + l2, 200).addSegStrokeR(0, l1).addSegStrokeRP(0, l1).addSegStrokeRP(Math.PI / 2, l2).addSegStrokeAP(Math.PI / 4, Math.sqrt(2) * (200 + l1 + l2)).addSegStrokeA(200 + l1 + l2, 200 + 2 * l1 + l2).addSegStrokeR(-l2, 0).addSegStrokeR(0, -l1).addSegStrokeR(-l1, 0).addSegStrokeRP(-Math.PI / 2, l2).addSegStrokeR(l1, 0).closeSegStroke();
|
|
5280
6178
|
ctr3.check();
|
|
5281
6179
|
figOne.addSecond(ctr3);
|
|
5282
6180
|
rGeome.fig = { one: figOne };
|
|
@@ -5291,20 +6189,20 @@ function pGeom24(t, param, suffix = "") {
|
|
|
5291
6189
|
var verifyContour1Def = {
|
|
5292
6190
|
pTitle: "Verify contour 1",
|
|
5293
6191
|
pDescription: "Debugging contour.ts",
|
|
5294
|
-
pDef:
|
|
5295
|
-
pGeom:
|
|
6192
|
+
pDef: pDef28,
|
|
6193
|
+
pGeom: pGeom28
|
|
5296
6194
|
};
|
|
5297
6195
|
|
|
5298
6196
|
// src/geometrix_verification/verify_contour_2.ts
|
|
5299
|
-
import { degToRad as
|
|
5300
|
-
var
|
|
6197
|
+
import { degToRad as degToRad10, contour as contour21, figure as figure29, pNumber as pNumber29, initGeom as initGeom29 } from "geometrix";
|
|
6198
|
+
var pDef29 = {
|
|
5301
6199
|
partName: "verify_contour_2",
|
|
5302
6200
|
params: [
|
|
5303
6201
|
//pNumber(name, unit, init, min, max, step)
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
6202
|
+
pNumber29("r1", "mm", 20, 5, 200, 1),
|
|
6203
|
+
pNumber29("a1", "deg", 30, -200, 200, 1),
|
|
6204
|
+
pNumber29("at1", "deg", 30, -200, 200, 1),
|
|
6205
|
+
pNumber29("at2", "deg", 50, -200, 200, 1)
|
|
5308
6206
|
],
|
|
5309
6207
|
paramSvg: {
|
|
5310
6208
|
r1: "verify_contour_1_r1.svg",
|
|
@@ -5319,17 +6217,17 @@ var pDef25 = {
|
|
|
5319
6217
|
// every 0.5 second
|
|
5320
6218
|
}
|
|
5321
6219
|
};
|
|
5322
|
-
function
|
|
5323
|
-
const rGeome =
|
|
6220
|
+
function pGeom29(t, param, suffix = "") {
|
|
6221
|
+
const rGeome = initGeom29(pDef29.partName + suffix);
|
|
5324
6222
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5325
6223
|
`;
|
|
5326
6224
|
try {
|
|
5327
|
-
const figOne =
|
|
6225
|
+
const figOne = figure29();
|
|
5328
6226
|
const r1 = param.r1 + t;
|
|
5329
6227
|
const ata = param.a1 + t;
|
|
5330
6228
|
const at1 = param.at1 + t;
|
|
5331
6229
|
const at2 = param.at2 + t;
|
|
5332
|
-
const ctr1 =
|
|
6230
|
+
const ctr1 = contour21(20, 20);
|
|
5333
6231
|
ctr1.addSegStrokeA(40, 20);
|
|
5334
6232
|
ctr1.addPointA(60, 20).addSegArc(r1, true, true);
|
|
5335
6233
|
ctr1.addPointA(80, 20).addSegArc(r1, true, false);
|
|
@@ -5356,7 +6254,7 @@ function pGeom25(t, param, suffix = "") {
|
|
|
5356
6254
|
ctr1.closeSegStroke();
|
|
5357
6255
|
ctr1.check();
|
|
5358
6256
|
figOne.addMain(ctr1);
|
|
5359
|
-
const ctr2 =
|
|
6257
|
+
const ctr2 = contour21(20, -20);
|
|
5360
6258
|
ctr2.addSegStrokeA(40, -40);
|
|
5361
6259
|
ctr2.addPointA(60, -60).addSegArc(r1, true, true);
|
|
5362
6260
|
ctr2.addPointA(80, -80).addSegArc(r1, true, false);
|
|
@@ -5366,17 +6264,17 @@ function pGeom25(t, param, suffix = "") {
|
|
|
5366
6264
|
ctr2.addSegStrokeR(20, 20).addPointR(20, 20).addSegArc(r1, false, false).addPointRP(Math.PI / 4, 28).addSegArc(r1, false, true).addPointRP(Math.PI / 4, 28).addSegArc(r1, true, true).addPointRP(Math.PI / 4, 28).addSegArc(r1, true, false).addSegStrokeRP(Math.PI / 4, 20).addSegStrokeRP(-Math.PI / 4, 20).addPointR(10, -9).addPointR(20, -20).addSegArc2().addPointR(20, -9).addPointR(20, -20).addSegArc2().addPointR(9, -6).addPointR(20, -20).addSegArc2().addPointR(9, -14).addPointR(20, -20).addSegArc2().addPointR(9, 0).addPointR(20, -20).addSegArc2().addSegStrokeR(20, -20).addSegStrokeR(20, 20).addPointR(9, 20).addPointR(20, 20).addSegArc2().addPointR(20, 10).addPointR(20, 20).addSegArc2().addPointR(9, 6).addPointR(20, 20).addSegArc2().addPointR(9, 14).addPointR(20, 20).addSegArc2().addPointR(9, 0).addPointR(20, 20).addSegArc2().addSegStrokeR(20, 20).addSegStrokeR(0, 20).addPointR(15, 8).addPointR(0, 20).addSegArc2().addPointR(-15, 8).addPointR(0, 20).addSegArc2().addPointR(5, 8).addPointR(0, 20).addSegArc2().addPointR(-5, 8).addPointR(0, 20).addSegArc2().addSegStrokeR(0, 20).addSegStrokeR(20, 0).addPointR(8, 15).addPointR(20, 0).addSegArc2().addPointR(8, -15).addPointR(20, 0).addSegArc2().addPointR(8, 5).addPointR(20, 0).addSegArc2().addPointR(8, -5).addPointR(20, 0).addSegArc2().addSegStrokeR(20, 0).addSegStrokeR(0, -20).addPointR(15, -8).addPointR(0, -20).addSegArc2().addPointR(-15, -8).addPointR(0, -20).addSegArc2().addPointR(5, -8).addPointR(0, -20).addSegArc2().addPointR(-5, -8).addPointR(0, -20).addSegArc2().addSegStrokeR(0, -20).addSegStrokeR(-20, 0).addPointR(-8, 15).addPointR(-20, 0).addSegArc2().addPointR(-8, -15).addPointR(-20, 0).addSegArc2().addPointR(-8, 5).addPointR(-20, 0).addSegArc2().addPointR(-8, -5).addPointR(-20, 0).addSegArc2().addSegStrokeR(-20, 0).closeSegStroke();
|
|
5367
6265
|
ctr2.check();
|
|
5368
6266
|
figOne.addMain(ctr2);
|
|
5369
|
-
const ctr3 =
|
|
6267
|
+
const ctr3 = contour21(200, 200).addSegStrokeR(20, 0).addPointR(20, 0).addSegArc3(degToRad10(ata), true).addSegStrokeR(20, 0).addPointR(20, 0).addSegArc3(degToRad10(ata), false).addSegStrokeR(20, 0).addSegStrokeR(0, 20).addPointR(0, 20).addSegArc3(degToRad10(ata), true).addSegStrokeR(0, 20).addPointR(0, 20).addSegArc3(degToRad10(ata), false).addSegStrokeR(0, 20).addSegStrokeR(-20, 0).addPointR(-20, 0).addSegArc3(degToRad10(ata), true).addSegStrokeR(-20, 0).addPointR(-20, 0).addSegArc3(degToRad10(ata), false).addSegStrokeR(-20, 0).addSegStrokeR(0, -20).addPointR(0, -20).addSegArc3(degToRad10(ata), true).addSegStrokeR(0, -20).addPointR(0, -20).addSegArc3(degToRad10(ata), false).addSegStrokeR(0, -20);
|
|
5370
6268
|
ctr3.check();
|
|
5371
6269
|
figOne.addMain(ctr3);
|
|
5372
|
-
const ctr4 =
|
|
6270
|
+
const ctr4 = contour21(600, 200).addSegStrokeR(20, 20).addPointR(20, 20).addSegArc3(degToRad10(ata), true).addSegStrokeR(20, 20).addPointR(20, 20).addSegArc3(degToRad10(ata), false).addSegStrokeR(20, 20).addSegStrokeR(-20, 20).addPointR(-20, 20).addSegArc3(degToRad10(ata), true).addSegStrokeR(-20, 20).addPointR(-20, 20).addSegArc3(degToRad10(ata), false).addSegStrokeR(-20, 20).addSegStrokeR(-20, -20).addPointR(-20, -20).addSegArc3(degToRad10(ata), true).addSegStrokeR(-20, -20).addPointR(-20, -20).addSegArc3(degToRad10(ata), false).addSegStrokeR(-20, -20).addSegStrokeR(20, -20).addPointR(20, -20).addSegArc3(degToRad10(ata), true).addSegStrokeR(20, -20).addPointR(20, -20).addSegArc3(degToRad10(ata), false).addSegStrokeR(20, -20);
|
|
5373
6271
|
ctr4.check();
|
|
5374
6272
|
figOne.addMain(ctr4);
|
|
5375
|
-
const ctr5 =
|
|
6273
|
+
const ctr5 = contour21(100, 500);
|
|
5376
6274
|
for (let i = 0; i < 8; i++) {
|
|
5377
6275
|
const adir = i * 45;
|
|
5378
|
-
const adirRad =
|
|
5379
|
-
ctr5.addSegStrokeRP(adirRad, 20).addPointRP(adirRad, 20).addSeg2Arcs(
|
|
6276
|
+
const adirRad = degToRad10(adir);
|
|
6277
|
+
ctr5.addSegStrokeRP(adirRad, 20).addPointRP(adirRad, 20).addSeg2Arcs(degToRad10(adir + at1), degToRad10(180 + adir - at2)).addSegStrokeRP(adirRad, 20).addPointRP(adirRad, 20).addSeg2Arcs(degToRad10(adir - at1), degToRad10(180 + adir + at2)).addSegStrokeRP(adirRad, 20);
|
|
5380
6278
|
}
|
|
5381
6279
|
ctr5.check();
|
|
5382
6280
|
figOne.addMain(ctr5);
|
|
@@ -5392,22 +6290,22 @@ function pGeom25(t, param, suffix = "") {
|
|
|
5392
6290
|
var verifyContour2Def = {
|
|
5393
6291
|
pTitle: "Verify contour 2",
|
|
5394
6292
|
pDescription: "Debugging more contour.ts",
|
|
5395
|
-
pDef:
|
|
5396
|
-
pGeom:
|
|
6293
|
+
pDef: pDef29,
|
|
6294
|
+
pGeom: pGeom29
|
|
5397
6295
|
};
|
|
5398
6296
|
|
|
5399
6297
|
// src/geometrix_verification/verify_contour_3.ts
|
|
5400
|
-
import { degToRad as
|
|
5401
|
-
var
|
|
6298
|
+
import { degToRad as degToRad11, contour as contour22, figure as figure30, pNumber as pNumber30, initGeom as initGeom30 } from "geometrix";
|
|
6299
|
+
var pDef30 = {
|
|
5402
6300
|
partName: "verify_contour_3",
|
|
5403
6301
|
params: [
|
|
5404
6302
|
//pNumber(name, unit, init, min, max, step)
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
6303
|
+
pNumber30("r1", "mm", 10, 0, 200, 1),
|
|
6304
|
+
pNumber30("r2", "mm", 10, 0, 200, 1),
|
|
6305
|
+
pNumber30("r3", "mm", 10, 0, 200, 1),
|
|
6306
|
+
pNumber30("r4", "mm", 10, 0, 200, 1),
|
|
6307
|
+
pNumber30("r5", "mm", 10, 0, 200, 1),
|
|
6308
|
+
pNumber30("r6", "mm", 5, 0, 200, 1)
|
|
5411
6309
|
],
|
|
5412
6310
|
paramSvg: {
|
|
5413
6311
|
r1: "verify_contour_1_r1.svg",
|
|
@@ -5424,32 +6322,32 @@ var pDef26 = {
|
|
|
5424
6322
|
// every 0.5 second
|
|
5425
6323
|
}
|
|
5426
6324
|
};
|
|
5427
|
-
function
|
|
5428
|
-
const rGeome =
|
|
6325
|
+
function pGeom30(t, param, suffix = "") {
|
|
6326
|
+
const rGeome = initGeom30(pDef30.partName + suffix);
|
|
5429
6327
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5430
6328
|
`;
|
|
5431
6329
|
try {
|
|
5432
|
-
const figOne =
|
|
6330
|
+
const figOne = figure30();
|
|
5433
6331
|
const r1 = param.r1 + t;
|
|
5434
6332
|
const r2 = param.r2 + t;
|
|
5435
6333
|
const r3 = param.r3 + t;
|
|
5436
6334
|
const r4 = param.r4 + t;
|
|
5437
6335
|
const r5 = param.r5 + t;
|
|
5438
6336
|
const r6 = param.r6 + t;
|
|
5439
|
-
const ctr1 =
|
|
6337
|
+
const ctr1 = contour22(100, 0).addSegStrokeR(30, 200).addCornerRounded(r1).addSegStrokeR(200, 30).addCornerRounded(r1).addSegStrokeR(-200, 30).addCornerRounded(r1).addSegStrokeR(-30, 200).addCornerRounded(r1).addSegStrokeR(-30, -200).addCornerRounded(r1).addSegStrokeR(-200, -30).addCornerRounded(r1).addSegStrokeR(200, -30).addCornerRounded(r1).closeSegStroke().addCornerRounded(r1);
|
|
5440
6338
|
rGeome.logstr += ctr1.check();
|
|
5441
6339
|
figOne.addMain(ctr1);
|
|
5442
6340
|
const l2 = 100;
|
|
5443
|
-
const ctr2 =
|
|
6341
|
+
const ctr2 = contour22(300, 0);
|
|
5444
6342
|
for (let i = 0; i < 4; i++) {
|
|
5445
6343
|
const angle = 90 * (1 - i);
|
|
5446
|
-
ctr2.addSegStrokeRP(
|
|
6344
|
+
ctr2.addSegStrokeRP(degToRad11(angle), l2).addCornerRounded(r2).addSegStrokeRP(degToRad11(angle - 45), l2).addCornerRounded(r2).addSegStrokeRP(degToRad11(angle + 45), l2).addCornerRounded(r2).addSegStrokeRP(degToRad11(angle), l2).addCornerRounded(r2);
|
|
5447
6345
|
}
|
|
5448
6346
|
rGeome.logstr += ctr2.check();
|
|
5449
6347
|
figOne.addMain(ctr2);
|
|
5450
6348
|
const l3 = 100;
|
|
5451
6349
|
const ra3 = 70;
|
|
5452
|
-
const ctr3 =
|
|
6350
|
+
const ctr3 = contour22(0, 600).addSegStrokeR(l3, l3);
|
|
5453
6351
|
for (let i = 0; i < 3; i++) {
|
|
5454
6352
|
const large = (i & 1) === 0 ? false : true;
|
|
5455
6353
|
const ccw = (i & 2) === 0 ? false : true;
|
|
@@ -5465,70 +6363,70 @@ function pGeom26(t, param, suffix = "") {
|
|
|
5465
6363
|
ctr3.addSegStrokeR(l3, 0).addSegStrokeR(l3, -l3).closeSegStroke();
|
|
5466
6364
|
rGeome.logstr += ctr3.check();
|
|
5467
6365
|
figOne.addMain(ctr3);
|
|
5468
|
-
const ctr3b =
|
|
6366
|
+
const ctr3b = contour22(0, 900).addCornerRounded(r3).addPointR(l3, l3).addSegArc(l3, false, true).addSegStrokeR(0, 2 * l3).addCornerRounded(r3).addPointR(l3, -l3).addSegArc(l3, false, true).addSegStrokeR(l3, 0).addCornerRounded(r3).addPointR(l3, l3).addSegArc(l3, false, false).addCornerRounded(r3).addSegStrokeR(0, 2 * l3).addCornerRounded(r3).addPointR(-l3, l3).addSegArc(l3, false, false).addPointR(l3, l3).addSegArc(l3, false, false).addCornerRounded(r3).addSegStrokeR(0, 3 * l3).addCornerRounded(r3).addPointR(-l3, -l3).addSegArc(l3, false, false).addPointR(-l3, l3).addSegArc(l3, false, false).addCornerRounded(r3).addSegStrokeR(0, -3 * l3).addCornerRounded(r3).addPointR(-l3, l3).addSegArc(l3, false, true).addSegStrokeR(-l3, 0).closeSegStroke();
|
|
5469
6367
|
rGeome.logstr += ctr3b.check();
|
|
5470
6368
|
figOne.addMain(ctr3b);
|
|
5471
6369
|
const l4 = 200;
|
|
5472
6370
|
const ra4 = 180;
|
|
5473
|
-
const ctr4 =
|
|
6371
|
+
const ctr4 = contour22(0, 2e3).addPointR(l4, 0).addSegArc(ra4, false, true).addCornerRounded(r4).addPointR(0, l4).addSegArc(ra4, false, true).addCornerRounded(r4).addPointR(-l4, -l4).addSegArc(1.4 * ra4, false, true).addCornerRounded(r4);
|
|
5474
6372
|
rGeome.logstr += ctr4.check();
|
|
5475
6373
|
figOne.addMain(ctr4);
|
|
5476
|
-
const ctr4b =
|
|
6374
|
+
const ctr4b = contour22(400, 2e3).addPointR(0, 1.7 * l4).addSegArc(2.3 * ra4, false, false).addCornerRounded(r4).addPointR(l4, -0.7 * l4).addSegArc(ra4, false, false).addCornerRounded(r4).addPointR(-l4, -l4).addSegArc(1.4 * ra4, false, false).addCornerRounded(r4);
|
|
5477
6375
|
rGeome.logstr += ctr4b.check();
|
|
5478
6376
|
figOne.addMain(ctr4b);
|
|
5479
|
-
const ctr4c =
|
|
6377
|
+
const ctr4c = contour22(1e3, 2e3).addPointR(l4, 0).addSegArc(0.6 * ra4, true, true).addCornerRounded(r4).addPointR(0, l4).addSegArc(ra4, true, true).addCornerRounded(r4).addPointR(-l4, -l4).addSegArc(1.4 * ra4, true, true).addCornerRounded(r4);
|
|
5480
6378
|
rGeome.logstr += ctr4c.check();
|
|
5481
6379
|
figOne.addMain(ctr4c);
|
|
5482
|
-
const ctr4d =
|
|
6380
|
+
const ctr4d = contour22(3e3, 2e3).addPointR(0, 1.7 * l4).addSegArc(2.3 * ra4, true, false).addCornerRounded(r4).addPointR(l4, -0.7 * l4).addSegArc(ra4, true, false).addCornerRounded(r4).addPointR(-l4, -l4).addSegArc(1.1 * ra4, true, false).addCornerRounded(r4);
|
|
5483
6381
|
rGeome.logstr += ctr4d.check();
|
|
5484
6382
|
figOne.addMain(ctr4d);
|
|
5485
6383
|
const l4b = 3 * l4;
|
|
5486
6384
|
const ra4b = 3 * ra4;
|
|
5487
|
-
const ctr4e =
|
|
6385
|
+
const ctr4e = contour22(3800, 2e3).addPointR(l4b, 0).addSegArc(ra4b, false, false).addCornerRounded(r4).addPointR(0, l4b).addSegArc(ra4b, false, false).addCornerRounded(r4).addPointR(-l4b, 0).addSegArc(ra4b, false, false).addCornerRounded(r4).addPointR(0, -l4b).addSegArc(ra4b, false, false).addCornerRounded(r4);
|
|
5488
6386
|
rGeome.logstr += ctr4e.check();
|
|
5489
6387
|
figOne.addMain(ctr4e);
|
|
5490
|
-
const ctr4f =
|
|
6388
|
+
const ctr4f = contour22(4500, 2e3).addPointR(l4, l4).addSegArc(l4, false, false).addPointR(l4, -l4).addSegArc(l4, false, false).addCornerRounded(r4).addPointR(-l4, 1.6 * l4).addSegArc(1.1 * ra4, false, true).addCornerRounded(r4).addPointR(-l4, -1.6 * l4).addSegArc(1.2 * ra4, false, true).addCornerRounded(r4);
|
|
5491
6389
|
rGeome.logstr += ctr4f.check();
|
|
5492
6390
|
figOne.addMain(ctr4f);
|
|
5493
|
-
const ctr4g =
|
|
6391
|
+
const ctr4g = contour22(5200, 2e3).addPointR(l4, 0).addSegArc(0.9 * l4, false, false).addCornerRounded(r4).addPointR(l4, 0).addSegArc(0.9 * l4, false, false).addCornerRounded(r4).addPointR(-2 * l4, 0).addSegArc(1.3 * l4, true, true).addCornerRounded(r4);
|
|
5494
6392
|
rGeome.logstr += ctr4g.check();
|
|
5495
6393
|
figOne.addMain(ctr4g);
|
|
5496
6394
|
const c099 = 0.999;
|
|
5497
|
-
const ctr4h =
|
|
6395
|
+
const ctr4h = contour22(6e3, 2e3).addPointR(2 * l4, 2 * l4).addSegArc(1.5 * l4, false, false).addCornerRounded(r4).addPointR(2 * l4, -2 * l4).addSegArc(1.5 * l4, false, false).addCornerRounded(r4).addPointR(-l4, l4).addSegArc(l4, false, true).addPointR(-l4, -c099 * l4).addSegArc(l4, false, true).addCornerRounded(r4).addPointR(-l4, c099 * l4).addSegArc(l4, false, true).addPointR(-l4, -l4).addSegArc(l4, false, true).addCornerRounded(r4);
|
|
5498
6396
|
rGeome.logstr += ctr4h.check();
|
|
5499
6397
|
figOne.addMain(ctr4h);
|
|
5500
6398
|
const l5 = 200;
|
|
5501
6399
|
const ra5 = 180;
|
|
5502
|
-
const ctr5 =
|
|
6400
|
+
const ctr5 = contour22(0, 3e3).addSegStrokeR(l5, 0).addCornerWidened(r5).addSegStrokeR(0, l5).addCornerWidened(r5).closeSegStroke().addCornerWidened(r5);
|
|
5503
6401
|
rGeome.logstr += ctr5.check();
|
|
5504
6402
|
figOne.addMain(ctr5);
|
|
5505
|
-
const ctr5b =
|
|
6403
|
+
const ctr5b = contour22(400, 3e3).addSegStrokeR(l5, 0).addCornerWidened(r5).addPointR(0, l5).addSegArc(ra5, false, true).addCornerWidened(r5).addPointR(-l5, 0).addSegArc(ra5, false, false).addCornerWidened(r5).closeSegStroke().addCornerWidened(r5);
|
|
5506
6404
|
rGeome.logstr += ctr5b.check();
|
|
5507
6405
|
figOne.addMain(ctr5b);
|
|
5508
|
-
const ctr5d =
|
|
6406
|
+
const ctr5d = contour22(3e3, 3e3).addPointR(0, 1.7 * l5).addSegArc(2.3 * ra5, true, false).addCornerWidened(r5).addPointR(l5, -0.7 * l5).addSegArc(ra5, true, false).addCornerWidened(r5).addPointR(-l5, -l5).addSegArc(1.1 * ra5, true, false).addCornerWidened(r5);
|
|
5509
6407
|
rGeome.logstr += ctr5d.check();
|
|
5510
6408
|
figOne.addMain(ctr5d);
|
|
5511
|
-
const ctr5e =
|
|
6409
|
+
const ctr5e = contour22(3800, 3e3).addPointR(l5, 0).addSegArc(ra5, false, false).addCornerWidened(r5).addPointR(0, l5).addSegArc(ra5, false, false).addCornerWidened(r5).addPointR(-l5, 0).addSegArc(ra5, false, false).addCornerWidened(r5).addPointR(0, -l5).addSegArc(ra5, false, false).addCornerWidened(r5);
|
|
5512
6410
|
rGeome.logstr += ctr5e.check();
|
|
5513
6411
|
figOne.addMain(ctr5e);
|
|
5514
|
-
const ctr5f =
|
|
6412
|
+
const ctr5f = contour22(4500, 3e3).addPointR(l5, l5).addSegArc(l5, false, false).addPointR(l5, -l5).addSegArc(l5, false, false).addCornerWidened(r5).addPointR(-l5, 1.6 * l5).addSegArc(1.1 * ra5, false, true).addCornerWidened(r5).addPointR(-l5, -1.6 * l5).addSegArc(1.2 * ra5, false, true).addCornerWidened(r5);
|
|
5515
6413
|
rGeome.logstr += ctr5f.check();
|
|
5516
6414
|
figOne.addMain(ctr5f);
|
|
5517
6415
|
const l6 = 200;
|
|
5518
6416
|
const ra6 = 180;
|
|
5519
|
-
const ctr6 =
|
|
6417
|
+
const ctr6 = contour22(0, 4e3).addSegStrokeR(l6, 0).addCornerWideAcc(r6).addSegStrokeR(0, l6).addCornerWideAcc(r6).closeSegStroke().addCornerWideAcc(r6);
|
|
5520
6418
|
rGeome.logstr += ctr6.check();
|
|
5521
6419
|
figOne.addMain(ctr6);
|
|
5522
|
-
const ctr6b =
|
|
6420
|
+
const ctr6b = contour22(400, 4e3).addSegStrokeR(l6, 0).addCornerWideAcc(r6).addPointR(0, l6).addSegArc(ra6, false, true).addCornerWideAcc(r6).addPointR(-l6, 0).addSegArc(ra6, false, false).addCornerWideAcc(r6).closeSegStroke().addCornerWideAcc(r6);
|
|
5523
6421
|
rGeome.logstr += ctr6b.check();
|
|
5524
6422
|
figOne.addMain(ctr6b);
|
|
5525
|
-
const ctr6d =
|
|
6423
|
+
const ctr6d = contour22(3e3, 4e3).addPointR(0, 1.7 * l6).addSegArc(2.3 * ra6, true, false).addCornerWideAcc(r6).addPointR(l6, -0.7 * l6).addSegArc(ra6, true, false).addCornerWideAcc(r6).addPointR(-l6, -l6).addSegArc(1.1 * ra6, true, false).addCornerWideAcc(r6);
|
|
5526
6424
|
rGeome.logstr += ctr6d.check();
|
|
5527
6425
|
figOne.addMain(ctr6d);
|
|
5528
|
-
const ctr6e =
|
|
6426
|
+
const ctr6e = contour22(3800, 4e3).addPointR(l6, 0).addSegArc(ra6, false, false).addCornerWideAcc(r6).addPointR(0, l6).addSegArc(ra6, false, false).addCornerWideAcc(r6).addPointR(-l6, 0).addSegArc(ra6, false, false).addCornerWideAcc(r6).addPointR(0, -l6).addSegArc(ra6, false, false).addCornerWideAcc(r6);
|
|
5529
6427
|
rGeome.logstr += ctr6e.check();
|
|
5530
6428
|
figOne.addMain(ctr6e);
|
|
5531
|
-
const ctr6f =
|
|
6429
|
+
const ctr6f = contour22(4500, 4e3).addPointR(l6, l6).addSegArc(l6, false, false).addPointR(l6, -l6).addSegArc(l6, false, false).addCornerWideAcc(r6).addPointR(-l6, 1.6 * l6).addSegArc(1.1 * ra6, false, true).addCornerWideAcc(r6).addPointR(-l6, -1.6 * l6).addSegArc(1.2 * ra6, false, true).addCornerWideAcc(r6);
|
|
5532
6430
|
rGeome.logstr += ctr6f.check();
|
|
5533
6431
|
figOne.addMain(ctr6f);
|
|
5534
6432
|
rGeome.fig = { one: figOne };
|
|
@@ -5543,19 +6441,19 @@ function pGeom26(t, param, suffix = "") {
|
|
|
5543
6441
|
var verifyContour3Def = {
|
|
5544
6442
|
pTitle: "Verify contour 3",
|
|
5545
6443
|
pDescription: "Debugging contour.ts for rounded corners and widened corners",
|
|
5546
|
-
pDef:
|
|
5547
|
-
pGeom:
|
|
6444
|
+
pDef: pDef30,
|
|
6445
|
+
pGeom: pGeom30
|
|
5548
6446
|
};
|
|
5549
6447
|
|
|
5550
6448
|
// src/geometrix_verification/verify_contour_4.ts
|
|
5551
|
-
import { contour as
|
|
5552
|
-
var
|
|
6449
|
+
import { contour as contour23, figure as figure31, pNumber as pNumber31, initGeom as initGeom31 } from "geometrix";
|
|
6450
|
+
var pDef31 = {
|
|
5553
6451
|
partName: "verify_contour_4",
|
|
5554
6452
|
params: [
|
|
5555
6453
|
//pNumber(name, unit, init, min, max, step)
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
6454
|
+
pNumber31("n1", "scalar", 16, 1, 50, 1),
|
|
6455
|
+
pNumber31("n2", "scalar", 6, 3, 50, 1),
|
|
6456
|
+
pNumber31("r1", "mm", 5, 0, 20, 1)
|
|
5559
6457
|
],
|
|
5560
6458
|
paramSvg: {
|
|
5561
6459
|
n1: "verify_contour_1_r1.svg",
|
|
@@ -5569,19 +6467,19 @@ var pDef27 = {
|
|
|
5569
6467
|
// every 0.5 second
|
|
5570
6468
|
}
|
|
5571
6469
|
};
|
|
5572
|
-
function
|
|
5573
|
-
const rGeome =
|
|
6470
|
+
function pGeom31(t, param, suffix = "") {
|
|
6471
|
+
const rGeome = initGeom31(pDef31.partName + suffix);
|
|
5574
6472
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5575
6473
|
`;
|
|
5576
6474
|
try {
|
|
5577
|
-
const figOne =
|
|
6475
|
+
const figOne = figure31();
|
|
5578
6476
|
const n1 = param.n1;
|
|
5579
6477
|
const n2 = param.n2;
|
|
5580
6478
|
const r1 = param.r1;
|
|
5581
6479
|
const l1 = 50 + t;
|
|
5582
6480
|
const as = 2 * Math.PI / (n2 * 3);
|
|
5583
|
-
const ctr2b =
|
|
5584
|
-
const ctr1 =
|
|
6481
|
+
const ctr2b = contour23(l1, 0).addSegStrokeAP(as, 1.5 * l1).addCornerRounded(r1).addPointAP(2 * as, l1).addSegArc(0.45 * l1, false, true).addCornerWidened(r1).addSegStrokeAP(3 * as, 1.2 * l1);
|
|
6482
|
+
const ctr1 = contour23(l1, 0);
|
|
5585
6483
|
const ctr1b = ctr2b.clone().addCornerRounded(r1);
|
|
5586
6484
|
for (let i = 0; i < n1; i++) {
|
|
5587
6485
|
const ctr1c = ctr1b.rotate(0, 0, i * 3 * as).scale(0, 0, 1 + i * 0.2, true);
|
|
@@ -5590,7 +6488,7 @@ function pGeom27(t, param, suffix = "") {
|
|
|
5590
6488
|
ctr1.closeSegStroke();
|
|
5591
6489
|
rGeome.logstr += ctr1.check();
|
|
5592
6490
|
figOne.addMain(ctr1);
|
|
5593
|
-
const ctr5 =
|
|
6491
|
+
const ctr5 = contour23(l1, 0);
|
|
5594
6492
|
for (let i = 0; i < n1; i++) {
|
|
5595
6493
|
ctr5.addPartial(ctr1b.rotate(0, 0, i * 3 * as).scale(0, 0, 1 + i * 0.2, false));
|
|
5596
6494
|
}
|
|
@@ -5621,29 +6519,29 @@ function pGeom27(t, param, suffix = "") {
|
|
|
5621
6519
|
var verifyContour4Def = {
|
|
5622
6520
|
pTitle: "Verify contour 4",
|
|
5623
6521
|
pDescription: "Debugging contour.ts for addPartial",
|
|
5624
|
-
pDef:
|
|
5625
|
-
pGeom:
|
|
6522
|
+
pDef: pDef31,
|
|
6523
|
+
pGeom: pGeom31
|
|
5626
6524
|
};
|
|
5627
6525
|
|
|
5628
6526
|
// src/geometrix_verification/verify_exports_1.ts
|
|
5629
6527
|
import {
|
|
5630
|
-
contour as
|
|
5631
|
-
contourCircle as
|
|
5632
|
-
figure as
|
|
5633
|
-
pNumber as
|
|
6528
|
+
contour as contour24,
|
|
6529
|
+
contourCircle as contourCircle18,
|
|
6530
|
+
figure as figure32,
|
|
6531
|
+
pNumber as pNumber32,
|
|
5634
6532
|
pCheckbox as pCheckbox4,
|
|
5635
|
-
initGeom as
|
|
5636
|
-
EExtrude as
|
|
5637
|
-
EBVolume as
|
|
6533
|
+
initGeom as initGeom32,
|
|
6534
|
+
EExtrude as EExtrude16,
|
|
6535
|
+
EBVolume as EBVolume19
|
|
5638
6536
|
} from "geometrix";
|
|
5639
|
-
var
|
|
6537
|
+
var pDef32 = {
|
|
5640
6538
|
partName: "verify_exports_1",
|
|
5641
6539
|
params: [
|
|
5642
6540
|
//pNumber(name, unit, init, min, max, step)
|
|
5643
6541
|
pCheckbox4("circle", true),
|
|
5644
|
-
|
|
6542
|
+
pNumber32("circle-size", "mm", 100, 1, 1e3, 1),
|
|
5645
6543
|
pCheckbox4("contour", true),
|
|
5646
|
-
|
|
6544
|
+
pNumber32("contour-size", "mm", 30, 1, 1e3, 1),
|
|
5647
6545
|
pCheckbox4("contour-arc-large", false)
|
|
5648
6546
|
],
|
|
5649
6547
|
paramSvg: {
|
|
@@ -5659,20 +6557,20 @@ var pDef28 = {
|
|
|
5659
6557
|
tUpdate: 500
|
|
5660
6558
|
}
|
|
5661
6559
|
};
|
|
5662
|
-
function
|
|
5663
|
-
const rGeome =
|
|
6560
|
+
function pGeom32(t, param, suffix = "") {
|
|
6561
|
+
const rGeome = initGeom32(pDef32.partName + suffix);
|
|
5664
6562
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5665
6563
|
`;
|
|
5666
6564
|
try {
|
|
5667
|
-
const figOne =
|
|
6565
|
+
const figOne = figure32();
|
|
5668
6566
|
if (param.circle === 1) {
|
|
5669
|
-
const theCircle =
|
|
6567
|
+
const theCircle = contourCircle18(0, 0, param["circle-size"]);
|
|
5670
6568
|
figOne.addMain(theCircle);
|
|
5671
6569
|
}
|
|
5672
6570
|
if (param.contour === 1) {
|
|
5673
6571
|
const csize = param["contour-size"];
|
|
5674
6572
|
const carcl = param["contour-arc-large"] === 1 ? true : false;
|
|
5675
|
-
const ctr1 =
|
|
6573
|
+
const ctr1 = contour24(0, 0).addSegStrokeA(csize, 0).addPointA(csize, csize).addSegArc(csize * 0.8, carcl, true).closeSegStroke();
|
|
5676
6574
|
figOne.addMain(ctr1);
|
|
5677
6575
|
}
|
|
5678
6576
|
rGeome.fig = { one: figOne };
|
|
@@ -5682,7 +6580,7 @@ function pGeom28(t, param, suffix = "") {
|
|
|
5682
6580
|
{
|
|
5683
6581
|
outName: `subpax_${designName}_one`,
|
|
5684
6582
|
face: `${designName}_one`,
|
|
5685
|
-
extrudeMethod:
|
|
6583
|
+
extrudeMethod: EExtrude16.eLinearOrtho,
|
|
5686
6584
|
length: 10,
|
|
5687
6585
|
rotate: [0, 0, 0],
|
|
5688
6586
|
translate: [0, 0, 0]
|
|
@@ -5691,7 +6589,7 @@ function pGeom28(t, param, suffix = "") {
|
|
|
5691
6589
|
volumes: [
|
|
5692
6590
|
{
|
|
5693
6591
|
outName: `pax_${designName}`,
|
|
5694
|
-
boolMethod:
|
|
6592
|
+
boolMethod: EBVolume19.eIdentity,
|
|
5695
6593
|
inList: [`subpax_${designName}_one`]
|
|
5696
6594
|
}
|
|
5697
6595
|
]
|
|
@@ -5707,8 +6605,8 @@ function pGeom28(t, param, suffix = "") {
|
|
|
5707
6605
|
var verifyExports1Def = {
|
|
5708
6606
|
pTitle: "Verify exports 1",
|
|
5709
6607
|
pDescription: "For dev & debug of Openscad export",
|
|
5710
|
-
pDef:
|
|
5711
|
-
pGeom:
|
|
6608
|
+
pDef: pDef32,
|
|
6609
|
+
pGeom: pGeom32
|
|
5712
6610
|
};
|
|
5713
6611
|
export {
|
|
5714
6612
|
baseDef,
|
|
@@ -5717,17 +6615,21 @@ export {
|
|
|
5717
6615
|
gearWheelWheelDef,
|
|
5718
6616
|
heliostatDef,
|
|
5719
6617
|
heliostat_2Def,
|
|
5720
|
-
poleRotorDef,
|
|
5721
6618
|
poleStaticDef,
|
|
5722
6619
|
rakeDef,
|
|
5723
6620
|
rakeStopperDef,
|
|
5724
6621
|
rectangleDef,
|
|
6622
|
+
ringDef,
|
|
6623
|
+
ringGuidanceDef,
|
|
5725
6624
|
rodDef,
|
|
5726
6625
|
simplifiedGearWheelDef,
|
|
5727
6626
|
spiderDef,
|
|
5728
6627
|
surfaceDef,
|
|
5729
6628
|
swingDef,
|
|
5730
6629
|
trapezeDef,
|
|
6630
|
+
vaxisDef,
|
|
6631
|
+
vaxisGuidanceDef,
|
|
6632
|
+
vaxisHolderDef,
|
|
5731
6633
|
verifyContour1Def,
|
|
5732
6634
|
verifyContour2Def,
|
|
5733
6635
|
verifyContour3Def,
|