designix 0.5.25 → 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.js CHANGED
@@ -1436,6 +1436,7 @@ import {
1436
1436
  radToDeg as radToDeg5,
1437
1437
  ffix as ffix8,
1438
1438
  pNumber as pNumber7,
1439
+ pSectionSeparator as pSectionSeparator6,
1439
1440
  initGeom as initGeom7,
1440
1441
  EBVolume as EBVolume7
1441
1442
  } from "geometrix";
@@ -1448,6 +1449,7 @@ import {
1448
1449
  radToDeg as radToDeg2,
1449
1450
  ffix as ffix4,
1450
1451
  pNumber as pNumber3,
1452
+ pSectionSeparator as pSectionSeparator2,
1451
1453
  initGeom as initGeom3,
1452
1454
  EExtrude as EExtrude2,
1453
1455
  EBVolume as EBVolume3
@@ -1461,11 +1463,14 @@ var pDef3 = {
1461
1463
  pNumber3("D3", "mm", 800, 10, 4e3, 1),
1462
1464
  pNumber3("H1", "mm", 3e3, 10, 4e4, 10),
1463
1465
  pNumber3("H2", "mm", 7e3, 50, 4e4, 10),
1466
+ pSectionSeparator2("thickness"),
1464
1467
  pNumber3("E1", "mm", 30, 1, 80, 1),
1465
1468
  pNumber3("E2", "mm", 5, 1, 80, 1),
1469
+ pSectionSeparator2("base holes"),
1466
1470
  pNumber3("N1", "", 32, 3, 100, 1),
1467
1471
  pNumber3("D5", "mm", 40, 1, 100, 1),
1468
1472
  pNumber3("L1", "mm", 45, 1, 300, 1),
1473
+ pSectionSeparator2("door"),
1469
1474
  pNumber3("D4", "mm", 600, 1, 1200, 1),
1470
1475
  pNumber3("H3", "mm", 300, 5, 1200, 1),
1471
1476
  pNumber3("H4", "mm", 1800, 10, 2500, 1),
@@ -1672,6 +1677,7 @@ import {
1672
1677
  radToDeg as radToDeg3,
1673
1678
  ffix as ffix5,
1674
1679
  pNumber as pNumber4,
1680
+ pSectionSeparator as pSectionSeparator3,
1675
1681
  initGeom as initGeom4,
1676
1682
  EExtrude as EExtrude3,
1677
1683
  EBVolume as EBVolume4
@@ -1688,6 +1694,7 @@ var pDef4 = {
1688
1694
  pNumber4("H3", "mm", 400, 0, 4e3, 10),
1689
1695
  pNumber4("E1", "mm", 20, 1, 80, 1),
1690
1696
  pNumber4("E3", "mm", 30, 1, 80, 1),
1697
+ pSectionSeparator3("transversal"),
1691
1698
  pNumber4("H4", "mm", 400, 10, 1e3, 10),
1692
1699
  pNumber4("D4", "mm", 300, 10, 1e3, 10),
1693
1700
  pNumber4("E4", "mm", 20, 1, 80, 1),
@@ -1696,14 +1703,17 @@ var pDef4 = {
1696
1703
  pNumber4("L4", "mm", 300, 1, 1e3, 10),
1697
1704
  pNumber4("L5", "mm", 2e3, 10, 4e3, 10),
1698
1705
  pNumber4("L6", "mm", 2e3, 1, 4e3, 10),
1706
+ pNumber4("D8", "mm", 400, 1, 1e3, 10),
1707
+ pSectionSeparator3("diagonal"),
1699
1708
  pNumber4("D6", "mm", 100, 1, 600, 10),
1700
1709
  pNumber4("E6", "mm", 10, 1, 80, 1),
1701
1710
  pNumber4("L7", "mm", 100, 1, 1e3, 1),
1702
1711
  pNumber4("L8", "mm", 200, 1, 1e3, 1),
1712
+ pSectionSeparator3("base"),
1703
1713
  pNumber4("N1", "", 24, 3, 100, 1),
1704
1714
  pNumber4("D7", "mm", 40, 1, 100, 1),
1705
1715
  pNumber4("L1", "mm", 30, 1, 300, 1),
1706
- pNumber4("D8", "mm", 400, 1, 1e3, 10),
1716
+ pSectionSeparator3("door"),
1707
1717
  pNumber4("H6", "mm", 100, 1, 1e3, 10),
1708
1718
  pNumber4("H7", "mm", 600, 10, 2e3, 10),
1709
1719
  pNumber4("L9", "mm", 300, 1, 1e3, 10),
@@ -2076,7 +2086,7 @@ function pGeom4(t, param, suffix = "") {
2076
2086
  }
2077
2087
  var rakeDef = {
2078
2088
  pTitle: "Heliostat rake",
2079
- pDescription: "The rake on top of the pole-rotor of the heliostat",
2089
+ pDescription: "The rake on top of the V-Axis of the heliostat",
2080
2090
  pDef: pDef4,
2081
2091
  pGeom: pGeom4
2082
2092
  };
@@ -2089,6 +2099,7 @@ import {
2089
2099
  radToDeg as radToDeg4,
2090
2100
  ffix as ffix6,
2091
2101
  pNumber as pNumber5,
2102
+ pSectionSeparator as pSectionSeparator4,
2092
2103
  initGeom as initGeom5,
2093
2104
  EExtrude as EExtrude4,
2094
2105
  EBVolume as EBVolume5
@@ -2102,13 +2113,15 @@ var pDef5 = {
2102
2113
  pNumber5("L2", "mm", 400, 1, 1e3, 1),
2103
2114
  pNumber5("L3", "mm", 100, 1, 400, 1),
2104
2115
  pNumber5("L4", "mm", 3e3, 10, 8e3, 10),
2116
+ pSectionSeparator4("longitude"),
2105
2117
  pNumber5("L5", "mm", 2e3, 1, 8e3, 1),
2118
+ pNumber5("N1", "", 6, 1, 20, 1),
2106
2119
  pNumber5("L6", "mm", 30, 1, 100, 1),
2120
+ pSectionSeparator4("thickness"),
2107
2121
  pNumber5("E1", "mm", 3, 1, 80, 1),
2108
2122
  pNumber5("E2", "mm", 50, 1, 200, 1),
2109
2123
  pNumber5("E3", "mm", 3, 1, 80, 1),
2110
- pNumber5("R2", "mm", 100, 0, 400, 10),
2111
- pNumber5("N1", "", 6, 1, 20, 1)
2124
+ pNumber5("R2", "mm", 100, 0, 400, 10)
2112
2125
  ],
2113
2126
  paramSvg: {
2114
2127
  D1: "spider_profile.svg",
@@ -2275,6 +2288,7 @@ import {
2275
2288
  figure as figure6,
2276
2289
  ffix as ffix7,
2277
2290
  pNumber as pNumber6,
2291
+ pSectionSeparator as pSectionSeparator5,
2278
2292
  initGeom as initGeom6,
2279
2293
  EExtrude as EExtrude5,
2280
2294
  EBVolume as EBVolume6
@@ -2285,18 +2299,21 @@ var pDef6 = {
2285
2299
  //pNumber(name, unit, init, min, max, step)
2286
2300
  pNumber6("L1", "mm", 12500, 100, 4e4, 10),
2287
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),
2288
2308
  pNumber6("L3", "mm", 500, 1, 4e3, 1),
2309
+ pSectionSeparator5("radial"),
2289
2310
  pNumber6("L4", "mm", 600, 1, 4e3, 1),
2290
2311
  pNumber6("L5", "mm", 2e3, 1, 1e4, 1),
2291
2312
  pNumber6("L6", "mm", 2e3, 1, 1e4, 1),
2292
- pNumber6("D1", "mm", 400, 1, 1e3, 1),
2293
2313
  pNumber6("H1", "mm", 100, 1, 400, 1),
2294
- pNumber6("H2", "mm", 100, 1, 400, 1),
2295
2314
  pNumber6("H3", "mm", 100, 1, 400, 1),
2296
- pNumber6("H4", "mm", 100, 1, 400, 1),
2297
- pNumber6("E1", "mm", 5, 1, 80, 1),
2298
- pNumber6("E2", "mm", 3, 1, 80, 1),
2299
2315
  pNumber6("E3", "mm", 3, 1, 80, 1),
2316
+ pSectionSeparator5("rod overlay"),
2300
2317
  pNumber6("rod1", "", 10, 1, 40, 1),
2301
2318
  pNumber6("rod2", "mm", 1300, 10, 4e3, 10),
2302
2319
  pNumber6("rod3", "mm", 400, 10, 1e3, 10),
@@ -2478,34 +2495,39 @@ var pDef7 = {
2478
2495
  //pNumber(name, unit, init, min, max, step)
2479
2496
  pNumber7("H1", "mm", 3e3, 10, 4e4, 10),
2480
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"),
2481
2502
  pNumber7("H3", "mm", 200, 1, 500, 1),
2482
2503
  pNumber7("H4", "mm", 800, 1, 4e3, 1),
2483
2504
  pNumber7("H5", "mm", 3e3, 50, 6e3, 10),
2484
2505
  pNumber7("H6", "mm", 200, 1, 4e3, 1),
2485
2506
  pNumber7("H7", "mm", 800, 1, 4e3, 1),
2486
2507
  pNumber7("H8", "mm", 200, 1, 4e3, 1),
2487
- pNumber7("H9", "mm", 100, 1, 400, 1),
2488
- pNumber7("D1", "mm", 1e3, 20, 4e3, 10),
2489
- pNumber7("D2", "mm", 700, 20, 4e3, 10),
2490
2508
  pNumber7("D3", "mm", 900, 20, 4e3, 10),
2491
2509
  pNumber7("D4", "mm", 400, 20, 4e3, 10),
2492
2510
  pNumber7("D5", "mm", 300, 20, 1e3, 10),
2493
2511
  pNumber7("D6", "mm", 200, 10, 1e3, 10),
2494
2512
  pNumber7("D7", "mm", 400, 10, 1e3, 10),
2495
- pNumber7("D8", "mm", 100, 1, 1e3, 1),
2513
+ pSectionSeparator6("rake diagonal"),
2496
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),
2497
2519
  pNumber7("S1", "mm", 250, 1, 800, 1),
2498
2520
  pNumber7("S2", "mm", 200, 1, 800, 1),
2499
- pNumber7("E1", "mm", 30, 1, 80, 1),
2500
2521
  pNumber7("E2", "mm", 50, 1, 80, 1),
2522
+ pSectionSeparator6("swing"),
2501
2523
  pNumber7("L1", "mm", 12500, 100, 4e4, 10),
2502
2524
  pNumber7("L2", "mm", 6e3, 100, 4e4, 10),
2503
2525
  pNumber7("L3", "mm", 100, 1, 500, 1),
2504
2526
  pNumber7("L4", "mm", 600, 1, 4e3, 1),
2505
2527
  pNumber7("L5", "mm", 2e3, 10, 6e3, 1),
2506
2528
  pNumber7("L6", "mm", 2e3, 1, 6e3, 1),
2507
- pNumber7("L7", "mm", 100, 1, 1e3, 1),
2508
- pNumber7("L8", "mm", 200, 1, 1e3, 1),
2529
+ pNumber7("H9", "mm", 100, 1, 400, 1),
2530
+ pSectionSeparator6("motion amplitude"),
2509
2531
  pNumber7("al", "degree", 80, 0, 95, 1),
2510
2532
  pNumber7("ar", "degree", 80, 0, 95, 1)
2511
2533
  ],
@@ -2792,6 +2814,7 @@ import {
2792
2814
  radToDeg as radToDeg7,
2793
2815
  ffix as ffix10,
2794
2816
  pNumber as pNumber9,
2817
+ pSectionSeparator as pSectionSeparator8,
2795
2818
  initGeom as initGeom9,
2796
2819
  EBVolume as EBVolume9
2797
2820
  } from "geometrix";
@@ -2807,6 +2830,7 @@ import {
2807
2830
  radToDeg as radToDeg6,
2808
2831
  ffix as ffix9,
2809
2832
  pNumber as pNumber8,
2833
+ pSectionSeparator as pSectionSeparator7,
2810
2834
  initGeom as initGeom8,
2811
2835
  EExtrude as EExtrude6,
2812
2836
  EBVolume as EBVolume8
@@ -2823,6 +2847,7 @@ var pDef8 = {
2823
2847
  pNumber8("H3", "mm", 400, 0, 4e3, 1),
2824
2848
  pNumber8("E1", "mm", 20, 1, 80, 1),
2825
2849
  pNumber8("E3", "mm", 30, 1, 80, 1),
2850
+ pSectionSeparator7("transversal"),
2826
2851
  pNumber8("H4", "mm", 200, 1, 1e3, 1),
2827
2852
  pNumber8("D4", "mm", 300, 1, 1e3, 1),
2828
2853
  pNumber8("E4", "mm", 20, 1, 80, 1),
@@ -2831,18 +2856,22 @@ var pDef8 = {
2831
2856
  pNumber8("L4", "mm", 300, 1, 1e3, 1),
2832
2857
  pNumber8("L5", "mm", 2e3, 1, 4e3, 1),
2833
2858
  pNumber8("L6", "mm", 2e3, 1, 4e3, 1),
2859
+ pNumber8("D8", "mm", 400, 1, 1e3, 1),
2860
+ pSectionSeparator7("diagonal"),
2834
2861
  pNumber8("D6", "mm", 100, 1, 600, 1),
2835
2862
  pNumber8("E6", "mm", 10, 1, 80, 1),
2836
2863
  pNumber8("L7", "mm", 100, 1, 1e3, 1),
2837
2864
  pNumber8("L8", "mm", 200, 1, 1e3, 1),
2865
+ pSectionSeparator7("base"),
2838
2866
  pNumber8("N1", "", 24, 3, 100, 1),
2839
2867
  pNumber8("D7", "mm", 40, 1, 100, 1),
2840
2868
  pNumber8("L1", "mm", 30, 1, 300, 1),
2841
- pNumber8("D8", "mm", 400, 1, 1e3, 1),
2869
+ pSectionSeparator7("door"),
2842
2870
  pNumber8("H6", "mm", 100, 1, 1e3, 1),
2843
2871
  pNumber8("H7", "mm", 600, 1, 2e3, 1),
2844
2872
  pNumber8("L9", "mm", 300, 1, 1e3, 1),
2845
2873
  pNumber8("R9", "mm", 50, 0, 300, 1),
2874
+ pSectionSeparator7("stopper"),
2846
2875
  pNumber8("S1", "mm", 100, 1, 300, 1),
2847
2876
  pNumber8("S2", "mm", 2e3, 1, 8e3, 1),
2848
2877
  pNumber8("E7", "mm", 5, 1, 80, 1)
@@ -3160,7 +3189,7 @@ function pGeom8(t, param, suffix = "") {
3160
3189
  }
3161
3190
  var rakeStopperDef = {
3162
3191
  pTitle: "Heliostat rake with stopper",
3163
- pDescription: "The rake-stopper on top of the pole-rotor of the heliostat",
3192
+ pDescription: "The rake-stopper on top of the V-Axis of the heliostat",
3164
3193
  pDef: pDef8,
3165
3194
  pGeom: pGeom8
3166
3195
  };
@@ -3172,31 +3201,36 @@ var pDef9 = {
3172
3201
  //pNumber(name, unit, init, min, max, step)
3173
3202
  pNumber9("H1", "mm", 3e3, 10, 4e4, 10),
3174
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"),
3175
3208
  pNumber9("H3", "mm", 200, 1, 500, 1),
3176
3209
  pNumber9("H4", "mm", 800, 1, 4e3, 1),
3177
3210
  pNumber9("H5", "mm", 3e3, 50, 6e3, 10),
3178
3211
  pNumber9("H6", "mm", 200, 1, 4e3, 1),
3179
3212
  pNumber9("H7", "mm", 400, 1, 4e3, 1),
3180
- pNumber9("H9", "mm", 100, 1, 400, 1),
3181
- pNumber9("D1", "mm", 1e3, 20, 4e3, 10),
3182
- pNumber9("D2", "mm", 700, 20, 4e3, 10),
3183
3213
  pNumber9("D3", "mm", 900, 20, 4e3, 10),
3184
3214
  pNumber9("D4", "mm", 400, 20, 4e3, 10),
3185
3215
  pNumber9("D5", "mm", 300, 20, 1e3, 10),
3186
3216
  pNumber9("D6", "mm", 200, 10, 1e3, 10),
3187
3217
  pNumber9("D7", "mm", 400, 10, 1e3, 10),
3218
+ pSectionSeparator8("rake diagonal"),
3188
3219
  pNumber9("D9", "mm", 100, 1, 1e3, 1),
3189
- pNumber9("E1", "mm", 30, 1, 80, 1),
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"),
3190
3225
  pNumber9("L1", "mm", 12500, 100, 4e4, 10),
3191
3226
  pNumber9("L2", "mm", 6e3, 100, 4e4, 10),
3192
3227
  pNumber9("L3", "mm", 100, 1, 500, 1),
3193
3228
  pNumber9("L4", "mm", 600, 1, 4e3, 1),
3194
3229
  pNumber9("L5", "mm", 2e3, 10, 6e3, 10),
3195
3230
  pNumber9("L6", "mm", 2e3, 1, 6e3, 1),
3196
- pNumber9("L7", "mm", 100, 1, 1e3, 1),
3197
- pNumber9("L8", "mm", 200, 1, 1e3, 1),
3198
- pNumber9("al", "degree", 80, 0, 95, 1),
3199
- 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)
3200
3234
  ],
3201
3235
  paramSvg: {
3202
3236
  H1: "heliostat_overview.svg",
@@ -3444,6 +3478,7 @@ import {
3444
3478
  figure as figure10,
3445
3479
  ffix as ffix11,
3446
3480
  pNumber as pNumber10,
3481
+ pSectionSeparator as pSectionSeparator9,
3447
3482
  initGeom as initGeom10,
3448
3483
  EExtrude as EExtrude7,
3449
3484
  EBVolume as EBVolume10
@@ -3461,9 +3496,11 @@ var pDef10 = {
3461
3496
  pNumber10("E3", "mm", 30, 1, 80, 1),
3462
3497
  pNumber10("H1", "mm", 800, 10, 4e3, 10),
3463
3498
  pNumber10("H2", "mm", 50, 1, 4e3, 1),
3499
+ pSectionSeparator9("side holes"),
3464
3500
  pNumber10("H3", "mm", 400, 10, 4e3, 10),
3465
3501
  pNumber10("N2", "", 12, 1, 100, 1),
3466
3502
  pNumber10("L2", "mm", 100, 1, 400, 1),
3503
+ pSectionSeparator9("base holes"),
3467
3504
  pNumber10("N1", "", 24, 3, 100, 1),
3468
3505
  pNumber10("D5", "mm", 40, 1, 100, 1),
3469
3506
  pNumber10("L1", "mm", 34, 1, 300, 1)
@@ -3647,19 +3684,20 @@ var baseDef = {
3647
3684
  pGeom: pGeom10
3648
3685
  };
3649
3686
 
3650
- // src/heliostat/pole_rotor.ts
3687
+ // src/heliostat/vaxis.ts
3651
3688
  import {
3652
3689
  contour as contour10,
3653
3690
  contourCircle as contourCircle9,
3654
3691
  figure as figure11,
3655
3692
  ffix as ffix12,
3656
3693
  pNumber as pNumber11,
3694
+ pSectionSeparator as pSectionSeparator10,
3657
3695
  initGeom as initGeom11,
3658
3696
  EExtrude as EExtrude8,
3659
3697
  EBVolume as EBVolume11
3660
3698
  } from "geometrix";
3661
3699
  var pDef11 = {
3662
- partName: "pole_rotor",
3700
+ partName: "vaxis",
3663
3701
  params: [
3664
3702
  //pNumber(name, unit, init, min, max, step)
3665
3703
  pNumber11("D1", "mm", 600, 1, 4e3, 1),
@@ -3667,19 +3705,20 @@ var pDef11 = {
3667
3705
  pNumber11("H1", "mm", 8e3, 10, 4e4, 10),
3668
3706
  pNumber11("E1", "mm", 5, 1, 80, 1),
3669
3707
  pNumber11("E2", "mm", 30, 1, 80, 1),
3708
+ pSectionSeparator10("base holes"),
3670
3709
  pNumber11("N1", "", 24, 3, 100, 1),
3671
3710
  pNumber11("D3", "mm", 40, 1, 100, 1),
3672
3711
  pNumber11("L1", "mm", 45, 1, 300, 1)
3673
3712
  ],
3674
3713
  paramSvg: {
3675
- D1: "pole_rotor_cut.svg",
3676
- D2: "pole_rotor_cut.svg",
3677
- H1: "pole_rotor_cut.svg",
3678
- E1: "pole_rotor_cut.svg",
3679
- E2: "pole_rotor_cut.svg",
3680
- N1: "pole_rotor_ends.svg",
3681
- D3: "pole_rotor_ends.svg",
3682
- L1: "pole_rotor_ends.svg"
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"
3683
3722
  },
3684
3723
  sim: {
3685
3724
  tMax: 180,
@@ -3699,7 +3738,7 @@ function pGeom11(t, param, suffix = "") {
3699
3738
  const R1 = param.D1 / 2;
3700
3739
  const R2 = param.D2 / 2;
3701
3740
  const R3 = param.D3 / 2;
3702
- rGeome.logstr += `pole-height: ${ffix12(param.H1)} mm
3741
+ rGeome.logstr += `vaxis-height: ${ffix12(param.H1)} mm
3703
3742
  `;
3704
3743
  const ctrCylinder = contour10(R1, 0).addSegStrokeA(R1, param.H1).addSegStrokeA(R1 - param.E1, param.H1).addSegStrokeA(R1 - param.E1, 0).closeSegStroke();
3705
3744
  figCut.addMain(ctrCylinder);
@@ -3763,7 +3802,7 @@ function pGeom11(t, param, suffix = "") {
3763
3802
  ]
3764
3803
  };
3765
3804
  rGeome.sub = {};
3766
- rGeome.logstr += "pole_rotor drawn successfully!\n";
3805
+ rGeome.logstr += "V-Axis drawn successfully!\n";
3767
3806
  rGeome.calcErr = false;
3768
3807
  } catch (emsg) {
3769
3808
  rGeome.logstr += emsg;
@@ -3771,56 +3810,53 @@ function pGeom11(t, param, suffix = "") {
3771
3810
  }
3772
3811
  return rGeome;
3773
3812
  }
3774
- var poleRotorDef = {
3775
- pTitle: "Heliostat pole rotor",
3813
+ var vaxisDef = {
3814
+ pTitle: "Heliostat V-Axis",
3776
3815
  pDescription: "The vertical axis inside the pole of an heliostat",
3777
3816
  pDef: pDef11,
3778
3817
  pGeom: pGeom11
3779
3818
  };
3780
3819
 
3781
- // src/heliostat/rod.ts
3820
+ // src/heliostat/ring.ts
3782
3821
  import {
3783
3822
  contour as contour11,
3784
3823
  contourCircle as contourCircle10,
3785
3824
  figure as figure12,
3786
3825
  ffix as ffix13,
3787
3826
  pNumber as pNumber12,
3827
+ pSectionSeparator as pSectionSeparator11,
3788
3828
  initGeom as initGeom12,
3789
3829
  EExtrude as EExtrude9,
3790
3830
  EBVolume as EBVolume12
3791
3831
  } from "geometrix";
3792
3832
  var pDef12 = {
3793
- partName: "rod",
3833
+ partName: "ring",
3794
3834
  params: [
3795
3835
  //pNumber(name, unit, init, min, max, step)
3796
- pNumber12("L1", "mm", 1e4, 100, 4e4, 10),
3797
- pNumber12("L2", "mm", 100, 2, 400, 1),
3798
- pNumber12("L3", "mm", 400, 10, 1e3, 1),
3799
- pNumber12("L4", "mm", 600, 10, 1e3, 1),
3800
- pNumber12("H1", "mm", 200, 5, 4e3, 1),
3801
- pNumber12("E1", "mm", 2, 1, 80, 1),
3802
- pNumber12("E2", "mm", 10, 1, 80, 1),
3803
- pNumber12("N1", "", 10, 2, 50, 1),
3804
- pNumber12("N3", "", 2, 1, 20, 1),
3805
- pNumber12("N4", "", 4, 1, 20, 1),
3806
- pNumber12("R3", "mm", 100, 1, 500, 1),
3807
- pNumber12("D2", "mm", 10, 1, 100, 1),
3808
- 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)
3809
3848
  ],
3810
3849
  paramSvg: {
3811
- L1: "rod_top.svg",
3812
- L2: "rod_top.svg",
3813
- L3: "rod_top.svg",
3814
- L4: "rod_top.svg",
3815
- H1: "rod_cut.svg",
3816
- E1: "rod_cut.svg",
3817
- E2: "rod_cut.svg",
3818
- N1: "rod_top.svg",
3819
- N3: "rod_top.svg",
3820
- N4: "rod_top.svg",
3821
- R3: "rod_top.svg",
3822
- D2: "rod_plate.svg",
3823
- 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"
3824
3860
  },
3825
3861
  sim: {
3826
3862
  tMax: 180,
@@ -3831,94 +3867,109 @@ var pDef12 = {
3831
3867
  };
3832
3868
  function pGeom12(t, param, suffix = "") {
3833
3869
  const rGeome = initGeom12(pDef12.partName + suffix);
3834
- let ctrPlate;
3835
- let ctrRod;
3836
- const figCut = figure12();
3837
- const figPlate = figure12();
3838
- const figTop = figure12();
3870
+ const figRingBase = figure12();
3871
+ const figRingTeeth = figure12();
3872
+ const figSection = figure12();
3839
3873
  rGeome.logstr += `${rGeome.partName} simTime: ${t}
3840
3874
  `;
3841
3875
  try {
3876
+ const R1 = param.D1 / 2;
3842
3877
  const R2 = param.D2 / 2;
3843
- const n3step = param.L3 / (param.N3 + 1);
3844
- const n4step = param.L4 / (param.N4 + 1);
3845
- rGeome.logstr += `rod-length: ${ffix13(param.L1)} mm
3846
- `;
3847
- const space_length = (param.L1 - param.L3) / (param.N1 - 1);
3848
- rGeome.logstr += `space-length: ${ffix13(space_length)} mm
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
3849
3890
  `;
3850
- ctrPlate = function(py) {
3851
- const rPlate = [];
3852
- const plateExt = contour11(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();
3853
- rPlate.push(plateExt);
3854
- for (let i = 1; i < param.N3 + 1; i++) {
3855
- rPlate.push(contourCircle10(param.L4 / 2 - param.L7, py + i * n3step, R2));
3856
- rPlate.push(contourCircle10(-param.L4 / 2 + param.L7, py + i * n3step, R2));
3857
- }
3858
- for (let i = 1; i < param.N4 + 1; i++) {
3859
- rPlate.push(contourCircle10(-param.L4 / 2 + i * n4step, py + param.L7, R2));
3860
- rPlate.push(
3861
- contourCircle10(-param.L4 / 2 + i * n4step, py + param.L3 - param.L7, R2)
3862
- );
3863
- }
3864
- return rPlate;
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;
3865
3922
  };
3866
- ctrRod = function(py, ly) {
3867
- const rRod = contour11(param.L2 / 2, py).addSegStrokeA(param.L2 / 2, py + ly).addSegStrokeA(-param.L2 / 2, py + ly).addSegStrokeA(-param.L2 / 2, py).closeSegStroke();
3868
- return rRod;
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;
3869
3926
  };
3870
- const L2h = param.L2 / 2;
3871
- const L4h = param.L4 / 2;
3872
- const L2hi = (param.L2 - 2 * param.E1) / 2;
3873
- const H1i = param.H1 - param.E1;
3874
- const ctrRodExt = contour11(L2h, 0).addSegStrokeA(L2h, param.H1).addSegStrokeA(-L2h, param.H1).addSegStrokeA(-L2h, 0).closeSegStroke();
3875
- const ctrRodInt = contour11(L2hi, param.E1).addSegStrokeA(L2hi, H1i).addSegStrokeA(-L2hi, H1i).addSegStrokeA(-L2hi, param.E1).closeSegStroke();
3876
- const ctrPlateSide = contour11(L4h, param.H1).addSegStrokeA(L4h, param.H1 + param.E2).addSegStrokeA(-L4h, param.H1 + param.E2).addSegStrokeA(-L4h, param.H1).closeSegStroke();
3877
- figCut.addMain(ctrRodExt);
3878
- figCut.addMain(ctrRodInt);
3879
- figCut.addSecond(ctrPlateSide);
3880
- ctrPlate(0).forEach((ctr) => figPlate.addMain(ctr));
3881
- figPlate.addSecond(ctrRod(-param.L3 / 2, 2 * param.L3));
3882
- const plateStep = (param.L1 - param.L3) / (param.N1 - 1);
3883
- for (let i = 0; i < param.N1; i++) {
3884
- ctrPlate(i * plateStep).forEach((ctr) => figTop.addMain(ctr));
3885
- }
3886
- 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));
3887
3938
  rGeome.fig = {
3888
- faceCut: figCut,
3889
- facePlate: figPlate,
3890
- faceTop: figTop
3939
+ faceRingBase: figRingBase,
3940
+ faceRingTeeth: figRingTeeth,
3941
+ faceSection: figSection
3891
3942
  };
3892
3943
  const designName = rGeome.partName;
3893
3944
  rGeome.vol = {
3894
3945
  extrudes: [
3895
3946
  {
3896
- outName: `subpax_${designName}_rod`,
3897
- face: `${designName}_faceCut`,
3947
+ outName: `subpax_${designName}_base`,
3948
+ face: `${designName}_faceRingBase`,
3898
3949
  extrudeMethod: EExtrude9.eLinearOrtho,
3899
- length: param.L1,
3950
+ length: param.H1,
3900
3951
  rotate: [0, 0, 0],
3901
3952
  translate: [0, 0, 0]
3902
3953
  },
3903
3954
  {
3904
- outName: `subpax_${designName}_plates`,
3905
- face: `${designName}_faceTop`,
3955
+ outName: `subpax_${designName}_teeth`,
3956
+ face: `${designName}_faceRingTeeth`,
3906
3957
  extrudeMethod: EExtrude9.eLinearOrtho,
3907
- length: param.E2,
3908
- rotate: [Math.PI / 2, 0, 0],
3909
- translate: [0, param.E2 + param.H1, 0]
3958
+ length: ringHeight,
3959
+ rotate: [0, 0, 0],
3960
+ translate: [0, 0, 0]
3910
3961
  }
3911
3962
  ],
3912
3963
  volumes: [
3913
3964
  {
3914
3965
  outName: `pax_${designName}`,
3915
3966
  boolMethod: EBVolume12.eUnion,
3916
- inList: [`subpax_${designName}_rod`, `subpax_${designName}_plates`]
3967
+ inList: [`subpax_${designName}_base`, `subpax_${designName}_teeth`]
3917
3968
  }
3918
3969
  ]
3919
3970
  };
3920
3971
  rGeome.sub = {};
3921
- rGeome.logstr += "heliostat-rod drawn successfully!\n";
3972
+ rGeome.logstr += "ring drawn successfully!\n";
3922
3973
  rGeome.calcErr = false;
3923
3974
  } catch (emsg) {
3924
3975
  rGeome.logstr += emsg;
@@ -3926,73 +3977,218 @@ function pGeom12(t, param, suffix = "") {
3926
3977
  }
3927
3978
  return rGeome;
3928
3979
  }
3929
- var rodDef = {
3930
- pTitle: "Heliostat rod",
3931
- pDescription: "The rod of an heliostat-surface",
3980
+ var ringDef = {
3981
+ pTitle: "Heliostat ring",
3982
+ pDescription: "The gear ring for adjusting the azimuth of the heliostat",
3932
3983
  pDef: pDef12,
3933
3984
  pGeom: pGeom12
3934
3985
  };
3935
3986
 
3936
- // src/heliostat/trapeze.ts
3987
+ // src/heliostat/vaxis_holder.ts
3937
3988
  import {
3938
- contour as contour12,
3989
+ point as point4,
3990
+ contour as contour13,
3939
3991
  contourCircle as contourCircle11,
3940
3992
  figure as figure13,
3941
- radToDeg as radToDeg8,
3942
- ffix as ffix14,
3993
+ degToRad as degToRad5,
3994
+ ffix as ffix15,
3943
3995
  pNumber as pNumber13,
3996
+ pSectionSeparator as pSectionSeparator12,
3944
3997
  initGeom as initGeom13,
3998
+ transform3d,
3945
3999
  EExtrude as EExtrude10,
3946
4000
  EBVolume as EBVolume13
3947
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
3948
4156
  var pDef13 = {
3949
- partName: "trapeze",
4157
+ partName: "vaxis_holder",
3950
4158
  params: [
3951
4159
  //pNumber(name, unit, init, min, max, step)
3952
- pNumber13("L1", "mm", 1600, 10, 4e3, 1),
3953
- pNumber13("L2", "mm", 1e3, 10, 4e3, 1),
3954
- pNumber13("L3", "mm", 400, 5, 800, 1),
3955
- pNumber13("L4", "mm", 300, 5, 800, 1),
3956
- pNumber13("N1", "", 7, 1, 20, 1),
3957
- pNumber13("N2", "", 4, 1, 20, 1),
3958
- pNumber13("N3", "", 2, 1, 20, 1),
3959
- pNumber13("N4", "", 2, 1, 20, 1),
3960
- pNumber13("L5", "mm", 100, 1, 400, 1),
3961
- pNumber13("L6", "mm", 20, 1, 400, 1),
3962
- pNumber13("L7", "mm", 20, 1, 400, 1),
3963
- pNumber13("D1", "mm", 10, 1, 40, 1),
3964
- pNumber13("D2", "mm", 10, 1, 40, 1),
3965
- pNumber13("D3", "mm", 30, 1, 100, 1),
3966
- pNumber13("D4", "mm", 26, 1, 100, 1),
3967
- pNumber13("R1", "mm", 60, 1, 400, 1),
3968
- pNumber13("R2", "mm", 20, 1, 400, 1),
3969
- pNumber13("R3", "mm", 20, 1, 400, 1),
3970
- pNumber13("H1", "mm", 300, 0.5, 800, 0.5),
3971
- pNumber13("H2", "mm", 2, 0.5, 800, 0.5),
3972
- 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)
3973
4176
  ],
3974
4177
  paramSvg: {
3975
- L1: "trapeze_top.svg",
3976
- L2: "trapeze_top.svg",
3977
- L3: "trapeze_top.svg",
3978
- L4: "trapeze_top.svg",
3979
- N1: "trapeze_top.svg",
3980
- N2: "trapeze_top.svg",
3981
- N3: "trapeze_top.svg",
3982
- N4: "trapeze_top.svg",
3983
- L5: "trapeze_top.svg",
3984
- L6: "trapeze_top.svg",
3985
- L7: "trapeze_top.svg",
3986
- D1: "trapeze_top.svg",
3987
- D2: "trapeze_top.svg",
3988
- D3: "trapeze_rod.svg",
3989
- D4: "trapeze_rod.svg",
3990
- R1: "trapeze_top.svg",
3991
- R2: "trapeze_top.svg",
3992
- R3: "trapeze_top.svg",
3993
- H1: "trapeze_side.svg",
3994
- H2: "trapeze_side.svg",
3995
- 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"
3996
4192
  },
3997
4193
  sim: {
3998
4194
  tMax: 180,
@@ -4003,123 +4199,815 @@ var pDef13 = {
4003
4199
  };
4004
4200
  function pGeom13(t, param, suffix = "") {
4005
4201
  const rGeome = initGeom13(pDef13.partName + suffix);
4006
- let ctrRodFootprint;
4007
- let ctrRod;
4008
- const figFrame = figure13();
4009
- const figPlate = figure13();
4010
- const figRod = figure13();
4011
- const figRodHollow = figure13();
4012
- const figCutRod = figure13();
4202
+ const figOuter = figure13();
4203
+ const figPetal = figure13();
4204
+ const figButtress1 = figure13();
4205
+ const figButtress2 = figure13();
4013
4206
  rGeome.logstr += `${rGeome.partName} simTime: ${t}
4014
4207
  `;
4015
4208
  try {
4016
- if (param.L3 > param.L1 - param.L5) {
4017
- throw `err595: L3 ${param.L3} too large compare to L1 ${param.L1} and L5 ${param.L5}`;
4018
- }
4019
- if (param.L4 > param.L2 - param.L5) {
4020
- throw `err596: L4 ${param.L4} too large compare to L2 ${param.L2} and L5 ${param.L5}`;
4021
- }
4022
- if (param.H1 - param.H2 - param.H3 < 4 * param.D3) {
4023
- throw `err597: H1 ${param.H1} too small compare to H2 ${param.H2}, H3 ${param.H3} and D3 ${param.D3}`;
4024
- }
4025
- const pad1 = param.R1 * (1 - 1 / Math.sqrt(2));
4026
- const pad3 = param.R3 * (1 - 1 / Math.sqrt(2));
4027
- const rod_x = param.L2 / 2 - pad1 - (param.L4 / 2 - pad3);
4028
- const rod_y = param.L1 / 2 - pad1 - (param.L3 / 2 - pad3);
4029
- const rod_xy = Math.sqrt(rod_x ** 2 + rod_y ** 2);
4030
- const rod_z = param.H1 - param.H2 - param.H3;
4031
- const rod_slope_length = Math.sqrt(rod_xy ** 2 + rod_z ** 2);
4032
- const rod_slope_angle = Math.atan2(rod_z, rod_xy);
4033
- const rod_xy_angle = Math.atan2(rod_y, rod_x);
4034
- rGeome.logstr += `rod-slope: length: ${ffix14(rod_slope_length)} mm, angle: ${ffix14(
4035
- radToDeg8(rod_slope_angle)
4036
- )} 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
4037
4226
  `;
4038
- rGeome.logstr += `rod-xy-angle: ${ffix14(radToDeg8(rod_xy_angle))} degree
4227
+ rGeome.logstr += `vaxis_holder outerD1: ${ffix15(2 * outerR1)} mm
4039
4228
  `;
4040
- const rodFootprintLength = param.D3 / Math.cos(Math.PI / 2 - rod_slope_angle);
4041
- rGeome.logstr += `rod-footprint-length: ${ffix14(rodFootprintLength)} mm
4229
+ rGeome.logstr += `vaxis_holder outerD2: ${ffix15(2 * outerR2)} mm
4042
4230
  `;
4043
- const rodFPl = Math.sqrt((rodFootprintLength / 2) ** 2 + (param.D3 / 2) ** 2);
4044
- const rodFPa = Math.atan2(param.D3, rodFootprintLength);
4045
- ctrRodFootprint = function(px, py, angle) {
4046
- const rCtr = contour12(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);
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();
4047
4237
  return rCtr;
4048
4238
  };
4049
- ctrRod = function(px, py, angle) {
4050
- const px0 = px + rodFPl * Math.cos(angle + Math.PI - rodFPa);
4051
- const py0 = py + rodFPl * Math.sin(angle + Math.PI - rodFPa);
4052
- 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();
4053
4241
  return rCtr;
4054
4242
  };
4055
- if (param.R1 > param.L1 / 4 || param.R1 > param.L2 / 4) {
4056
- throw `err614: R1 ${param.R1} too large compare to L1 ${param.L1} or L2 ${param.L2}`;
4057
- }
4058
- const ctrFrameExt = contour12(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);
4059
- if (param.R2 > (param.L1 - 2 * param.L5) / 4 || param.R2 > (param.L2 - 2 * param.L5) / 4) {
4060
- throw `err627: R2 ${param.R2} too large compare to L1 ${param.L1}, L2 ${param.L2} and L5 ${param.L5}`;
4061
- }
4062
- const ctrFrameInt = contour12(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);
4063
- if (param.R3 > param.L3 / 4 || param.R3 > param.L4 / 4) {
4064
- throw `err639: R3 ${param.R3} too large compare to L3 ${param.L3} or L4 ${param.L4}`;
4065
- }
4066
- const ctrPlate = contour12(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);
4067
- figFrame.addMain(ctrFrameExt);
4068
- figFrame.addMain(ctrFrameInt);
4069
- figFrame.addSecond(ctrPlate);
4070
- const step1 = param.L1 / (param.N1 + 1);
4071
- const step2 = param.L2 / (param.N2 + 1);
4072
- const step3 = param.L3 / (param.N3 + 1);
4073
- const step4 = param.L4 / (param.N4 + 1);
4074
- if (param.L5 < param.D1 / 2 + param.L6) {
4075
- throw `err658: L5 ${param.L5} too small compare to D1 ${param.D1} or L6 ${param.L6}`;
4076
- }
4077
- if (step3 < param.D2 / 2 + param.L7) {
4078
- throw `err661: D2 ${param.D2} or L7 ${param.L7} too large compare to L3 ${param.l3}`;
4079
- }
4080
- if (step4 < param.D2 / 2 + param.L7) {
4081
- throw `err664: D2 ${param.D2} or L7 ${param.L7} too large compare to L4 ${param.l4}`;
4082
- }
4083
- const lFrameHole = [];
4084
- for (let i = 1; i < param.N1 + 1; i++) {
4085
- lFrameHole.push(
4086
- contourCircle11(param.L2 / 2 - param.L6, -param.L1 / 2 + i * step1, param.D1 / 2)
4087
- );
4088
- lFrameHole.push(
4089
- contourCircle11(-param.L2 / 2 + param.L6, -param.L1 / 2 + i * step1, param.D1 / 2)
4090
- );
4091
- }
4092
- for (let i = 1; i < param.N2 + 1; i++) {
4093
- lFrameHole.push(
4094
- contourCircle11(-param.L2 / 2 + i * step2, param.L1 / 2 - param.L6, param.D1 / 2)
4095
- );
4096
- lFrameHole.push(
4097
- contourCircle11(-param.L2 / 2 + i * step2, -param.L1 / 2 + param.L6, param.D1 / 2)
4098
- );
4099
- }
4100
- const lPlateHole = [];
4101
- for (let i = 1; i < param.N3 + 1; i++) {
4102
- lPlateHole.push(
4103
- contourCircle11(param.L4 / 2 - param.L7, -param.L3 / 2 + i * step3, param.D2 / 2)
4104
- );
4105
- lPlateHole.push(
4106
- contourCircle11(-param.L4 / 2 + param.L7, -param.L3 / 2 + i * step3, param.D2 / 2)
4107
- );
4108
- }
4109
- for (let i = 1; i < param.N4 + 1; i++) {
4110
- lPlateHole.push(
4111
- contourCircle11(-param.L4 / 2 + i * step4, param.L3 / 2 - param.L7, param.D2 / 2)
4112
- );
4113
- lPlateHole.push(
4114
- contourCircle11(-param.L4 / 2 + i * step4, -param.L3 / 2 + param.L7, param.D2 / 2)
4115
- );
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));
4116
4284
  }
4117
- lFrameHole.forEach((ctr) => {
4118
- figFrame.addMain(ctr);
4119
- });
4120
- lPlateHole.forEach((ctr) => {
4121
- figFrame.addSecond(ctr);
4122
- });
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);
5010
+ });
4123
5011
  const lRodFP = [];
4124
5012
  lRodFP.push(ctrRodFootprint(param.L2 / 2 - pad1, param.L1 / 2 - pad1, rod_xy_angle));
4125
5013
  lRodFP.push(ctrRodFootprint(param.L4 / 2 - pad3, param.L3 / 2 - pad3, rod_xy_angle));
@@ -4166,17 +5054,17 @@ function pGeom13(t, param, suffix = "") {
4166
5054
  if (param.D4 >= param.D3) {
4167
5055
  throw `err218: D4 ${param.D4} larger than D3 ${param.D3}`;
4168
5056
  }
4169
- figRod.addMain(contourCircle11(0, 0, param.D3 / 2));
4170
- figRod.addSecond(contourCircle11(0, 0, param.D4 / 2));
4171
- figRodHollow.addMain(contourCircle11(0, 0, param.D4 / 2));
4172
- figRodHollow.addSecond(contourCircle11(0, 0, param.D3 / 2));
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));
4173
5061
  const rodFootprintHeight = param.D3 * Math.cos(rod_slope_angle);
4174
5062
  const rodFootprintBack = rodFootprintHeight / Math.tan(rod_slope_angle);
4175
5063
  const pad3x = pad3 + (rodFootprintLength / 2 + rodFootprintBack) * Math.cos(rod_xy_angle);
4176
5064
  const pad3y = pad3 + (rodFootprintLength / 2 + rodFootprintBack) * Math.sin(rod_xy_angle);
4177
5065
  const rodExtrudeLength = rod_slope_length + 2 * (rodFootprintLength + rodFootprintBack + rodFootprintHeight);
4178
5066
  const cutL = rodExtrudeLength + param.L3 + param.L4 + rodFootprintHeight;
4179
- const ctrCutRod = contour12(cutL, cutL).addSegStrokeA(-cutL, cutL).addSegStrokeA(-cutL, -cutL).addSegStrokeA(cutL, -cutL).closeSegStroke();
5067
+ const ctrCutRod = contour17(cutL, cutL).addSegStrokeA(-cutL, cutL).addSegStrokeA(-cutL, -cutL).addSegStrokeA(cutL, -cutL).closeSegStroke();
4180
5068
  figCutRod.addMain(ctrCutRod);
4181
5069
  rGeome.fig = {
4182
5070
  faceFrame: figFrame,
@@ -4191,7 +5079,7 @@ function pGeom13(t, param, suffix = "") {
4191
5079
  {
4192
5080
  outName: `subpax_${designName}_frame`,
4193
5081
  face: `${designName}_faceFrame`,
4194
- extrudeMethod: EExtrude10.eLinearOrtho,
5082
+ extrudeMethod: EExtrude14.eLinearOrtho,
4195
5083
  length: param.H2,
4196
5084
  rotate: [0, 0, 0],
4197
5085
  translate: [0, 0, param.H1 - param.H2]
@@ -4199,7 +5087,7 @@ function pGeom13(t, param, suffix = "") {
4199
5087
  {
4200
5088
  outName: `subpax_${designName}_plate`,
4201
5089
  face: `${designName}_facePlate`,
4202
- extrudeMethod: EExtrude10.eLinearOrtho,
5090
+ extrudeMethod: EExtrude14.eLinearOrtho,
4203
5091
  length: param.H3,
4204
5092
  rotate: [0, 0, 0],
4205
5093
  translate: [0, 0, 0]
@@ -4207,7 +5095,7 @@ function pGeom13(t, param, suffix = "") {
4207
5095
  {
4208
5096
  outName: `subpax_${designName}_rod1`,
4209
5097
  face: `${designName}_faceRod`,
4210
- extrudeMethod: EExtrude10.eLinearOrtho,
5098
+ extrudeMethod: EExtrude14.eLinearOrtho,
4211
5099
  length: rodExtrudeLength,
4212
5100
  rotate: [0, Math.PI / 2 - rod_slope_angle, rod_xy_angle],
4213
5101
  translate: [
@@ -4219,7 +5107,7 @@ function pGeom13(t, param, suffix = "") {
4219
5107
  {
4220
5108
  outName: `subpax_${designName}_rod2`,
4221
5109
  face: `${designName}_faceRod`,
4222
- extrudeMethod: EExtrude10.eLinearOrtho,
5110
+ extrudeMethod: EExtrude14.eLinearOrtho,
4223
5111
  length: rodExtrudeLength,
4224
5112
  rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI - rod_xy_angle],
4225
5113
  translate: [
@@ -4231,7 +5119,7 @@ function pGeom13(t, param, suffix = "") {
4231
5119
  {
4232
5120
  outName: `subpax_${designName}_rod3`,
4233
5121
  face: `${designName}_faceRod`,
4234
- extrudeMethod: EExtrude10.eLinearOrtho,
5122
+ extrudeMethod: EExtrude14.eLinearOrtho,
4235
5123
  length: rodExtrudeLength,
4236
5124
  rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI + rod_xy_angle],
4237
5125
  translate: [
@@ -4243,7 +5131,7 @@ function pGeom13(t, param, suffix = "") {
4243
5131
  {
4244
5132
  outName: `subpax_${designName}_rod4`,
4245
5133
  face: `${designName}_faceRod`,
4246
- extrudeMethod: EExtrude10.eLinearOrtho,
5134
+ extrudeMethod: EExtrude14.eLinearOrtho,
4247
5135
  length: rodExtrudeLength,
4248
5136
  rotate: [0, Math.PI / 2 - rod_slope_angle, -rod_xy_angle],
4249
5137
  translate: [
@@ -4255,7 +5143,7 @@ function pGeom13(t, param, suffix = "") {
4255
5143
  {
4256
5144
  outName: `subpax_${designName}_rodH1`,
4257
5145
  face: `${designName}_faceRodHollow`,
4258
- extrudeMethod: EExtrude10.eLinearOrtho,
5146
+ extrudeMethod: EExtrude14.eLinearOrtho,
4259
5147
  length: rodExtrudeLength,
4260
5148
  rotate: [0, Math.PI / 2 - rod_slope_angle, rod_xy_angle],
4261
5149
  translate: [
@@ -4267,7 +5155,7 @@ function pGeom13(t, param, suffix = "") {
4267
5155
  {
4268
5156
  outName: `subpax_${designName}_rodH2`,
4269
5157
  face: `${designName}_faceRodHollow`,
4270
- extrudeMethod: EExtrude10.eLinearOrtho,
5158
+ extrudeMethod: EExtrude14.eLinearOrtho,
4271
5159
  length: rodExtrudeLength,
4272
5160
  rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI - rod_xy_angle],
4273
5161
  translate: [
@@ -4279,7 +5167,7 @@ function pGeom13(t, param, suffix = "") {
4279
5167
  {
4280
5168
  outName: `subpax_${designName}_rodH3`,
4281
5169
  face: `${designName}_faceRodHollow`,
4282
- extrudeMethod: EExtrude10.eLinearOrtho,
5170
+ extrudeMethod: EExtrude14.eLinearOrtho,
4283
5171
  length: rodExtrudeLength,
4284
5172
  rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI + rod_xy_angle],
4285
5173
  translate: [
@@ -4291,7 +5179,7 @@ function pGeom13(t, param, suffix = "") {
4291
5179
  {
4292
5180
  outName: `subpax_${designName}_rodH4`,
4293
5181
  face: `${designName}_faceRodHollow`,
4294
- extrudeMethod: EExtrude10.eLinearOrtho,
5182
+ extrudeMethod: EExtrude14.eLinearOrtho,
4295
5183
  length: rodExtrudeLength,
4296
5184
  rotate: [0, Math.PI / 2 - rod_slope_angle, -rod_xy_angle],
4297
5185
  translate: [
@@ -4303,7 +5191,7 @@ function pGeom13(t, param, suffix = "") {
4303
5191
  {
4304
5192
  outName: `subpax_${designName}_cut1`,
4305
5193
  face: `${designName}_faceCutRod`,
4306
- extrudeMethod: EExtrude10.eLinearOrtho,
5194
+ extrudeMethod: EExtrude14.eLinearOrtho,
4307
5195
  length: cutL,
4308
5196
  rotate: [0, 0, 0],
4309
5197
  translate: [0, 0, -cutL]
@@ -4311,7 +5199,7 @@ function pGeom13(t, param, suffix = "") {
4311
5199
  {
4312
5200
  outName: `subpax_${designName}_cut2`,
4313
5201
  face: `${designName}_faceCutRod`,
4314
- extrudeMethod: EExtrude10.eLinearOrtho,
5202
+ extrudeMethod: EExtrude14.eLinearOrtho,
4315
5203
  length: cutL,
4316
5204
  rotate: [0, 0, 0],
4317
5205
  translate: [0, 0, param.H1]
@@ -4320,7 +5208,7 @@ function pGeom13(t, param, suffix = "") {
4320
5208
  volumes: [
4321
5209
  {
4322
5210
  outName: `ipax_${designName}_rawRod`,
4323
- boolMethod: EBVolume13.eUnion,
5211
+ boolMethod: EBVolume17.eUnion,
4324
5212
  inList: [
4325
5213
  `subpax_${designName}_rod1`,
4326
5214
  `subpax_${designName}_rod2`,
@@ -4330,7 +5218,7 @@ function pGeom13(t, param, suffix = "") {
4330
5218
  },
4331
5219
  {
4332
5220
  outName: `ipax_${designName}_rodHollow`,
4333
- boolMethod: EBVolume13.eUnion,
5221
+ boolMethod: EBVolume17.eUnion,
4334
5222
  inList: [
4335
5223
  `subpax_${designName}_rodH1`,
4336
5224
  `subpax_${designName}_rodH2`,
@@ -4340,17 +5228,17 @@ function pGeom13(t, param, suffix = "") {
4340
5228
  },
4341
5229
  {
4342
5230
  outName: `ipax_${designName}_halfRods`,
4343
- boolMethod: EBVolume13.eSubstraction,
5231
+ boolMethod: EBVolume17.eSubstraction,
4344
5232
  inList: [`ipax_${designName}_rawRod`, `subpax_${designName}_cut1`]
4345
5233
  },
4346
5234
  {
4347
5235
  outName: `ipax_${designName}_rods`,
4348
- boolMethod: EBVolume13.eSubstraction,
5236
+ boolMethod: EBVolume17.eSubstraction,
4349
5237
  inList: [`ipax_${designName}_halfRods`, `subpax_${designName}_cut2`]
4350
5238
  },
4351
5239
  {
4352
5240
  outName: `ipax_${designName}_plus`,
4353
- boolMethod: EBVolume13.eUnion,
5241
+ boolMethod: EBVolume17.eUnion,
4354
5242
  inList: [
4355
5243
  `subpax_${designName}_frame`,
4356
5244
  `subpax_${designName}_plate`,
@@ -4359,7 +5247,7 @@ function pGeom13(t, param, suffix = "") {
4359
5247
  },
4360
5248
  {
4361
5249
  outName: `pax_${designName}`,
4362
- boolMethod: EBVolume13.eSubstraction,
5250
+ boolMethod: EBVolume17.eSubstraction,
4363
5251
  inList: [`ipax_${designName}_plus`, `ipax_${designName}_rodHollow`]
4364
5252
  }
4365
5253
  ]
@@ -4376,49 +5264,54 @@ function pGeom13(t, param, suffix = "") {
4376
5264
  var trapezeDef = {
4377
5265
  pTitle: "Heliostat trapeze",
4378
5266
  pDescription: "The support of one solar panel. Made out of aluminium for lightness and cooling",
4379
- pDef: pDef13,
4380
- pGeom: pGeom13
5267
+ pDef: pDef17,
5268
+ pGeom: pGeom17
4381
5269
  };
4382
5270
 
4383
5271
  // src/heliostat/surface.ts
4384
5272
  import {
4385
- contour as contour13,
4386
- figure as figure14,
4387
- ffix as ffix15,
4388
- pNumber as pNumber14,
5273
+ contour as contour18,
5274
+ figure as figure18,
5275
+ ffix as ffix20,
5276
+ pNumber as pNumber18,
4389
5277
  pCheckbox as pCheckbox3,
4390
5278
  pDropdown as pDropdown2,
4391
- initGeom as initGeom14,
4392
- EExtrude as EExtrude11,
4393
- EBVolume as EBVolume14
5279
+ pSectionSeparator as pSectionSeparator17,
5280
+ initGeom as initGeom18,
5281
+ EExtrude as EExtrude15,
5282
+ EBVolume as EBVolume18
4394
5283
  } from "geometrix";
4395
- var pDef14 = {
5284
+ var pDef18 = {
4396
5285
  partName: "surface",
4397
5286
  params: [
4398
5287
  //pNumber(name, unit, init, min, max, step)
4399
- pNumber14("LH", "mm", 1600, 10, 4e3, 1),
4400
- pNumber14("LV", "mm", 1e3, 10, 4e3, 1),
4401
- pNumber14("LZ", "mm", 40, 0, 100, 1),
4402
- pNumber14("nx", "", 9, 1, 40, 1),
4403
- pNumber14("ny", "", 9, 1, 40, 1),
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"),
4404
5294
  pDropdown2("main_direction", ["horizontal", "vertical"]),
4405
5295
  pCheckbox3("crenel", false),
4406
- pNumber14("first_row", "", 9, 1, 40, 1),
4407
- pNumber14("second_row", "", 9, 1, 40, 1),
4408
- pNumber14("EH", "mm", 10, 0, 1e3, 1),
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),
4409
5300
  pCheckbox3("EH_gradient", false),
4410
- pNumber14("EH_sup", "mm", 500, 0, 1e3, 1),
4411
- pNumber14("EH_cycle", "", 1, 0, 3, 0.05),
4412
- pNumber14("EH_start", "", 0, 0, 1, 0.05),
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),
4413
5304
  pDropdown2("EH_shape", ["sinusoid", "triangle", "sawUp", "sawDown"]),
4414
- pNumber14("EV", "mm", 10, 0, 1e3, 1),
5305
+ pSectionSeparator17("vertical spacing"),
5306
+ pNumber18("EV", "mm", 10, 0, 1e3, 1),
4415
5307
  pCheckbox3("EV_gradient", false),
4416
- pNumber14("EV_sup", "mm", 500, 0, 1e3, 1),
4417
- pNumber14("EV_cycle", "", 1, 0, 3, 0.05),
4418
- pNumber14("EV_start", "", 0, 0, 1, 0.05),
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),
4419
5311
  pDropdown2("EV_shape", ["sinusoid", "triangle", "sawUp", "sawDown"]),
4420
- pNumber14("power_efficiency", "%", 16, 0, 100, 0.1),
4421
- pNumber14("solar_power", "W/m2", 816, 100, 2e3, 1)
5312
+ pSectionSeparator17("solar power"),
5313
+ pNumber18("power_efficiency", "%", 16, 0, 100, 0.1),
5314
+ pNumber18("solar_power", "W/m2", 816, 100, 2e3, 1)
4422
5315
  // 1361*0.6=816 W/m2
4423
5316
  ],
4424
5317
  paramSvg: {
@@ -4453,26 +5346,26 @@ var pDef14 = {
4453
5346
  // every 0.5 second
4454
5347
  }
4455
5348
  };
4456
- function pGeom14(t, param, suffix = "") {
4457
- const rGeome = initGeom14(pDef14.partName + suffix);
5349
+ function pGeom18(t, param, suffix = "") {
5350
+ const rGeome = initGeom18(pDef18.partName + suffix);
4458
5351
  let ctrPanelProfile;
4459
- const figSurface = figure14();
4460
- const figOnePanel = figure14();
5352
+ const figSurface = figure18();
5353
+ const figOnePanel = figure18();
4461
5354
  rGeome.logstr += `${rGeome.partName} simTime: ${t}
4462
5355
  `;
4463
5356
  try {
4464
5357
  const panel_surface = param.LH * param.LV / 10 ** 6;
4465
5358
  const panel_power = param.solar_power * panel_surface * param.power_efficiency / 100;
4466
- rGeome.logstr += `panel surface: ${ffix15(panel_surface)} m2
5359
+ rGeome.logstr += `panel surface: ${ffix20(panel_surface)} m2
4467
5360
  `;
4468
- rGeome.logstr += `panel power: ${ffix15(panel_power)} W
5361
+ rGeome.logstr += `panel power: ${ffix20(panel_power)} W
4469
5362
  `;
4470
5363
  const max_panel_nb = param.nx * param.ny;
4471
5364
  rGeome.logstr += `max panel number: ${max_panel_nb}
4472
5365
  `;
4473
- rGeome.logstr += `max panel surface: ${ffix15(max_panel_nb * panel_surface)} m2
5366
+ rGeome.logstr += `max panel surface: ${ffix20(max_panel_nb * panel_surface)} m2
4474
5367
  `;
4475
- rGeome.logstr += `max panel power: ${ffix15(max_panel_nb * panel_power)} W
5368
+ rGeome.logstr += `max panel power: ${ffix20(max_panel_nb * panel_power)} W
4476
5369
  `;
4477
5370
  const lenMain = param.main_direction === 1 ? param.ny : param.nx;
4478
5371
  const lenLateral = param.main_direction === 1 ? param.nx : param.ny;
@@ -4505,13 +5398,13 @@ function pGeom14(t, param, suffix = "") {
4505
5398
  lenRow.forEach((oneRow) => {
4506
5399
  panelNb += oneRow;
4507
5400
  });
4508
- rGeome.logstr += `actual panel number: ${panelNb} (${ffix15(
5401
+ rGeome.logstr += `actual panel number: ${panelNb} (${ffix20(
4509
5402
  100 * panelNb / max_panel_nb
4510
5403
  )} %)
4511
5404
  `;
4512
- rGeome.logstr += `actual panel surface: ${ffix15(panelNb * panel_surface)} m2
5405
+ rGeome.logstr += `actual panel surface: ${ffix20(panelNb * panel_surface)} m2
4513
5406
  `;
4514
- rGeome.logstr += `actual panel power: ${ffix15(panelNb * panel_power)} W
5407
+ rGeome.logstr += `actual panel power: ${ffix20(panelNb * panel_power)} W
4515
5408
  `;
4516
5409
  const eMain = [];
4517
5410
  for (let i = 0; i < lenMain - 1; i++) {
@@ -4587,18 +5480,18 @@ function pGeom14(t, param, suffix = "") {
4587
5480
  gLenVertical = lenMain * param.LV + eMainTotal;
4588
5481
  }
4589
5482
  const gArea = gLenHorizontal * gLenVertical / 10 ** 6;
4590
- rGeome.logstr += `global horizontal width: ${ffix15(gLenHorizontal / 1e3)} m
5483
+ rGeome.logstr += `global horizontal width: ${ffix20(gLenHorizontal / 1e3)} m
4591
5484
  `;
4592
- rGeome.logstr += `global vertical height: ${ffix15(gLenVertical / 1e3)} m
5485
+ rGeome.logstr += `global vertical height: ${ffix20(gLenVertical / 1e3)} m
4593
5486
  `;
4594
- rGeome.logstr += `global area: ${ffix15(gArea)} m2
5487
+ rGeome.logstr += `global area: ${ffix20(gArea)} m2
4595
5488
  `;
4596
- rGeome.logstr += `area efficiency: ${ffix15(100 * panelNb * panel_surface / gArea)} %
5489
+ rGeome.logstr += `area efficiency: ${ffix20(100 * panelNb * panel_surface / gArea)} %
4597
5490
  `;
4598
5491
  const ox = -gLenHorizontal / 2;
4599
5492
  const oy = -gLenVertical / 2;
4600
5493
  ctrPanelProfile = function(px, py) {
4601
- const rPanelProfile = contour13(px, py).addSegStrokeA(px + param.LH, py).addSegStrokeA(px + param.LH, py + param.LV).addSegStrokeA(px, py + param.LV).closeSegStroke();
5494
+ const rPanelProfile = contour18(px, py).addSegStrokeA(px + param.LH, py).addSegStrokeA(px + param.LH, py + param.LV).addSegStrokeA(px, py + param.LV).closeSegStroke();
4602
5495
  return rPanelProfile;
4603
5496
  };
4604
5497
  const panelPositions = [];
@@ -4638,7 +5531,7 @@ function pGeom14(t, param, suffix = "") {
4638
5531
  const rElem = {
4639
5532
  outName: `subpax_${designName}_panel_${idx}`,
4640
5533
  face: `${designName}_faceOnePanel`,
4641
- extrudeMethod: EExtrude11.eLinearOrtho,
5534
+ extrudeMethod: EExtrude15.eLinearOrtho,
4642
5535
  length: param.LZ,
4643
5536
  rotate: [0, 0, 0],
4644
5537
  translate: [elem[0], elem[1], 0]
@@ -4649,7 +5542,7 @@ function pGeom14(t, param, suffix = "") {
4649
5542
  {
4650
5543
  outName: `pax_${designName}`,
4651
5544
  //boolMethod: EBVolume.eIdentity,
4652
- boolMethod: EBVolume14.eUnion,
5545
+ boolMethod: EBVolume18.eUnion,
4653
5546
  inList: panelPositions.map((elem, idx) => {
4654
5547
  const subElem = `subpax_${designName}_panel_${idx}`;
4655
5548
  return subElem;
@@ -4669,19 +5562,19 @@ function pGeom14(t, param, suffix = "") {
4669
5562
  var surfaceDef = {
4670
5563
  pTitle: "Heliostat panel-surface",
4671
5564
  pDescription: "The surface collecting the solar power",
4672
- pDef: pDef14,
4673
- pGeom: pGeom14
5565
+ pDef: pDef18,
5566
+ pGeom: pGeom18
4674
5567
  };
4675
5568
 
4676
5569
  // src/dummy/circles.ts
4677
- import { degToRad as degToRad4, point as point3, figure as figure15, pNumber as pNumber15, initGeom as initGeom15 } from "geometrix";
4678
- var pDef15 = {
5570
+ import { degToRad as degToRad6, point as point5, figure as figure19, pNumber as pNumber19, initGeom as initGeom19 } from "geometrix";
5571
+ var pDef19 = {
4679
5572
  partName: "circles",
4680
5573
  params: [
4681
5574
  //pNumber(name, unit, init, min, max, step)
4682
- pNumber15("angle", "degree", 15, 5, 45, 1),
4683
- pNumber15("amplitude-offset", "mm", 1, 0.5, 4, 0.1),
4684
- pNumber15("amplitude-scale", "scalar", 0.2, 0.1, 0.5, 0.01)
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)
4685
5578
  ],
4686
5579
  paramSvg: {
4687
5580
  angle: "circles_angle.svg",
@@ -4694,18 +5587,18 @@ var pDef15 = {
4694
5587
  tUpdate: 500
4695
5588
  }
4696
5589
  };
4697
- function pGeom15(t, param, suffix = "") {
4698
- const rGeome = initGeom15(pDef15.partName + suffix);
5590
+ function pGeom19(t, param, suffix = "") {
5591
+ const rGeome = initGeom19(pDef19.partName + suffix);
4699
5592
  rGeome.logstr += `${rGeome.partName} simTime: ${t}
4700
5593
  `;
4701
5594
  try {
4702
- const figOne = figure15();
4703
- const p1 = point3(10, 10);
4704
- const p2 = point3(10, 30);
5595
+ const figOne = figure19();
5596
+ const p1 = point5(10, 10);
5597
+ const p2 = point5(10, 30);
4705
5598
  figOne.addPoint(p2);
4706
5599
  for (let i = 0; i < 20; i++) {
4707
5600
  figOne.addPoint(
4708
- p1.scale(p2, param["amplitude-offset"] + param["amplitude-scale"] * i).rotate(p2, i * degToRad4(param.angle) + t * Math.PI / 2 / pDef15.sim.tMax)
5601
+ p1.scale(p2, param["amplitude-offset"] + param["amplitude-scale"] * i).rotate(p2, i * degToRad6(param.angle) + t * Math.PI / 2 / pDef19.sim.tMax)
4709
5602
  );
4710
5603
  }
4711
5604
  rGeome.fig = { one: figOne };
@@ -4720,18 +5613,18 @@ function pGeom15(t, param, suffix = "") {
4720
5613
  var circlesDef = {
4721
5614
  pTitle: "Circles",
4722
5615
  pDescription: "A spiral made by points.",
4723
- pDef: pDef15,
4724
- pGeom: pGeom15
5616
+ pDef: pDef19,
5617
+ pGeom: pGeom19
4725
5618
  };
4726
5619
 
4727
5620
  // src/dummy/rectangle.ts
4728
- import { point as point4, figure as figure16, pNumber as pNumber16, initGeom as initGeom16 } from "geometrix";
4729
- var pDef16 = {
5621
+ import { point as point6, figure as figure20, pNumber as pNumber20, initGeom as initGeom20 } from "geometrix";
5622
+ var pDef20 = {
4730
5623
  partName: "rectangle",
4731
5624
  params: [
4732
5625
  //pNumber(name, unit, init, min, max, step)
4733
- pNumber16("width", "mm", 15, 3, 40, 0.5),
4734
- pNumber16("height", "mm", 10, 3, 40, 0.5)
5626
+ pNumber20("width", "mm", 15, 3, 40, 0.5),
5627
+ pNumber20("height", "mm", 10, 3, 40, 0.5)
4735
5628
  ],
4736
5629
  paramSvg: {
4737
5630
  width: "rectangle_width.svg",
@@ -4743,16 +5636,16 @@ var pDef16 = {
4743
5636
  tUpdate: 500
4744
5637
  }
4745
5638
  };
4746
- function pGeom16(t, param, suffix = "") {
4747
- const rGeome = initGeom16(pDef16.partName + suffix);
5639
+ function pGeom20(t, param, suffix = "") {
5640
+ const rGeome = initGeom20(pDef20.partName + suffix);
4748
5641
  rGeome.logstr += `${rGeome.partName} simTime: ${t}
4749
5642
  `;
4750
5643
  try {
4751
- const figOne = figure16();
4752
- const p1 = point4(10, 10);
4753
- const p2 = point4(10 + param.width, 10);
4754
- const p3 = point4(10 + param.width, 10 + param.height);
4755
- const p4 = point4(10, 10 + param.height);
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);
4756
5649
  const angle = t * Math.PI / 180;
4757
5650
  figOne.addPoint(p1);
4758
5651
  figOne.addPoint(p2.rotate(p1, angle));
@@ -4770,25 +5663,25 @@ function pGeom16(t, param, suffix = "") {
4770
5663
  var rectangleDef = {
4771
5664
  pTitle: "Rectangle",
4772
5665
  pDescription: "Just a rectangle.",
4773
- pDef: pDef16,
4774
- pGeom: pGeom16
5666
+ pDef: pDef20,
5667
+ pGeom: pGeom20
4775
5668
  };
4776
5669
 
4777
5670
  // src/dummy/pole_static.ts
4778
5671
  import {
4779
- contour as contour14,
4780
- contourCircle as contourCircle12,
4781
- figure as figure17,
4782
- pNumber as pNumber17,
4783
- initGeom as initGeom17
5672
+ contour as contour19,
5673
+ contourCircle as contourCircle16,
5674
+ figure as figure21,
5675
+ pNumber as pNumber21,
5676
+ initGeom as initGeom21
4784
5677
  } from "geometrix";
4785
- var pDef17 = {
5678
+ var pDef21 = {
4786
5679
  partName: "pole_static",
4787
5680
  params: [
4788
5681
  //pNumber(name, unit, init, min, max, step)
4789
- pNumber17("H1", "mm", 4e3, 100, 4e4, 10),
4790
- pNumber17("H2", "mm", 5e3, 100, 4e4, 10),
4791
- pNumber17("radius", "mm", 1e3, 100, 4e4, 10)
5682
+ pNumber21("H1", "mm", 4e3, 100, 4e4, 10),
5683
+ pNumber21("H2", "mm", 5e3, 100, 4e4, 10),
5684
+ pNumber21("radius", "mm", 1e3, 100, 4e4, 10)
4792
5685
  ],
4793
5686
  paramSvg: {
4794
5687
  H1: "dummy_pole_static_face.svg",
@@ -4802,15 +5695,15 @@ var pDef17 = {
4802
5695
  // every 0.5 second
4803
5696
  }
4804
5697
  };
4805
- function pGeom17(t, param, suffix = "") {
4806
- const rGeome = initGeom17(pDef17.partName + suffix);
4807
- const figFace = figure17();
5698
+ function pGeom21(t, param, suffix = "") {
5699
+ const rGeome = initGeom21(pDef21.partName + suffix);
5700
+ const figFace = figure21();
4808
5701
  rGeome.logstr += `${rGeome.partName} simTime: ${t}
4809
5702
  `;
4810
5703
  try {
4811
- const ctrPoleFace = contour14(-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();
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();
4812
5705
  figFace.addMain(ctrPoleFace);
4813
- figFace.addMain(contourCircle12(0, 0, param.radius));
5706
+ figFace.addMain(contourCircle16(0, 0, param.radius));
4814
5707
  rGeome.fig = {
4815
5708
  poleFace: figFace
4816
5709
  };
@@ -4826,22 +5719,22 @@ function pGeom17(t, param, suffix = "") {
4826
5719
  var dummyPoleStaticDef = {
4827
5720
  pTitle: "Dummy pole static",
4828
5721
  pDescription: "Testing two design with identical name",
4829
- pDef: pDef17,
4830
- pGeom: pGeom17
5722
+ pDef: pDef21,
5723
+ pGeom: pGeom21
4831
5724
  };
4832
5725
 
4833
5726
  // src/geometrix_verification/verify_point.ts
4834
- import { degToRad as degToRad5, point as point5, figure as figure18, pNumber as pNumber18, initGeom as initGeom18 } from "geometrix";
4835
- var pDef18 = {
5727
+ import { degToRad as degToRad7, point as point7, figure as figure22, pNumber as pNumber22, initGeom as initGeom22 } from "geometrix";
5728
+ var pDef22 = {
4836
5729
  partName: "verify_point",
4837
5730
  params: [
4838
5731
  //pNumber(name, unit, init, min, max, step)
4839
- pNumber18("p1x", "mm", 30, -200, 200, 1),
4840
- pNumber18("p1y", "mm", 50, -200, 200, 1),
4841
- pNumber18("p2a", "degree", 30, -200, 200, 1),
4842
- pNumber18("p2l", "mm", 60, 0, 200, 1),
4843
- pNumber18("rotateOrig", "degree", 45, -200, 200, 1),
4844
- pNumber18("scaleOrig", "scalar", 1.5, 0.1, 2, 0.1)
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)
4845
5738
  ],
4846
5739
  paramSvg: {
4847
5740
  p1x: "verify_point_p1x.svg",
@@ -4858,15 +5751,15 @@ var pDef18 = {
4858
5751
  // every 0.5 second
4859
5752
  }
4860
5753
  };
4861
- function pGeom18(t, param, suffix = "") {
4862
- const rGeome = initGeom18(pDef18.partName + suffix);
5754
+ function pGeom22(t, param, suffix = "") {
5755
+ const rGeome = initGeom22(pDef22.partName + suffix);
4863
5756
  rGeome.logstr += `${rGeome.partName} simTime: ${t}
4864
5757
  `;
4865
5758
  try {
4866
- const figOne = figure18();
4867
- const p1 = point5(param.p1x, param.p1y + t);
4868
- const p2 = point5(0, 0).setPolar(degToRad5(param.p2a), param.p2l);
4869
- const p3 = p1.rotateOrig(degToRad5(param.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));
4870
5763
  const p4 = p1.scaleOrig(param.scaleOrig);
4871
5764
  figOne.addPoint(p1);
4872
5765
  figOne.addPoint(p2);
@@ -4884,23 +5777,23 @@ function pGeom18(t, param, suffix = "") {
4884
5777
  var verifyPoint1Def = {
4885
5778
  pTitle: "Verify point",
4886
5779
  pDescription: "Debugging point.ts",
4887
- pDef: pDef18,
4888
- pGeom: pGeom18
5780
+ pDef: pDef22,
5781
+ pGeom: pGeom22
4889
5782
  };
4890
5783
 
4891
5784
  // src/geometrix_verification/verify_point_2.ts
4892
- import { point as point6, figure as figure19, pNumber as pNumber19, initGeom as initGeom19 } from "geometrix";
4893
- var pDef19 = {
5785
+ import { point as point8, figure as figure23, pNumber as pNumber23, initGeom as initGeom23 } from "geometrix";
5786
+ var pDef23 = {
4894
5787
  partName: "verify_point_2",
4895
5788
  params: [
4896
5789
  //pNumber(name, unit, init, min, max, step)
4897
- pNumber19("p1x", "mm", 30, -200, 200, 1),
4898
- pNumber19("p1y", "mm", 50, -200, 200, 1),
4899
- pNumber19("p2x", "mm", -10, -200, 200, 1),
4900
- pNumber19("p2y", "mm", 60, -200, 200, 1),
4901
- pNumber19("p3x", "mm", 70, -200, 200, 1),
4902
- pNumber19("p3y", "mm", -20, -200, 200, 1),
4903
- pNumber19("dist", "mm", 50, 0, 200, 1)
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)
4904
5797
  ],
4905
5798
  paramSvg: {
4906
5799
  p1x: "verify_line_p1x.svg",
@@ -4918,15 +5811,15 @@ var pDef19 = {
4918
5811
  // every 0.5 second
4919
5812
  }
4920
5813
  };
4921
- function pGeom19(t, param, suffix = "") {
4922
- const rGeome = initGeom19(pDef19.partName + suffix);
5814
+ function pGeom23(t, param, suffix = "") {
5815
+ const rGeome = initGeom23(pDef23.partName + suffix);
4923
5816
  rGeome.logstr += `${rGeome.partName} simTime: ${t}
4924
5817
  `;
4925
5818
  try {
4926
- const figOne = figure19();
4927
- const p1 = point6(param.p1x, param.p1y + t);
4928
- const p2 = point6(param.p2x, param.p2y);
4929
- const p3 = point6(param.p3x, param.p3y);
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);
4930
5823
  const mp1p2 = p1.middlePoint(p2);
4931
5824
  const ep1p2 = p1.equidistantPoint(p2, param.dist, p3);
4932
5825
  figOne.addPoint(p1);
@@ -4946,22 +5839,22 @@ function pGeom19(t, param, suffix = "") {
4946
5839
  var verifyPoint2Def = {
4947
5840
  pTitle: "Verify point 2",
4948
5841
  pDescription: "Debugging more point.ts",
4949
- pDef: pDef19,
4950
- pGeom: pGeom19
5842
+ pDef: pDef23,
5843
+ pGeom: pGeom23
4951
5844
  };
4952
5845
 
4953
5846
  // src/geometrix_verification/verify_line.ts
4954
- import { point as point7, line, linePP, figure as figure20, pNumber as pNumber20, initGeom as initGeom20 } from "geometrix";
4955
- var pDef20 = {
5847
+ import { point as point9, line, linePP, figure as figure24, pNumber as pNumber24, initGeom as initGeom24 } from "geometrix";
5848
+ var pDef24 = {
4956
5849
  partName: "verify_line",
4957
5850
  params: [
4958
5851
  //pNumber(name, unit, init, min, max, step)
4959
- pNumber20("p1x", "mm", 30, -200, 200, 1),
4960
- pNumber20("p1y", "mm", 50, -200, 200, 1),
4961
- pNumber20("p2x", "mm", 40, -200, 200, 1),
4962
- pNumber20("p2y", "mm", -20, -200, 200, 1),
4963
- pNumber20("p3x", "mm", -30, -200, 200, 1),
4964
- pNumber20("p3y", "mm", 30, -200, 200, 1)
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)
4965
5858
  ],
4966
5859
  paramSvg: {
4967
5860
  p1x: "verify_line_p1x.svg",
@@ -4978,25 +5871,25 @@ var pDef20 = {
4978
5871
  // every 0.5 second
4979
5872
  }
4980
5873
  };
4981
- function pGeom20(t, param, suffix = "") {
4982
- const rGeome = initGeom20(pDef20.partName + suffix);
5874
+ function pGeom24(t, param, suffix = "") {
5875
+ const rGeome = initGeom24(pDef24.partName + suffix);
4983
5876
  rGeome.logstr += `${rGeome.partName} simTime: ${t}
4984
5877
  `;
4985
5878
  try {
4986
- const figOne = figure20();
4987
- const p1 = point7(param.p1x, param.p1y + t);
4988
- const p2 = point7(param.p2x, param.p2y);
4989
- const p3 = point7(param.p3x, param.p3y);
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);
4990
5883
  figOne.addPoint(p1);
4991
5884
  figOne.addPoint(p2);
4992
5885
  figOne.addPoint(p3);
4993
5886
  const l1 = line(0, 0, 0).setFromPoints(p1, p2);
4994
5887
  figOne.addLine(l1);
4995
- figOne.addPoint(point7(l1.getAxisXIntersection(), 0));
4996
- figOne.addPoint(point7(0, l1.getAxisYIntersection()));
5888
+ figOne.addPoint(point9(l1.getAxisXIntersection(), 0));
5889
+ figOne.addPoint(point9(0, l1.getAxisYIntersection()));
4997
5890
  const p4 = l1.projectOrig();
4998
5891
  figOne.addPoint(p4);
4999
- const p0 = point7(0, 0);
5892
+ const p0 = point9(0, 0);
5000
5893
  if (!p0.isEqual(p4)) {
5001
5894
  const l2 = linePP(p0, p4);
5002
5895
  figOne.addLine(l2);
@@ -5018,24 +5911,24 @@ function pGeom20(t, param, suffix = "") {
5018
5911
  var verifyLine1Def = {
5019
5912
  pTitle: "Verify line",
5020
5913
  pDescription: "Debugging line.ts",
5021
- pDef: pDef20,
5022
- pGeom: pGeom20
5914
+ pDef: pDef24,
5915
+ pGeom: pGeom24
5023
5916
  };
5024
5917
 
5025
5918
  // src/geometrix_verification/verify_line_2.ts
5026
- import { degToRad as degToRad6, point as point8, line as line2, figure as figure21, pNumber as pNumber21, initGeom as initGeom21 } from "geometrix";
5027
- var pDef21 = {
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 = {
5028
5921
  partName: "verify_line_2",
5029
5922
  params: [
5030
5923
  //pNumber(name, unit, init, min, max, step)
5031
- pNumber21("l1cx", "mm", 10, -200, 200, 1),
5032
- pNumber21("l1cy", "mm", 20, -200, 200, 1),
5033
- pNumber21("l1ca", "degree", 15, -200, 200, 1),
5034
- pNumber21("l2cx", "mm", 30, -200, 200, 1),
5035
- pNumber21("l2cy", "mm", 50, -200, 200, 1),
5036
- pNumber21("l2ca", "degree", 35, -200, 200, 1),
5037
- pNumber21("p3x", "mm", -30, -200, 200, 1),
5038
- pNumber21("p3y", "mm", 30, -200, 200, 1)
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)
5039
5932
  ],
5040
5933
  paramSvg: {
5041
5934
  l1cx: "verify_line_2_l1cx.svg",
@@ -5054,20 +5947,20 @@ var pDef21 = {
5054
5947
  // every 0.5 second
5055
5948
  }
5056
5949
  };
5057
- function pGeom21(t, param, suffix = "") {
5058
- const rGeome = initGeom21(pDef21.partName + suffix);
5950
+ function pGeom25(t, param, suffix = "") {
5951
+ const rGeome = initGeom25(pDef25.partName + suffix);
5059
5952
  rGeome.logstr += `${rGeome.partName} simTime: ${t}
5060
5953
  `;
5061
5954
  try {
5062
- const figOne = figure21();
5063
- const p1 = point8(param.l1cx, param.l1cy);
5064
- const p2 = point8(param.l2cx, param.l2cy);
5065
- const p3 = point8(param.p3x, param.p3y);
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);
5066
5959
  figOne.addPoint(p1);
5067
5960
  figOne.addPoint(p2);
5068
5961
  figOne.addPoint(p3);
5069
- const l1 = line2(param.l1cx, param.l1cy, degToRad6(param.l1ca + t));
5070
- const l2 = line2(param.l2cx, param.l2cy, degToRad6(param.l2ca));
5962
+ const l1 = line2(param.l1cx, param.l1cy, degToRad8(param.l1ca + t));
5963
+ const l2 = line2(param.l2cx, param.l2cy, degToRad8(param.l2ca));
5071
5964
  figOne.addLine(l1);
5072
5965
  figOne.addLine(l2);
5073
5966
  figOne.addPoint(l1.intersection(l2));
@@ -5078,7 +5971,7 @@ function pGeom21(t, param, suffix = "") {
5078
5971
  rGeome.logstr += `dist(l2, p3) = ${l2.distanceToPoint(p3)}
5079
5972
  `;
5080
5973
  const bisector2 = l1.bisector(l2, p3);
5081
- const pBisec = point8(bisector2.cx, bisector2.cy).translatePolar(bisector2.ca, 30);
5974
+ const pBisec = point10(bisector2.cx, bisector2.cy).translatePolar(bisector2.ca, 30);
5082
5975
  figOne.addPoint(pBisec);
5083
5976
  rGeome.fig = { one: figOne };
5084
5977
  rGeome.logstr += "verify_line_2 drawn successfully!\n";
@@ -5092,22 +5985,22 @@ function pGeom21(t, param, suffix = "") {
5092
5985
  var verifyLine2Def = {
5093
5986
  pTitle: "Verify line 2",
5094
5987
  pDescription: "Debugging more line.ts",
5095
- pDef: pDef21,
5096
- pGeom: pGeom21
5988
+ pDef: pDef25,
5989
+ pGeom: pGeom25
5097
5990
  };
5098
5991
 
5099
5992
  // src/geometrix_verification/verify_line_3.ts
5100
- import { point as point9, bisector, circleCenter, figure as figure22, pNumber as pNumber22, initGeom as initGeom22 } from "geometrix";
5101
- var pDef22 = {
5993
+ import { point as point11, bisector, circleCenter, figure as figure26, pNumber as pNumber26, initGeom as initGeom26 } from "geometrix";
5994
+ var pDef26 = {
5102
5995
  partName: "verify_line_3",
5103
5996
  params: [
5104
5997
  //pNumber(name, unit, init, min, max, step)
5105
- pNumber22("p1x", "mm", 30, -200, 200, 1),
5106
- pNumber22("p1y", "mm", 50, -200, 200, 1),
5107
- pNumber22("p2x", "mm", 40, -200, 200, 1),
5108
- pNumber22("p2y", "mm", -20, -200, 200, 1),
5109
- pNumber22("p3x", "mm", -30, -200, 200, 1),
5110
- pNumber22("p3y", "mm", 30, -200, 200, 1)
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)
5111
6004
  ],
5112
6005
  paramSvg: {
5113
6006
  p1x: "verify_line_p1x.svg",
@@ -5124,15 +6017,15 @@ var pDef22 = {
5124
6017
  // every 0.5 second
5125
6018
  }
5126
6019
  };
5127
- function pGeom22(t, param, suffix = "") {
5128
- const rGeome = initGeom22(pDef22.partName + suffix);
6020
+ function pGeom26(t, param, suffix = "") {
6021
+ const rGeome = initGeom26(pDef26.partName + suffix);
5129
6022
  rGeome.logstr += `${rGeome.partName} simTime: ${t}
5130
6023
  `;
5131
6024
  try {
5132
- const figOne = figure22();
5133
- const p1 = point9(param.p1x, param.p1y + t);
5134
- const p2 = point9(param.p2x, param.p2y);
5135
- const p3 = point9(param.p3x, param.p3y);
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);
5136
6029
  figOne.addPoint(p1);
5137
6030
  figOne.addPoint(p2);
5138
6031
  figOne.addPoint(p3);
@@ -5152,24 +6045,24 @@ function pGeom22(t, param, suffix = "") {
5152
6045
  var verifyLine3Def = {
5153
6046
  pTitle: "Verify line 3",
5154
6047
  pDescription: "Debugging more more line.ts",
5155
- pDef: pDef22,
5156
- pGeom: pGeom22
6048
+ pDef: pDef26,
6049
+ pGeom: pGeom26
5157
6050
  };
5158
6051
 
5159
6052
  // src/geometrix_verification/verify_vector.ts
5160
- import { degToRad as degToRad7, point as point10, vector, figure as figure23, pNumber as pNumber23, initGeom as initGeom23 } from "geometrix";
5161
- var pDef23 = {
6053
+ import { degToRad as degToRad9, point as point12, vector, figure as figure27, pNumber as pNumber27, initGeom as initGeom27 } from "geometrix";
6054
+ var pDef27 = {
5162
6055
  partName: "verify_vector",
5163
6056
  params: [
5164
6057
  //pNumber(name, unit, init, min, max, step)
5165
- pNumber23("p1x", "mm", 30, -200, 200, 1),
5166
- pNumber23("p1y", "mm", 50, -200, 200, 1),
5167
- pNumber23("p2x", "mm", 80, -200, 200, 1),
5168
- pNumber23("p2y", "mm", -30, -200, 200, 1),
5169
- pNumber23("v1a", "degree", 30, -200, 200, 1),
5170
- pNumber23("v1l", "mm", 60, 0, 200, 1),
5171
- pNumber23("v2a", "degree", 30, -200, 200, 1),
5172
- pNumber23("v2l", "mm", 60, 0, 200, 1)
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)
5173
6066
  ],
5174
6067
  paramSvg: {
5175
6068
  p1x: "verify_vector_p1x.svg",
@@ -5188,16 +6081,16 @@ var pDef23 = {
5188
6081
  // every 0.5 second
5189
6082
  }
5190
6083
  };
5191
- function pGeom23(t, param, suffix = "") {
5192
- const rGeome = initGeom23(pDef23.partName + suffix);
6084
+ function pGeom27(t, param, suffix = "") {
6085
+ const rGeome = initGeom27(pDef27.partName + suffix);
5193
6086
  rGeome.logstr += `${rGeome.partName} simTime: ${t}
5194
6087
  `;
5195
6088
  try {
5196
- const figOne = figure23();
5197
- const p1 = point10(param.p1x, param.p1y + t);
5198
- const p2 = point10(param.p2x, param.p2y);
5199
- const v1 = vector(degToRad7(param.v1a), param.v1l, p1);
5200
- const v2 = vector(degToRad7(param.v2a), param.v2l, p1);
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);
5201
6094
  figOne.addPoint(p1);
5202
6095
  figOne.addPoint(p2);
5203
6096
  figOne.addVector(v1);
@@ -5218,22 +6111,22 @@ function pGeom23(t, param, suffix = "") {
5218
6111
  var verifyVector1Def = {
5219
6112
  pTitle: "Verify vector",
5220
6113
  pDescription: "Debugging vector.ts",
5221
- pDef: pDef23,
5222
- pGeom: pGeom23
6114
+ pDef: pDef27,
6115
+ pGeom: pGeom27
5223
6116
  };
5224
6117
 
5225
6118
  // src/geometrix_verification/verify_contour_1.ts
5226
- import { contour as contour15, contourCircle as contourCircle13, figure as figure24, pNumber as pNumber24, initGeom as initGeom24 } from "geometrix";
5227
- var pDef24 = {
6119
+ import { contour as contour20, contourCircle as contourCircle17, figure as figure28, pNumber as pNumber28, initGeom as initGeom28 } from "geometrix";
6120
+ var pDef28 = {
5228
6121
  partName: "verify_contour_1",
5229
6122
  params: [
5230
6123
  //pNumber(name, unit, init, min, max, step)
5231
- pNumber24("r1", "mm", 30, 10, 200, 1),
5232
- pNumber24("d1", "mm", 20, 10, 200, 1),
5233
- pNumber24("w1", "mm", 100, 10, 200, 1),
5234
- pNumber24("r2", "mm", 60, 10, 200, 1),
5235
- pNumber24("l1", "mm", 10, 5, 200, 1),
5236
- pNumber24("l2", "mm", 30, 5, 200, 1)
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)
5237
6130
  ],
5238
6131
  paramSvg: {
5239
6132
  r1: "verify_contour_1_r1.svg",
@@ -5250,12 +6143,12 @@ var pDef24 = {
5250
6143
  // every 0.5 second
5251
6144
  }
5252
6145
  };
5253
- function pGeom24(t, param, suffix = "") {
5254
- const rGeome = initGeom24(pDef24.partName + suffix);
6146
+ function pGeom28(t, param, suffix = "") {
6147
+ const rGeome = initGeom28(pDef28.partName + suffix);
5255
6148
  rGeome.logstr += `${rGeome.partName} simTime: ${t}
5256
6149
  `;
5257
6150
  try {
5258
- const figOne = figure24();
6151
+ const figOne = figure28();
5259
6152
  const r1 = param.r1;
5260
6153
  const d1 = param.d1;
5261
6154
  const w1 = param.w1;
@@ -5268,20 +6161,20 @@ function pGeom24(t, param, suffix = "") {
5268
6161
  const c12 = 2 * r1 + d1;
5269
6162
  const c2 = c1 + c12;
5270
6163
  const c3 = c1 + 2 * c12;
5271
- const ctr1 = contour15(0, 0);
6164
+ const ctr1 = contour20(0, 0);
5272
6165
  ctr1.addSegStrokeA(w1, 0);
5273
6166
  ctr1.addSegStrokeA(w1, h1);
5274
6167
  ctr1.addSegStrokeA(0, h1);
5275
6168
  ctr1.closeSegStroke();
5276
6169
  ctr1.check();
5277
6170
  figOne.addMain(ctr1);
5278
- figOne.addMain(contourCircle13(w12, c1, r1));
5279
- figOne.addMain(contourCircle13(w12, c2, r1 + t));
5280
- figOne.addMain(contourCircle13(w12, c3, r1));
5281
- const ctr2 = contourCircle13(w1 + r2, 3 * c1, r2);
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);
5282
6175
  ctr2.check();
5283
6176
  figOne.addSecond(ctr2);
5284
- const ctr3 = contour15(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();
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();
5285
6178
  ctr3.check();
5286
6179
  figOne.addSecond(ctr3);
5287
6180
  rGeome.fig = { one: figOne };
@@ -5296,20 +6189,20 @@ function pGeom24(t, param, suffix = "") {
5296
6189
  var verifyContour1Def = {
5297
6190
  pTitle: "Verify contour 1",
5298
6191
  pDescription: "Debugging contour.ts",
5299
- pDef: pDef24,
5300
- pGeom: pGeom24
6192
+ pDef: pDef28,
6193
+ pGeom: pGeom28
5301
6194
  };
5302
6195
 
5303
6196
  // src/geometrix_verification/verify_contour_2.ts
5304
- import { degToRad as degToRad8, contour as contour16, figure as figure25, pNumber as pNumber25, initGeom as initGeom25 } from "geometrix";
5305
- var pDef25 = {
6197
+ import { degToRad as degToRad10, contour as contour21, figure as figure29, pNumber as pNumber29, initGeom as initGeom29 } from "geometrix";
6198
+ var pDef29 = {
5306
6199
  partName: "verify_contour_2",
5307
6200
  params: [
5308
6201
  //pNumber(name, unit, init, min, max, step)
5309
- pNumber25("r1", "mm", 20, 5, 200, 1),
5310
- pNumber25("a1", "deg", 30, -200, 200, 1),
5311
- pNumber25("at1", "deg", 30, -200, 200, 1),
5312
- pNumber25("at2", "deg", 50, -200, 200, 1)
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)
5313
6206
  ],
5314
6207
  paramSvg: {
5315
6208
  r1: "verify_contour_1_r1.svg",
@@ -5324,17 +6217,17 @@ var pDef25 = {
5324
6217
  // every 0.5 second
5325
6218
  }
5326
6219
  };
5327
- function pGeom25(t, param, suffix = "") {
5328
- const rGeome = initGeom25(pDef25.partName + suffix);
6220
+ function pGeom29(t, param, suffix = "") {
6221
+ const rGeome = initGeom29(pDef29.partName + suffix);
5329
6222
  rGeome.logstr += `${rGeome.partName} simTime: ${t}
5330
6223
  `;
5331
6224
  try {
5332
- const figOne = figure25();
6225
+ const figOne = figure29();
5333
6226
  const r1 = param.r1 + t;
5334
6227
  const ata = param.a1 + t;
5335
6228
  const at1 = param.at1 + t;
5336
6229
  const at2 = param.at2 + t;
5337
- const ctr1 = contour16(20, 20);
6230
+ const ctr1 = contour21(20, 20);
5338
6231
  ctr1.addSegStrokeA(40, 20);
5339
6232
  ctr1.addPointA(60, 20).addSegArc(r1, true, true);
5340
6233
  ctr1.addPointA(80, 20).addSegArc(r1, true, false);
@@ -5361,7 +6254,7 @@ function pGeom25(t, param, suffix = "") {
5361
6254
  ctr1.closeSegStroke();
5362
6255
  ctr1.check();
5363
6256
  figOne.addMain(ctr1);
5364
- const ctr2 = contour16(20, -20);
6257
+ const ctr2 = contour21(20, -20);
5365
6258
  ctr2.addSegStrokeA(40, -40);
5366
6259
  ctr2.addPointA(60, -60).addSegArc(r1, true, true);
5367
6260
  ctr2.addPointA(80, -80).addSegArc(r1, true, false);
@@ -5371,17 +6264,17 @@ function pGeom25(t, param, suffix = "") {
5371
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();
5372
6265
  ctr2.check();
5373
6266
  figOne.addMain(ctr2);
5374
- const ctr3 = contour16(200, 200).addSegStrokeR(20, 0).addPointR(20, 0).addSegArc3(degToRad8(ata), true).addSegStrokeR(20, 0).addPointR(20, 0).addSegArc3(degToRad8(ata), false).addSegStrokeR(20, 0).addSegStrokeR(0, 20).addPointR(0, 20).addSegArc3(degToRad8(ata), true).addSegStrokeR(0, 20).addPointR(0, 20).addSegArc3(degToRad8(ata), false).addSegStrokeR(0, 20).addSegStrokeR(-20, 0).addPointR(-20, 0).addSegArc3(degToRad8(ata), true).addSegStrokeR(-20, 0).addPointR(-20, 0).addSegArc3(degToRad8(ata), false).addSegStrokeR(-20, 0).addSegStrokeR(0, -20).addPointR(0, -20).addSegArc3(degToRad8(ata), true).addSegStrokeR(0, -20).addPointR(0, -20).addSegArc3(degToRad8(ata), false).addSegStrokeR(0, -20);
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);
5375
6268
  ctr3.check();
5376
6269
  figOne.addMain(ctr3);
5377
- const ctr4 = contour16(600, 200).addSegStrokeR(20, 20).addPointR(20, 20).addSegArc3(degToRad8(ata), true).addSegStrokeR(20, 20).addPointR(20, 20).addSegArc3(degToRad8(ata), false).addSegStrokeR(20, 20).addSegStrokeR(-20, 20).addPointR(-20, 20).addSegArc3(degToRad8(ata), true).addSegStrokeR(-20, 20).addPointR(-20, 20).addSegArc3(degToRad8(ata), false).addSegStrokeR(-20, 20).addSegStrokeR(-20, -20).addPointR(-20, -20).addSegArc3(degToRad8(ata), true).addSegStrokeR(-20, -20).addPointR(-20, -20).addSegArc3(degToRad8(ata), false).addSegStrokeR(-20, -20).addSegStrokeR(20, -20).addPointR(20, -20).addSegArc3(degToRad8(ata), true).addSegStrokeR(20, -20).addPointR(20, -20).addSegArc3(degToRad8(ata), false).addSegStrokeR(20, -20);
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);
5378
6271
  ctr4.check();
5379
6272
  figOne.addMain(ctr4);
5380
- const ctr5 = contour16(100, 500);
6273
+ const ctr5 = contour21(100, 500);
5381
6274
  for (let i = 0; i < 8; i++) {
5382
6275
  const adir = i * 45;
5383
- const adirRad = degToRad8(adir);
5384
- ctr5.addSegStrokeRP(adirRad, 20).addPointRP(adirRad, 20).addSeg2Arcs(degToRad8(adir + at1), degToRad8(180 + adir - at2)).addSegStrokeRP(adirRad, 20).addPointRP(adirRad, 20).addSeg2Arcs(degToRad8(adir - at1), degToRad8(180 + adir + at2)).addSegStrokeRP(adirRad, 20);
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);
5385
6278
  }
5386
6279
  ctr5.check();
5387
6280
  figOne.addMain(ctr5);
@@ -5397,22 +6290,22 @@ function pGeom25(t, param, suffix = "") {
5397
6290
  var verifyContour2Def = {
5398
6291
  pTitle: "Verify contour 2",
5399
6292
  pDescription: "Debugging more contour.ts",
5400
- pDef: pDef25,
5401
- pGeom: pGeom25
6293
+ pDef: pDef29,
6294
+ pGeom: pGeom29
5402
6295
  };
5403
6296
 
5404
6297
  // src/geometrix_verification/verify_contour_3.ts
5405
- import { degToRad as degToRad9, contour as contour17, figure as figure26, pNumber as pNumber26, initGeom as initGeom26 } from "geometrix";
5406
- var pDef26 = {
6298
+ import { degToRad as degToRad11, contour as contour22, figure as figure30, pNumber as pNumber30, initGeom as initGeom30 } from "geometrix";
6299
+ var pDef30 = {
5407
6300
  partName: "verify_contour_3",
5408
6301
  params: [
5409
6302
  //pNumber(name, unit, init, min, max, step)
5410
- pNumber26("r1", "mm", 10, 0, 200, 1),
5411
- pNumber26("r2", "mm", 10, 0, 200, 1),
5412
- pNumber26("r3", "mm", 10, 0, 200, 1),
5413
- pNumber26("r4", "mm", 10, 0, 200, 1),
5414
- pNumber26("r5", "mm", 10, 0, 200, 1),
5415
- pNumber26("r6", "mm", 5, 0, 200, 1)
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)
5416
6309
  ],
5417
6310
  paramSvg: {
5418
6311
  r1: "verify_contour_1_r1.svg",
@@ -5429,32 +6322,32 @@ var pDef26 = {
5429
6322
  // every 0.5 second
5430
6323
  }
5431
6324
  };
5432
- function pGeom26(t, param, suffix = "") {
5433
- const rGeome = initGeom26(pDef26.partName + suffix);
6325
+ function pGeom30(t, param, suffix = "") {
6326
+ const rGeome = initGeom30(pDef30.partName + suffix);
5434
6327
  rGeome.logstr += `${rGeome.partName} simTime: ${t}
5435
6328
  `;
5436
6329
  try {
5437
- const figOne = figure26();
6330
+ const figOne = figure30();
5438
6331
  const r1 = param.r1 + t;
5439
6332
  const r2 = param.r2 + t;
5440
6333
  const r3 = param.r3 + t;
5441
6334
  const r4 = param.r4 + t;
5442
6335
  const r5 = param.r5 + t;
5443
6336
  const r6 = param.r6 + t;
5444
- const ctr1 = contour17(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);
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);
5445
6338
  rGeome.logstr += ctr1.check();
5446
6339
  figOne.addMain(ctr1);
5447
6340
  const l2 = 100;
5448
- const ctr2 = contour17(300, 0);
6341
+ const ctr2 = contour22(300, 0);
5449
6342
  for (let i = 0; i < 4; i++) {
5450
6343
  const angle = 90 * (1 - i);
5451
- ctr2.addSegStrokeRP(degToRad9(angle), l2).addCornerRounded(r2).addSegStrokeRP(degToRad9(angle - 45), l2).addCornerRounded(r2).addSegStrokeRP(degToRad9(angle + 45), l2).addCornerRounded(r2).addSegStrokeRP(degToRad9(angle), l2).addCornerRounded(r2);
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);
5452
6345
  }
5453
6346
  rGeome.logstr += ctr2.check();
5454
6347
  figOne.addMain(ctr2);
5455
6348
  const l3 = 100;
5456
6349
  const ra3 = 70;
5457
- const ctr3 = contour17(0, 600).addSegStrokeR(l3, l3);
6350
+ const ctr3 = contour22(0, 600).addSegStrokeR(l3, l3);
5458
6351
  for (let i = 0; i < 3; i++) {
5459
6352
  const large = (i & 1) === 0 ? false : true;
5460
6353
  const ccw = (i & 2) === 0 ? false : true;
@@ -5470,70 +6363,70 @@ function pGeom26(t, param, suffix = "") {
5470
6363
  ctr3.addSegStrokeR(l3, 0).addSegStrokeR(l3, -l3).closeSegStroke();
5471
6364
  rGeome.logstr += ctr3.check();
5472
6365
  figOne.addMain(ctr3);
5473
- const ctr3b = contour17(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();
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();
5474
6367
  rGeome.logstr += ctr3b.check();
5475
6368
  figOne.addMain(ctr3b);
5476
6369
  const l4 = 200;
5477
6370
  const ra4 = 180;
5478
- const ctr4 = contour17(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);
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);
5479
6372
  rGeome.logstr += ctr4.check();
5480
6373
  figOne.addMain(ctr4);
5481
- const ctr4b = contour17(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);
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);
5482
6375
  rGeome.logstr += ctr4b.check();
5483
6376
  figOne.addMain(ctr4b);
5484
- const ctr4c = contour17(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);
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);
5485
6378
  rGeome.logstr += ctr4c.check();
5486
6379
  figOne.addMain(ctr4c);
5487
- const ctr4d = contour17(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);
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);
5488
6381
  rGeome.logstr += ctr4d.check();
5489
6382
  figOne.addMain(ctr4d);
5490
6383
  const l4b = 3 * l4;
5491
6384
  const ra4b = 3 * ra4;
5492
- const ctr4e = contour17(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);
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);
5493
6386
  rGeome.logstr += ctr4e.check();
5494
6387
  figOne.addMain(ctr4e);
5495
- const ctr4f = contour17(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);
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);
5496
6389
  rGeome.logstr += ctr4f.check();
5497
6390
  figOne.addMain(ctr4f);
5498
- const ctr4g = contour17(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);
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);
5499
6392
  rGeome.logstr += ctr4g.check();
5500
6393
  figOne.addMain(ctr4g);
5501
6394
  const c099 = 0.999;
5502
- const ctr4h = contour17(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);
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);
5503
6396
  rGeome.logstr += ctr4h.check();
5504
6397
  figOne.addMain(ctr4h);
5505
6398
  const l5 = 200;
5506
6399
  const ra5 = 180;
5507
- const ctr5 = contour17(0, 3e3).addSegStrokeR(l5, 0).addCornerWidened(r5).addSegStrokeR(0, l5).addCornerWidened(r5).closeSegStroke().addCornerWidened(r5);
6400
+ const ctr5 = contour22(0, 3e3).addSegStrokeR(l5, 0).addCornerWidened(r5).addSegStrokeR(0, l5).addCornerWidened(r5).closeSegStroke().addCornerWidened(r5);
5508
6401
  rGeome.logstr += ctr5.check();
5509
6402
  figOne.addMain(ctr5);
5510
- const ctr5b = contour17(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);
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);
5511
6404
  rGeome.logstr += ctr5b.check();
5512
6405
  figOne.addMain(ctr5b);
5513
- const ctr5d = contour17(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);
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);
5514
6407
  rGeome.logstr += ctr5d.check();
5515
6408
  figOne.addMain(ctr5d);
5516
- const ctr5e = contour17(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);
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);
5517
6410
  rGeome.logstr += ctr5e.check();
5518
6411
  figOne.addMain(ctr5e);
5519
- const ctr5f = contour17(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);
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);
5520
6413
  rGeome.logstr += ctr5f.check();
5521
6414
  figOne.addMain(ctr5f);
5522
6415
  const l6 = 200;
5523
6416
  const ra6 = 180;
5524
- const ctr6 = contour17(0, 4e3).addSegStrokeR(l6, 0).addCornerWideAcc(r6).addSegStrokeR(0, l6).addCornerWideAcc(r6).closeSegStroke().addCornerWideAcc(r6);
6417
+ const ctr6 = contour22(0, 4e3).addSegStrokeR(l6, 0).addCornerWideAcc(r6).addSegStrokeR(0, l6).addCornerWideAcc(r6).closeSegStroke().addCornerWideAcc(r6);
5525
6418
  rGeome.logstr += ctr6.check();
5526
6419
  figOne.addMain(ctr6);
5527
- const ctr6b = contour17(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);
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);
5528
6421
  rGeome.logstr += ctr6b.check();
5529
6422
  figOne.addMain(ctr6b);
5530
- const ctr6d = contour17(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);
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);
5531
6424
  rGeome.logstr += ctr6d.check();
5532
6425
  figOne.addMain(ctr6d);
5533
- const ctr6e = contour17(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);
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);
5534
6427
  rGeome.logstr += ctr6e.check();
5535
6428
  figOne.addMain(ctr6e);
5536
- const ctr6f = contour17(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);
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);
5537
6430
  rGeome.logstr += ctr6f.check();
5538
6431
  figOne.addMain(ctr6f);
5539
6432
  rGeome.fig = { one: figOne };
@@ -5548,19 +6441,19 @@ function pGeom26(t, param, suffix = "") {
5548
6441
  var verifyContour3Def = {
5549
6442
  pTitle: "Verify contour 3",
5550
6443
  pDescription: "Debugging contour.ts for rounded corners and widened corners",
5551
- pDef: pDef26,
5552
- pGeom: pGeom26
6444
+ pDef: pDef30,
6445
+ pGeom: pGeom30
5553
6446
  };
5554
6447
 
5555
6448
  // src/geometrix_verification/verify_contour_4.ts
5556
- import { contour as contour18, figure as figure27, pNumber as pNumber27, initGeom as initGeom27 } from "geometrix";
5557
- var pDef27 = {
6449
+ import { contour as contour23, figure as figure31, pNumber as pNumber31, initGeom as initGeom31 } from "geometrix";
6450
+ var pDef31 = {
5558
6451
  partName: "verify_contour_4",
5559
6452
  params: [
5560
6453
  //pNumber(name, unit, init, min, max, step)
5561
- pNumber27("n1", "scalar", 16, 1, 50, 1),
5562
- pNumber27("n2", "scalar", 6, 3, 50, 1),
5563
- pNumber27("r1", "mm", 5, 0, 20, 1)
6454
+ pNumber31("n1", "scalar", 16, 1, 50, 1),
6455
+ pNumber31("n2", "scalar", 6, 3, 50, 1),
6456
+ pNumber31("r1", "mm", 5, 0, 20, 1)
5564
6457
  ],
5565
6458
  paramSvg: {
5566
6459
  n1: "verify_contour_1_r1.svg",
@@ -5574,19 +6467,19 @@ var pDef27 = {
5574
6467
  // every 0.5 second
5575
6468
  }
5576
6469
  };
5577
- function pGeom27(t, param, suffix = "") {
5578
- const rGeome = initGeom27(pDef27.partName + suffix);
6470
+ function pGeom31(t, param, suffix = "") {
6471
+ const rGeome = initGeom31(pDef31.partName + suffix);
5579
6472
  rGeome.logstr += `${rGeome.partName} simTime: ${t}
5580
6473
  `;
5581
6474
  try {
5582
- const figOne = figure27();
6475
+ const figOne = figure31();
5583
6476
  const n1 = param.n1;
5584
6477
  const n2 = param.n2;
5585
6478
  const r1 = param.r1;
5586
6479
  const l1 = 50 + t;
5587
6480
  const as = 2 * Math.PI / (n2 * 3);
5588
- const ctr2b = contour18(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);
5589
- const ctr1 = contour18(l1, 0);
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);
5590
6483
  const ctr1b = ctr2b.clone().addCornerRounded(r1);
5591
6484
  for (let i = 0; i < n1; i++) {
5592
6485
  const ctr1c = ctr1b.rotate(0, 0, i * 3 * as).scale(0, 0, 1 + i * 0.2, true);
@@ -5595,7 +6488,7 @@ function pGeom27(t, param, suffix = "") {
5595
6488
  ctr1.closeSegStroke();
5596
6489
  rGeome.logstr += ctr1.check();
5597
6490
  figOne.addMain(ctr1);
5598
- const ctr5 = contour18(l1, 0);
6491
+ const ctr5 = contour23(l1, 0);
5599
6492
  for (let i = 0; i < n1; i++) {
5600
6493
  ctr5.addPartial(ctr1b.rotate(0, 0, i * 3 * as).scale(0, 0, 1 + i * 0.2, false));
5601
6494
  }
@@ -5626,29 +6519,29 @@ function pGeom27(t, param, suffix = "") {
5626
6519
  var verifyContour4Def = {
5627
6520
  pTitle: "Verify contour 4",
5628
6521
  pDescription: "Debugging contour.ts for addPartial",
5629
- pDef: pDef27,
5630
- pGeom: pGeom27
6522
+ pDef: pDef31,
6523
+ pGeom: pGeom31
5631
6524
  };
5632
6525
 
5633
6526
  // src/geometrix_verification/verify_exports_1.ts
5634
6527
  import {
5635
- contour as contour19,
5636
- contourCircle as contourCircle14,
5637
- figure as figure28,
5638
- pNumber as pNumber28,
6528
+ contour as contour24,
6529
+ contourCircle as contourCircle18,
6530
+ figure as figure32,
6531
+ pNumber as pNumber32,
5639
6532
  pCheckbox as pCheckbox4,
5640
- initGeom as initGeom28,
5641
- EExtrude as EExtrude12,
5642
- EBVolume as EBVolume15
6533
+ initGeom as initGeom32,
6534
+ EExtrude as EExtrude16,
6535
+ EBVolume as EBVolume19
5643
6536
  } from "geometrix";
5644
- var pDef28 = {
6537
+ var pDef32 = {
5645
6538
  partName: "verify_exports_1",
5646
6539
  params: [
5647
6540
  //pNumber(name, unit, init, min, max, step)
5648
6541
  pCheckbox4("circle", true),
5649
- pNumber28("circle-size", "mm", 100, 1, 1e3, 1),
6542
+ pNumber32("circle-size", "mm", 100, 1, 1e3, 1),
5650
6543
  pCheckbox4("contour", true),
5651
- pNumber28("contour-size", "mm", 30, 1, 1e3, 1),
6544
+ pNumber32("contour-size", "mm", 30, 1, 1e3, 1),
5652
6545
  pCheckbox4("contour-arc-large", false)
5653
6546
  ],
5654
6547
  paramSvg: {
@@ -5664,20 +6557,20 @@ var pDef28 = {
5664
6557
  tUpdate: 500
5665
6558
  }
5666
6559
  };
5667
- function pGeom28(t, param, suffix = "") {
5668
- const rGeome = initGeom28(pDef28.partName + suffix);
6560
+ function pGeom32(t, param, suffix = "") {
6561
+ const rGeome = initGeom32(pDef32.partName + suffix);
5669
6562
  rGeome.logstr += `${rGeome.partName} simTime: ${t}
5670
6563
  `;
5671
6564
  try {
5672
- const figOne = figure28();
6565
+ const figOne = figure32();
5673
6566
  if (param.circle === 1) {
5674
- const theCircle = contourCircle14(0, 0, param["circle-size"]);
6567
+ const theCircle = contourCircle18(0, 0, param["circle-size"]);
5675
6568
  figOne.addMain(theCircle);
5676
6569
  }
5677
6570
  if (param.contour === 1) {
5678
6571
  const csize = param["contour-size"];
5679
6572
  const carcl = param["contour-arc-large"] === 1 ? true : false;
5680
- const ctr1 = contour19(0, 0).addSegStrokeA(csize, 0).addPointA(csize, csize).addSegArc(csize * 0.8, carcl, true).closeSegStroke();
6573
+ const ctr1 = contour24(0, 0).addSegStrokeA(csize, 0).addPointA(csize, csize).addSegArc(csize * 0.8, carcl, true).closeSegStroke();
5681
6574
  figOne.addMain(ctr1);
5682
6575
  }
5683
6576
  rGeome.fig = { one: figOne };
@@ -5687,7 +6580,7 @@ function pGeom28(t, param, suffix = "") {
5687
6580
  {
5688
6581
  outName: `subpax_${designName}_one`,
5689
6582
  face: `${designName}_one`,
5690
- extrudeMethod: EExtrude12.eLinearOrtho,
6583
+ extrudeMethod: EExtrude16.eLinearOrtho,
5691
6584
  length: 10,
5692
6585
  rotate: [0, 0, 0],
5693
6586
  translate: [0, 0, 0]
@@ -5696,7 +6589,7 @@ function pGeom28(t, param, suffix = "") {
5696
6589
  volumes: [
5697
6590
  {
5698
6591
  outName: `pax_${designName}`,
5699
- boolMethod: EBVolume15.eIdentity,
6592
+ boolMethod: EBVolume19.eIdentity,
5700
6593
  inList: [`subpax_${designName}_one`]
5701
6594
  }
5702
6595
  ]
@@ -5712,8 +6605,8 @@ function pGeom28(t, param, suffix = "") {
5712
6605
  var verifyExports1Def = {
5713
6606
  pTitle: "Verify exports 1",
5714
6607
  pDescription: "For dev & debug of Openscad export",
5715
- pDef: pDef28,
5716
- pGeom: pGeom28
6608
+ pDef: pDef32,
6609
+ pGeom: pGeom32
5717
6610
  };
5718
6611
  export {
5719
6612
  baseDef,
@@ -5722,17 +6615,21 @@ export {
5722
6615
  gearWheelWheelDef,
5723
6616
  heliostatDef,
5724
6617
  heliostat_2Def,
5725
- poleRotorDef,
5726
6618
  poleStaticDef,
5727
6619
  rakeDef,
5728
6620
  rakeStopperDef,
5729
6621
  rectangleDef,
6622
+ ringDef,
6623
+ ringGuidanceDef,
5730
6624
  rodDef,
5731
6625
  simplifiedGearWheelDef,
5732
6626
  spiderDef,
5733
6627
  surfaceDef,
5734
6628
  swingDef,
5735
6629
  trapezeDef,
6630
+ vaxisDef,
6631
+ vaxisGuidanceDef,
6632
+ vaxisHolderDef,
5736
6633
  verifyContour1Def,
5737
6634
  verifyContour2Def,
5738
6635
  verifyContour3Def,