desi77 0.1.17 → 0.1.19

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
@@ -1163,8 +1163,11 @@ var houseDef = {
1163
1163
 
1164
1164
  // src/stone/factory.ts
1165
1165
  import {
1166
+ contour as contour4,
1166
1167
  ctrRectangle as ctrRectangle4,
1167
1168
  figure as figure4,
1169
+ degToRad,
1170
+ radToDeg as radToDeg3,
1168
1171
  ffix as ffix4,
1169
1172
  pNumber as pNumber4,
1170
1173
  pCheckbox as pCheckbox2,
@@ -1174,6 +1177,7 @@ import {
1174
1177
  EBVolume as EBVolume4,
1175
1178
  initGeom as initGeom4
1176
1179
  } from "geometrix";
1180
+ import { triALArLL } from "triangule";
1177
1181
  var pDef4 = {
1178
1182
  // partName is used in URL. Choose a name without slash, backslash and space.
1179
1183
  partName: "factory",
@@ -1195,9 +1199,10 @@ var pDef4 = {
1195
1199
  pSectionSeparator4("heights and roof"),
1196
1200
  pNumber4("oh1", "mm", 2800, 2e3, 5e3, 10),
1197
1201
  pNumber4("oh2", "mm", 4e3, 2e3, 1e4, 10),
1202
+ pNumber4("rtn", "triangle", 6, 1, 1e3, 1),
1203
+ pNumber4("ran", "degree", 49, 20, 90, 0.1),
1204
+ pNumber4("ram", "degree", 90, 80, 160, 0.1),
1198
1205
  pNumber4("rth", "mm", 200, 10, 1e3, 10),
1199
- pNumber4("ras", "degree", 49, 20, 90, 0.1),
1200
- pNumber4("ran", "degree", 90, 80, 160, 0.1),
1201
1206
  pSectionSeparator4("lateral windows"),
1202
1207
  pNumber4("swx1", "mm", 1e3, 10, 5e3, 10),
1203
1208
  pNumber4("swx2", "mm", 1e3, 10, 5e3, 10),
@@ -1244,9 +1249,10 @@ var pDef4 = {
1244
1249
  bw: "factory_top.svg",
1245
1250
  oh1: "factory_west.svg",
1246
1251
  oh2: "factory_west.svg",
1247
- rth: "factory_west.svg",
1248
- ras: "factory_west.svg",
1252
+ rtn: "factory_west.svg",
1249
1253
  ran: "factory_west.svg",
1254
+ ram: "factory_west.svg",
1255
+ rth: "factory_west.svg",
1250
1256
  swx1: "factory_side_window.svg",
1251
1257
  swx2: "factory_side_window.svg",
1252
1258
  swh1: "factory_side_window.svg",
@@ -1299,6 +1305,21 @@ function pGeom4(t, param, suffix = "") {
1299
1305
  const oliy = param.oly - 2 * param.ith;
1300
1306
  const officeOx = param.eth + param.ewx;
1301
1307
  const officeOy = param.eth + param.ewy;
1308
+ const roofTriLx = llex / param.rtn;
1309
+ const ran = degToRad(param.ran);
1310
+ const ram = degToRad(param.ram);
1311
+ const ras = Math.PI - ran - ram;
1312
+ if (ras < 0.1) {
1313
+ throw `err162: ras ${ffix4(radToDeg3(ras))} is too small. Reduce ran ${ffix4(param.ran)} or ram ${ffix4(param.ram)} degree`;
1314
+ }
1315
+ const [tr1lBC, tr1lCA, tr1Log] = triALArLL(ras, roofTriLx, ran);
1316
+ rGeome.logstr += tr1Log;
1317
+ const Rh = tr1lBC * Math.sin(ran);
1318
+ const Rhx = tr1lBC * Math.cos(ran);
1319
+ const Rhxs = roofTriLx - Rhx;
1320
+ const Rhxp = 100 * Rhx / roofTriLx;
1321
+ const Rhxsp = 100 * Rhxs / roofTriLx;
1322
+ const Rhyp = 100 * Rh / roofTriLx;
1302
1323
  if (olix < 0) {
1303
1324
  throw `err158: olix ${ffix4(olix)} is too small compare to ith ${param.ith}`;
1304
1325
  }
@@ -1317,6 +1338,10 @@ function pGeom4(t, param, suffix = "") {
1317
1338
  rGeome.logstr += `factory size: llex ${ffix4(llexm)} x lley ${ffix4(lleym)} m
1318
1339
  `;
1319
1340
  rGeome.logstr += `factory surface: ext ${ffix4(llexm * lleym)}, int ${ffix4(llixm * lliym)} m2
1341
+ `;
1342
+ rGeome.logstr += `roof: triL ${ffix4(roofTriLx)}, Rh ${ffix4(Rh)} mm, Rhyp ${ffix4(Rhyp)} %
1343
+ `;
1344
+ rGeome.logstr += `roof north glass length ${ffix4(tr1lBC)} mm, Rhxp ${ffix4(Rhxp)} %, roof south opaque ${ffix4(tr1lCA)} mm, Rhxsp ${ffix4(Rhxsp)} %
1320
1345
  `;
1321
1346
  const ctrFext = ctrRectangle4(0, 0, llex, lley);
1322
1347
  const ctrFint = ctrRectangle4(param.eth, param.eth, llix, lliy);
@@ -1356,6 +1381,16 @@ function pGeom4(t, param, suffix = "") {
1356
1381
  ctrRectangle4(pox + param.ith, 0, olix, param.oh1 - param.ith)
1357
1382
  ]);
1358
1383
  }
1384
+ const ctrRoof = contour4(0, fh);
1385
+ for (let ii = 0; ii < param.rtn; ii++) {
1386
+ ctrRoof.addSegStrokeR(Rhx, Rh).addSegStrokeR(Rhxs, -Rh);
1387
+ }
1388
+ ctrRoof.addSegStrokeR(0, param.rth);
1389
+ for (let ii = 0; ii < param.rtn; ii++) {
1390
+ ctrRoof.addSegStrokeR(-Rhxs, Rh).addSegStrokeR(-Rhx, -Rh);
1391
+ }
1392
+ ctrRoof.closeSegStroke();
1393
+ figWest.addMainO(ctrRoof);
1359
1394
  rGeome.fig = {
1360
1395
  faceTop: figTop,
1361
1396
  faceWest: figWest
@@ -1399,10 +1434,10 @@ var factoryDef = {
1399
1434
  // src/spring/springTorqueA.ts
1400
1435
  import {
1401
1436
  point as point2,
1402
- contour as contour4,
1437
+ contour as contour5,
1403
1438
  contourCircle as contourCircle2,
1404
1439
  figure as figure5,
1405
- radToDeg as radToDeg3,
1440
+ radToDeg as radToDeg4,
1406
1441
  ffix as ffix5,
1407
1442
  pNumber as pNumber5,
1408
1443
  pCheckbox as pCheckbox3,
@@ -1477,12 +1512,12 @@ function pGeom5(t, param, suffix = "") {
1477
1512
  const aIntMin = 2 * Math.asin((RT1 + 0.5 * param.E1) / R1);
1478
1513
  const aInt = param.N1 > 0 ? 2 * Math.PI / param.N1 : 3.14;
1479
1514
  if (aInt < aIntMin) {
1480
- throw `err101: aInt ${ffix5(radToDeg3(aInt))} is too small compare to aIntMin ${ffix5(radToDeg3(aIntMin))} degree`;
1515
+ throw `err101: aInt ${ffix5(radToDeg4(aInt))} is too small compare to aIntMin ${ffix5(radToDeg4(aIntMin))} degree`;
1481
1516
  }
1482
1517
  const aExtMin = 2 * Math.asin((RT2 + 0.5 * param.E2) / R2);
1483
1518
  const aExt = param.N2 > 0 ? 2 * Math.PI / param.N2 : 3.14;
1484
1519
  if (aExt < aExtMin) {
1485
- throw `err106: aExt ${ffix5(radToDeg3(aExt))} is too small compare to aExtMin ${ffix5(radToDeg3(aExtMin))} degree`;
1520
+ throw `err106: aExt ${ffix5(radToDeg4(aExt))} is too small compare to aExtMin ${ffix5(radToDeg4(aExtMin))} degree`;
1486
1521
  }
1487
1522
  const ah2 = Math.asin(E32 / Rh2);
1488
1523
  const ah1 = Math.asin(E32 / Rh1);
@@ -1493,7 +1528,7 @@ function pGeom5(t, param, suffix = "") {
1493
1528
  const Rh1b2 = sinah02 > 0.1 ? (E32 + param.R3) / sinah02 : Rh1 / 2;
1494
1529
  const hollowTriangle = param.N3 > 1 && Rh1b2 > Rh1 + param.R3 - 0.1 ? true : false;
1495
1530
  if (!hollowTriangle && ah0 < 2 * ahR1) {
1496
- throw `err115: ah0 ${ffix5(radToDeg3(ah0))} is too small compare to ah1 ${ffix5(radToDeg3(ah1))}, ahR1 ${ffix5(radToDeg3(ahR1))} degree`;
1531
+ throw `err115: ah0 ${ffix5(radToDeg4(ah0))} is too small compare to ah1 ${ffix5(radToDeg4(ah1))}, ahR1 ${ffix5(radToDeg4(ahR1))} degree`;
1497
1532
  }
1498
1533
  rGeome.logstr += `Dmax ${ffix5(2 * Rmax)}, Dmin ${ffix5(2 * Rmin)} mm
1499
1534
  `;
@@ -1518,7 +1553,7 @@ function pGeom5(t, param, suffix = "") {
1518
1553
  const p1 = point2(0, 0).translatePolar(aRef + ah1, Rh1);
1519
1554
  const p1b = point2(0, 0).translatePolar(aRef + ah0 / 2, Rh1b);
1520
1555
  const [x0, y0] = hollowTriangle ? [p1b.cx, p1b.cy] : [p1.cx, p1.cy];
1521
- const iCtr = contour4(x0, y0).addCornerRounded(param.R3).addSegStrokeAP(aRef + ah2, Rh2).addCornerRounded(param.R3).addPointAP(aRef + ah0 / 2, Rh2).addPointAP(aRef + ah0 - ah2, Rh2).addSegArc2().addCornerRounded(param.R3);
1556
+ const iCtr = contour5(x0, y0).addCornerRounded(param.R3).addSegStrokeAP(aRef + ah2, Rh2).addCornerRounded(param.R3).addPointAP(aRef + ah0 / 2, Rh2).addPointAP(aRef + ah0 - ah2, Rh2).addSegArc2().addCornerRounded(param.R3);
1522
1557
  if (hollowTriangle) {
1523
1558
  iCtr.closeSegStroke();
1524
1559
  } else {
@@ -1574,11 +1609,11 @@ var springTorqueADef = {
1574
1609
  import {
1575
1610
  withinPiPi as withinPiPi2,
1576
1611
  point as point3,
1577
- contour as contour6,
1612
+ contour as contour7,
1578
1613
  contourCircle as contourCircle3,
1579
1614
  figure as figure6,
1580
- degToRad as degToRad2,
1581
- radToDeg as radToDeg5,
1615
+ degToRad as degToRad3,
1616
+ radToDeg as radToDeg6,
1582
1617
  ffix as ffix7,
1583
1618
  pNumber as pNumber6,
1584
1619
  pDropdown as pDropdown3,
@@ -1592,15 +1627,15 @@ import { triALLrLAA as triALLrLAA2 } from "triangule";
1592
1627
  // src/spring/libPlugTorque.ts
1593
1628
  import {
1594
1629
  withinPiPi,
1595
- contour as contour5,
1596
- degToRad,
1597
- radToDeg as radToDeg4,
1630
+ contour as contour6,
1631
+ degToRad as degToRad2,
1632
+ radToDeg as radToDeg5,
1598
1633
  ffix as ffix6
1599
1634
  } from "geometrix";
1600
1635
  import { triALLrLAA } from "triangule";
1601
1636
  function ctrPlugExtern(param, RbEmax) {
1602
1637
  let rLog = "";
1603
- const aM = degToRad(param.aM);
1638
+ const aM = degToRad2(param.aM);
1604
1639
  const Rt = param.Dt / 2;
1605
1640
  const aTooth = 2 * Math.PI / param.Nt;
1606
1641
  const aAddenE = param.ate * aTooth / 100;
@@ -1625,9 +1660,9 @@ function ctrPlugExtern(param, RbEmax) {
1625
1660
  }
1626
1661
  const tooSmallAngle = 1e-4;
1627
1662
  if (aAddE < tooSmallAngle || aDedE < tooSmallAngle) {
1628
- throw `err164: aAddE ${ffix6(radToDeg4(aAddE))} or aDedE ${ffix6(radToDeg4(aDedE))} are too small`;
1663
+ throw `err164: aAddE ${ffix6(radToDeg5(aAddE))} or aDedE ${ffix6(radToDeg5(aDedE))} are too small`;
1629
1664
  }
1630
- const ctrToothE = contour5(RminE, 0);
1665
+ const ctrToothE = contour6(RminE, 0);
1631
1666
  for (let ii = 0; ii < param.Nt; ii++) {
1632
1667
  const aRef = ii * aTooth;
1633
1668
  ctrToothE.addSegStrokeAP(aRef + aSlopeE, RbE).addCornerRounded(param.Rae);
@@ -1730,7 +1765,7 @@ function pGeom6(t, param, suffix = "") {
1730
1765
  rGeome.logstr += `${rGeome.partName} simTime: ${t}
1731
1766
  `;
1732
1767
  try {
1733
- const aM = degToRad2(param.aM);
1768
+ const aM = degToRad3(param.aM);
1734
1769
  const Rt = param.Dt / 2;
1735
1770
  const Ri = param.Di / 2;
1736
1771
  const Re = param.De / 2;
@@ -1781,10 +1816,10 @@ function pGeom6(t, param, suffix = "") {
1781
1816
  throw `err087: RminI ${RminI} is too small because of Di ${param.Di}, DTi ${param.DTi} or Ei ${param.Ei}`;
1782
1817
  }
1783
1818
  if (adTi < 2 * aMindTi) {
1784
- throw `err131: adTi ${ffix7(radToDeg5(adTi))} is too small compare to aMindTi ${ffix7(radToDeg5(aMindTi))} degree`;
1819
+ throw `err131: adTi ${ffix7(radToDeg6(adTi))} is too small compare to aMindTi ${ffix7(radToDeg6(aMindTi))} degree`;
1785
1820
  }
1786
1821
  if (adTe < 2 * aMindTe) {
1787
- throw `err134: adTe ${ffix7(radToDeg5(adTe))} is too small compare to aMindTe ${ffix7(radToDeg5(aMindTe))} degree`;
1822
+ throw `err134: adTe ${ffix7(radToDeg6(adTe))} is too small compare to aMindTe ${ffix7(radToDeg6(aMindTe))} degree`;
1788
1823
  }
1789
1824
  if (param.ati > param.ate) {
1790
1825
  throw `err145: ate ${param.ate} is too small compare to ati ${param.ati} %`;
@@ -1797,22 +1832,22 @@ function pGeom6(t, param, suffix = "") {
1797
1832
  }
1798
1833
  const tooSmallAngle = 1e-4;
1799
1834
  if (aAddI < tooSmallAngle || aDedI < tooSmallAngle) {
1800
- throw `err161: aAddI ${ffix7(radToDeg5(aAddI))} or aDedI ${ffix7(radToDeg5(aDedI))} are too small`;
1835
+ throw `err161: aAddI ${ffix7(radToDeg6(aAddI))} or aDedI ${ffix7(radToDeg6(aDedI))} are too small`;
1801
1836
  }
1802
1837
  if (aAddE < tooSmallAngle || aDedE < tooSmallAngle) {
1803
- throw `err164: aAddE ${ffix7(radToDeg5(aAddE))} or aDedE ${ffix7(radToDeg5(aDedE))} are too small`;
1838
+ throw `err164: aAddE ${ffix7(radToDeg6(aAddE))} or aDedE ${ffix7(radToDeg6(aDedE))} are too small`;
1804
1839
  }
1805
1840
  rGeome.logstr += `Extern: Dmax ${ffix7(2 * RmaxE)}, Dmin ${ffix7(2 * RminE)} mm
1806
1841
  `;
1807
1842
  rGeome.logstr += `Intern: Dmax ${ffix7(2 * RmaxI)}, Dmin ${ffix7(2 * RminI)} mm
1808
1843
  `;
1809
- rGeome.logstr += `aSlack: ${ffix7(radToDeg5(aSlack))} degree
1844
+ rGeome.logstr += `aSlack: ${ffix7(radToDeg6(aSlack))} degree
1810
1845
  `;
1811
1846
  rGeome.logstr += `Tooth: Ht ${param.Ht}, moduli ${ffix7(moduli)}, Hti ${ffix7(Htai + Htdi)}, Hte ${ffix7(Htae + Htde)} mm
1812
1847
  `;
1813
- rGeome.logstr += `Tooth angle intern: aM ${param.aM}, aM[adden] ${ffix7(radToDeg5(-aAddenI / 2))}, aM[deden] ${ffix7(radToDeg5((aTooth - aAddenI) / 2))} degree
1848
+ rGeome.logstr += `Tooth angle intern: aM ${param.aM}, aM[adden] ${ffix7(radToDeg6(-aAddenI / 2))}, aM[deden] ${ffix7(radToDeg6((aTooth - aAddenI) / 2))} degree
1814
1849
  `;
1815
- rGeome.logstr += `Tooth angle extern: aM ${param.aM}, aM[adden] ${ffix7(radToDeg5(-aAddenE / 2))}, aM[deden] ${ffix7(radToDeg5((aTooth - aAddenE) / 2))} degree
1850
+ rGeome.logstr += `Tooth angle extern: aM ${param.aM}, aM[adden] ${ffix7(radToDeg6(-aAddenE / 2))}, aM[deden] ${ffix7(radToDeg6((aTooth - aAddenE) / 2))} degree
1816
1851
  `;
1817
1852
  const ctrsI = [];
1818
1853
  ctrsI.push(contourCircle3(0, 0, RminI));
@@ -1820,7 +1855,7 @@ function pGeom6(t, param, suffix = "") {
1820
1855
  const p1 = point3(0, 0).translatePolar(ii * adTi, Ri);
1821
1856
  ctrsI.push(contourCircle3(p1.cx, p1.cy, RTi));
1822
1857
  }
1823
- const ctrToothI = contour6(RbI, 0);
1858
+ const ctrToothI = contour7(RbI, 0);
1824
1859
  for (let ii = 0; ii < param.Nt; ii++) {
1825
1860
  const aRef = ii * aTooth;
1826
1861
  ctrToothI.addSegStrokeAP(aRef + aSlopeI, RmaxI).addCornerRounded(param.Rai);
@@ -1925,10 +1960,10 @@ var plugTorqueDef = {
1925
1960
  import {
1926
1961
  withinZeroPi,
1927
1962
  point as point4,
1928
- contour as contour7,
1963
+ contour as contour8,
1929
1964
  contourCircle as contourCircle4,
1930
1965
  figure as figure7,
1931
- radToDeg as radToDeg6,
1966
+ radToDeg as radToDeg7,
1932
1967
  ffix as ffix8,
1933
1968
  pNumber as pNumber7,
1934
1969
  pCheckbox as pCheckbox4,
@@ -2094,12 +2129,12 @@ function pGeom7(t, param, suffix = "") {
2094
2129
  const aHMinI = 2 * Math.asin((RTi + 0.5 * param.Ei) / Ri);
2095
2130
  const aHI = param.Ni > 0 ? 2 * Math.PI / param.Ni : 3.14;
2096
2131
  if (aHI < aHMinI) {
2097
- throw `err126: aHI ${ffix8(radToDeg6(aHI))} is too small compare to aHMinI ${ffix8(radToDeg6(aHMinI))} degree`;
2132
+ throw `err126: aHI ${ffix8(radToDeg7(aHI))} is too small compare to aHMinI ${ffix8(radToDeg7(aHMinI))} degree`;
2098
2133
  }
2099
2134
  const aHMinE = 2 * Math.asin((RTe + 0.5 * param.Ee) / Re);
2100
2135
  const aHE = param.Ne > 0 ? 2 * Math.PI / param.Ne : 3.14;
2101
2136
  if (aHE < aHMinE) {
2102
- throw `err131: aHE ${ffix8(radToDeg6(aHE))} is too small compare to aHMinE ${ffix8(radToDeg6(aHMinE))} degree`;
2137
+ throw `err131: aHE ${ffix8(radToDeg7(aHE))} is too small compare to aHMinE ${ffix8(radToDeg7(aHMinE))} degree`;
2103
2138
  }
2104
2139
  const pts1 = [];
2105
2140
  const Rk1 = Rsi + Esi + dRLs - Rk;
@@ -2131,7 +2166,7 @@ function pGeom7(t, param, suffix = "") {
2131
2166
  const Rkl = Rk + Wk2;
2132
2167
  rGeome.logstr += `Dmax ${ffix8(2 * Rmax)}, Dmin1 ${ffix8(2 * Rmin1)} mm
2133
2168
  `;
2134
- rGeome.logstr += `Spring area: aSpring ${ffix8(radToDeg6(aSpring))} degree, dRLs ${ffix8(dRLs)}, HLs ${ffix8(HLs)} mm
2169
+ rGeome.logstr += `Spring area: aSpring ${ffix8(radToDeg7(aSpring))} degree, dRLs ${ffix8(dRLs)}, HLs ${ffix8(HLs)} mm
2135
2170
  `;
2136
2171
  rGeome.logstr += `Spring zigzag: Ek ${ffix8(Ek)}, Rk ${ffix8(Rk)} mm
2137
2172
  `;
@@ -2152,7 +2187,7 @@ function pGeom7(t, param, suffix = "") {
2152
2187
  const p1 = point4(0, 0).translatePolar(ii * aHE, Re);
2153
2188
  ctrsH.push(contourCircle4(p1.cx, p1.cy, RTe));
2154
2189
  }
2155
- const ctrSpringEnv = contour7(Rsi + Esi, 0).addSegStrokeAP(0, Rse - Ese).addPointAP(aSpring / 2, Rse - Ese).addPointAP(aSpring, Rse - Ese).addSegArc2().addSegStrokeAP(aSpring, Rsi + Esi).addPointAP(aSpring / 2, Rsi + Esi).addPointAP(0, Rsi + Esi).addSegArc2();
2190
+ const ctrSpringEnv = contour8(Rsi + Esi, 0).addSegStrokeAP(0, Rse - Ese).addPointAP(aSpring / 2, Rse - Ese).addPointAP(aSpring, Rse - Ese).addSegArc2().addSegStrokeAP(aSpring, Rsi + Esi).addPointAP(aSpring / 2, Rsi + Esi).addPointAP(0, Rsi + Esi).addSegArc2();
2156
2191
  figProfile.addSecond(ctrSpringEnv);
2157
2192
  figProfile.addSecond(ctrSpringEnv.rotate(0, 0, aSpringStep));
2158
2193
  figProfile.addSecond(ctrSpringEnv.rotate(0, 0, -aSpringStep));
@@ -2160,7 +2195,7 @@ function pGeom7(t, param, suffix = "") {
2160
2195
  figProfile.addSecond(contourCircle4(pts1[ii].cx, pts1[ii].cy, Rk));
2161
2196
  figProfile.addSecond(contourCircle4(pts2[ii].cx, pts2[ii].cy, Rk));
2162
2197
  }
2163
- const ctrPartial1 = contour7(pt1.cx, pt1.cy);
2198
+ const ctrPartial1 = contour8(pt1.cx, pt1.cy);
2164
2199
  for (let ii = 0; ii < param.Nk; ii++) {
2165
2200
  let a11 = -Math.PI / 2;
2166
2201
  const [a12, a21] = calcAzig(pts1[ii].cx, pts2[ii].cx, Rks, Rkl);
@@ -2194,7 +2229,7 @@ function pGeom7(t, param, suffix = "") {
2194
2229
  ctrPartial1.addPointA(pt2b.cx, pt2b.cy).addPointA(pt2c.cx, pt2c.cy).addSegArc2().addSegStrokeA(pt2.cx, pt2.cy);
2195
2230
  const [, firsta22] = calcAzig(pts1[param.Nk - 1].cx, pts2[param.Nk - 1].cx, Rkl, Rks);
2196
2231
  const firstp22 = pts2[param.Nk - 1].translatePolar(firsta22, Rks);
2197
- const ctrPartial2 = contour7(pt3.cx, pt3.cy).addSegStrokeA(pt3c.cx, pt3c.cy).addPointA(pt3b.cx, pt3b.cy).addPointA(firstp22.cx, firstp22.cy).addSegArc2();
2232
+ const ctrPartial2 = contour8(pt3.cx, pt3.cy).addSegStrokeA(pt3c.cx, pt3c.cy).addPointA(pt3b.cx, pt3b.cy).addPointA(firstp22.cx, firstp22.cy).addSegArc2();
2198
2233
  for (let ii = param.Nk - 1; ii >= 0; ii--) {
2199
2234
  let a21 = Math.PI / 2;
2200
2235
  let a12 = -Math.PI / 2;
@@ -2219,7 +2254,7 @@ function pGeom7(t, param, suffix = "") {
2219
2254
  ctrPartial2.addSegStrokeA(p11.cx, p11.cy).addPointA(p1b.cx, p1b.cy).addPointA(p12.cx, p12.cy).addSegArc2();
2220
2255
  }
2221
2256
  ctrPartial2.addSegStrokeA(pt4.cx, pt4.cy);
2222
- const ctrSpringHollow = contour7(pt1.cx, pt1.cy).addCornerRounded(param.Rrsi).addPartial(ctrPartial1).addCornerRounded(param.Rrse).addPointAP(aSpring + aSpringStep / 2, Rse).addPointAP(aSpring + aSpringStep - a23, Rse).addSegArc2().addCornerRounded(param.Rrse).addPartial(ctrPartial2.rotate(0, 0, aSpringStep)).addCornerRounded(param.Rrsi).addPointAP(aSpringStep / 2, Rsi).addPointAP(a14, Rsi).addSegArc2();
2257
+ const ctrSpringHollow = contour8(pt1.cx, pt1.cy).addCornerRounded(param.Rrsi).addPartial(ctrPartial1).addCornerRounded(param.Rrse).addPointAP(aSpring + aSpringStep / 2, Rse).addPointAP(aSpring + aSpringStep - a23, Rse).addSegArc2().addCornerRounded(param.Rrse).addPartial(ctrPartial2.rotate(0, 0, aSpringStep)).addCornerRounded(param.Rrsi).addPointAP(aSpringStep / 2, Rsi).addPointAP(a14, Rsi).addSegArc2();
2223
2258
  for (let ii = 0; ii < param.Ns; ii++) {
2224
2259
  ctrsH.push(ctrSpringHollow.rotate(0, 0, ii * aSpringStep));
2225
2260
  }
@@ -2266,10 +2301,10 @@ var springTorqueBDef = {
2266
2301
  // src/spring/springTorqueC.ts
2267
2302
  import {
2268
2303
  point as point5,
2269
- contour as contour8,
2304
+ contour as contour9,
2270
2305
  contourCircle as contourCircle5,
2271
2306
  figure as figure8,
2272
- radToDeg as radToDeg7,
2307
+ radToDeg as radToDeg8,
2273
2308
  ffix as ffix9,
2274
2309
  pNumber as pNumber8,
2275
2310
  pCheckbox as pCheckbox5,
@@ -2418,7 +2453,7 @@ function pGeom8(t, param, suffix = "") {
2418
2453
  const aStart1 = iParity === 0 ? -Math.PI / 2 : Math.PI / 2 + aSpring;
2419
2454
  const siRk = iParity === 0 ? Rks : Rkl;
2420
2455
  const startPt1 = pts[0].translatePolar(aStart1, siRk);
2421
- const rCtr = contour8(startPt1.cx, startPt1.cy);
2456
+ const rCtr = contour9(startPt1.cx, startPt1.cy);
2422
2457
  for (let ii = 0; ii < param.Nk; ii++) {
2423
2458
  const iiParity3 = (ii + iParity) % 2;
2424
2459
  const apt = Math.atan2(pts[ii].cy, pts[ii].cx);
@@ -2468,7 +2503,7 @@ function pGeom8(t, param, suffix = "") {
2468
2503
  const aStart1 = eParity === 0 ? -Math.PI / 2 : Math.PI / 2 + aSpring;
2469
2504
  const siRk = eParity === 0 ? Rkl : Rks;
2470
2505
  const startPt1 = pts[param.Nk - 1].translatePolar(aStart1, siRk);
2471
- const rCtr = contour8(startPt1.cx, startPt1.cy);
2506
+ const rCtr = contour9(startPt1.cx, startPt1.cy);
2472
2507
  for (let ii = param.Nk - 1; ii >= 0; ii--) {
2473
2508
  const iiParity3 = (ii + iParity) % 2;
2474
2509
  const apt = Math.atan2(pts[ii].cy, pts[ii].cx);
@@ -2517,7 +2552,7 @@ function pGeom8(t, param, suffix = "") {
2517
2552
  const pp1 = ip1 === 0 ? ppp0 : ppp1;
2518
2553
  const pp2 = ip2 === 0 ? ppp0 : ppp1;
2519
2554
  const [ppib, ppeb] = pppb2(ip1, ip2);
2520
- const ctr = contour8(pp1[0].cx, pp1[0].cy).addCornerRounded(param.Rrsi).addSegStrokeA(pp1[1].cx, pp1[1].cy).addPartial(ctrPartial12(ip1)).addSegStrokeA(pp1[3].cx, pp1[3].cy).addCornerRounded(param.Rrse).addPointA(ppeb.cx, ppeb.cy).addPointA(pp2[4].cx, pp2[4].cy).addSegArc2().addCornerRounded(param.Rrse).addSegStrokeA(pp2[5].cx, pp2[5].cy).addPartial(ctrPartial22(ip2).rotate(0, 0, aSpringStep)).addSegStrokeA(pp2[7].cx, pp2[7].cy).addCornerRounded(param.Rrsi).addPointA(ppib.cx, ppib.cy).addPointA(pp1[0].cx, pp1[0].cy).addSegArc2();
2555
+ const ctr = contour9(pp1[0].cx, pp1[0].cy).addCornerRounded(param.Rrsi).addSegStrokeA(pp1[1].cx, pp1[1].cy).addPartial(ctrPartial12(ip1)).addSegStrokeA(pp1[3].cx, pp1[3].cy).addCornerRounded(param.Rrse).addPointA(ppeb.cx, ppeb.cy).addPointA(pp2[4].cx, pp2[4].cy).addSegArc2().addCornerRounded(param.Rrse).addSegStrokeA(pp2[5].cx, pp2[5].cy).addPartial(ctrPartial22(ip2).rotate(0, 0, aSpringStep)).addSegStrokeA(pp2[7].cx, pp2[7].cy).addCornerRounded(param.Rrsi).addPointA(ppib.cx, ppib.cy).addPointA(pp1[0].cx, pp1[0].cy).addSegArc2();
2521
2556
  return ctr.rotate(0, 0, ii * aSpringStep);
2522
2557
  };
2523
2558
  var prePoints = prePoints2, pppI = pppI2, externParity = externParity2, pppE = pppE2, iiParity = iiParity2, pppb = pppb2, ctrPartial1 = ctrPartial12, ctrPartial2 = ctrPartial22, ctrSpringHollow = ctrSpringHollow2;
@@ -2556,12 +2591,12 @@ function pGeom8(t, param, suffix = "") {
2556
2591
  const aHMinI = 2 * Math.asin((RTi + 0.5 * param.Ei) / Ri);
2557
2592
  const aHI = param.Ni > 0 ? 2 * Math.PI / param.Ni : 3.14;
2558
2593
  if (aHI < aHMinI) {
2559
- throw `err126: aHI ${ffix9(radToDeg7(aHI))} is too small compare to aHMinI ${ffix9(radToDeg7(aHMinI))} degree`;
2594
+ throw `err126: aHI ${ffix9(radToDeg8(aHI))} is too small compare to aHMinI ${ffix9(radToDeg8(aHMinI))} degree`;
2560
2595
  }
2561
2596
  const aHMinE = 2 * Math.asin((RTe + 0.5 * param.Ee) / Re);
2562
2597
  const aHE = param.Ne > 0 ? 2 * Math.PI / param.Ne : 3.14;
2563
2598
  if (aHE < aHMinE) {
2564
- throw `err131: aHE ${ffix9(radToDeg7(aHE))} is too small compare to aHMinE ${ffix9(radToDeg7(aHMinE))} degree`;
2599
+ throw `err131: aHE ${ffix9(radToDeg8(aHE))} is too small compare to aHMinE ${ffix9(radToDeg8(aHMinE))} degree`;
2565
2600
  }
2566
2601
  const pts0 = [];
2567
2602
  const pts1 = [];
@@ -2607,13 +2642,13 @@ function pGeom8(t, param, suffix = "") {
2607
2642
  const Rkl = Rk + Wk2;
2608
2643
  rGeome.logstr += `Dmax ${ffix9(2 * Rmax)}, Dmin1 ${ffix9(2 * Rmin1)} mm
2609
2644
  `;
2610
- rGeome.logstr += `Spring area: aSpring ${ffix9(radToDeg7(aSpring))} degree, dRLs ${ffix9(dRLs)} mm
2645
+ rGeome.logstr += `Spring area: aSpring ${ffix9(radToDeg8(aSpring))} degree, dRLs ${ffix9(dRLs)} mm
2611
2646
  `;
2612
2647
  rGeome.logstr += `Spring zigzag: Ek ${ffix9(Ek)}, Rk ${ffix9(Rk)} mm
2613
2648
  `;
2614
2649
  if (aSpring < 2 * aArcMin) {
2615
2650
  zagArc = false;
2616
- rGeome.logstr += `Spring zigzag forced to stroke because of aArcMin ${ffix9(radToDeg7(aArcMin))} degree
2651
+ rGeome.logstr += `Spring zigzag forced to stroke because of aArcMin ${ffix9(radToDeg8(aArcMin))} degree
2617
2652
  `;
2618
2653
  }
2619
2654
  const ctrExt = contourCircle5(0, 0, Rmax);
@@ -2633,7 +2668,7 @@ function pGeom8(t, param, suffix = "") {
2633
2668
  const p1 = point5(0, 0).translatePolar(ii * aHE, Re);
2634
2669
  ctrsH.push(contourCircle5(p1.cx, p1.cy, RTe));
2635
2670
  }
2636
- const ctrSpringEnv = contour8(Rsi + Esi, 0).addSegStrokeAP(0, Rse - Ese).addPointAP(aSpring / 2, Rse - Ese).addPointAP(aSpring, Rse - Ese).addSegArc2().addSegStrokeAP(aSpring, Rsi + Esi).addPointAP(aSpring / 2, Rsi + Esi).addPointAP(0, Rsi + Esi).addSegArc2();
2671
+ const ctrSpringEnv = contour9(Rsi + Esi, 0).addSegStrokeAP(0, Rse - Ese).addPointAP(aSpring / 2, Rse - Ese).addPointAP(aSpring, Rse - Ese).addSegArc2().addSegStrokeAP(aSpring, Rsi + Esi).addPointAP(aSpring / 2, Rsi + Esi).addPointAP(0, Rsi + Esi).addSegArc2();
2637
2672
  figProfile.addSecond(ctrSpringEnv);
2638
2673
  figProfile.addSecond(ctrSpringEnv.rotate(0, 0, aSpringStep));
2639
2674
  figProfile.addSecond(ctrSpringEnv.rotate(0, 0, -aSpringStep));
@@ -2690,7 +2725,7 @@ var springTorqueCDef = {
2690
2725
 
2691
2726
  // src/spring/springWorm.ts
2692
2727
  import {
2693
- contour as contour9,
2728
+ contour as contour10,
2694
2729
  contourCircle as contourCircle6,
2695
2730
  ctrRectangle as ctrRectangle5,
2696
2731
  figure as figure9,
@@ -2706,10 +2741,10 @@ function makeCtrGroove(x0, y0, xl, yl, roundTop) {
2706
2741
  const xl2 = xl / 2;
2707
2742
  const yl2 = yl - xl2;
2708
2743
  if (roundTop) {
2709
- const rCtr = contour9(x0, y0).addSegStrokeR(xl, 0).addSegStrokeR(0, yl2).addPointR(-xl2, xl2).addPointR(-xl, 0).addSegArc2().closeSegStroke();
2744
+ const rCtr = contour10(x0, y0).addSegStrokeR(xl, 0).addSegStrokeR(0, yl2).addPointR(-xl2, xl2).addPointR(-xl, 0).addSegArc2().closeSegStroke();
2710
2745
  return rCtr;
2711
2746
  } else {
2712
- const rCtr = contour9(x0, y0 + xl2).addPointR(xl2, -xl2).addPointR(xl, 0).addSegArc2().addSegStrokeR(0, yl2).addSegStrokeR(-xl, 0).closeSegStroke();
2747
+ const rCtr = contour10(x0, y0 + xl2).addPointR(xl2, -xl2).addPointR(xl, 0).addSegArc2().addSegStrokeR(0, yl2).addSegStrokeR(-xl, 0).closeSegStroke();
2713
2748
  return rCtr;
2714
2749
  }
2715
2750
  }
@@ -2974,10 +3009,10 @@ var springWormDef = {
2974
3009
 
2975
3010
  // src/spring/springOne.ts
2976
3011
  import {
2977
- contour as contour10,
3012
+ contour as contour11,
2978
3013
  contourCircle as contourCircle7,
2979
3014
  figure as figure10,
2980
- degToRad as degToRad3,
3015
+ degToRad as degToRad4,
2981
3016
  ffix as ffix11,
2982
3017
  pNumber as pNumber10,
2983
3018
  pCheckbox as pCheckbox6,
@@ -3081,7 +3116,7 @@ function pGeom10(t, param, suffix = "") {
3081
3116
  `;
3082
3117
  try {
3083
3118
  let makeSpringHollow2 = function(iLen) {
3084
- const rCtr = contour10(0, 0).addCornerRounded(sRc).addSegStrokeR(iLen, 0).addCornerRounded(sRc).addSegStrokeR(0, param.shEy).addCornerRounded(sRc).addSegStrokeR(-iLen, 0).addCornerRounded(sRc).closeSegStroke();
3119
+ const rCtr = contour11(0, 0).addCornerRounded(sRc).addSegStrokeR(iLen, 0).addCornerRounded(sRc).addSegStrokeR(0, param.shEy).addCornerRounded(sRc).addSegStrokeR(-iLen, 0).addCornerRounded(sRc).closeSegStroke();
3085
3120
  return rCtr;
3086
3121
  }, calcXref2 = function(iyRef, iSel, idx) {
3087
3122
  const cotan = iSel === 0 ? cotanBAD : cotanBADb;
@@ -3108,7 +3143,7 @@ function pGeom10(t, param, suffix = "") {
3108
3143
  const R1 = param.D1 / 2;
3109
3144
  const R3 = param.D3 / 2;
3110
3145
  const Hwall = param.H1 + param.H2 + param.R2;
3111
- const aJa = degToRad3(param.Jangle);
3146
+ const aJa = degToRad4(param.Jangle);
3112
3147
  const aJn = param.Jneutral / 100;
3113
3148
  const aJr = param.Jradius;
3114
3149
  const aJm = param.Jmark;
@@ -3274,7 +3309,7 @@ var springOneDef = {
3274
3309
 
3275
3310
  // src/spring/springSide.ts
3276
3311
  import {
3277
- contour as contour11,
3312
+ contour as contour12,
3278
3313
  contourCircle as contourCircle8,
3279
3314
  ffix as ffix12,
3280
3315
  pNumber as pNumber11,
@@ -3354,7 +3389,7 @@ function pGeom11(t, param, suffix = "") {
3354
3389
  `;
3355
3390
  try {
3356
3391
  let makeSpringHollow2 = function(iLen) {
3357
- const rCtr = contour11(0, 0).addCornerRounded(sRc).addSegStrokeR(iLen, 0).addCornerRounded(sRc).addSegStrokeR(0, param.shEy).addCornerRounded(sRc).addSegStrokeR(-iLen, 0).addCornerRounded(sRc).closeSegStroke();
3392
+ const rCtr = contour12(0, 0).addCornerRounded(sRc).addSegStrokeR(iLen, 0).addCornerRounded(sRc).addSegStrokeR(0, param.shEy).addCornerRounded(sRc).addSegStrokeR(-iLen, 0).addCornerRounded(sRc).closeSegStroke();
3358
3393
  return rCtr;
3359
3394
  }, calcXref2 = function(iyRef, iSel, idx) {
3360
3395
  const cotan = iSel === 0 ? cotanBAD : cotanBADb;
@@ -3590,9 +3625,9 @@ var springSideDef = {
3590
3625
 
3591
3626
  // src/spring/springInt.ts
3592
3627
  import {
3593
- contour as contour12,
3628
+ contour as contour13,
3594
3629
  contourCircle as contourCircle9,
3595
- degToRad as degToRad4,
3630
+ degToRad as degToRad5,
3596
3631
  ffix as ffix13,
3597
3632
  pNumber as pNumber12,
3598
3633
  pCheckbox as pCheckbox8,
@@ -3671,7 +3706,7 @@ function pGeom12(t, param, suffix = "") {
3671
3706
  `;
3672
3707
  try {
3673
3708
  let makeSpringHollow2 = function(iLen) {
3674
- const rCtr = contour12(0, 0).addCornerRounded(sRc).addSegStrokeR(iLen, 0).addCornerRounded(sRc).addSegStrokeR(0, param.shEy).addCornerRounded(sRc).addSegStrokeR(-iLen, 0).addCornerRounded(sRc).closeSegStroke();
3709
+ const rCtr = contour13(0, 0).addCornerRounded(sRc).addSegStrokeR(iLen, 0).addCornerRounded(sRc).addSegStrokeR(0, param.shEy).addCornerRounded(sRc).addSegStrokeR(-iLen, 0).addCornerRounded(sRc).closeSegStroke();
3675
3710
  return rCtr;
3676
3711
  }, calcXref2 = function(iyRef, idx) {
3677
3712
  const cotan = cotanBAD;
@@ -3707,7 +3742,7 @@ function pGeom12(t, param, suffix = "") {
3707
3742
  return rFa;
3708
3743
  };
3709
3744
  var makeSpringHollow = makeSpringHollow2, calcXref = calcXref2, makeCtrWall = makeCtrWall2, makeFaBottom = makeFaBottom2;
3710
- const aJa = degToRad4(param.Jangle);
3745
+ const aJa = degToRad5(param.Jangle);
3711
3746
  const aJn = param.Jneutral / 100;
3712
3747
  const aJr = param.Jradius;
3713
3748
  const aJm = param.Jmark;
@@ -3847,12 +3882,12 @@ var springIntDef = {
3847
3882
  // src/heliostat/heliostat.ts
3848
3883
  import {
3849
3884
  point as point6,
3850
- contour as contour13,
3885
+ contour as contour14,
3851
3886
  contourCircle as contourCircle10,
3852
3887
  ctrRectangle as ctrRectangle6,
3853
3888
  figure as figure11,
3854
- degToRad as degToRad5,
3855
- radToDeg as radToDeg8,
3889
+ degToRad as degToRad6,
3890
+ radToDeg as radToDeg9,
3856
3891
  ffix as ffix14,
3857
3892
  pNumber as pNumber13,
3858
3893
  pDropdown as pDropdown7,
@@ -3972,16 +4007,16 @@ function pGeom13(t, param, suffix = "") {
3972
4007
  `;
3973
4008
  try {
3974
4009
  let ctrBottomPole2 = function(sig) {
3975
- const rCtr = contour13(sig * R1, 0).addSegStrokeR(0, param.E1).addSegStrokeR(sig * (R3 - R1), L1b).addSegStrokeR(-sig * S3c, 0).addSegStrokeR(0, -param.E3).addSegStrokeR(sig * param.S3, 0).addSegStrokeA(sig * (R1 - S1b), param.E1).addSegStrokeR(0, -param.E1).closeSegStroke();
4010
+ const rCtr = contour14(sig * R1, 0).addSegStrokeR(0, param.E1).addSegStrokeR(sig * (R3 - R1), L1b).addSegStrokeR(-sig * S3c, 0).addSegStrokeR(0, -param.E3).addSegStrokeR(sig * param.S3, 0).addSegStrokeA(sig * (R1 - S1b), param.E1).addSegStrokeR(0, -param.E1).closeSegStroke();
3976
4011
  return rCtr;
3977
4012
  }, ctrTopPole2 = function(sig) {
3978
- const rCtr = contour13(-sig * R4e, posY4).addSegStrokeR(sig * E4b, 0).addSegStrokeR(sig * (R4i - R5b), param.L4).addSegStrokeR(sig * (R5b - R5), 0).addSegStrokeR(0, param.E5).addSegStrokeR(sig * (R5 - R5t), 0).addSegStrokeR(sig * (R5t - R7b), param.H6).addSegStrokeR(sig * (R7b - R7i), 0).addSegStrokeR(0, param.E7).addSegStrokeR(sig * (R7i - R7t), 0).closeSegStroke();
4013
+ const rCtr = contour14(-sig * R4e, posY4).addSegStrokeR(sig * E4b, 0).addSegStrokeR(sig * (R4i - R5b), param.L4).addSegStrokeR(sig * (R5b - R5), 0).addSegStrokeR(0, param.E5).addSegStrokeR(sig * (R5 - R5t), 0).addSegStrokeR(sig * (R5t - R7b), param.H6).addSegStrokeR(sig * (R7b - R7i), 0).addSegStrokeR(0, param.E7).addSegStrokeR(sig * (R7i - R7t), 0).closeSegStroke();
3979
4014
  return rCtr;
3980
4015
  }, ctrDiag2 = function(posX, RR, AA) {
3981
4016
  const rCtr = ctrRectangle6(posX - RR, posY4, 2 * RR, diagL).rotate(posX, posY4, AA);
3982
4017
  return rCtr;
3983
4018
  }, ctrCleanDiag2 = function(sig) {
3984
- const rCtr = contour13(-sig * R4i, posY4).addSegStrokeR(sig * (R4i - R5b), param.L4).addSegStrokeR(sig * R5b, 0).addSegStrokeR(0, -param.L4 - 2 * param.D6).addSegStrokeR(-sig * R4i, 0).closeSegStroke();
4019
+ const rCtr = contour14(-sig * R4i, posY4).addSegStrokeR(sig * (R4i - R5b), param.L4).addSegStrokeR(sig * R5b, 0).addSegStrokeR(0, -param.L4 - 2 * param.D6).addSegStrokeR(-sig * R4i, 0).closeSegStroke();
3985
4020
  return rCtr;
3986
4021
  };
3987
4022
  var ctrBottomPole = ctrBottomPole2, ctrTopPole = ctrTopPole2, ctrDiag = ctrDiag2, ctrCleanDiag = ctrCleanDiag2;
@@ -4039,7 +4074,7 @@ function pGeom13(t, param, suffix = "") {
4039
4074
  const diagL = diagHeight / Math.cos(diagA);
4040
4075
  const R8 = param.G8 / 2;
4041
4076
  const R82 = R8 + param.F8;
4042
- const a82 = degToRad5(param.a8) / 2;
4077
+ const a82 = degToRad6(param.a8) / 2;
4043
4078
  const posY8 = posY6 + param.H8;
4044
4079
  const [t2iL3, triLog3] = triLALrL(param.H8, a82, R82);
4045
4080
  const [t2iA31, triLog4] = triLLLrA(param.H8, R82, t2iL3);
@@ -4073,7 +4108,7 @@ function pGeom13(t, param, suffix = "") {
4073
4108
  if (param.H6 < param.D6) {
4074
4109
  throw `err200: H6 ${ffix14(param.H6)} is too small compare to D6 ${ffix14(param.D6)} mm`;
4075
4110
  }
4076
- rGeome.logstr += `Cone inclination ${ffix14(radToDeg8(inclination))}, diagonal ${ffix14(radToDeg8(diagA))} deg
4111
+ rGeome.logstr += `Cone inclination ${ffix14(radToDeg9(inclination))}, diagonal ${ffix14(radToDeg9(diagA))} deg
4077
4112
  `;
4078
4113
  rGeome.logstr += `Diameters: D1 ${ffix14(2 * R1)}, D1b ${ffix14(2 * R1)}, D3 ${ffix14(2 * R3)}, D5 ${ffix14(2 * R5)} mm
4079
4114
  `;
@@ -4094,7 +4129,7 @@ function pGeom13(t, param, suffix = "") {
4094
4129
  figBottomDisc.addSecond(contourCircle10(0, 0, R5));
4095
4130
  figBottomPole.addMainO(ctrBottomPole2(-1));
4096
4131
  figBottomPole.addSecond(ctrBottomPole2(1));
4097
- const ctrDoor = contour13(H1W2, param.H1P + H1W2).addSegStrokeR(0, H1h).addPointR(-H1W2, H1W2).addPointR(-2 * H1W2, 0).addSegArc2().addSegStrokeR(0, -H1h).addPointR(H1W2, -H1W2).addPointR(2 * H1W2, 0).addSegArc2();
4132
+ const ctrDoor = contour14(H1W2, param.H1P + H1W2).addSegStrokeR(0, H1h).addPointR(-H1W2, H1W2).addPointR(-2 * H1W2, 0).addSegArc2().addSegStrokeR(0, -H1h).addPointR(H1W2, -H1W2).addPointR(2 * H1W2, 0).addSegArc2();
4098
4133
  figDoor.addMainO(ctrDoor);
4099
4134
  figDoor.addSecond(ctrBottomPole2(1));
4100
4135
  figDoor.addSecond(ctrBottomPole2(-1));
@@ -4142,7 +4177,7 @@ function pGeom13(t, param, suffix = "") {
4142
4177
  const p4 = point6(0, posY8).translatePolar(-a82 - pi2, R82);
4143
4178
  const p5 = point6(0, posY6).translatePolar(pi2 + a62, R6e);
4144
4179
  const p6 = point6(0, posY6).translatePolar(pi2 - a62, R6e);
4145
- const ctrHand = contour13(p1.cx, p1.cy).addSegStrokeA(p2.cx, p2.cy).addPointA(0, posY8 - R8).addPointA(p3.cx, p3.cy).addSegArc2().addSegStrokeA(p4.cx, p4.cy).addSegStrokeA(p5.cx, p5.cy).addPointA(0, posY6 + R6e).addPointA(p6.cx, p6.cy).addSegArc2().closeSegStroke();
4180
+ const ctrHand = contour14(p1.cx, p1.cy).addSegStrokeA(p2.cx, p2.cy).addPointA(0, posY8 - R8).addPointA(p3.cx, p3.cy).addSegArc2().addSegStrokeA(p4.cx, p4.cy).addSegStrokeA(p5.cx, p5.cy).addPointA(0, posY6 + R6e).addPointA(p6.cx, p6.cy).addSegArc2().closeSegStroke();
4146
4181
  figHand.addMainO(ctrHand);
4147
4182
  figHand.addSecond(contourCircle10(0, posY6, R6e));
4148
4183
  figHand.addSecond(contourCircle10(0, posY6, R6i));
@@ -4359,11 +4394,11 @@ import {
4359
4394
  withinHPiHPi,
4360
4395
  ShapePoint as ShapePoint2,
4361
4396
  point as point7,
4362
- contour as contour14,
4397
+ contour as contour15,
4363
4398
  contourCircle as contourCircle11,
4364
4399
  ctrRectangle as ctrRectangle7,
4365
4400
  figure as figure12,
4366
- degToRad as degToRad6,
4401
+ degToRad as degToRad7,
4367
4402
  ffix as ffix15,
4368
4403
  pNumber as pNumber14,
4369
4404
  pCheckbox as pCheckbox9,
@@ -4493,20 +4528,20 @@ function pGeom14(t, param, suffix = "") {
4493
4528
  const dx2 = sign * param.T1 + dx1;
4494
4529
  const dR2 = sign * R2;
4495
4530
  const dW22d = tpL > 0 ? -dW22 - dx2 : dW22 + dx2;
4496
- const rCtrExt = contour14(dW22c, 0, "green").addSegStrokeR(dx2, 0).addPointR(dR2, R2).addPointR(0, 2 * R2).addSegArc2().addSegStrokeR(-dx1, 0).addSegStrokeR(0, Z2b).addSegStrokeR(dx1, 0).addPointR(dR2, R2).addPointR(0, 2 * R2).addSegArc2().addSegStrokeR(-dx2, 0).closeSegStroke().translatePolar(tpA, tpL);
4531
+ const rCtrExt = contour15(dW22c, 0, "green").addSegStrokeR(dx2, 0).addPointR(dR2, R2).addPointR(0, 2 * R2).addSegArc2().addSegStrokeR(-dx1, 0).addSegStrokeR(0, Z2b).addSegStrokeR(dx1, 0).addPointR(dR2, R2).addPointR(0, 2 * R2).addSegArc2().addSegStrokeR(-dx2, 0).closeSegStroke().translatePolar(tpA, tpL);
4497
4532
  const rCtr1 = contourCircle11(dW22d, R2, R1).translatePolar(tpA, tpL);
4498
4533
  const rCtr2 = contourCircle11(dW22d, Z2b + 3 * R2, R1).translatePolar(tpA, tpL);
4499
4534
  return [rCtrExt, rCtr1, rCtr2];
4500
4535
  }, makeHandPlate2 = function(az, addL, ipX, ipY) {
4501
- const rCtrExt = contour14(ipX, ipY + F12).addPointR(-F12, -F12).addPointR(0, -2 * F12).addSegArc2().addSegStrokeR(F12 + addL, 0).addSegStrokeR(0, 2 * F12).closeSegStroke().rotate(ipX, ipY, az);
4536
+ const rCtrExt = contour15(ipX, ipY + F12).addPointR(-F12, -F12).addPointR(0, -2 * F12).addSegArc2().addSegStrokeR(F12 + addL, 0).addSegStrokeR(0, 2 * F12).closeSegStroke().rotate(ipX, ipY, az);
4502
4537
  const rCtrHole = contourCircle11(ipX, ipY, Rsteering);
4503
4538
  return [rCtrExt, rCtrHole];
4504
4539
  }, makeMFoot2 = function(itx, ity) {
4505
- const rCtrExt = contour14(itx - mFootR, ity, "green").addPointR(mFootR, -mFootR).addPointR(2 * mFootR, 0).addSegArc2().addSegStrokeR(F12 - mFootR, param.Z1 + param.T1 + param.E1).addSegStrokeR(0, motorHeight).addSegStrokeR(-2 * F12, 0).addSegStrokeR(0, -motorHeight).closeSegStroke();
4540
+ const rCtrExt = contour15(itx - mFootR, ity, "green").addPointR(mFootR, -mFootR).addPointR(2 * mFootR, 0).addSegArc2().addSegStrokeR(F12 - mFootR, param.Z1 + param.T1 + param.E1).addSegStrokeR(0, motorHeight).addSegStrokeR(-2 * F12, 0).addSegStrokeR(0, -motorHeight).closeSegStroke();
4506
4541
  const rCtrHole = contourCircle11(itx, ity, Raxis + param.E1);
4507
4542
  return [rCtrExt, rCtrHole];
4508
4543
  }, makeCtrWheel2 = function(xSign, ia, itx, ity) {
4509
- const rCtr = contour14(itx, ity).addSegStrokeR(xSign * Raxis, 0).addSegStrokeR(0, mFootWidth + param.E3).addSegStrokeR(xSign * dWheelAxis, 0).addCornerRounded(roundedWheel).addSegStrokeR(0, param.Lwheel).addCornerRounded(roundedWheel).addSegStrokeR(-xSign * Rwheel, 0).closeSegStroke().rotate(itx, ity, ia);
4544
+ const rCtr = contour15(itx, ity).addSegStrokeR(xSign * Raxis, 0).addSegStrokeR(0, mFootWidth + param.E3).addSegStrokeR(xSign * dWheelAxis, 0).addCornerRounded(roundedWheel).addSegStrokeR(0, param.Lwheel).addCornerRounded(roundedWheel).addSegStrokeR(-xSign * Rwheel, 0).closeSegStroke().rotate(itx, ity, ia);
4510
4545
  return rCtr;
4511
4546
  }, makeTopWheel2 = function(itx, ity, ia) {
4512
4547
  const tL = param.Lmotor - mFootWidth;
@@ -4642,8 +4677,8 @@ function pGeom14(t, param, suffix = "") {
4642
4677
  const Rsteering = param.Dsteering / 2;
4643
4678
  const Z2b = param.Z2 - 4 * R2;
4644
4679
  const Z2c = param.Z2 - param.T1;
4645
- const AbMin = degToRad6(param.aBoneMin);
4646
- const AbMax = degToRad6(param.aBoneMax);
4680
+ const AbMin = degToRad7(param.aBoneMin);
4681
+ const AbMax = degToRad7(param.aBoneMax);
4647
4682
  const posZplatform = Rwheel + param.Z1 + param.L2 * Math.sin(AbMin);
4648
4683
  const Hplatform = posZplatform + param.H1;
4649
4684
  const W32 = param.W3 / 2;
@@ -4661,7 +4696,7 @@ function pGeom14(t, param, suffix = "") {
4661
4696
  const boneSideyRs = param.L2 * Math.sin(aBR);
4662
4697
  const boneSideyLs = param.L2 * Math.sin(aBL);
4663
4698
  const boneSideyR = 2 * R2 * Math.sign(aBR) + boneSideyRs;
4664
- const ra = degToRad6(param.ra);
4699
+ const ra = degToRad7(param.ra);
4665
4700
  const rx10 = 10 * param.rx;
4666
4701
  const ry10 = 10 * param.ry;
4667
4702
  const hPlen = 2 * F12 + param.E2 + param.T1;
@@ -4732,11 +4767,11 @@ function pGeom14(t, param, suffix = "") {
4732
4767
  `;
4733
4768
  rGeome.logstr += `Hplatform ${ffix15(Hplatform)} mm
4734
4769
  `;
4735
- const ctrPlatformMain = contour14(-W22, 0).addSegStrokeR(param.W2, 0).addSegStrokeR(0, H1b).addSegStrokeR(W22b, 0).addSegStrokeR(0, param.T1).addSegStrokeR(-param.W1, 0).addSegStrokeR(0, -param.T1).addSegStrokeR(W22b, 0).closeSegStroke();
4770
+ const ctrPlatformMain = contour15(-W22, 0).addSegStrokeR(param.W2, 0).addSegStrokeR(0, H1b).addSegStrokeR(W22b, 0).addSegStrokeR(0, param.T1).addSegStrokeR(-param.W1, 0).addSegStrokeR(0, -param.T1).addSegStrokeR(W22b, 0).closeSegStroke();
4736
4771
  const ctrPlatformInt = ctrRectangle7(-W22 + param.T1, param.T1, W2c, H1c);
4737
4772
  figPlatform.addMainOI([ctrPlatformMain, ctrPlatformInt]);
4738
- const ctrTriangleL = contour14(-W22, 0).addSegStrokeR(param.T1, 0).addSegStrokeR(0, param.H1).addSegStrokeR(-W22b - param.T1, 0).addSegStrokeR(0, -param.T1).closeSegStroke();
4739
- const ctrTriangleR = contour14(W22, 0).addSegStrokeR(W22b, H1b).addSegStrokeR(0, param.T1).addSegStrokeR(-W22b - param.T1, 0).addSegStrokeR(0, -param.H1).closeSegStroke();
4773
+ const ctrTriangleL = contour15(-W22, 0).addSegStrokeR(param.T1, 0).addSegStrokeR(0, param.H1).addSegStrokeR(-W22b - param.T1, 0).addSegStrokeR(0, -param.T1).closeSegStroke();
4774
+ const ctrTriangleR = contour15(W22, 0).addSegStrokeR(W22b, H1b).addSegStrokeR(0, param.T1).addSegStrokeR(-W22b - param.T1, 0).addSegStrokeR(0, -param.H1).closeSegStroke();
4740
4775
  figTriangle.addMainO(ctrTriangleL);
4741
4776
  figTriangle.addMainO(ctrTriangleR);
4742
4777
  figPlatform.addSecond(ctrTriangleL);
@@ -4744,7 +4779,7 @@ function pGeom14(t, param, suffix = "") {
4744
4779
  figPFfixation.addMainOI(makePFfixExt2(1, 0, 0));
4745
4780
  figPFfixation.addMainOI(makePFfixExt2(-1, 0, 0));
4746
4781
  figPlatform.mergeFigure(figPFfixation, true);
4747
- const ctrBone = contour14(W32X, W32).addPointR(-W32X - R2, -W32).addPointR(0, -2 * W32).addSegArc2().addSegStrokeR(L2b, 0).addPointR(W32X + R2, W32).addPointR(0, 2 * W32).addSegArc2().closeSegStroke();
4782
+ const ctrBone = contour15(W32X, W32).addPointR(-W32X - R2, -W32).addPointR(0, -2 * W32).addSegArc2().addSegStrokeR(L2b, 0).addPointR(W32X + R2, W32).addPointR(0, 2 * W32).addSegArc2().closeSegStroke();
4748
4783
  const ctrBoneR = ctrBone.rotate(0, 0, aBR);
4749
4784
  const ctrBoneL = ctrBone.rotate(0, 0, aBL);
4750
4785
  const ptR1 = point7(W22 + param.E2 + R2, R2);
@@ -5104,7 +5139,7 @@ var rccarDef = {
5104
5139
 
5105
5140
  // src/rccar/singleBone.ts
5106
5141
  import {
5107
- contour as contour15,
5142
+ contour as contour16,
5108
5143
  contourCircle as contourCircle12,
5109
5144
  figure as figure13,
5110
5145
  ffix as ffix16,
@@ -5180,7 +5215,7 @@ function pGeom15(t, param, suffix = "") {
5180
5215
  `;
5181
5216
  rGeome.logstr += `Bone W2b ${ffix16(W2b)} mm
5182
5217
  `;
5183
- const ctrBone = contour15(dX, W12).addCornerRounded(param.R3).addPointR(-dX - R22, -W12).addPointR(0, -2 * W12).addSegArc2().addCornerRounded(param.R3).addSegStrokeR(L1b, 0).addCornerRounded(param.R3).addPointR(dX + R22, W12).addPointR(0, 2 * W12).addSegArc2().addCornerRounded(param.R3).closeSegStroke();
5218
+ const ctrBone = contour16(dX, W12).addCornerRounded(param.R3).addPointR(-dX - R22, -W12).addPointR(0, -2 * W12).addSegArc2().addCornerRounded(param.R3).addSegStrokeR(L1b, 0).addCornerRounded(param.R3).addPointR(dX + R22, W12).addPointR(0, 2 * W12).addSegArc2().addCornerRounded(param.R3).closeSegStroke();
5184
5219
  const ctrAxis1 = contourCircle12(0, 0, R12);
5185
5220
  const ctrAxis2 = contourCircle12(param.L1, 0, R12);
5186
5221
  const ctrMinis = [];
@@ -5232,7 +5267,7 @@ var singleBoneDef = {
5232
5267
  // src/rccar/doubleBone.ts
5233
5268
  import {
5234
5269
  contourCircle as contourCircle13,
5235
- degToRad as degToRad7,
5270
+ degToRad as degToRad8,
5236
5271
  ffix as ffix17,
5237
5272
  pNumber as pNumber16,
5238
5273
  pSectionSeparator as pSectionSeparator16,
@@ -5383,7 +5418,7 @@ function pGeom16(t, param, suffix = "") {
5383
5418
  const W2b = (param.L1 - 2 * R22 - N2 * 2 * Rh) / (N2 + 1);
5384
5419
  const hX0b = R22 + W2b + Rh;
5385
5420
  const hX1b = W2b + 2 * Rh;
5386
- const aJa = degToRad7(param.Jangle);
5421
+ const aJa = degToRad8(param.Jangle);
5387
5422
  const aJn = param.Jneutral / 100;
5388
5423
  const aJr = param.Jradius;
5389
5424
  const aJm = param.Jmark;
@@ -5533,7 +5568,7 @@ var doubleBoneDef = {
5533
5568
 
5534
5569
  // src/rccar/pcar.ts
5535
5570
  import {
5536
- contour as contour16,
5571
+ contour as contour17,
5537
5572
  contourCircle as contourCircle14,
5538
5573
  figure as figure14,
5539
5574
  ffix as ffix18,
@@ -5667,7 +5702,7 @@ function pGeom17(t, param, suffix = "") {
5667
5702
  const rEF = EG / Math.cos(aAED);
5668
5703
  return rEF;
5669
5704
  }, makeCtrSide2 = function(withWheels) {
5670
- const rCtr = contour16(-param.LB1, BodyY0).addCornerRounded(param.Rs1);
5705
+ const rCtr = contour17(-param.LB1, BodyY0).addCornerRounded(param.Rs1);
5671
5706
  if (withWheels) {
5672
5707
  rCtr.addSegStrokeR(LB1b, 0).addPointR(dXwheel, param.HW1 + RW3).addPointR(2 * dXwheel, 0).addSegArc2().addSegStrokeR(LB2b, 0).addPointR(dXwheel, param.HW1 + RW3).addPointR(2 * dXwheel, 0).addSegArc2().addSegStrokeR(LB3b, 0);
5673
5708
  } else {
@@ -5676,7 +5711,7 @@ function pGeom17(t, param, suffix = "") {
5676
5711
  rCtr.addCornerRounded(param.Rs7).addSegStrokeR(0, param.HF1).addCornerRounded(param.Rs6).addPointR(-param.LT4, param.HF4).addSegArc(CR4, false, true).addCornerRounded(param.Rs5).addPointR(-param.LT3, HF3b).addSegArc(CR3, false, true).addCornerRounded(param.Rs4).addPointR(-LT2, 0).addSegArc(CR2, false, true).addCornerRounded(param.Rs3).addPointR(-param.LT1, -HB1b).addSegArc(CR1, false, true).addCornerRounded(param.Rs2).closeSegStroke();
5677
5712
  return rCtr;
5678
5713
  }, makeCtrWheel2 = function(sX, x0, y0, r0) {
5679
- const rCtr = contour16(x0, y0).addSegStrokeR(sX * RW1, 0).addSegStrokeR(0, param.WW1).addSegStrokeR(sX * (RW2 - RW1), 0).addCornerRounded(param.RW2).addSegStrokeR(0, param.WW2).addCornerRounded(param.RW2).addSegStrokeR(-sX * RW2, 0).closeSegStroke().rotate(x0, y0, r0);
5714
+ const rCtr = contour17(x0, y0).addSegStrokeR(sX * RW1, 0).addSegStrokeR(0, param.WW1).addSegStrokeR(sX * (RW2 - RW1), 0).addCornerRounded(param.RW2).addSegStrokeR(0, param.WW2).addCornerRounded(param.RW2).addSegStrokeR(-sX * RW2, 0).closeSegStroke().rotate(x0, y0, r0);
5680
5715
  return rCtr;
5681
5716
  };
5682
5717
  var calcCR = calcCR2, makeCtrSide = makeCtrSide2, makeCtrWheel = makeCtrWheel2;
@@ -5769,9 +5804,9 @@ function pGeom17(t, param, suffix = "") {
5769
5804
  figSideWiWheels.addSecond(contourCircle14(param.LB2, RW2, RW1));
5770
5805
  figSideWoWheels.addMainO(makeCtrSide2(false));
5771
5806
  figSideWoWheels.mergeFigure(figSideWiWheels, true);
5772
- const ctrTop = contour16(-param.LB1 + param.Ct1, param.Ct2).addCornerRounded(param.Rt1).addPointR(BodyLength - param.Ct1 - param.Ct3, 0).addSegArc(CRt2, false, true).addCornerRounded(param.Rt2).addPointR(0, BodyWidth - 2 * param.Ct2).addSegArc(CRt3, false, true).addCornerRounded(param.Rt2).addPointR(-BodyLength + param.Ct1 + param.Ct3, 0).addSegArc(CRt2, false, true).addCornerRounded(param.Rt1).addPointR(0, -BodyWidth + 2 * param.Ct2).addSegArc(CRt1, false, true);
5807
+ const ctrTop = contour17(-param.LB1 + param.Ct1, param.Ct2).addCornerRounded(param.Rt1).addPointR(BodyLength - param.Ct1 - param.Ct3, 0).addSegArc(CRt2, false, true).addCornerRounded(param.Rt2).addPointR(0, BodyWidth - 2 * param.Ct2).addSegArc(CRt3, false, true).addCornerRounded(param.Rt2).addPointR(-BodyLength + param.Ct1 + param.Ct3, 0).addSegArc(CRt2, false, true).addCornerRounded(param.Rt1).addPointR(0, -BodyWidth + 2 * param.Ct2).addSegArc(CRt1, false, true);
5773
5808
  figTop.addMainO(ctrTop);
5774
- const ctrFront = contour16(param.Cf1, BodyY0).addCornerRounded(param.Rf1).addSegStrokeR(Wtb, 0).addCornerRounded(param.Rf1).addPointR(0, param.Wf1).addSegArc(CRf1, false, true).addCornerRounded(param.Rf2).addPointR(-param.Wf2, Wf1b).addSegArc(CRf2, false, true).addCornerRounded(param.Rf3).addPointR(-Wf2b, 0).addSegArc(CRf3, false, true).addCornerRounded(param.Rf3).addPointR(-param.Wf2, -Wf1b).addSegArc(CRf2, false, true).addCornerRounded(param.Rf2).addPointR(0, -param.Wf1).addSegArc(CRf1, false, true);
5809
+ const ctrFront = contour17(param.Cf1, BodyY0).addCornerRounded(param.Rf1).addSegStrokeR(Wtb, 0).addCornerRounded(param.Rf1).addPointR(0, param.Wf1).addSegArc(CRf1, false, true).addCornerRounded(param.Rf2).addPointR(-param.Wf2, Wf1b).addSegArc(CRf2, false, true).addCornerRounded(param.Rf3).addPointR(-Wf2b, 0).addSegArc(CRf3, false, true).addCornerRounded(param.Rf3).addPointR(-param.Wf2, -Wf1b).addSegArc(CRf2, false, true).addCornerRounded(param.Rf2).addPointR(0, -param.Wf1).addSegArc(CRf1, false, true);
5775
5810
  figFront.addMainO(ctrFront);
5776
5811
  figWheel.addMainO(makeCtrWheel2(1, 0, 0, 0));
5777
5812
  figWheel.addSecond(makeCtrWheel2(-1, 0, 0, 0));
@@ -5917,7 +5952,7 @@ var pcarDef = {
5917
5952
  // src/capsule/capsule.ts
5918
5953
  import {
5919
5954
  point as point8,
5920
- contour as contour17,
5955
+ contour as contour18,
5921
5956
  contourCircle as contourCircle15,
5922
5957
  ctrRectangle as ctrRectangle8,
5923
5958
  figure as figure15,
@@ -6056,7 +6091,7 @@ function pGeom18(t, param, suffix = "") {
6056
6091
  `;
6057
6092
  try {
6058
6093
  let ctrBody2 = function(withBat) {
6059
- const rCtr = contour17(-L12, param.H0);
6094
+ const rCtr = contour18(-L12, param.H0);
6060
6095
  if (withBat) {
6061
6096
  rCtr.addSegStrokeR(Wwheels, 0).addSegStrokeR(0, -Hbatterie).addSegStrokeR(Lbatterie, 0).addSegStrokeR(0, Hbatterie).addSegStrokeR(Wwheels, 0);
6062
6097
  } else {
@@ -6065,15 +6100,15 @@ function pGeom18(t, param, suffix = "") {
6065
6100
  rCtr.addCornerRounded(param.R1).addSegStrokeR(param.W1, param.H1).addCornerRounded(param.R2).addSegStrokeR(0, param.H2).addCornerRounded(param.R3).addPointR(p1.cx, p1.cy).addPointR(-param.W3, param.H3).addSegArc2().addCornerRounded(param.R4).addSegStrokeR(-Lroof, 0).addCornerRounded(param.R4).addPointR(p2.cx, p2.cy).addPointR(-param.W3, -param.H3).addSegArc2().addCornerRounded(param.R3).addSegStrokeR(0, -param.H2).addCornerRounded(param.R2).closeSegStroke().addCornerRounded(param.R1);
6066
6101
  return rCtr;
6067
6102
  }, ctrWheels2 = function(sign) {
6068
- const rCtr = contour17(0, posYwheels).addSegStrokeR(sign * R7, 0).addSegStrokeR(0, param.WW3).addSegStrokeR(sign * (R8 - R7), 0).addSegStrokeR(0, 2 * WW22).addSegStrokeR(-sign * (R8 - R7), 0).addSegStrokeR(0, param.WW3).addSegStrokeR(-sign * R7, 0).closeSegStroke();
6103
+ const rCtr = contour18(0, posYwheels).addSegStrokeR(sign * R7, 0).addSegStrokeR(0, param.WW3).addSegStrokeR(sign * (R8 - R7), 0).addSegStrokeR(0, 2 * WW22).addSegStrokeR(-sign * (R8 - R7), 0).addSegStrokeR(0, param.WW3).addSegStrokeR(-sign * R7, 0).closeSegStroke();
6069
6104
  return rCtr;
6070
6105
  }, makeCtrTop2 = function(radius) {
6071
- const rCtr = contour17(-L52 + topR - radius, -R52).addPointR(radius, -radius).addSegArc(radius, false, true).addSegStrokeR(L53, 0).addPointR(radius, radius).addSegArc(radius, false, true).addSegStrokeR(0, R53).addPointR(-radius, radius).addSegArc(radius, false, true).addSegStrokeR(-L53, 0).addPointR(-radius, -radius).addSegArc(radius, false, true).closeSegStroke();
6106
+ const rCtr = contour18(-L52 + topR - radius, -R52).addPointR(radius, -radius).addSegArc(radius, false, true).addSegStrokeR(L53, 0).addPointR(radius, radius).addSegArc(radius, false, true).addSegStrokeR(0, R53).addPointR(-radius, radius).addSegArc(radius, false, true).addSegStrokeR(-L53, 0).addPointR(-radius, -radius).addSegArc(radius, false, true).closeSegStroke();
6072
6107
  return rCtr;
6073
6108
  }, ctrSideWindow2 = function(sign) {
6074
6109
  const p0x = sign * (Ltotal / 2 - param.U1);
6075
6110
  const p0y = param.H0 + param.H1 + param.H2 - UH2dy;
6076
- const rCtr = contour17(p0x, p0y).addCornerRounded(param.JR1).addPointR(sign * p1ub.cx, p1ub.cy).addPointR(-sign * UW3b, UH3b).addSegArc2().addCornerRounded(param.JR4).addSegStrokeR(-sign * param.U2, 0).addCornerRounded(param.JR3).addSegStrokeR(0, -UH3b).addCornerRounded(param.JR2).closeSegStroke();
6111
+ const rCtr = contour18(p0x, p0y).addCornerRounded(param.JR1).addPointR(sign * p1ub.cx, p1ub.cy).addPointR(-sign * UW3b, UH3b).addSegArc2().addCornerRounded(param.JR4).addSegStrokeR(-sign * param.U2, 0).addCornerRounded(param.JR3).addSegStrokeR(0, -UH3b).addCornerRounded(param.JR2).closeSegStroke();
6077
6112
  return rCtr;
6078
6113
  }, volWheel2 = function(posX, idx) {
6079
6114
  return {
@@ -6182,7 +6217,7 @@ function pGeom18(t, param, suffix = "") {
6182
6217
  rGeome.logstr += `Batterie: LbatInt ${ffix19(LbatInt)}, HbatInt: ${ffix19(HbatInt)}, WW1 ${ffix19(param.WW1)} mm
6183
6218
  `;
6184
6219
  const ctrBodyExt = ctrBody2(true);
6185
- const ctrBodyInt = contour17(-L12 + L1dx, param.H0 + E1).addSegStrokeR(2 * L12 - 2 * L1dx, 0).addCornerRounded(iR1).addSegStrokeR(param.W1 - E1 + L1dx, param.H1 - E1 + H2dy).addCornerRounded(iR2).addSegStrokeR(0, param.H2 - 2 * H2dy).addCornerRounded(iR3).addPointR(p1b.cx, p1b.cy).addPointR(-W3b, H3b).addSegArc2().addCornerRounded(iR4).addSegStrokeR(-Lroof + 2 * W3dx, 0).addCornerRounded(iR4).addPointR(p2b.cx, p2b.cy).addPointR(-W3b, -H3b).addSegArc2().addCornerRounded(iR3).addSegStrokeR(0, -param.H2 + 2 * H2dy).addCornerRounded(iR2).closeSegStroke().addCornerRounded(iR1);
6220
+ const ctrBodyInt = contour18(-L12 + L1dx, param.H0 + E1).addSegStrokeR(2 * L12 - 2 * L1dx, 0).addCornerRounded(iR1).addSegStrokeR(param.W1 - E1 + L1dx, param.H1 - E1 + H2dy).addCornerRounded(iR2).addSegStrokeR(0, param.H2 - 2 * H2dy).addCornerRounded(iR3).addPointR(p1b.cx, p1b.cy).addPointR(-W3b, H3b).addSegArc2().addCornerRounded(iR4).addSegStrokeR(-Lroof + 2 * W3dx, 0).addCornerRounded(iR4).addPointR(p2b.cx, p2b.cy).addPointR(-W3b, -H3b).addSegArc2().addCornerRounded(iR3).addSegStrokeR(0, -param.H2 + 2 * H2dy).addCornerRounded(iR2).closeSegStroke().addCornerRounded(iR1);
6186
6221
  const ctrBatterie = ctrRectangle8(-LbatInt2, posYbatterie, LbatInt, HbatInt);
6187
6222
  figBody.addMainOI([ctrBodyExt, ctrBodyInt, ctrBatterie]);
6188
6223
  figBody.addSecond(contourCircle15(-posXwheel1, R7, R7));
@@ -6197,7 +6232,7 @@ function pGeom18(t, param, suffix = "") {
6197
6232
  figBody.addSecond(ctrRectangle8(-L52 - param.S5, posYtop2, L5 + 2 * param.S5, E1));
6198
6233
  figWheels.addMainO(ctrWheels2(1));
6199
6234
  figWheels.addSecond(ctrWheels2(-1));
6200
- const ctrFront = contour17(-FWL1 / 2, param.H0 + param.FH1).addCornerRounded(param.FR1).addSegStrokeR(FWL1, 0).addCornerRounded(param.FR1).addSegStrokeR(param.FW1 - param.FW3, HfrontWin).addCornerRounded(param.FR3).addSegStrokeR(-FWL3, 0).addCornerRounded(param.FR3).closeSegStroke();
6235
+ const ctrFront = contour18(-FWL1 / 2, param.H0 + param.FH1).addCornerRounded(param.FR1).addSegStrokeR(FWL1, 0).addCornerRounded(param.FR1).addSegStrokeR(param.FW1 - param.FW3, HfrontWin).addCornerRounded(param.FR3).addSegStrokeR(-FWL3, 0).addCornerRounded(param.FR3).closeSegStroke();
6201
6236
  figFront.addMainO(ctrFront);
6202
6237
  figFront.addSecond(ctrWheels2(1).rotate(0, 0, pi2).translate(WW12, R7));
6203
6238
  figFront.addSecond(ctrWheels2(-1).rotate(0, 0, pi2).translate(WW12, R7));
@@ -6227,10 +6262,10 @@ function pGeom18(t, param, suffix = "") {
6227
6262
  figTopInt.mergeFigure(figTop, true);
6228
6263
  figTopTop.addMainO(ctrTopTop);
6229
6264
  figTopTop.mergeFigure(figTop, true);
6230
- const ctrTopLeg = contour17(-R52, posYtop).addSegStrokeR(R53, 0).addSegStrokeR(0, param.R5).addPointR(-param.R5, param.R5).addSegArc(param.R5, false, false).addSegStrokeR(0, H53).addPointR(param.R5, param.R5).addSegArc(param.R5, false, false).addSegStrokeR(0, param.R5).addSegStrokeR(-R53, 0).addSegStrokeR(0, -param.R5).addPointR(param.R5, -param.R5).addSegArc(param.R5, false, false).addSegStrokeR(0, -H53).addPointR(-param.R5, -param.R5).addSegArc(param.R5, false, false).closeSegStroke();
6265
+ const ctrTopLeg = contour18(-R52, posYtop).addSegStrokeR(R53, 0).addSegStrokeR(0, param.R5).addPointR(-param.R5, param.R5).addSegArc(param.R5, false, false).addSegStrokeR(0, H53).addPointR(param.R5, param.R5).addSegArc(param.R5, false, false).addSegStrokeR(0, param.R5).addSegStrokeR(-R53, 0).addSegStrokeR(0, -param.R5).addPointR(param.R5, -param.R5).addSegArc(param.R5, false, false).addSegStrokeR(0, -H53).addPointR(-param.R5, -param.R5).addSegArc(param.R5, false, false).closeSegStroke();
6231
6266
  figTopLeg.addMainO(ctrTopLeg);
6232
6267
  figFront.addSecond(ctrTopLeg);
6233
- const ctrDoor = contour17(-LwallDoor / 2, param.H0 + param.V1).addCornerRounded(param.JR5).addSegStrokeR(LwallDoor, 0).addCornerRounded(param.JR5).addSegStrokeR(0, HwallDoor).addCornerRounded(param.JR6).addSegStrokeR(-LwallDoor, 0).addCornerRounded(param.JR6).closeSegStroke();
6268
+ const ctrDoor = contour18(-LwallDoor / 2, param.H0 + param.V1).addCornerRounded(param.JR5).addSegStrokeR(LwallDoor, 0).addCornerRounded(param.JR5).addSegStrokeR(0, HwallDoor).addCornerRounded(param.JR6).addSegStrokeR(-LwallDoor, 0).addCornerRounded(param.JR6).closeSegStroke();
6234
6269
  figWall.addMainOI([ctrBody2(false), ctrSideWindow2(1), ctrSideWindow2(-1), ctrDoor]);
6235
6270
  figWall.mergeFigure(figBody, true);
6236
6271
  rGeome.fig = {
@@ -6386,8 +6421,288 @@ var capsuleDef = {
6386
6421
  pDef: pDef18,
6387
6422
  pGeom: pGeom18
6388
6423
  };
6424
+
6425
+ // src/sysmix/square.ts
6426
+ import {
6427
+ contour as contour19,
6428
+ contourCircle as contourCircle16,
6429
+ figure as figure16,
6430
+ ffix as ffix20,
6431
+ pNumber as pNumber19,
6432
+ pSectionSeparator as pSectionSeparator19,
6433
+ EExtrude as EExtrude15,
6434
+ EBVolume as EBVolume15,
6435
+ initGeom as initGeom19
6436
+ } from "geometrix";
6437
+ var pDef19 = {
6438
+ partName: "square",
6439
+ params: [
6440
+ //pNumber(name, unit, init, min, max, step)
6441
+ pNumber19("W1", "mm", 100, 5, 500, 1),
6442
+ pNumber19("Di", "mm", 50, 2, 500, 1),
6443
+ pSectionSeparator19("Details and thickness"),
6444
+ pNumber19("R1", "mm", 0, 0, 50, 1),
6445
+ pNumber19("T1", "mm", 30, 1, 500, 1)
6446
+ ],
6447
+ paramSvg: {
6448
+ W1: "square_top.svg",
6449
+ Di: "square_top.svg",
6450
+ R1: "square_top.svg",
6451
+ T1: "square_top.svg"
6452
+ },
6453
+ sim: {
6454
+ tMax: 180,
6455
+ tStep: 0.5,
6456
+ tUpdate: 500
6457
+ // every 0.5 second
6458
+ }
6459
+ };
6460
+ function pGeom19(t, param, suffix = "") {
6461
+ const rGeome = initGeom19(pDef19.partName + suffix);
6462
+ const figSquare = figure16();
6463
+ rGeome.logstr += `${rGeome.partName} simTime: ${t}
6464
+ `;
6465
+ try {
6466
+ const Ri = param.Di / 2;
6467
+ const W12 = param.W1 / 2;
6468
+ const surface = param.W1 ** 2 - Math.PI * Ri ** 2;
6469
+ const volume = surface * param.T1;
6470
+ if (param.W1 < param.Di) {
6471
+ throw `err069: W1 ${param.W1} is too small compare to Di ${param.Di}`;
6472
+ }
6473
+ rGeome.logstr += `Surface ${ffix20(surface)} mm2, volume ${ffix20(volume)} mm3
6474
+ `;
6475
+ const ctrSquare = contour19(-W12, -W12).addCornerRounded(param.R1).addSegStrokeR(param.W1, 0).addCornerRounded(param.R1).addSegStrokeR(0, param.W1).addCornerRounded(param.R1).addSegStrokeR(-param.W1, 0).addCornerRounded(param.R1).closeSegStroke();
6476
+ const ctrHole = contourCircle16(0, 0, Ri);
6477
+ figSquare.addMainOI([ctrSquare, ctrHole]);
6478
+ rGeome.fig = {
6479
+ faceSquare: figSquare
6480
+ };
6481
+ const designName = rGeome.partName;
6482
+ rGeome.vol = {
6483
+ extrudes: [
6484
+ {
6485
+ outName: `subpax_${designName}_square`,
6486
+ face: `${designName}_faceSquare`,
6487
+ extrudeMethod: EExtrude15.eLinearOrtho,
6488
+ length: param.T1,
6489
+ rotate: [0, 0, 0],
6490
+ translate: [0, 0, 0]
6491
+ }
6492
+ ],
6493
+ volumes: [
6494
+ {
6495
+ outName: `pax_${designName}`,
6496
+ boolMethod: EBVolume15.eUnion,
6497
+ inList: [`subpax_${designName}_square`]
6498
+ }
6499
+ ]
6500
+ };
6501
+ rGeome.sub = {};
6502
+ rGeome.logstr += "square drawn successfully!\n";
6503
+ rGeome.calcErr = false;
6504
+ } catch (emsg) {
6505
+ rGeome.logstr += emsg;
6506
+ console.log(emsg);
6507
+ }
6508
+ return rGeome;
6509
+ }
6510
+ var squareDef = {
6511
+ pTitle: "square",
6512
+ pDescription: "simple square shape for experimenting systemix",
6513
+ pDef: pDef19,
6514
+ pGeom: pGeom19
6515
+ };
6516
+
6517
+ // src/sysmix/triangle.ts
6518
+ import {
6519
+ contour as contour20,
6520
+ contourCircle as contourCircle17,
6521
+ figure as figure17,
6522
+ ffix as ffix21,
6523
+ pNumber as pNumber20,
6524
+ pSectionSeparator as pSectionSeparator20,
6525
+ EExtrude as EExtrude16,
6526
+ EBVolume as EBVolume16,
6527
+ initGeom as initGeom20
6528
+ } from "geometrix";
6529
+ var pDef20 = {
6530
+ partName: "square",
6531
+ params: [
6532
+ //pNumber(name, unit, init, min, max, step)
6533
+ pNumber20("W1", "mm", 100, 5, 500, 1),
6534
+ pNumber20("T1", "mm", 20, 1, 500, 1),
6535
+ pNumber20("E1", "mm", 10, 1, 500, 1),
6536
+ pNumber20("N1", "triangles", 3, 1, 20, 1),
6537
+ pSectionSeparator20("Details and hole"),
6538
+ pNumber20("R1", "mm", 0, 0, 50, 1),
6539
+ pNumber20("Di", "mm", 50, 2, 500, 1)
6540
+ ],
6541
+ paramSvg: {
6542
+ W1: "triangle_top.svg",
6543
+ T1: "triangle_side.svg",
6544
+ E1: "triangle_side.svg",
6545
+ N1: "triangle_side.svg",
6546
+ R1: "triangle_top.svg",
6547
+ Di: "triangle_top.svg"
6548
+ },
6549
+ sim: {
6550
+ tMax: 180,
6551
+ tStep: 0.5,
6552
+ tUpdate: 500
6553
+ // every 0.5 second
6554
+ }
6555
+ };
6556
+ function pGeom20(t, param, suffix = "") {
6557
+ const rGeome = initGeom20(pDef20.partName + suffix);
6558
+ const figTriangle = figure17();
6559
+ rGeome.logstr += `${rGeome.partName} simTime: ${t}
6560
+ `;
6561
+ try {
6562
+ const Ri = param.Di / 2;
6563
+ const W12 = param.W1 / 2;
6564
+ const W12h = W12 * Math.tan(Math.PI / 6);
6565
+ const W1h = W12 * Math.tan(Math.PI / 3);
6566
+ const surface = W12 * W1h - Math.PI * Ri ** 2;
6567
+ const volume = surface * param.T1;
6568
+ const Zoffset = param.T1 + param.E1;
6569
+ if (W12h < Ri) {
6570
+ throw `err077: W1 ${param.W1} is too small compare to Di ${param.Di}`;
6571
+ }
6572
+ rGeome.logstr += `Surface ${ffix21(surface)} mm2, volume ${ffix21(volume)} mm3
6573
+ `;
6574
+ const ctrTriangle = contour20(-W12, -W12h).addCornerRounded(param.R1).addSegStrokeR(param.W1, 0).addCornerRounded(param.R1).addSegStrokeRP(2 * Math.PI / 3, param.W1).addCornerRounded(param.R1).closeSegStroke();
6575
+ const ctrHole = contourCircle17(0, 0, Ri);
6576
+ figTriangle.addMainOI([ctrTriangle, ctrHole]);
6577
+ rGeome.fig = {
6578
+ faceTriangle: figTriangle
6579
+ };
6580
+ const designName = rGeome.partName;
6581
+ const Vidx = [...Array(param.N1).keys()];
6582
+ rGeome.vol = {
6583
+ extrudes: Vidx.map((ii) => ({
6584
+ outName: `subpax_${designName}_tri${ii}`,
6585
+ face: `${designName}_faceTriangle`,
6586
+ extrudeMethod: EExtrude16.eLinearOrtho,
6587
+ length: param.T1,
6588
+ rotate: [0, 0, 0],
6589
+ translate: [0, 0, ii * Zoffset]
6590
+ })),
6591
+ volumes: [
6592
+ {
6593
+ outName: `pax_${designName}`,
6594
+ boolMethod: EBVolume16.eUnion,
6595
+ inList: Vidx.map((ii) => `subpax_${designName}_tri${ii}`)
6596
+ }
6597
+ ]
6598
+ };
6599
+ rGeome.sub = {};
6600
+ rGeome.logstr += "triangle drawn successfully!\n";
6601
+ rGeome.calcErr = false;
6602
+ } catch (emsg) {
6603
+ rGeome.logstr += emsg;
6604
+ console.log(emsg);
6605
+ }
6606
+ return rGeome;
6607
+ }
6608
+ var triangleDef = {
6609
+ pTitle: "triangle",
6610
+ pDescription: "triangle sandwich shape for experimenting systemix",
6611
+ pDef: pDef20,
6612
+ pGeom: pGeom20
6613
+ };
6614
+
6615
+ // src/sysmix/cylinder.ts
6616
+ import {
6617
+ contourCircle as contourCircle18,
6618
+ figure as figure18,
6619
+ ffix as ffix22,
6620
+ pNumber as pNumber21,
6621
+ pSectionSeparator as pSectionSeparator21,
6622
+ EExtrude as EExtrude17,
6623
+ EBVolume as EBVolume17,
6624
+ initGeom as initGeom21
6625
+ } from "geometrix";
6626
+ var pDef21 = {
6627
+ partName: "cylinder",
6628
+ params: [
6629
+ //pNumber(name, unit, init, min, max, step)
6630
+ pNumber21("D1", "mm", 100, 5, 500, 1),
6631
+ pNumber21("Di", "mm", 50, 2, 500, 1),
6632
+ pSectionSeparator21("Thickness"),
6633
+ pNumber21("T1", "mm", 30, 1, 500, 1)
6634
+ ],
6635
+ paramSvg: {
6636
+ D1: "cylinder_top.svg",
6637
+ Di: "cylinder_top.svg",
6638
+ T1: "cylinder_top.svg"
6639
+ },
6640
+ sim: {
6641
+ tMax: 180,
6642
+ tStep: 0.5,
6643
+ tUpdate: 500
6644
+ // every 0.5 second
6645
+ }
6646
+ };
6647
+ function pGeom21(t, param, suffix = "") {
6648
+ const rGeome = initGeom21(pDef21.partName + suffix);
6649
+ const figCylinder = figure18();
6650
+ rGeome.logstr += `${rGeome.partName} simTime: ${t}
6651
+ `;
6652
+ try {
6653
+ const Ri = param.Di / 2;
6654
+ const R1 = param.D1 / 2;
6655
+ const surface = Math.PI * R1 ** 2 - Math.PI * Ri ** 2;
6656
+ const volume = surface * param.T1;
6657
+ if (R1 < Ri) {
6658
+ throw `err071: D1 ${param.D1} is too small compare to Di ${param.Di}`;
6659
+ }
6660
+ rGeome.logstr += `Surface ${ffix22(surface)} mm2, volume ${ffix22(volume)} mm3
6661
+ `;
6662
+ const ctrCylinder = contourCircle18(0, 0, R1);
6663
+ const ctrHole = contourCircle18(0, 0, Ri);
6664
+ figCylinder.addMainOI([ctrCylinder, ctrHole]);
6665
+ rGeome.fig = {
6666
+ faceCylinder: figCylinder
6667
+ };
6668
+ const designName = rGeome.partName;
6669
+ rGeome.vol = {
6670
+ extrudes: [
6671
+ {
6672
+ outName: `subpax_${designName}_cyl`,
6673
+ face: `${designName}_faceCylinder`,
6674
+ extrudeMethod: EExtrude17.eLinearOrtho,
6675
+ length: param.T1,
6676
+ rotate: [0, 0, 0],
6677
+ translate: [0, 0, 0]
6678
+ }
6679
+ ],
6680
+ volumes: [
6681
+ {
6682
+ outName: `pax_${designName}`,
6683
+ boolMethod: EBVolume17.eIdentity,
6684
+ inList: [`subpax_${designName}_cyl`]
6685
+ }
6686
+ ]
6687
+ };
6688
+ rGeome.sub = {};
6689
+ rGeome.logstr += "cylinder drawn successfully!\n";
6690
+ rGeome.calcErr = false;
6691
+ } catch (emsg) {
6692
+ rGeome.logstr += emsg;
6693
+ console.log(emsg);
6694
+ }
6695
+ return rGeome;
6696
+ }
6697
+ var cylinderDef = {
6698
+ pTitle: "cylinder",
6699
+ pDescription: "simple cylinder shape for experimenting systemix",
6700
+ pDef: pDef21,
6701
+ pGeom: pGeom21
6702
+ };
6389
6703
  export {
6390
6704
  capsuleDef,
6705
+ cylinderDef,
6391
6706
  door1arcDef,
6392
6707
  doubleBoneDef,
6393
6708
  factoryDef,
@@ -6404,6 +6719,8 @@ export {
6404
6719
  springTorqueBDef,
6405
6720
  springTorqueCDef,
6406
6721
  springWormDef,
6407
- stoneTowerDef
6722
+ squareDef,
6723
+ stoneTowerDef,
6724
+ triangleDef
6408
6725
  };
6409
6726
  //# sourceMappingURL=index.js.map