designix 0.5.26 → 0.5.27
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 +1455 -1238
- package/dist/pgdsvg/pole_stator.svg +3 -3
- package/dist/pgdsvg/pole_stator_holderB_section.svg +1 -0
- package/dist/pgdsvg/pole_stator_holderB_top.svg +1 -0
- package/dist/pgdsvg/pole_stator_holders.svg +1 -0
- package/dist/pgdsvg/swing.svg +1 -1
- package/dist/pgdsvg/swing_buttress.svg +1 -0
- package/dist/pgdsvg/swing_side.svg +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1427,55 +1427,478 @@ var simplifiedGearWheelDef = {
|
|
|
1427
1427
|
};
|
|
1428
1428
|
|
|
1429
1429
|
// src/heliostat/heliostat.ts
|
|
1430
|
+
import {
|
|
1431
|
+
designParam as designParam3,
|
|
1432
|
+
checkGeom as checkGeom3,
|
|
1433
|
+
prefixLog as prefixLog3,
|
|
1434
|
+
figure as figure8,
|
|
1435
|
+
degToRad as degToRad4,
|
|
1436
|
+
radToDeg as radToDeg6,
|
|
1437
|
+
ffix as ffix10,
|
|
1438
|
+
pNumber as pNumber8,
|
|
1439
|
+
pSectionSeparator as pSectionSeparator7,
|
|
1440
|
+
initGeom as initGeom8,
|
|
1441
|
+
EBVolume as EBVolume8
|
|
1442
|
+
} from "geometrix";
|
|
1443
|
+
|
|
1444
|
+
// src/heliostat/pole_static.ts
|
|
1430
1445
|
import {
|
|
1431
1446
|
designParam as designParam2,
|
|
1432
1447
|
checkGeom as checkGeom2,
|
|
1433
1448
|
prefixLog as prefixLog2,
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1449
|
+
contour as contour6,
|
|
1450
|
+
contourCircle as contourCircle4,
|
|
1451
|
+
figure as figure4,
|
|
1452
|
+
radToDeg as radToDeg3,
|
|
1453
|
+
ffix as ffix6,
|
|
1454
|
+
pNumber as pNumber4,
|
|
1455
|
+
pCheckbox as pCheckbox3,
|
|
1456
|
+
pSectionSeparator as pSectionSeparator3,
|
|
1457
|
+
initGeom as initGeom4,
|
|
1458
|
+
EExtrude as EExtrude3,
|
|
1459
|
+
EBVolume as EBVolume4
|
|
1442
1460
|
} from "geometrix";
|
|
1443
1461
|
|
|
1462
|
+
// src/heliostat/vaxis_holder.ts
|
|
1463
|
+
import {
|
|
1464
|
+
point as point4,
|
|
1465
|
+
contour as contour5,
|
|
1466
|
+
contourCircle as contourCircle3,
|
|
1467
|
+
figure as figure3,
|
|
1468
|
+
degToRad as degToRad3,
|
|
1469
|
+
ffix as ffix5,
|
|
1470
|
+
pNumber as pNumber3,
|
|
1471
|
+
pSectionSeparator as pSectionSeparator2,
|
|
1472
|
+
initGeom as initGeom3,
|
|
1473
|
+
transform3d,
|
|
1474
|
+
EExtrude as EExtrude2,
|
|
1475
|
+
EBVolume as EBVolume3
|
|
1476
|
+
} from "geometrix";
|
|
1477
|
+
|
|
1478
|
+
// src/heliostat/common_spring_and_petal.ts
|
|
1479
|
+
import { point as point3, contour as contour4, degToRad as degToRad2, radToDeg as radToDeg2, ffix as ffix4 } from "geometrix";
|
|
1480
|
+
function ctrHolderPetal(param) {
|
|
1481
|
+
let rLog = "";
|
|
1482
|
+
const R1 = param.PHD1 / 2;
|
|
1483
|
+
const R5 = param.PHD5 / 2;
|
|
1484
|
+
const petalA1 = 2 * Math.asin(param.PHR4 / R1);
|
|
1485
|
+
const petalA2 = 2 * Math.asin(param.PHL2 / (2 * R5));
|
|
1486
|
+
const hollowA = 2 * Math.PI / param.PHN1 - petalA2;
|
|
1487
|
+
const lCD = param.PHL2 / 2;
|
|
1488
|
+
const lAD = Math.sqrt(R5 ** 2 - lCD ** 2) - R1;
|
|
1489
|
+
const lAC = Math.sqrt(lCD ** 2 + lAD ** 2);
|
|
1490
|
+
const aDAC = Math.acos(lAD / lAC);
|
|
1491
|
+
const aCAB = Math.acos(param.PHR4 / lAC);
|
|
1492
|
+
const aTan = Math.PI - aDAC - aCAB;
|
|
1493
|
+
if (R5 < R1 + param.PHR4) {
|
|
1494
|
+
throw `err211: PHD5 ${param.PHD5} too small compare to PHD1 ${param.PHD1} or PHR4 ${param.PHR4}`;
|
|
1495
|
+
}
|
|
1496
|
+
if (hollowA < petalA2) {
|
|
1497
|
+
throw `err212: PHL2 ${param.PHL2} too large compare to PHN1 ${param.PHN1}`;
|
|
1498
|
+
}
|
|
1499
|
+
if (param.PHD3 > 2 * param.PHR4) {
|
|
1500
|
+
throw `err213: PHD3 ${param.PHD3} too large compare to PHR4 ${param.PHR4}`;
|
|
1501
|
+
}
|
|
1502
|
+
if (aTan > Math.PI / 2 - petalA1) {
|
|
1503
|
+
rLog += `warn345: PHL2 is quiet small ${ffix4(param.PHL2)} mm
|
|
1504
|
+
`;
|
|
1505
|
+
}
|
|
1506
|
+
rLog += `petal angle: ${ffix4(radToDeg2(petalA2))} degree
|
|
1507
|
+
`;
|
|
1508
|
+
rLog += `hollow angle: ${ffix4(radToDeg2(hollowA))} degree
|
|
1509
|
+
`;
|
|
1510
|
+
const p0 = point3(0, 0);
|
|
1511
|
+
const p1 = point3(R5, 0);
|
|
1512
|
+
const p2 = p1.rotate(p0, -petalA2 / 2);
|
|
1513
|
+
const p10 = point3(R1, 0);
|
|
1514
|
+
const p11 = point3(R1 - param.PHR4, 0);
|
|
1515
|
+
const p12 = p11.rotate(p10, aTan);
|
|
1516
|
+
const p13 = p11.rotate(p10, -aTan);
|
|
1517
|
+
const ctrPetalPartial = contour4(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();
|
|
1518
|
+
const rCtr = contour4(p2.cx, p2.cy);
|
|
1519
|
+
const petalAngles = [...Array(param.PHN1).keys()].map((i) => i * (petalA2 + hollowA));
|
|
1520
|
+
for (const rota of petalAngles) {
|
|
1521
|
+
rCtr.addPartial(ctrPetalPartial.rotate(0, 0, rota));
|
|
1522
|
+
}
|
|
1523
|
+
return [rLog, rCtr, petalAngles];
|
|
1524
|
+
}
|
|
1525
|
+
function ctrGuidanceOuter(param) {
|
|
1526
|
+
const rLog = "";
|
|
1527
|
+
const R1 = param.D1 / 2;
|
|
1528
|
+
const R2 = param.D2 / 2;
|
|
1529
|
+
const R4 = param.D4 / 2;
|
|
1530
|
+
const stepA1 = 2 * Math.PI / param.N1;
|
|
1531
|
+
const L12 = param.L1 / 2;
|
|
1532
|
+
const L3b = Math.sqrt(R2 ** 2 - L12 ** 2);
|
|
1533
|
+
const aAOD = Math.asin(L12 / R2);
|
|
1534
|
+
const L3 = R1 - L3b;
|
|
1535
|
+
const aABD = Math.atan2(L12, L3);
|
|
1536
|
+
const lBD = Math.sqrt(L12 ** 2 + L3 ** 2);
|
|
1537
|
+
const aDBC = Math.acos(R4 / lBD);
|
|
1538
|
+
const aABC = aABD + aDBC;
|
|
1539
|
+
const larcA2 = (stepA1 - 2 * aAOD) / 2;
|
|
1540
|
+
if (larcA2 < 0) {
|
|
1541
|
+
throw `err464: N1 ${param.N1} is too large compare to D2 ${param.D2}, L1 ${param.L1}`;
|
|
1542
|
+
}
|
|
1543
|
+
if (R1 < R2) {
|
|
1544
|
+
throw `err465: D2 ${param.D2} is too large compare to D1 ${param.D1}`;
|
|
1545
|
+
}
|
|
1546
|
+
const rCtr = contour4(L3b, -L12);
|
|
1547
|
+
const pO = point3(0, 0);
|
|
1548
|
+
const pA = point3(R2, 0);
|
|
1549
|
+
const pB = point3(R1, 0);
|
|
1550
|
+
const pE = point3(R1 - R4, 0);
|
|
1551
|
+
const pC = pE.rotate(pB, aABC);
|
|
1552
|
+
const pA2 = pA.rotate(pO, aAOD + larcA2);
|
|
1553
|
+
const pA3 = pA.rotate(pO, stepA1 - aAOD);
|
|
1554
|
+
const ctrOuterPartial = contour4(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();
|
|
1555
|
+
for (let i = 0; i < param.N1; i++) {
|
|
1556
|
+
rCtr.addPartial(ctrOuterPartial.rotate(0, 0, i * stepA1));
|
|
1557
|
+
}
|
|
1558
|
+
return [rLog, rCtr, stepA1];
|
|
1559
|
+
}
|
|
1560
|
+
function ctrGuidanceInner(param) {
|
|
1561
|
+
const rLog = "";
|
|
1562
|
+
const R6 = param.D6 / 2;
|
|
1563
|
+
const stepA2 = 2 * Math.PI / param.N2;
|
|
1564
|
+
const E22 = param.E2 / 2;
|
|
1565
|
+
const aE2 = 2 * Math.asin(E22 / R6);
|
|
1566
|
+
const iarcA2 = (stepA2 - aE2) / 2;
|
|
1567
|
+
const a1Plus = param.N2 < 3 ? 0 : Math.PI / (2 * param.N2);
|
|
1568
|
+
const a1 = Math.PI / 2 + a1Plus + degToRad2(param.a1);
|
|
1569
|
+
if (iarcA2 < 0) {
|
|
1570
|
+
throw `err564: N2 ${param.N2} is too large compare to D6 ${param.D6}, E2 ${param.E2}`;
|
|
1571
|
+
}
|
|
1572
|
+
const rCtr = contour4(R6, 0);
|
|
1573
|
+
const pF = point3(0, -R6);
|
|
1574
|
+
const pO = point3(0, 0);
|
|
1575
|
+
const pG = pF.rotate(pO, -aE2);
|
|
1576
|
+
const pH = pF.translatePolar(a1, param.L2);
|
|
1577
|
+
const pI = pH.translatePolar(a1 + Math.PI / 2, param.E1);
|
|
1578
|
+
const pH2 = pF.translatePolar(a1, param.L2 + param.L4);
|
|
1579
|
+
const pI2 = pH2.translatePolar(a1 + Math.PI / 2, param.E1);
|
|
1580
|
+
const ctrSpring = contour4(pG.cx, pG.cy).addSegStrokeA(pI.cx, pI.cy);
|
|
1581
|
+
if (param.N3 > 0) {
|
|
1582
|
+
let pK1 = pI;
|
|
1583
|
+
const W12 = param.W1 / 2;
|
|
1584
|
+
const E1W12 = param.E1 + W12;
|
|
1585
|
+
for (let i = 0; i < param.N3; i++) {
|
|
1586
|
+
const pK1b = pK1.translatePolar(a1 - Math.PI / 2, E1W12);
|
|
1587
|
+
const pK2 = pK1b.translatePolar(a1, E1W12);
|
|
1588
|
+
const pK3 = pK1.translatePolar(a1 - Math.PI / 2, 2 * E1W12);
|
|
1589
|
+
const pK4 = pK3.translatePolar(a1 + Math.PI, param.L3);
|
|
1590
|
+
const pK4b = pK4.translatePolar(a1 - Math.PI / 2, W12);
|
|
1591
|
+
const pK5 = pK4b.translatePolar(a1 + Math.PI, W12);
|
|
1592
|
+
const pK6 = pK4.translatePolar(a1 - Math.PI / 2, 2 * W12);
|
|
1593
|
+
let L4end = 0;
|
|
1594
|
+
if (i === param.N3 - 1) {
|
|
1595
|
+
L4end = param.L4;
|
|
1596
|
+
}
|
|
1597
|
+
const pK7 = pK6.translatePolar(a1, param.L3 + L4end);
|
|
1598
|
+
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);
|
|
1599
|
+
pK1 = pK7;
|
|
1600
|
+
}
|
|
1601
|
+
const pK8 = pK1.translatePolar(a1 - Math.PI / 2, param.E1);
|
|
1602
|
+
ctrSpring.addSegStrokeA(pK8.cx, pK8.cy);
|
|
1603
|
+
pK1 = pK8;
|
|
1604
|
+
for (let i = 0; i < param.N3; i++) {
|
|
1605
|
+
let L4end = 0;
|
|
1606
|
+
if (i === 0) {
|
|
1607
|
+
L4end = param.L4;
|
|
1608
|
+
}
|
|
1609
|
+
const pK2 = pK1.translatePolar(a1 + Math.PI, param.L3 + L4end);
|
|
1610
|
+
const pK2b = pK2.translatePolar(a1 + Math.PI / 2, E1W12);
|
|
1611
|
+
const pK3 = pK2b.translatePolar(a1 + Math.PI, E1W12);
|
|
1612
|
+
const pK4 = pK2.translatePolar(a1 + Math.PI / 2, 2 * E1W12);
|
|
1613
|
+
const pK5 = pK4.translatePolar(a1, param.L3);
|
|
1614
|
+
const pK5b = pK5.translatePolar(a1 + Math.PI / 2, W12);
|
|
1615
|
+
const pK6 = pK5b.translatePolar(a1, W12);
|
|
1616
|
+
const pK7 = pK5.translatePolar(a1 + Math.PI / 2, 2 * W12);
|
|
1617
|
+
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();
|
|
1618
|
+
pK1 = pK7;
|
|
1619
|
+
}
|
|
1620
|
+
} else {
|
|
1621
|
+
ctrSpring.addSegStrokeA(pI2.cx, pI2.cy).addSegStrokeA(pH2.cx, pH2.cy);
|
|
1622
|
+
}
|
|
1623
|
+
ctrSpring.addSegStrokeA(pF.cx, pF.cy);
|
|
1624
|
+
for (let i = 0; i < param.N2; i++) {
|
|
1625
|
+
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);
|
|
1626
|
+
}
|
|
1627
|
+
return [rLog, rCtr];
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
// src/heliostat/vaxis_holder.ts
|
|
1631
|
+
var pDef3 = {
|
|
1632
|
+
partName: "vaxis_holder",
|
|
1633
|
+
params: [
|
|
1634
|
+
//pNumber(name, unit, init, min, max, step)
|
|
1635
|
+
pNumber3("PHD1", "mm", 700, 1, 2e3, 1),
|
|
1636
|
+
pNumber3("PHD2", "mm", 900, 1, 4e3, 1),
|
|
1637
|
+
pNumber3("PHD5", "mm", 800, 1, 4e3, 1),
|
|
1638
|
+
pNumber3("PHN1", "holes", 6, 1, 24, 1),
|
|
1639
|
+
pSectionSeparator2("screw holes"),
|
|
1640
|
+
pNumber3("PHD3", "mm", 40, 2, 100, 1),
|
|
1641
|
+
pNumber3("PHR4", "mm", 40, 2, 100, 1),
|
|
1642
|
+
pNumber3("PHL2", "mm", 120, 5, 400, 1),
|
|
1643
|
+
pNumber3("PHR6", "mm", 20, 0, 400, 1),
|
|
1644
|
+
pSectionSeparator2("section"),
|
|
1645
|
+
pNumber3("PHE1", "mm", 10, 1, 80, 1),
|
|
1646
|
+
pNumber3("PHH1", "mm", 50, 1, 200, 1),
|
|
1647
|
+
pNumber3("PHA", "degree", 5, -45, 45, 0.1),
|
|
1648
|
+
pNumber3("PHL1", "mm", 300, 1, 500, 1),
|
|
1649
|
+
pNumber3("PHE2", "mm", 10, 1, 80, 1),
|
|
1650
|
+
pNumber3("PHE3", "mm", 10, 1, 80, 1)
|
|
1651
|
+
],
|
|
1652
|
+
paramSvg: {
|
|
1653
|
+
PHD1: "vaxis_holder_top.svg",
|
|
1654
|
+
PHD2: "vaxis_holder_top.svg",
|
|
1655
|
+
PHD5: "vaxis_holder_top.svg",
|
|
1656
|
+
PHD3: "vaxis_holder_top.svg",
|
|
1657
|
+
PHR4: "vaxis_holder_top.svg",
|
|
1658
|
+
PHN1: "vaxis_holder_top.svg",
|
|
1659
|
+
PHL2: "vaxis_holder_top.svg",
|
|
1660
|
+
PHR6: "vaxis_holder_top.svg",
|
|
1661
|
+
PHE1: "vaxis_holder_section.svg",
|
|
1662
|
+
PHH1: "vaxis_holder_section.svg",
|
|
1663
|
+
PHA: "vaxis_holder_section.svg",
|
|
1664
|
+
PHL1: "vaxis_holder_section.svg",
|
|
1665
|
+
PHE2: "vaxis_holder_section.svg",
|
|
1666
|
+
PHE3: "vaxis_holder_top.svg"
|
|
1667
|
+
},
|
|
1668
|
+
sim: {
|
|
1669
|
+
tMax: 180,
|
|
1670
|
+
tStep: 0.5,
|
|
1671
|
+
tUpdate: 500
|
|
1672
|
+
// every 0.5 second
|
|
1673
|
+
}
|
|
1674
|
+
};
|
|
1675
|
+
function pGeom3(t, param, suffix = "") {
|
|
1676
|
+
const rGeome = initGeom3(pDef3.partName + suffix);
|
|
1677
|
+
const figOuter = figure3();
|
|
1678
|
+
const figPetal = figure3();
|
|
1679
|
+
const figButtress1 = figure3();
|
|
1680
|
+
const figButtress2 = figure3();
|
|
1681
|
+
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
1682
|
+
`;
|
|
1683
|
+
try {
|
|
1684
|
+
const outerA = degToRad3(param.PHA);
|
|
1685
|
+
const R1 = param.PHD1 / 2;
|
|
1686
|
+
const R2 = param.PHD2 / 2;
|
|
1687
|
+
const R3 = param.PHD3 / 2;
|
|
1688
|
+
const R5 = param.PHD5 / 2;
|
|
1689
|
+
const outerR1 = R2 + param.PHL1 / 2 * Math.sin(outerA);
|
|
1690
|
+
const outerR2 = R2 - param.PHL1 / 2 * Math.sin(outerA);
|
|
1691
|
+
const vaxisHolderHeight = param.PHL1 * Math.cos(outerA);
|
|
1692
|
+
const innerR1 = R2 - param.PHE2 / Math.cos(outerA) + param.PHE1 / 2 * Math.tan(outerA);
|
|
1693
|
+
const innerR2 = R2 - param.PHE2 / Math.cos(outerA) - param.PHE1 / 2 * Math.tan(outerA);
|
|
1694
|
+
const innerR = Math.min(innerR1, innerR2);
|
|
1695
|
+
const innerL2 = (param.PHL1 - param.PHE1 / Math.cos(outerA)) / 2;
|
|
1696
|
+
const R2next = R2 - param.PHE2 / Math.cos(outerA);
|
|
1697
|
+
if (innerR < R5) {
|
|
1698
|
+
throw `err210: PHD5 ${param.PHD5} too large compare to PHE2 ${param.PHE2} or PHA ${param.PHA}`;
|
|
1699
|
+
}
|
|
1700
|
+
rGeome.logstr += `vaxis_holder's height: ${ffix5(vaxisHolderHeight)} mm
|
|
1701
|
+
`;
|
|
1702
|
+
rGeome.logstr += `vaxis_holder outerD1: ${ffix5(2 * outerR1)} mm
|
|
1703
|
+
`;
|
|
1704
|
+
rGeome.logstr += `vaxis_holder outerD2: ${ffix5(2 * outerR2)} mm
|
|
1705
|
+
`;
|
|
1706
|
+
rGeome.logstr += `vaxis_holder innerD: ${ffix5(param.PHD1 - 2 * param.PHR4)} mm
|
|
1707
|
+
`;
|
|
1708
|
+
rGeome.logstr += `vaxis_holder D2-next: ${ffix5(2 * R2next)} mm
|
|
1709
|
+
`;
|
|
1710
|
+
const ctrOuter = function(rnl) {
|
|
1711
|
+
const rCtr = contour5(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();
|
|
1712
|
+
return rCtr;
|
|
1713
|
+
};
|
|
1714
|
+
const ctrLeg = function(rnl) {
|
|
1715
|
+
const rCtr = contour5(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();
|
|
1716
|
+
return rCtr;
|
|
1717
|
+
};
|
|
1718
|
+
const ctrLegHole = function(rnl) {
|
|
1719
|
+
const rCtr = contour5(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();
|
|
1720
|
+
return rCtr;
|
|
1721
|
+
};
|
|
1722
|
+
figOuter.addMain(ctrOuter(1));
|
|
1723
|
+
figOuter.addSecond(ctrOuter(-1));
|
|
1724
|
+
figOuter.addSecond(ctrLeg(1));
|
|
1725
|
+
figOuter.addSecond(ctrLegHole(1));
|
|
1726
|
+
figOuter.addSecond(ctrLeg(-1));
|
|
1727
|
+
figOuter.addSecond(ctrLegHole(-1));
|
|
1728
|
+
const ctrButtress1 = function(rnl) {
|
|
1729
|
+
const rCtr = contour5(rnl * (R1 + param.PHR4), -param.PHE1 / 2).addSegStrokeA(rnl * innerR1, -param.PHE1 / 2).addSegStrokeRP(-Math.PI / 2 + rnl * outerA, innerL2).closeSegStroke();
|
|
1730
|
+
return rCtr;
|
|
1731
|
+
};
|
|
1732
|
+
const ctrButtress2 = function(rnl) {
|
|
1733
|
+
const rCtr = contour5(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();
|
|
1734
|
+
return rCtr;
|
|
1735
|
+
};
|
|
1736
|
+
figOuter.addSecond(ctrButtress1(-1));
|
|
1737
|
+
figOuter.addSecond(ctrButtress2(-1));
|
|
1738
|
+
figButtress1.mergeFigure(figOuter, true);
|
|
1739
|
+
figButtress2.mergeFigure(figOuter, true);
|
|
1740
|
+
figOuter.addSecond(ctrButtress1(1));
|
|
1741
|
+
figOuter.addSecond(ctrButtress2(1));
|
|
1742
|
+
figButtress1.addMain(ctrButtress1(1));
|
|
1743
|
+
figButtress1.addSecond(ctrButtress2(1));
|
|
1744
|
+
figButtress2.addSecond(ctrButtress1(1));
|
|
1745
|
+
figButtress2.addMain(ctrButtress2(1));
|
|
1746
|
+
figPetal.addMain(contourCircle3(0, 0, innerR));
|
|
1747
|
+
figPetal.addSecond(contourCircle3(0, 0, R2));
|
|
1748
|
+
figPetal.addSecond(contourCircle3(0, 0, Math.max(outerR1, outerR2)));
|
|
1749
|
+
const [petalLog, petalCtr, petalAngles] = ctrHolderPetal(param);
|
|
1750
|
+
rGeome.logstr += petalLog;
|
|
1751
|
+
figPetal.addMain(petalCtr);
|
|
1752
|
+
for (const rota of petalAngles) {
|
|
1753
|
+
const p4 = point4(0, 0).translatePolar(rota, R1);
|
|
1754
|
+
figPetal.addMain(contourCircle3(p4.cx, p4.cy, param.PHD3 / 2));
|
|
1755
|
+
}
|
|
1756
|
+
const ctrButtress = contour5(R1 + param.PHR4, -param.PHE3).addSegStrokeA(innerR, -param.PHE3).addSegStrokeA(innerR, param.PHE3).addSegStrokeA(R1 + param.PHR4, param.PHE3).closeSegStroke();
|
|
1757
|
+
for (const rota of petalAngles) {
|
|
1758
|
+
figPetal.addSecond(ctrButtress.rotate(0, 0, rota));
|
|
1759
|
+
}
|
|
1760
|
+
rGeome.fig = {
|
|
1761
|
+
facePetal: figPetal,
|
|
1762
|
+
faceOuter: figOuter,
|
|
1763
|
+
faceButtress1: figButtress1,
|
|
1764
|
+
faceButtress2: figButtress2
|
|
1765
|
+
};
|
|
1766
|
+
const designName = rGeome.partName;
|
|
1767
|
+
const tm = transform3d();
|
|
1768
|
+
tm.addRotation(Math.PI / 2, 0, 0);
|
|
1769
|
+
tm.addTranslation(0, param.PHE3 / 2, 0);
|
|
1770
|
+
const preExtrude1 = petalAngles.map((rota, idx) => {
|
|
1771
|
+
const tm1 = transform3d(tm.getMatrix());
|
|
1772
|
+
tm1.addRotation(0, 0, rota);
|
|
1773
|
+
const rElem = {
|
|
1774
|
+
outName: `subpax_${designName}_b1_${idx}`,
|
|
1775
|
+
face: `${designName}_faceButtress1`,
|
|
1776
|
+
extrudeMethod: EExtrude2.eLinearOrtho,
|
|
1777
|
+
length: param.PHE3,
|
|
1778
|
+
rotate: tm1.getRotation(),
|
|
1779
|
+
translate: tm1.getTranslation()
|
|
1780
|
+
};
|
|
1781
|
+
return rElem;
|
|
1782
|
+
});
|
|
1783
|
+
const preExtrude2 = petalAngles.map((rota, idx) => {
|
|
1784
|
+
const tm2 = transform3d(tm.getMatrix());
|
|
1785
|
+
tm2.addRotation(0, 0, rota);
|
|
1786
|
+
const rElem = {
|
|
1787
|
+
outName: `subpax_${designName}_b2_${idx}`,
|
|
1788
|
+
face: `${designName}_faceButtress2`,
|
|
1789
|
+
extrudeMethod: EExtrude2.eLinearOrtho,
|
|
1790
|
+
length: param.PHE3,
|
|
1791
|
+
rotate: tm2.getRotation(),
|
|
1792
|
+
translate: tm2.getTranslation()
|
|
1793
|
+
};
|
|
1794
|
+
return rElem;
|
|
1795
|
+
});
|
|
1796
|
+
const b1List = petalAngles.map((elem, idx) => {
|
|
1797
|
+
const subElem = `subpax_${designName}_b1_${idx}`;
|
|
1798
|
+
return subElem;
|
|
1799
|
+
});
|
|
1800
|
+
const b2List = petalAngles.map((elem, idx) => {
|
|
1801
|
+
const subElem = `subpax_${designName}_b2_${idx}`;
|
|
1802
|
+
return subElem;
|
|
1803
|
+
});
|
|
1804
|
+
rGeome.vol = {
|
|
1805
|
+
extrudes: [
|
|
1806
|
+
{
|
|
1807
|
+
outName: `subpax_${designName}_outer`,
|
|
1808
|
+
face: `${designName}_faceOuter`,
|
|
1809
|
+
extrudeMethod: EExtrude2.eRotate,
|
|
1810
|
+
rotate: [0, 0, 0],
|
|
1811
|
+
translate: [0, 0, 0]
|
|
1812
|
+
},
|
|
1813
|
+
{
|
|
1814
|
+
outName: `subpax_${designName}_petal`,
|
|
1815
|
+
face: `${designName}_facePetal`,
|
|
1816
|
+
extrudeMethod: EExtrude2.eLinearOrtho,
|
|
1817
|
+
length: param.PHE1,
|
|
1818
|
+
rotate: [0, 0, 0],
|
|
1819
|
+
translate: [0, 0, -param.PHE1 / 2]
|
|
1820
|
+
},
|
|
1821
|
+
...preExtrude1,
|
|
1822
|
+
...preExtrude2
|
|
1823
|
+
],
|
|
1824
|
+
volumes: [
|
|
1825
|
+
{
|
|
1826
|
+
outName: `pax_${designName}`,
|
|
1827
|
+
boolMethod: EBVolume3.eUnion,
|
|
1828
|
+
inList: [
|
|
1829
|
+
`subpax_${designName}_petal`,
|
|
1830
|
+
`subpax_${designName}_outer`,
|
|
1831
|
+
...b1List,
|
|
1832
|
+
...b2List
|
|
1833
|
+
]
|
|
1834
|
+
}
|
|
1835
|
+
]
|
|
1836
|
+
};
|
|
1837
|
+
rGeome.sub = {};
|
|
1838
|
+
rGeome.logstr += "vaxis_holder drawn successfully!\n";
|
|
1839
|
+
rGeome.calcErr = false;
|
|
1840
|
+
} catch (emsg) {
|
|
1841
|
+
rGeome.logstr += emsg;
|
|
1842
|
+
console.log(emsg);
|
|
1843
|
+
}
|
|
1844
|
+
return rGeome;
|
|
1845
|
+
}
|
|
1846
|
+
var vaxisHolderDef = {
|
|
1847
|
+
pTitle: "Heliostat vaxis_holder",
|
|
1848
|
+
pDescription: "The holders of the guidance mechanism for azimuth motion",
|
|
1849
|
+
pDef: pDef3,
|
|
1850
|
+
pGeom: pGeom3
|
|
1851
|
+
};
|
|
1852
|
+
|
|
1444
1853
|
// src/heliostat/pole_static.ts
|
|
1445
|
-
|
|
1446
|
-
contour as contour4,
|
|
1447
|
-
contourCircle as contourCircle3,
|
|
1448
|
-
figure as figure3,
|
|
1449
|
-
radToDeg as radToDeg2,
|
|
1450
|
-
ffix as ffix4,
|
|
1451
|
-
pNumber as pNumber3,
|
|
1452
|
-
pSectionSeparator as pSectionSeparator2,
|
|
1453
|
-
initGeom as initGeom3,
|
|
1454
|
-
EExtrude as EExtrude2,
|
|
1455
|
-
EBVolume as EBVolume3
|
|
1456
|
-
} from "geometrix";
|
|
1457
|
-
var pDef3 = {
|
|
1854
|
+
var pDef4 = {
|
|
1458
1855
|
partName: "pole_static",
|
|
1459
1856
|
params: [
|
|
1460
1857
|
//pNumber(name, unit, init, min, max, step)
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1858
|
+
pNumber4("D1", "mm", 1e3, 20, 4e3, 1),
|
|
1859
|
+
pNumber4("D2", "mm", 700, 10, 4e3, 1),
|
|
1860
|
+
pNumber4("D3", "mm", 800, 10, 4e3, 1),
|
|
1861
|
+
pNumber4("H1", "mm", 3e3, 10, 4e4, 10),
|
|
1862
|
+
pNumber4("H2", "mm", 7e3, 50, 4e4, 10),
|
|
1863
|
+
pSectionSeparator3("thickness"),
|
|
1864
|
+
pNumber4("E1", "mm", 30, 1, 80, 1),
|
|
1865
|
+
pNumber4("E2", "mm", 5, 1, 80, 1),
|
|
1866
|
+
pSectionSeparator3("base holes"),
|
|
1867
|
+
pNumber4("N1", "", 32, 3, 100, 1),
|
|
1868
|
+
pNumber4("D5", "mm", 40, 1, 100, 1),
|
|
1869
|
+
pNumber4("L1", "mm", 45, 1, 300, 1),
|
|
1870
|
+
pSectionSeparator3("door"),
|
|
1871
|
+
pNumber4("D4", "mm", 600, 1, 1200, 1),
|
|
1872
|
+
pNumber4("H3", "mm", 300, 5, 1200, 1),
|
|
1873
|
+
pNumber4("H4", "mm", 1800, 10, 2500, 1),
|
|
1874
|
+
pNumber4("L2", "mm", 30, 1, 100, 1),
|
|
1875
|
+
pNumber4("E3", "mm", 40, 1, 100, 1),
|
|
1876
|
+
pSectionSeparator3("holders"),
|
|
1877
|
+
pCheckbox3("holders", true),
|
|
1878
|
+
pNumber4("PHL1A", "mm", 400, 10, 1e3, 1),
|
|
1879
|
+
pNumber4("PHL1B", "mm", 400, 10, 1e3, 1),
|
|
1880
|
+
pNumber4("PHB", "mm", 5e3, 10, 2e4, 1),
|
|
1881
|
+
pNumber4("PHD1A", "mm", 600, 10, 4e3, 1),
|
|
1882
|
+
pNumber4("PHD1B", "mm", 380, 10, 4e3, 1),
|
|
1883
|
+
pNumber4("PHN1AB", "petal", 6, 1, 24, 1),
|
|
1884
|
+
pSectionSeparator3("holder-B"),
|
|
1885
|
+
pNumber4("PHD5B", "mm", 600, 10, 4e3, 1),
|
|
1886
|
+
pNumber4("PHR4B", "mm", 30, 3, 400, 1),
|
|
1887
|
+
pNumber4("PHD3B", "mm", 40, 3, 400, 1),
|
|
1888
|
+
pNumber4("PHL2B", "mm", 140, 3, 400, 1),
|
|
1889
|
+
pNumber4("PHE3B", "mm", 10, 1, 50, 1),
|
|
1890
|
+
pNumber4("PHR6B", "mm", 20, 0, 400, 1),
|
|
1891
|
+
pNumber4("PHE1B", "mm", 10, 1, 50, 1),
|
|
1892
|
+
pNumber4("PHH1B", "mm", 10, 1, 50, 1),
|
|
1893
|
+
pSectionSeparator3("holder-A"),
|
|
1894
|
+
pNumber4("PHD5A", "mm", 900, 10, 4e3, 1),
|
|
1895
|
+
pNumber4("PHR4A", "mm", 30, 3, 400, 1),
|
|
1896
|
+
pNumber4("PHD3A", "mm", 40, 3, 400, 1),
|
|
1897
|
+
pNumber4("PHL2A", "mm", 200, 3, 400, 1),
|
|
1898
|
+
pNumber4("PHE3A", "mm", 10, 1, 50, 1),
|
|
1899
|
+
pNumber4("PHR6A", "mm", 20, 0, 400, 1),
|
|
1900
|
+
pNumber4("PHE1A", "mm", 10, 1, 50, 1),
|
|
1901
|
+
pNumber4("PHH1A", "mm", 10, 1, 50, 1)
|
|
1479
1902
|
],
|
|
1480
1903
|
paramSvg: {
|
|
1481
1904
|
D1: "pole_stator_cut.svg",
|
|
@@ -1492,7 +1915,30 @@ var pDef3 = {
|
|
|
1492
1915
|
H3: "pole_stator_face.svg",
|
|
1493
1916
|
H4: "pole_stator_face.svg",
|
|
1494
1917
|
L2: "pole_stator_face.svg",
|
|
1495
|
-
E3: "pole_stator_right.svg"
|
|
1918
|
+
E3: "pole_stator_right.svg",
|
|
1919
|
+
holders: "pole_stator_holders.svg",
|
|
1920
|
+
PHL1A: "pole_stator_holders.svg",
|
|
1921
|
+
PHL1B: "pole_stator_holders.svg",
|
|
1922
|
+
PHB: "pole_stator_holders.svg",
|
|
1923
|
+
PHD1A: "pole_stator_holders.svg",
|
|
1924
|
+
PHD1B: "pole_stator_holders.svg",
|
|
1925
|
+
PHN1AB: "pole_stator_holders.svg",
|
|
1926
|
+
PHD5A: "pole_stator_holderB_top.svg",
|
|
1927
|
+
PHR4A: "pole_stator_holderB_top.svg",
|
|
1928
|
+
PHD3A: "pole_stator_holderB_top.svg",
|
|
1929
|
+
PHL2A: "pole_stator_holderB_top.svg",
|
|
1930
|
+
PHE3A: "pole_stator_holderB_top.svg",
|
|
1931
|
+
PHR6A: "pole_stator_holderB_top.svg",
|
|
1932
|
+
PHE1A: "pole_stator_holderB_section.svg",
|
|
1933
|
+
PHH1A: "pole_stator_holderB_section.svg",
|
|
1934
|
+
PHD5B: "pole_stator_holderB_top.svg",
|
|
1935
|
+
PHR4B: "pole_stator_holderB_top.svg",
|
|
1936
|
+
PHD3B: "pole_stator_holderB_top.svg",
|
|
1937
|
+
PHL2B: "pole_stator_holderB_top.svg",
|
|
1938
|
+
PHE3B: "pole_stator_holderB_top.svg",
|
|
1939
|
+
PHR6B: "pole_stator_holderB_top.svg",
|
|
1940
|
+
PHE1B: "pole_stator_holderB_section.svg",
|
|
1941
|
+
PHH1B: "pole_stator_holderB_section.svg"
|
|
1496
1942
|
},
|
|
1497
1943
|
sim: {
|
|
1498
1944
|
tMax: 180,
|
|
@@ -1501,40 +1947,77 @@ var pDef3 = {
|
|
|
1501
1947
|
// every 0.5 second
|
|
1502
1948
|
}
|
|
1503
1949
|
};
|
|
1504
|
-
function
|
|
1505
|
-
const rGeome =
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
const
|
|
1509
|
-
const
|
|
1510
|
-
const
|
|
1511
|
-
const
|
|
1512
|
-
const
|
|
1950
|
+
function pGeom4(t, param, suffix = "") {
|
|
1951
|
+
const rGeome = initGeom4(pDef4.partName + suffix);
|
|
1952
|
+
const figCut = figure4();
|
|
1953
|
+
const figFace = figure4();
|
|
1954
|
+
const figBottom = figure4();
|
|
1955
|
+
const figEmptyPole = figure4();
|
|
1956
|
+
const figEmptyDoor = figure4();
|
|
1957
|
+
const figHolderB2Section = figure4();
|
|
1958
|
+
const figHolderB2Top = figure4();
|
|
1959
|
+
const figHolderB1Section = figure4();
|
|
1960
|
+
const figHolderB1Top = figure4();
|
|
1961
|
+
const figHolderASection = figure4();
|
|
1962
|
+
const figHolderATop = figure4();
|
|
1513
1963
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
1514
1964
|
`;
|
|
1515
1965
|
try {
|
|
1516
1966
|
const R1 = param.D1 / 2;
|
|
1517
1967
|
const R2 = param.D2 / 2;
|
|
1518
1968
|
const R3 = param.D3 / 2;
|
|
1969
|
+
const poleHeight = param.H1 + param.H2;
|
|
1970
|
+
const coneAngle = Math.atan2(R1 - R2, param.H2);
|
|
1971
|
+
const H1bminus = param.E2 * Math.tan(coneAngle / 2);
|
|
1972
|
+
const H1b = param.H1 - H1bminus;
|
|
1973
|
+
const phl1b = param.PHL1B / Math.cos(coneAngle);
|
|
1974
|
+
const hb2R2 = R2 + param.PHL1B / 2 * Math.tan(coneAngle);
|
|
1975
|
+
const hb2PosH = param.H1 + param.H2 - param.PHL1B / 2;
|
|
1976
|
+
const hb1R2 = R2 + (param.PHL1B / 2 + param.PHB) * Math.tan(coneAngle);
|
|
1977
|
+
const hb1PosH = param.H1 + param.H2 - param.PHL1B / 2 - param.PHB;
|
|
1978
|
+
const phl1a = param.PHL1A / Math.cos(coneAngle);
|
|
1979
|
+
const haR2 = R1 - param.PHL1A / 2 * Math.tan(coneAngle);
|
|
1980
|
+
const haPosH = param.H1 + param.PHL1A / 2;
|
|
1519
1981
|
if (R2 > R1) {
|
|
1520
1982
|
throw `err091: D2 ${param.D2} is larger than D1 ${param.D1}`;
|
|
1521
1983
|
}
|
|
1522
1984
|
if (R3 + param.E2 > R1) {
|
|
1523
1985
|
throw `err095: D3 ${param.D3} and E2 ${param.E2} are too large compare to D1 ${param.D1}`;
|
|
1524
1986
|
}
|
|
1525
|
-
|
|
1526
|
-
|
|
1987
|
+
if (param.holders) {
|
|
1988
|
+
if (param.PHB < param.PHL1B) {
|
|
1989
|
+
throw `err131: PHB ${param.PHB} is too small compare to PHL1B ${param.PHL1B}`;
|
|
1990
|
+
}
|
|
1991
|
+
if (param.PHB > param.H2 - param.PHL1B - param.PHL1A) {
|
|
1992
|
+
throw `err132: PHB ${param.PHB} is too large compare to H2 ${param.H2}, PHL1B ${param.PHL1B} and PHL1A ${param.PHL1A}`;
|
|
1993
|
+
}
|
|
1994
|
+
}
|
|
1995
|
+
rGeome.logstr += `pole-height: ${ffix6(poleHeight)} mm
|
|
1527
1996
|
`;
|
|
1528
|
-
|
|
1529
|
-
rGeome.logstr += `cone-half-angle: ${ffix4(radToDeg2(coneAngle))} degree
|
|
1997
|
+
rGeome.logstr += `cone-half-angle: ${ffix6(radToDeg3(coneAngle))} degree
|
|
1530
1998
|
`;
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1999
|
+
rGeome.logstr += `holder position: A: ${ffix6(haPosH)} B1: ${ffix6(hb1PosH)} B2: ${ffix6(hb2PosH)} mm
|
|
2000
|
+
`;
|
|
2001
|
+
const innerX = function(posY) {
|
|
2002
|
+
let rPosX = R2 - param.E2 * Math.cos(coneAngle);
|
|
2003
|
+
rPosX += (poleHeight - param.E2 * Math.sin(coneAngle) - posY) * Math.tan(coneAngle);
|
|
2004
|
+
return rPosX;
|
|
2005
|
+
};
|
|
2006
|
+
const ctrPoleProfile = function(orient, withR3) {
|
|
2007
|
+
const rPoleProfile = contour6(orient * R1, 0).addSegStrokeA(orient * R1, param.H1).addSegStrokeA(orient * R2, poleHeight).addSegStrokeR(
|
|
1535
2008
|
-orient * param.E2 * Math.cos(coneAngle),
|
|
1536
2009
|
-param.E2 * Math.sin(coneAngle)
|
|
1537
|
-
)
|
|
2010
|
+
);
|
|
2011
|
+
if (withR3 && param.holders) {
|
|
2012
|
+
const py1 = param.H1 + param.PHL1A / 2 - param.PHE1A / 2;
|
|
2013
|
+
const py2 = py1 + param.PHE1A;
|
|
2014
|
+
const py6 = poleHeight - param.PHL1B / 2 + param.PHE1B / 2;
|
|
2015
|
+
const py5 = py6 - param.PHE1B;
|
|
2016
|
+
const py4 = py6 - param.PHB;
|
|
2017
|
+
const py3 = py4 - param.PHE1B;
|
|
2018
|
+
rPoleProfile.addSegStrokeA(orient * innerX(py6), py6).addSegStrokeA(orient * (param.PHD1B / 2 - param.PHR4B), py6).addSegStrokeA(orient * (param.PHD1B / 2 - param.PHR4B), py5).addSegStrokeA(orient * innerX(py5), py5).addSegStrokeA(orient * innerX(py4), py4).addSegStrokeA(orient * (param.PHD1B / 2 - param.PHR4B), py4).addSegStrokeA(orient * (param.PHD1B / 2 - param.PHR4B), py3).addSegStrokeA(orient * innerX(py3), py3).addSegStrokeA(orient * innerX(py2), py2).addSegStrokeA(orient * (param.PHD1A / 2 - param.PHR4A), py2).addSegStrokeA(orient * (param.PHD1A / 2 - param.PHR4A), py1).addSegStrokeA(orient * innerX(py1), py1);
|
|
2019
|
+
}
|
|
2020
|
+
rPoleProfile.addSegStrokeA(orient * (R1 - param.E2), H1b);
|
|
1538
2021
|
if (withR3) {
|
|
1539
2022
|
rPoleProfile.addSegStrokeA(orient * (R1 - param.E2), param.E1).addSegStrokeA(orient * R3, param.E1).addSegStrokeA(orient * R3, 0);
|
|
1540
2023
|
} else {
|
|
@@ -1554,53 +2037,172 @@ function pGeom3(t, param, suffix = "") {
|
|
|
1554
2037
|
if (R4 - param.L2 < 0) {
|
|
1555
2038
|
throw `err121: D4 ${param.D4} is too small compare to L2 ${param.L2}`;
|
|
1556
2039
|
}
|
|
1557
|
-
ctrDoorFace = function(pL2) {
|
|
2040
|
+
const ctrDoorFace = function(pL2) {
|
|
1558
2041
|
const R4b = R4 - pL2;
|
|
1559
2042
|
const H3b = param.H3 + R4;
|
|
1560
|
-
const rCtrDoorFace =
|
|
2043
|
+
const rCtrDoorFace = contour6(R4b, H3b + doorStraightLenght).addPointR(-R4b, R4b).addSegArc(R4b, false, true).addPointR(-R4b, -R4b).addSegArc(R4b, false, true).addSegStrokeR(0, -doorStraightLenght).addPointR(R4b, -R4b).addSegArc(R4b, false, true).addPointR(R4b, R4b).addSegArc(R4b, false, true).closeSegStroke();
|
|
1561
2044
|
return rCtrDoorFace;
|
|
1562
2045
|
};
|
|
1563
2046
|
figFace.addMain(ctrDoorFace(0));
|
|
1564
2047
|
figFace.addMain(ctrDoorFace(param.L2));
|
|
1565
|
-
const ctrPoleFace =
|
|
2048
|
+
const ctrPoleFace = contour6(R1, 0).addSegStrokeA(R1, param.H1).addSegStrokeA(R2, poleHeight).addSegStrokeA(-R2, poleHeight).addSegStrokeA(-R1, param.H1).addSegStrokeA(-R1, 0).closeSegStroke();
|
|
1566
2049
|
figFace.addSecond(ctrPoleFace);
|
|
1567
|
-
const ctrDoorSide =
|
|
2050
|
+
const ctrDoorSide = contour6(-R1, param.H3).addSegStrokeR(0, param.H4).addSegStrokeR(-param.E3, 0).addSegStrokeR(0, -param.H4).closeSegStroke();
|
|
1568
2051
|
figFace.addSecond(ctrDoorSide);
|
|
1569
|
-
figBottom.addMain(
|
|
1570
|
-
figBottom.addMain(
|
|
2052
|
+
figBottom.addMain(contourCircle4(0, 0, R1));
|
|
2053
|
+
figBottom.addMain(contourCircle4(0, 0, R3));
|
|
1571
2054
|
const posR = R3 + param.L1;
|
|
1572
2055
|
const posA = 2 * Math.PI / param.N1;
|
|
1573
2056
|
for (let i = 0; i < param.N1; i++) {
|
|
1574
2057
|
const posX = posR * Math.cos(i * posA);
|
|
1575
2058
|
const posY = posR * Math.sin(i * posA);
|
|
1576
|
-
figBottom.addMain(
|
|
2059
|
+
figBottom.addMain(contourCircle4(posX, posY, param.D5 / 2));
|
|
1577
2060
|
}
|
|
1578
|
-
figBottom.addSecond(
|
|
1579
|
-
figBottom.addSecond(
|
|
1580
|
-
figEmptyPole.addMain(
|
|
1581
|
-
figEmptyPole.addMain(
|
|
2061
|
+
figBottom.addSecond(contourCircle4(0, 0, R2));
|
|
2062
|
+
figBottom.addSecond(contourCircle4(0, 0, R1 - param.E2));
|
|
2063
|
+
figEmptyPole.addMain(contourCircle4(0, 0, R1 + param.E3));
|
|
2064
|
+
figEmptyPole.addMain(contourCircle4(0, 0, R1 - param.E2));
|
|
1582
2065
|
figEmptyDoor.addMain(ctrDoorFace(param.L2));
|
|
2066
|
+
const designName = rGeome.partName;
|
|
2067
|
+
const inheritList = [];
|
|
2068
|
+
const inheritNames = [];
|
|
2069
|
+
if (param.holders) {
|
|
2070
|
+
const vaxisHolderB2Param = designParam2(vaxisHolderDef.pDef, "B2");
|
|
2071
|
+
vaxisHolderB2Param.setVal("PHD1", param.PHD1B);
|
|
2072
|
+
vaxisHolderB2Param.setVal("PHD2", 2 * hb2R2);
|
|
2073
|
+
vaxisHolderB2Param.setVal("PHD5", param.PHD5B);
|
|
2074
|
+
vaxisHolderB2Param.setVal("PHN1", param.PHN1AB);
|
|
2075
|
+
vaxisHolderB2Param.setVal("PHD3", param.PHD3B);
|
|
2076
|
+
vaxisHolderB2Param.setVal("PHR4", param.PHR4B);
|
|
2077
|
+
vaxisHolderB2Param.setVal("PHL2", param.PHL2B);
|
|
2078
|
+
vaxisHolderB2Param.setVal("PHR6", param.PHR6B);
|
|
2079
|
+
vaxisHolderB2Param.setVal("PHE1", param.PHE1B);
|
|
2080
|
+
vaxisHolderB2Param.setVal("PHH1", param.PHH1B);
|
|
2081
|
+
vaxisHolderB2Param.setVal("PHA", radToDeg3(coneAngle));
|
|
2082
|
+
vaxisHolderB2Param.setVal("PHL1", phl1b);
|
|
2083
|
+
vaxisHolderB2Param.setVal("PHE2", param.E2);
|
|
2084
|
+
vaxisHolderB2Param.setVal("PHE3", param.PHE3B);
|
|
2085
|
+
const vaxisHolderB2Geom = vaxisHolderDef.pGeom(
|
|
2086
|
+
0,
|
|
2087
|
+
vaxisHolderB2Param.getParamVal(),
|
|
2088
|
+
vaxisHolderB2Param.getSuffix()
|
|
2089
|
+
);
|
|
2090
|
+
checkGeom2(vaxisHolderB2Geom);
|
|
2091
|
+
rGeome.logstr += prefixLog2(
|
|
2092
|
+
vaxisHolderB2Geom.logstr,
|
|
2093
|
+
vaxisHolderB2Param.getPartNameSuffix()
|
|
2094
|
+
);
|
|
2095
|
+
figHolderB2Section.mergeFigure(vaxisHolderB2Geom.fig.faceOuter);
|
|
2096
|
+
figHolderB2Top.mergeFigure(vaxisHolderB2Geom.fig.facePetal);
|
|
2097
|
+
const inheritHb2 = {
|
|
2098
|
+
outName: `inpax_${designName}_hB2`,
|
|
2099
|
+
subdesign: "pax_vaxis_holderB2",
|
|
2100
|
+
subgeom: vaxisHolderB2Geom,
|
|
2101
|
+
rotate: [0, 0, 0],
|
|
2102
|
+
translate: [0, 0, hb2PosH]
|
|
2103
|
+
};
|
|
2104
|
+
inheritList.push(inheritHb2);
|
|
2105
|
+
inheritNames.push(`inpax_${designName}_hB2`);
|
|
2106
|
+
const vaxisHolderB1Param = designParam2(vaxisHolderDef.pDef, "B1");
|
|
2107
|
+
vaxisHolderB1Param.setVal("PHD1", param.PHD1B);
|
|
2108
|
+
vaxisHolderB1Param.setVal("PHD2", 2 * hb1R2);
|
|
2109
|
+
vaxisHolderB1Param.setVal("PHD5", param.PHD5B);
|
|
2110
|
+
vaxisHolderB1Param.setVal("PHN1", param.PHN1AB);
|
|
2111
|
+
vaxisHolderB1Param.setVal("PHD3", param.PHD3B);
|
|
2112
|
+
vaxisHolderB1Param.setVal("PHR4", param.PHR4B);
|
|
2113
|
+
vaxisHolderB1Param.setVal("PHL2", param.PHL2B);
|
|
2114
|
+
vaxisHolderB1Param.setVal("PHR6", param.PHR6B);
|
|
2115
|
+
vaxisHolderB1Param.setVal("PHE1", param.PHE1B);
|
|
2116
|
+
vaxisHolderB1Param.setVal("PHH1", param.PHH1B);
|
|
2117
|
+
vaxisHolderB1Param.setVal("PHA", radToDeg3(coneAngle));
|
|
2118
|
+
vaxisHolderB1Param.setVal("PHL1", phl1b);
|
|
2119
|
+
vaxisHolderB1Param.setVal("PHE2", param.E2);
|
|
2120
|
+
vaxisHolderB1Param.setVal("PHE3", param.PHE3B);
|
|
2121
|
+
const vaxisHolderB1Geom = vaxisHolderDef.pGeom(
|
|
2122
|
+
0,
|
|
2123
|
+
vaxisHolderB1Param.getParamVal(),
|
|
2124
|
+
vaxisHolderB1Param.getSuffix()
|
|
2125
|
+
);
|
|
2126
|
+
checkGeom2(vaxisHolderB1Geom);
|
|
2127
|
+
rGeome.logstr += prefixLog2(
|
|
2128
|
+
vaxisHolderB1Geom.logstr,
|
|
2129
|
+
vaxisHolderB1Param.getPartNameSuffix()
|
|
2130
|
+
);
|
|
2131
|
+
figHolderB1Section.mergeFigure(vaxisHolderB1Geom.fig.faceOuter);
|
|
2132
|
+
figHolderB1Top.mergeFigure(vaxisHolderB1Geom.fig.facePetal);
|
|
2133
|
+
const inheritHb1 = {
|
|
2134
|
+
outName: `inpax_${designName}_hB1`,
|
|
2135
|
+
subdesign: "pax_vaxis_holderB1",
|
|
2136
|
+
subgeom: vaxisHolderB1Geom,
|
|
2137
|
+
rotate: [0, 0, 0],
|
|
2138
|
+
translate: [0, 0, hb1PosH]
|
|
2139
|
+
};
|
|
2140
|
+
inheritList.push(inheritHb1);
|
|
2141
|
+
inheritNames.push(`inpax_${designName}_hB1`);
|
|
2142
|
+
const vaxisHolderAParam = designParam2(vaxisHolderDef.pDef, "A");
|
|
2143
|
+
vaxisHolderAParam.setVal("PHD1", param.PHD1A);
|
|
2144
|
+
vaxisHolderAParam.setVal("PHD2", 2 * haR2);
|
|
2145
|
+
vaxisHolderAParam.setVal("PHD5", param.PHD5A);
|
|
2146
|
+
vaxisHolderAParam.setVal("PHN1", param.PHN1AB);
|
|
2147
|
+
vaxisHolderAParam.setVal("PHD3", param.PHD3A);
|
|
2148
|
+
vaxisHolderAParam.setVal("PHR4", param.PHR4A);
|
|
2149
|
+
vaxisHolderAParam.setVal("PHL2", param.PHL2A);
|
|
2150
|
+
vaxisHolderAParam.setVal("PHR6", param.PHR6A);
|
|
2151
|
+
vaxisHolderAParam.setVal("PHE1", param.PHE1A);
|
|
2152
|
+
vaxisHolderAParam.setVal("PHH1", param.PHH1A);
|
|
2153
|
+
vaxisHolderAParam.setVal("PHA", radToDeg3(coneAngle));
|
|
2154
|
+
vaxisHolderAParam.setVal("PHL1", phl1a);
|
|
2155
|
+
vaxisHolderAParam.setVal("PHE2", param.E2);
|
|
2156
|
+
vaxisHolderAParam.setVal("PHE3", param.PHE3A);
|
|
2157
|
+
const vaxisHolderAGeom = vaxisHolderDef.pGeom(
|
|
2158
|
+
0,
|
|
2159
|
+
vaxisHolderAParam.getParamVal(),
|
|
2160
|
+
vaxisHolderAParam.getSuffix()
|
|
2161
|
+
);
|
|
2162
|
+
checkGeom2(vaxisHolderAGeom);
|
|
2163
|
+
rGeome.logstr += prefixLog2(
|
|
2164
|
+
vaxisHolderAGeom.logstr,
|
|
2165
|
+
vaxisHolderAParam.getPartNameSuffix()
|
|
2166
|
+
);
|
|
2167
|
+
figHolderASection.mergeFigure(vaxisHolderAGeom.fig.faceOuter);
|
|
2168
|
+
figHolderATop.mergeFigure(vaxisHolderAGeom.fig.facePetal);
|
|
2169
|
+
const inheritHa = {
|
|
2170
|
+
outName: `inpax_${designName}_hA`,
|
|
2171
|
+
subdesign: "pax_vaxis_holderA",
|
|
2172
|
+
subgeom: vaxisHolderAGeom,
|
|
2173
|
+
rotate: [0, 0, 0],
|
|
2174
|
+
translate: [0, 0, haPosH]
|
|
2175
|
+
};
|
|
2176
|
+
inheritList.push(inheritHa);
|
|
2177
|
+
inheritNames.push(`inpax_${designName}_hA`);
|
|
2178
|
+
}
|
|
1583
2179
|
rGeome.fig = {
|
|
1584
2180
|
poleCut: figCut,
|
|
1585
2181
|
poleFace: figFace,
|
|
1586
2182
|
poleBottom: figBottom,
|
|
1587
2183
|
emptyPole: figEmptyPole,
|
|
1588
|
-
emptyDoor: figEmptyDoor
|
|
2184
|
+
emptyDoor: figEmptyDoor,
|
|
2185
|
+
holderB2Section: figHolderB2Section,
|
|
2186
|
+
holderB2Top: figHolderB2Top,
|
|
2187
|
+
holderB1Section: figHolderB1Section,
|
|
2188
|
+
holderB1Top: figHolderB1Top,
|
|
2189
|
+
holderASection: figHolderASection,
|
|
2190
|
+
holderATop: figHolderATop
|
|
1589
2191
|
};
|
|
1590
|
-
const designName = rGeome.partName;
|
|
1591
2192
|
rGeome.vol = {
|
|
2193
|
+
inherits: inheritList,
|
|
1592
2194
|
extrudes: [
|
|
1593
2195
|
{
|
|
1594
2196
|
outName: `subpax_${designName}_pole`,
|
|
1595
2197
|
face: `${designName}_poleCut`,
|
|
1596
|
-
extrudeMethod:
|
|
2198
|
+
extrudeMethod: EExtrude3.eRotate,
|
|
1597
2199
|
rotate: [0, 0, 0],
|
|
1598
2200
|
translate: [0, 0, 0]
|
|
1599
2201
|
},
|
|
1600
2202
|
{
|
|
1601
2203
|
outName: `subpax_${designName}_bottom`,
|
|
1602
2204
|
face: `${designName}_poleBottom`,
|
|
1603
|
-
extrudeMethod:
|
|
2205
|
+
extrudeMethod: EExtrude3.eLinearOrtho,
|
|
1604
2206
|
length: param.E1,
|
|
1605
2207
|
rotate: [0, 0, 0],
|
|
1606
2208
|
translate: [0, 0, 0]
|
|
@@ -1608,7 +2210,7 @@ function pGeom3(t, param, suffix = "") {
|
|
|
1608
2210
|
{
|
|
1609
2211
|
outName: `subpax_${designName}_door`,
|
|
1610
2212
|
face: `${designName}_poleFace`,
|
|
1611
|
-
extrudeMethod:
|
|
2213
|
+
extrudeMethod: EExtrude3.eLinearOrtho,
|
|
1612
2214
|
length: R1 + param.E3,
|
|
1613
2215
|
rotate: [Math.PI / 2, 0, 0],
|
|
1614
2216
|
translate: [0, 0, 0]
|
|
@@ -1616,7 +2218,7 @@ function pGeom3(t, param, suffix = "") {
|
|
|
1616
2218
|
{
|
|
1617
2219
|
outName: `subpax_${designName}_emptyPole`,
|
|
1618
2220
|
face: `${designName}_emptyPole`,
|
|
1619
|
-
extrudeMethod:
|
|
2221
|
+
extrudeMethod: EExtrude3.eLinearOrtho,
|
|
1620
2222
|
length: param.H1,
|
|
1621
2223
|
rotate: [0, 0, 0],
|
|
1622
2224
|
translate: [0, 0, 0]
|
|
@@ -1624,7 +2226,7 @@ function pGeom3(t, param, suffix = "") {
|
|
|
1624
2226
|
{
|
|
1625
2227
|
outName: `subpax_${designName}_emptyDoor`,
|
|
1626
2228
|
face: `${designName}_emptyDoor`,
|
|
1627
|
-
extrudeMethod:
|
|
2229
|
+
extrudeMethod: EExtrude3.eLinearOrtho,
|
|
1628
2230
|
length: R1 + param.E3 + 10,
|
|
1629
2231
|
rotate: [Math.PI / 2, 0, 0],
|
|
1630
2232
|
translate: [0, 0, 0]
|
|
@@ -1634,21 +2236,22 @@ function pGeom3(t, param, suffix = "") {
|
|
|
1634
2236
|
{
|
|
1635
2237
|
outName: `ipax_${designName}_door`,
|
|
1636
2238
|
//boolMethod: EBVolume.eSubstraction,
|
|
1637
|
-
boolMethod:
|
|
2239
|
+
boolMethod: EBVolume4.eIntersection,
|
|
1638
2240
|
inList: [`subpax_${designName}_door`, `subpax_${designName}_emptyPole`]
|
|
1639
2241
|
},
|
|
1640
2242
|
{
|
|
1641
2243
|
outName: `ipax_${designName}_pole`,
|
|
1642
|
-
boolMethod:
|
|
2244
|
+
boolMethod: EBVolume4.eSubstraction,
|
|
1643
2245
|
inList: [`subpax_${designName}_pole`, `subpax_${designName}_emptyDoor`]
|
|
1644
2246
|
},
|
|
1645
2247
|
{
|
|
1646
2248
|
outName: `pax_${designName}`,
|
|
1647
|
-
boolMethod:
|
|
2249
|
+
boolMethod: EBVolume4.eUnion,
|
|
1648
2250
|
inList: [
|
|
1649
2251
|
`ipax_${designName}_pole`,
|
|
1650
2252
|
`subpax_${designName}_bottom`,
|
|
1651
|
-
`ipax_${designName}_door
|
|
2253
|
+
`ipax_${designName}_door`,
|
|
2254
|
+
...inheritNames
|
|
1652
2255
|
]
|
|
1653
2256
|
}
|
|
1654
2257
|
]
|
|
@@ -1665,59 +2268,59 @@ function pGeom3(t, param, suffix = "") {
|
|
|
1665
2268
|
var poleStaticDef = {
|
|
1666
2269
|
pTitle: "Heliostat pole static",
|
|
1667
2270
|
pDescription: "The vertical pole of an heliostat",
|
|
1668
|
-
pDef:
|
|
1669
|
-
pGeom:
|
|
2271
|
+
pDef: pDef4,
|
|
2272
|
+
pGeom: pGeom4
|
|
1670
2273
|
};
|
|
1671
2274
|
|
|
1672
2275
|
// src/heliostat/rake.ts
|
|
1673
2276
|
import {
|
|
1674
|
-
contour as
|
|
1675
|
-
contourCircle as
|
|
1676
|
-
figure as
|
|
1677
|
-
radToDeg as
|
|
1678
|
-
ffix as
|
|
1679
|
-
pNumber as
|
|
1680
|
-
pSectionSeparator as
|
|
1681
|
-
initGeom as
|
|
1682
|
-
EExtrude as
|
|
1683
|
-
EBVolume as
|
|
2277
|
+
contour as contour7,
|
|
2278
|
+
contourCircle as contourCircle5,
|
|
2279
|
+
figure as figure5,
|
|
2280
|
+
radToDeg as radToDeg4,
|
|
2281
|
+
ffix as ffix7,
|
|
2282
|
+
pNumber as pNumber5,
|
|
2283
|
+
pSectionSeparator as pSectionSeparator4,
|
|
2284
|
+
initGeom as initGeom5,
|
|
2285
|
+
EExtrude as EExtrude4,
|
|
2286
|
+
EBVolume as EBVolume5
|
|
1684
2287
|
} from "geometrix";
|
|
1685
|
-
var
|
|
2288
|
+
var pDef5 = {
|
|
1686
2289
|
partName: "rake",
|
|
1687
2290
|
params: [
|
|
1688
2291
|
//pNumber(name, unit, init, min, max, step)
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
2292
|
+
pNumber5("D1", "mm", 600, 10, 4e3, 10),
|
|
2293
|
+
pNumber5("D2", "mm", 400, 10, 4e3, 10),
|
|
2294
|
+
pNumber5("D3", "mm", 400, 10, 4e3, 10),
|
|
2295
|
+
pNumber5("H1", "mm", 800, 1, 4e3, 10),
|
|
2296
|
+
pNumber5("H2", "mm", 3e3, 20, 6e3, 10),
|
|
2297
|
+
pNumber5("H3", "mm", 400, 0, 4e3, 10),
|
|
2298
|
+
pNumber5("E1", "mm", 20, 1, 80, 1),
|
|
2299
|
+
pNumber5("E3", "mm", 30, 1, 80, 1),
|
|
2300
|
+
pSectionSeparator4("transversal"),
|
|
2301
|
+
pNumber5("H4", "mm", 400, 10, 1e3, 10),
|
|
2302
|
+
pNumber5("D4", "mm", 300, 10, 1e3, 10),
|
|
2303
|
+
pNumber5("E4", "mm", 20, 1, 80, 1),
|
|
2304
|
+
pNumber5("H5", "mm", 1e3, 10, 2e3, 10),
|
|
2305
|
+
pNumber5("D5", "mm", 200, 1, 1e3, 10),
|
|
2306
|
+
pNumber5("L4", "mm", 300, 1, 1e3, 10),
|
|
2307
|
+
pNumber5("L5", "mm", 2e3, 10, 4e3, 10),
|
|
2308
|
+
pNumber5("L6", "mm", 2e3, 1, 4e3, 10),
|
|
2309
|
+
pNumber5("D8", "mm", 400, 1, 1e3, 10),
|
|
2310
|
+
pSectionSeparator4("diagonal"),
|
|
2311
|
+
pNumber5("D6", "mm", 100, 1, 600, 10),
|
|
2312
|
+
pNumber5("E6", "mm", 10, 1, 80, 1),
|
|
2313
|
+
pNumber5("L7", "mm", 100, 1, 1e3, 1),
|
|
2314
|
+
pNumber5("L8", "mm", 200, 1, 1e3, 1),
|
|
2315
|
+
pSectionSeparator4("base"),
|
|
2316
|
+
pNumber5("N1", "", 24, 3, 100, 1),
|
|
2317
|
+
pNumber5("D7", "mm", 40, 1, 100, 1),
|
|
2318
|
+
pNumber5("L1", "mm", 30, 1, 300, 1),
|
|
2319
|
+
pSectionSeparator4("door"),
|
|
2320
|
+
pNumber5("H6", "mm", 100, 1, 1e3, 10),
|
|
2321
|
+
pNumber5("H7", "mm", 600, 10, 2e3, 10),
|
|
2322
|
+
pNumber5("L9", "mm", 300, 1, 1e3, 10),
|
|
2323
|
+
pNumber5("R9", "mm", 50, 0, 300, 1)
|
|
1721
2324
|
],
|
|
1722
2325
|
paramSvg: {
|
|
1723
2326
|
D1: "rake_face.svg",
|
|
@@ -1756,19 +2359,19 @@ var pDef4 = {
|
|
|
1756
2359
|
// every 0.5 second
|
|
1757
2360
|
}
|
|
1758
2361
|
};
|
|
1759
|
-
function
|
|
1760
|
-
const rGeome =
|
|
2362
|
+
function pGeom5(t, param, suffix = "") {
|
|
2363
|
+
const rGeome = initGeom5(pDef5.partName + suffix);
|
|
1761
2364
|
let ctrCone;
|
|
1762
2365
|
let ctrConePlus;
|
|
1763
2366
|
let ctrRect;
|
|
1764
|
-
const figCone =
|
|
1765
|
-
const figBeam =
|
|
1766
|
-
const figBeamHollow =
|
|
1767
|
-
const figDisc =
|
|
1768
|
-
const figHand =
|
|
1769
|
-
const figWing =
|
|
1770
|
-
const figWingHollow =
|
|
1771
|
-
const figDoor =
|
|
2367
|
+
const figCone = figure5();
|
|
2368
|
+
const figBeam = figure5();
|
|
2369
|
+
const figBeamHollow = figure5();
|
|
2370
|
+
const figDisc = figure5();
|
|
2371
|
+
const figHand = figure5();
|
|
2372
|
+
const figWing = figure5();
|
|
2373
|
+
const figWingHollow = figure5();
|
|
2374
|
+
const figDoor = figure5();
|
|
1772
2375
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
1773
2376
|
`;
|
|
1774
2377
|
try {
|
|
@@ -1782,9 +2385,9 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1782
2385
|
const R8 = param.D8 / 2;
|
|
1783
2386
|
const H1H2 = param.H1 + param.H2;
|
|
1784
2387
|
const H1H5 = H1H2 - param.H4 + param.H5;
|
|
1785
|
-
rGeome.logstr += `cone-height: ${
|
|
2388
|
+
rGeome.logstr += `cone-height: ${ffix7(H1H2)} mm
|
|
1786
2389
|
`;
|
|
1787
|
-
rGeome.logstr += `cone-height total: ${
|
|
2390
|
+
rGeome.logstr += `cone-height total: ${ffix7(H1H5)} mm
|
|
1788
2391
|
`;
|
|
1789
2392
|
if (param.D2 > param.D1) {
|
|
1790
2393
|
throw `err110: D2 ${param.D2} is larger than D1 ${param.D1}`;
|
|
@@ -1818,12 +2421,12 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1818
2421
|
throw `err140: H2 ${param.H2} too small compare to L8 ${param.L8}, H4 ${param.H4} and D4 ${param.D4}`;
|
|
1819
2422
|
}
|
|
1820
2423
|
const coneAngle = Math.atan2(R1 - R2, param.H2);
|
|
1821
|
-
rGeome.logstr += `cone-angle: ${
|
|
2424
|
+
rGeome.logstr += `cone-angle: ${ffix7(radToDeg4(coneAngle))} degree
|
|
1822
2425
|
`;
|
|
1823
2426
|
const wingLx = beamL / 2 - param.L7 - R1 + param.L8 * Math.tan(coneAngle);
|
|
1824
2427
|
const wingL = Math.sqrt(wingLx ** 2 + wingLy ** 2);
|
|
1825
2428
|
const wingAngle = Math.atan2(wingLx, wingLy);
|
|
1826
|
-
rGeome.logstr += `wing-angle: ${
|
|
2429
|
+
rGeome.logstr += `wing-angle: ${ffix7(radToDeg4(wingAngle))} degree
|
|
1827
2430
|
`;
|
|
1828
2431
|
const wingLPre = param.E1 / Math.sin(wingAngle + coneAngle);
|
|
1829
2432
|
const wingL2 = wingL + param.E4 / Math.cos(wingAngle) + wingLPre;
|
|
@@ -1847,11 +2450,11 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1847
2450
|
const coneSlopeY = param.E1 * Math.sin(coneAngle);
|
|
1848
2451
|
const coneFC = param.E1 * Math.tan(coneAngle / 2);
|
|
1849
2452
|
ctrCone = function(orient) {
|
|
1850
|
-
const rCtr =
|
|
2453
|
+
const rCtr = contour7(orient * R1, 0).addSegStrokeA(orient * R1, param.H1).addSegStrokeA(orient * R2, H1H2).addSegStrokeA(orient * (R2 - coneSlopeX), H1H2 - coneSlopeY).addSegStrokeA(orient * (R1 - param.E1), param.H1 - coneFC).addSegStrokeA(orient * (R1 - param.E1), 0).closeSegStroke();
|
|
1851
2454
|
return rCtr;
|
|
1852
2455
|
};
|
|
1853
2456
|
ctrConePlus = function(orient) {
|
|
1854
|
-
const rCtr =
|
|
2457
|
+
const rCtr = contour7(orient * R1, 0).addSegStrokeA(orient * R1, param.H1).addSegStrokeA(orient * R2, H1H2).addSegStrokeA(orient * (R2 - coneSlopeX), H1H2 - coneSlopeY).addSegStrokeA(orient * (R1 - param.E1), param.H1 - coneFC).addSegStrokeA(orient * (R1 - param.E1), param.H1 - param.H3).addSegStrokeA(orient * R3, param.H1 - param.H3).addSegStrokeA(orient * R3, param.H1 - param.H3 - param.E3).addSegStrokeA(orient * (R1 - param.E1), param.H1 - param.H3 - param.E3).addSegStrokeA(orient * (R1 - param.E1), 0).closeSegStroke();
|
|
1855
2458
|
return rCtr;
|
|
1856
2459
|
};
|
|
1857
2460
|
ctrRect = function(width, height, xpos, ypos, angle) {
|
|
@@ -1859,10 +2462,10 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1859
2462
|
const yWidth = width * Math.sin(angle);
|
|
1860
2463
|
const xHeight = -height * Math.sin(angle);
|
|
1861
2464
|
const yHeight = height * Math.cos(angle);
|
|
1862
|
-
const rCtr =
|
|
2465
|
+
const rCtr = contour7(xpos, ypos).addSegStrokeA(xpos + xWidth, ypos + yWidth).addSegStrokeA(xpos + xWidth + xHeight, ypos + yWidth + yHeight).addSegStrokeA(xpos + xHeight, ypos + yHeight).closeSegStroke();
|
|
1863
2466
|
return rCtr;
|
|
1864
2467
|
};
|
|
1865
|
-
const ctrDoor =
|
|
2468
|
+
const ctrDoor = contour7(doorLowX, param.H1 + param.H6).addCornerRounded(param.R9).addSegStrokeA(doorHighX, param.H1 + param.H6 + param.H7).addCornerRounded(param.R9).addSegStrokeA(-doorHighX, param.H1 + param.H6 + param.H7).addCornerRounded(param.R9).addSegStrokeA(-doorLowX, param.H1 + param.H6).addCornerRounded(param.R9).closeSegStroke();
|
|
1866
2469
|
figCone.addMain(ctrCone(1));
|
|
1867
2470
|
figCone.addSecond(ctrConePlus(1));
|
|
1868
2471
|
figCone.addSecond(ctrConePlus(-1));
|
|
@@ -1880,30 +2483,30 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1880
2483
|
figCone.addSecond(ctrRect(2 * R6, wingL2, -wingPosX, wingPosY, wingAngle));
|
|
1881
2484
|
figCone.addSecond(ctrRect(2 * wingHR, wingL2, -wingHPosX, wingHPosY, wingAngle));
|
|
1882
2485
|
figCone.addSecond(ctrDoor);
|
|
1883
|
-
const ctrHand =
|
|
1884
|
-
figBeam.addMain(
|
|
1885
|
-
figBeam.addMain(
|
|
2486
|
+
const ctrHand = contour7(handLowX, beamH + handLowY).addSegStrokeA(handHighXext, beamH + param.H5 - handHighYext).addSegStrokeA(handHighXint, beamH + param.H5 - handHighYint).addPointA(-handHighXint, beamH + param.H5 - handHighYint).addSegArc(R5, false, false).addSegStrokeA(-handHighXext, beamH + param.H5 - handHighYext).addSegStrokeA(-handLowX, beamH + handLowY).closeSegArc(R4, false, false);
|
|
2487
|
+
figBeam.addMain(contourCircle5(0, beamH, R4));
|
|
2488
|
+
figBeam.addMain(contourCircle5(0, beamH, R4 - param.E4));
|
|
1886
2489
|
figBeam.addSecond(ctrConePlus(1));
|
|
1887
2490
|
figBeam.addSecond(ctrConePlus(-1));
|
|
1888
2491
|
figBeam.addSecond(ctrHand);
|
|
1889
|
-
figBeam.addSecond(
|
|
2492
|
+
figBeam.addSecond(contourCircle5(0, beamH + param.H5, R5));
|
|
1890
2493
|
figBeam.addSecond(ctrRect(2 * R6, wingLy, -R6, param.H1 + param.L8, 0));
|
|
1891
2494
|
figBeam.addSecond(ctrRect(2 * wingHR, wingLy, -wingHR, param.H1 + param.L8, 0));
|
|
1892
2495
|
figBeam.addSecond(ctrDoor);
|
|
1893
|
-
figBeamHollow.addMain(
|
|
1894
|
-
figBeamHollow.addSecond(
|
|
2496
|
+
figBeamHollow.addMain(contourCircle5(0, beamH, R4 - param.E4));
|
|
2497
|
+
figBeamHollow.addSecond(contourCircle5(0, beamH, R4));
|
|
1895
2498
|
figBeamHollow.addSecond(ctrHand);
|
|
1896
|
-
figDisc.addMain(
|
|
1897
|
-
figDisc.addMain(
|
|
2499
|
+
figDisc.addMain(contourCircle5(0, 0, R1));
|
|
2500
|
+
figDisc.addMain(contourCircle5(0, 0, R3));
|
|
1898
2501
|
const posR = R3 + param.L1;
|
|
1899
2502
|
const posA = 2 * Math.PI / param.N1;
|
|
1900
2503
|
for (let i = 0; i < param.N1; i++) {
|
|
1901
2504
|
const posX = posR * Math.cos(i * posA);
|
|
1902
2505
|
const posY = posR * Math.sin(i * posA);
|
|
1903
|
-
figDisc.addMain(
|
|
2506
|
+
figDisc.addMain(contourCircle5(posX, posY, R7));
|
|
1904
2507
|
}
|
|
1905
|
-
figDisc.addSecond(
|
|
1906
|
-
figDisc.addSecond(
|
|
2508
|
+
figDisc.addSecond(contourCircle5(0, 0, R1 - param.E1));
|
|
2509
|
+
figDisc.addSecond(contourCircle5(0, 0, R2));
|
|
1907
2510
|
figDisc.addSecond(ctrRect(param.D4, beamL, -R4, -beamL / 2, 0));
|
|
1908
2511
|
figDisc.addSecond(ctrRect(param.D4 - 2 * param.E4, beamL, -R4 + param.E4, -beamL / 2, 0));
|
|
1909
2512
|
for (const posX of handPos) {
|
|
@@ -1922,13 +2525,13 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1922
2525
|
ctrRect(2 * wingHR, wingLx, -wingHR, -R1 + param.L8 * Math.tan(coneAngle) - wingLx, 0)
|
|
1923
2526
|
);
|
|
1924
2527
|
figHand.addMain(ctrHand);
|
|
1925
|
-
figHand.addSecond(
|
|
1926
|
-
figHand.addSecond(
|
|
1927
|
-
figHand.addSecond(
|
|
1928
|
-
figWing.addMain(
|
|
1929
|
-
figWing.addMain(
|
|
1930
|
-
figWingHollow.addSecond(
|
|
1931
|
-
figWingHollow.addMain(
|
|
2528
|
+
figHand.addSecond(contourCircle5(0, beamH, R4));
|
|
2529
|
+
figHand.addSecond(contourCircle5(0, beamH, R4 - param.E4));
|
|
2530
|
+
figHand.addSecond(contourCircle5(0, beamH + param.H5, R5));
|
|
2531
|
+
figWing.addMain(contourCircle5(0, 0, R6));
|
|
2532
|
+
figWing.addMain(contourCircle5(0, 0, wingHR));
|
|
2533
|
+
figWingHollow.addSecond(contourCircle5(0, 0, R6));
|
|
2534
|
+
figWingHollow.addMain(contourCircle5(0, 0, wingHR));
|
|
1932
2535
|
figDoor.addMain(ctrDoor);
|
|
1933
2536
|
figDoor.addSecond(ctrConePlus(1));
|
|
1934
2537
|
figDoor.addSecond(ctrConePlus(-1));
|
|
@@ -1960,7 +2563,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1960
2563
|
const rHand = {
|
|
1961
2564
|
outName: `subpax_${designName}_hand_${idx}`,
|
|
1962
2565
|
face: `${designName}_faceHand`,
|
|
1963
|
-
extrudeMethod:
|
|
2566
|
+
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
1964
2567
|
length: param.L4,
|
|
1965
2568
|
rotate: [Math.PI / 2, 0, 0],
|
|
1966
2569
|
translate: [0, -posX, 0]
|
|
@@ -1972,14 +2575,14 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1972
2575
|
{
|
|
1973
2576
|
outName: `subpax_${designName}_cone`,
|
|
1974
2577
|
face: `${designName}_faceCone`,
|
|
1975
|
-
extrudeMethod:
|
|
2578
|
+
extrudeMethod: EExtrude4.eRotate,
|
|
1976
2579
|
rotate: [0, 0, 0],
|
|
1977
2580
|
translate: [0, 0, 0]
|
|
1978
2581
|
},
|
|
1979
2582
|
{
|
|
1980
2583
|
outName: `subpax_${designName}_beam`,
|
|
1981
2584
|
face: `${designName}_faceBeam`,
|
|
1982
|
-
extrudeMethod:
|
|
2585
|
+
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
1983
2586
|
length: beamL,
|
|
1984
2587
|
rotate: [Math.PI / 2, 0, 0],
|
|
1985
2588
|
translate: [0, beamL / 2, 0]
|
|
@@ -1987,7 +2590,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1987
2590
|
{
|
|
1988
2591
|
outName: `subpax_${designName}_beamHollow`,
|
|
1989
2592
|
face: `${designName}_faceBeamHollow`,
|
|
1990
|
-
extrudeMethod:
|
|
2593
|
+
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
1991
2594
|
length: beamL,
|
|
1992
2595
|
rotate: [Math.PI / 2, 0, 0],
|
|
1993
2596
|
translate: [0, beamL / 2, 0]
|
|
@@ -1995,7 +2598,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1995
2598
|
{
|
|
1996
2599
|
outName: `subpax_${designName}_disc`,
|
|
1997
2600
|
face: `${designName}_faceDisc`,
|
|
1998
|
-
extrudeMethod:
|
|
2601
|
+
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
1999
2602
|
length: param.E3,
|
|
2000
2603
|
rotate: [0, 0, 0],
|
|
2001
2604
|
translate: [0, 0, param.H1 - param.H3 - param.E3]
|
|
@@ -2003,7 +2606,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2003
2606
|
{
|
|
2004
2607
|
outName: `subpax_${designName}_wing_right`,
|
|
2005
2608
|
face: `${designName}_faceWing`,
|
|
2006
|
-
extrudeMethod:
|
|
2609
|
+
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
2007
2610
|
length: wingL2,
|
|
2008
2611
|
rotate: [-wingAngle, 0, 0],
|
|
2009
2612
|
translate: [0, wingCPosX, wingCPosY]
|
|
@@ -2011,7 +2614,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2011
2614
|
{
|
|
2012
2615
|
outName: `subpax_${designName}_wing_left`,
|
|
2013
2616
|
face: `${designName}_faceWing`,
|
|
2014
|
-
extrudeMethod:
|
|
2617
|
+
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
2015
2618
|
length: wingL2,
|
|
2016
2619
|
rotate: [wingAngle, 0, 0],
|
|
2017
2620
|
translate: [0, -wingCPosX, wingCPosY]
|
|
@@ -2019,7 +2622,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2019
2622
|
{
|
|
2020
2623
|
outName: `subpax_${designName}_wing_hollow_right`,
|
|
2021
2624
|
face: `${designName}_faceWingHollow`,
|
|
2022
|
-
extrudeMethod:
|
|
2625
|
+
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
2023
2626
|
length: wingL2,
|
|
2024
2627
|
rotate: [-wingAngle, 0, 0],
|
|
2025
2628
|
translate: [0, wingCPosX, wingCPosY]
|
|
@@ -2027,7 +2630,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2027
2630
|
{
|
|
2028
2631
|
outName: `subpax_${designName}_wing_hollow_left`,
|
|
2029
2632
|
face: `${designName}_faceWingHollow`,
|
|
2030
|
-
extrudeMethod:
|
|
2633
|
+
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
2031
2634
|
length: wingL2,
|
|
2032
2635
|
rotate: [wingAngle, 0, 0],
|
|
2033
2636
|
translate: [0, -wingCPosX, wingCPosY]
|
|
@@ -2035,7 +2638,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2035
2638
|
{
|
|
2036
2639
|
outName: `subpax_${designName}_door`,
|
|
2037
2640
|
face: `${designName}_faceDoor`,
|
|
2038
|
-
extrudeMethod:
|
|
2641
|
+
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
2039
2642
|
length: param.D1,
|
|
2040
2643
|
rotate: [Math.PI / 2, 0, Math.PI / 2],
|
|
2041
2644
|
translate: [0, 0, 0]
|
|
@@ -2045,7 +2648,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2045
2648
|
volumes: [
|
|
2046
2649
|
{
|
|
2047
2650
|
outName: `ipax_${designName}_plus`,
|
|
2048
|
-
boolMethod:
|
|
2651
|
+
boolMethod: EBVolume5.eUnion,
|
|
2049
2652
|
inList: [
|
|
2050
2653
|
`subpax_${designName}_cone`,
|
|
2051
2654
|
`subpax_${designName}_beam`,
|
|
@@ -2060,7 +2663,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2060
2663
|
},
|
|
2061
2664
|
{
|
|
2062
2665
|
outName: `ipax_${designName}_hollow`,
|
|
2063
|
-
boolMethod:
|
|
2666
|
+
boolMethod: EBVolume5.eUnion,
|
|
2064
2667
|
inList: [
|
|
2065
2668
|
`subpax_${designName}_beamHollow`,
|
|
2066
2669
|
`subpax_${designName}_wing_hollow_right`,
|
|
@@ -2070,7 +2673,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2070
2673
|
},
|
|
2071
2674
|
{
|
|
2072
2675
|
outName: `pax_${designName}`,
|
|
2073
|
-
boolMethod:
|
|
2676
|
+
boolMethod: EBVolume5.eSubstraction,
|
|
2074
2677
|
inList: [`ipax_${designName}_plus`, `ipax_${designName}_hollow`]
|
|
2075
2678
|
}
|
|
2076
2679
|
]
|
|
@@ -2087,41 +2690,41 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2087
2690
|
var rakeDef = {
|
|
2088
2691
|
pTitle: "Heliostat rake",
|
|
2089
2692
|
pDescription: "The rake on top of the V-Axis of the heliostat",
|
|
2090
|
-
pDef:
|
|
2091
|
-
pGeom:
|
|
2693
|
+
pDef: pDef5,
|
|
2694
|
+
pGeom: pGeom5
|
|
2092
2695
|
};
|
|
2093
2696
|
|
|
2094
2697
|
// src/heliostat/spider.ts
|
|
2095
2698
|
import {
|
|
2096
|
-
contour as
|
|
2097
|
-
contourCircle as
|
|
2098
|
-
figure as
|
|
2099
|
-
radToDeg as
|
|
2100
|
-
ffix as
|
|
2101
|
-
pNumber as
|
|
2102
|
-
pSectionSeparator as
|
|
2103
|
-
initGeom as
|
|
2104
|
-
EExtrude as
|
|
2105
|
-
EBVolume as
|
|
2699
|
+
contour as contour8,
|
|
2700
|
+
contourCircle as contourCircle6,
|
|
2701
|
+
figure as figure6,
|
|
2702
|
+
radToDeg as radToDeg5,
|
|
2703
|
+
ffix as ffix8,
|
|
2704
|
+
pNumber as pNumber6,
|
|
2705
|
+
pSectionSeparator as pSectionSeparator5,
|
|
2706
|
+
initGeom as initGeom6,
|
|
2707
|
+
EExtrude as EExtrude5,
|
|
2708
|
+
EBVolume as EBVolume6
|
|
2106
2709
|
} from "geometrix";
|
|
2107
|
-
var
|
|
2710
|
+
var pDef6 = {
|
|
2108
2711
|
partName: "spider",
|
|
2109
2712
|
params: [
|
|
2110
2713
|
//pNumber(name, unit, init, min, max, step)
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2714
|
+
pNumber6("D1", "mm", 100, 1, 400, 1),
|
|
2715
|
+
pNumber6("L1", "mm", 400, 1, 1e3, 1),
|
|
2716
|
+
pNumber6("L2", "mm", 400, 1, 1e3, 1),
|
|
2717
|
+
pNumber6("L3", "mm", 100, 1, 400, 1),
|
|
2718
|
+
pNumber6("L4", "mm", 3e3, 10, 8e3, 10),
|
|
2719
|
+
pSectionSeparator5("longitude"),
|
|
2720
|
+
pNumber6("L5", "mm", 2e3, 1, 8e3, 1),
|
|
2721
|
+
pNumber6("N1", "", 6, 1, 20, 1),
|
|
2722
|
+
pNumber6("L6", "mm", 30, 1, 100, 1),
|
|
2723
|
+
pSectionSeparator5("thickness"),
|
|
2724
|
+
pNumber6("E1", "mm", 3, 1, 80, 1),
|
|
2725
|
+
pNumber6("E2", "mm", 50, 1, 200, 1),
|
|
2726
|
+
pNumber6("E3", "mm", 3, 1, 80, 1),
|
|
2727
|
+
pNumber6("R2", "mm", 100, 0, 400, 10)
|
|
2125
2728
|
],
|
|
2126
2729
|
paramSvg: {
|
|
2127
2730
|
D1: "spider_profile.svg",
|
|
@@ -2144,13 +2747,13 @@ var pDef5 = {
|
|
|
2144
2747
|
// every 0.5 second
|
|
2145
2748
|
}
|
|
2146
2749
|
};
|
|
2147
|
-
function
|
|
2148
|
-
const rGeome =
|
|
2750
|
+
function pGeom6(t, param, suffix = "") {
|
|
2751
|
+
const rGeome = initGeom6(pDef6.partName + suffix);
|
|
2149
2752
|
let ctrSquare;
|
|
2150
2753
|
let ctrRect;
|
|
2151
|
-
const figLegs =
|
|
2152
|
-
const figTube =
|
|
2153
|
-
const figBody =
|
|
2754
|
+
const figLegs = figure6();
|
|
2755
|
+
const figTube = figure6();
|
|
2756
|
+
const figBody = figure6();
|
|
2154
2757
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
2155
2758
|
`;
|
|
2156
2759
|
try {
|
|
@@ -2193,27 +2796,27 @@ function pGeom5(t, param, suffix = "") {
|
|
|
2193
2796
|
}
|
|
2194
2797
|
const legPos = [...Array(param.N1).keys()].map((i) => i * legStep);
|
|
2195
2798
|
ctrSquare = function(sx, sy, sl) {
|
|
2196
|
-
const rCtr =
|
|
2799
|
+
const rCtr = contour8(sx, sy).addSegStrokeA(sx + sl * Math.cos(Math.PI / 4), sy - sl * Math.sin(Math.PI / 4)).addSegStrokeA(sx, sy - 2 * sl * Math.sin(Math.PI / 4)).addSegStrokeA(sx - sl * Math.cos(Math.PI / 4), sy - sl * Math.sin(Math.PI / 4)).closeSegStroke();
|
|
2197
2800
|
return rCtr;
|
|
2198
2801
|
};
|
|
2199
2802
|
ctrRect = function(width, height, xpos, ypos) {
|
|
2200
|
-
const rCtr =
|
|
2803
|
+
const rCtr = contour8(xpos, ypos).addSegStrokeA(xpos + width, ypos).addSegStrokeA(xpos + width, ypos + height).addSegStrokeA(xpos, ypos + height).closeSegStroke();
|
|
2201
2804
|
return rCtr;
|
|
2202
2805
|
};
|
|
2203
|
-
const posAngle = Math.sin(2 * Math.PI * t /
|
|
2806
|
+
const posAngle = Math.sin(2 * Math.PI * t / pDef6.sim.tMax) * Math.PI / 2;
|
|
2204
2807
|
rGeome.logstr += `spide leg number: ${param.N1}
|
|
2205
2808
|
`;
|
|
2206
|
-
rGeome.logstr += `spide position angle: ${
|
|
2809
|
+
rGeome.logstr += `spide position angle: ${ffix8(radToDeg5(posAngle))} degree
|
|
2207
2810
|
`;
|
|
2208
|
-
const ctrLeg =
|
|
2811
|
+
const ctrLeg = contour8(legE2, -legStartY).addCornerRounded(param.R2).addSegStrokeA(legE2, -param.L1).addCornerRounded(param.R2).addSegStrokeA(legL2, -param.L1).addCornerRounded(param.R2 + param.E2).addSegStrokeA(legL2 + legL4x, -param.L1 - legL4y).addSegStrokeA(legL2 + legL4x - E2x, -param.L1 - legL4y - E2y).addSegStrokeA(legL2 - elbowx, -param.L1 - param.E2).addCornerRounded(param.R2).addSegStrokeA(-legL2 + elbowx, -param.L1 - param.E2).addCornerRounded(param.R2).addSegStrokeA(-legL2 - legL4x + E2x, -param.L1 - legL4y - E2y).addSegStrokeA(-legL2 - legL4x, -param.L1 - legL4y).addSegStrokeA(-legL2, -param.L1).addCornerRounded(param.R2 + param.E2).addSegStrokeA(-legE2, -param.L1).addCornerRounded(param.R2).addSegStrokeA(-legE2, -legStartY).addCornerRounded(param.R2).closeSegArc(R1, true, false);
|
|
2209
2812
|
figLegs.addMain(ctrLeg);
|
|
2210
|
-
figLegs.addMain(
|
|
2813
|
+
figLegs.addMain(contourCircle6(0, 0, R1 - param.E1));
|
|
2211
2814
|
figLegs.addSecond(ctrSquare(squareX, squareY, param.L3));
|
|
2212
2815
|
figLegs.addSecond(ctrSquare(squareX, squareY2, param.L3 - 2 * param.E3));
|
|
2213
2816
|
figLegs.addSecond(ctrSquare(-squareX, squareY, param.L3));
|
|
2214
2817
|
figLegs.addSecond(ctrSquare(-squareX, squareY2, param.L3 - 2 * param.E3));
|
|
2215
|
-
figTube.addMain(
|
|
2216
|
-
figTube.addMain(
|
|
2818
|
+
figTube.addMain(contourCircle6(0, 0, R1));
|
|
2819
|
+
figTube.addMain(contourCircle6(0, 0, R1 - param.E1));
|
|
2217
2820
|
figTube.addMain(ctrSquare(squareX, squareY, param.L3));
|
|
2218
2821
|
figTube.addMain(ctrSquare(squareX, squareY2, param.L3 - 2 * param.E3));
|
|
2219
2822
|
figTube.addMain(ctrSquare(-squareX, squareY, param.L3));
|
|
@@ -2234,7 +2837,7 @@ function pGeom5(t, param, suffix = "") {
|
|
|
2234
2837
|
const rElem = {
|
|
2235
2838
|
outName: `subpax_${designName}_leg_${idx}`,
|
|
2236
2839
|
face: `${designName}_faceLegs`,
|
|
2237
|
-
extrudeMethod:
|
|
2840
|
+
extrudeMethod: EExtrude5.eLinearOrtho,
|
|
2238
2841
|
length: param.L6,
|
|
2239
2842
|
rotate: [0, 0, 0],
|
|
2240
2843
|
translate: [0, 0, posX]
|
|
@@ -2250,7 +2853,7 @@ function pGeom5(t, param, suffix = "") {
|
|
|
2250
2853
|
{
|
|
2251
2854
|
outName: `subpax_${designName}_tube`,
|
|
2252
2855
|
face: `${designName}_faceTube`,
|
|
2253
|
-
extrudeMethod:
|
|
2856
|
+
extrudeMethod: EExtrude5.eLinearOrtho,
|
|
2254
2857
|
length: param.L5,
|
|
2255
2858
|
rotate: [0, 0, 0],
|
|
2256
2859
|
translate: [0, 0, 0]
|
|
@@ -2260,7 +2863,7 @@ function pGeom5(t, param, suffix = "") {
|
|
|
2260
2863
|
volumes: [
|
|
2261
2864
|
{
|
|
2262
2865
|
outName: `pax_${designName}`,
|
|
2263
|
-
boolMethod:
|
|
2866
|
+
boolMethod: EBVolume6.eUnion,
|
|
2264
2867
|
inList: [`subpax_${designName}_tube`, ...legList]
|
|
2265
2868
|
}
|
|
2266
2869
|
]
|
|
@@ -2277,47 +2880,52 @@ function pGeom5(t, param, suffix = "") {
|
|
|
2277
2880
|
var spiderDef = {
|
|
2278
2881
|
pTitle: "Heliostat spider",
|
|
2279
2882
|
pDescription: "The spider part for the control of the inclination of the heliostat",
|
|
2280
|
-
pDef:
|
|
2281
|
-
pGeom:
|
|
2883
|
+
pDef: pDef6,
|
|
2884
|
+
pGeom: pGeom6
|
|
2282
2885
|
};
|
|
2283
2886
|
|
|
2284
2887
|
// src/heliostat/swing.ts
|
|
2285
2888
|
import {
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2889
|
+
point as point5,
|
|
2890
|
+
contour as contour9,
|
|
2891
|
+
contourCircle as contourCircle7,
|
|
2892
|
+
ctrRectangle,
|
|
2893
|
+
figure as figure7,
|
|
2894
|
+
ffix as ffix9,
|
|
2895
|
+
pNumber as pNumber7,
|
|
2896
|
+
pSectionSeparator as pSectionSeparator6,
|
|
2897
|
+
initGeom as initGeom7,
|
|
2898
|
+
EExtrude as EExtrude6,
|
|
2899
|
+
EBVolume as EBVolume7
|
|
2295
2900
|
} from "geometrix";
|
|
2296
|
-
var
|
|
2901
|
+
var pDef7 = {
|
|
2297
2902
|
partName: "swing",
|
|
2298
2903
|
params: [
|
|
2299
2904
|
//pNumber(name, unit, init, min, max, step)
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2905
|
+
pNumber7("L1", "mm", 12500, 100, 4e4, 10),
|
|
2906
|
+
pNumber7("L2", "mm", 6e3, 100, 4e4, 10),
|
|
2907
|
+
pSectionSeparator6("radial"),
|
|
2908
|
+
pNumber7("D1", "mm", 400, 1, 1e3, 1),
|
|
2909
|
+
pNumber7("E1", "mm", 5, 1, 80, 1),
|
|
2910
|
+
pNumber7("H2", "mm", 100, 1, 400, 1),
|
|
2911
|
+
pNumber7("H4", "mm", 100, 1, 400, 1),
|
|
2912
|
+
pNumber7("E2", "mm", 3, 1, 80, 1),
|
|
2913
|
+
pNumber7("L3", "mm", 500, 1, 4e3, 1),
|
|
2914
|
+
pSectionSeparator6("radial"),
|
|
2915
|
+
pNumber7("L4", "mm", 600, 1, 4e3, 1),
|
|
2916
|
+
pNumber7("L5", "mm", 2e3, 1, 1e4, 1),
|
|
2917
|
+
pNumber7("L6", "mm", 2e3, 1, 1e4, 1),
|
|
2918
|
+
pNumber7("H1", "mm", 100, 1, 400, 1),
|
|
2919
|
+
pNumber7("H3", "mm", 100, 1, 400, 1),
|
|
2920
|
+
pNumber7("E3", "mm", 3, 1, 80, 1),
|
|
2921
|
+
pSectionSeparator6("buttress"),
|
|
2922
|
+
pNumber7("S1", "mm", 300, 0, 1e3, 1),
|
|
2923
|
+
pNumber7("R2", "mm", 100, 0, 1e3, 1),
|
|
2924
|
+
pSectionSeparator6("rod overlay"),
|
|
2925
|
+
pNumber7("rod1", "", 10, 1, 40, 1),
|
|
2926
|
+
pNumber7("rod2", "mm", 1300, 10, 4e3, 10),
|
|
2927
|
+
pNumber7("rod3", "mm", 400, 10, 1e3, 10),
|
|
2928
|
+
pNumber7("rod4", "mm", 100, 1, 400, 1)
|
|
2321
2929
|
],
|
|
2322
2930
|
paramSvg: {
|
|
2323
2931
|
L1: "swing_top.svg",
|
|
@@ -2334,6 +2942,8 @@ var pDef6 = {
|
|
|
2334
2942
|
E1: "swing_side.svg",
|
|
2335
2943
|
E2: "swing_side.svg",
|
|
2336
2944
|
E3: "swing_face.svg",
|
|
2945
|
+
S1: "swing_buttress.svg",
|
|
2946
|
+
R2: "swing_buttress.svg",
|
|
2337
2947
|
rod1: "swing_with_rod.svg",
|
|
2338
2948
|
rod2: "swing_with_rod.svg",
|
|
2339
2949
|
rod3: "swing_with_rod.svg",
|
|
@@ -2346,30 +2956,21 @@ var pDef6 = {
|
|
|
2346
2956
|
// every 0.5 second
|
|
2347
2957
|
}
|
|
2348
2958
|
};
|
|
2349
|
-
function
|
|
2350
|
-
const rGeome =
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
const
|
|
2354
|
-
const
|
|
2355
|
-
const
|
|
2356
|
-
const figTopWithRod = figure6();
|
|
2959
|
+
function pGeom7(t, param, suffix = "") {
|
|
2960
|
+
const rGeome = initGeom7(pDef7.partName + suffix);
|
|
2961
|
+
const figSide = figure7();
|
|
2962
|
+
const figFace = figure7();
|
|
2963
|
+
const figTop = figure7();
|
|
2964
|
+
const figButtress = figure7();
|
|
2965
|
+
const figTopWithRod = figure7();
|
|
2357
2966
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
2358
2967
|
`;
|
|
2359
2968
|
try {
|
|
2360
2969
|
const R1 = param.D1 / 2;
|
|
2361
|
-
rGeome.logstr += `swing size: L1 ${
|
|
2970
|
+
rGeome.logstr += `swing size: L1 ${ffix9(param.L1)} x L2 ${ffix9(param.L2)} mm
|
|
2362
2971
|
`;
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
return rRect;
|
|
2366
|
-
};
|
|
2367
|
-
ctrRectRound = function(px, py, lx, ly, round) {
|
|
2368
|
-
const rRect = contour7(px, py).addCornerRounded(round).addSegStrokeA(px + lx, py).addCornerRounded(round).addSegStrokeA(px + lx, py + ly).addCornerRounded(round).addSegStrokeA(px, py + ly).addCornerRounded(round).closeSegStroke();
|
|
2369
|
-
return rRect;
|
|
2370
|
-
};
|
|
2371
|
-
figSide.addMain(contourCircle6(0, 0, R1));
|
|
2372
|
-
figSide.addMain(contourCircle6(0, 0, R1 - param.E1));
|
|
2972
|
+
figSide.addMain(contourCircle7(0, 0, R1));
|
|
2973
|
+
figSide.addMain(contourCircle7(0, 0, R1 - param.E1));
|
|
2373
2974
|
const sidePx = [-param.L2 / 2, -param.L3 - param.H2, param.L3, param.L2 / 2 - param.H2];
|
|
2374
2975
|
for (const px of sidePx) {
|
|
2375
2976
|
figSide.addMain(ctrRectangle(px, R1 - param.H4, param.H2, param.H4));
|
|
@@ -2416,6 +3017,14 @@ function pGeom6(t, param, suffix = "") {
|
|
|
2416
3017
|
figTop.addSecond(ctrRectangle(-param.L1 / 2, py, param.L1, param.H2));
|
|
2417
3018
|
}
|
|
2418
3019
|
figTop.addSecond(ctrRectangle(-param.L1 / 2, -R1, param.L1, param.D1));
|
|
3020
|
+
const aBAC = Math.atan2(param.S1, R1);
|
|
3021
|
+
const aDAB = 2 * aBAC;
|
|
3022
|
+
const pA = point5(0, 0);
|
|
3023
|
+
const pB = point5(0, R1);
|
|
3024
|
+
const pD = pB.rotate(pA, aDAB);
|
|
3025
|
+
const ctrButtress = contour9(-param.L3, R1).addSegStrokeA(-param.S1, R1).addCornerRounded(param.R2).addSegStrokeA(pD.cx, pD.cy).addPointA(0, -R1).addPointA(-pD.cx, pD.cy).addSegArc2().addSegStrokeA(param.S1, R1).addCornerRounded(param.R2).addSegStrokeA(param.L3, R1).addSegStrokeA(param.L3, R1 + param.E3).addSegStrokeA(-param.L3, R1 + param.E3).closeSegStroke();
|
|
3026
|
+
figButtress.addMain(ctrButtress);
|
|
3027
|
+
figButtress.addMain(contourCircle7(0, 0, R1 - param.E1));
|
|
2419
3028
|
for (const px of facePx) {
|
|
2420
3029
|
figTopWithRod.addMain(ctrRectangle(px, -param.L2 / 2, param.H1, param.L2));
|
|
2421
3030
|
}
|
|
@@ -2434,7 +3043,7 @@ function pGeom6(t, param, suffix = "") {
|
|
|
2434
3043
|
figTopWithRod.addSecond(ctrRectangle(px + rodOffset, rodPy0, param.rod4, rodLength));
|
|
2435
3044
|
for (let j = 0; j < 4; j++) {
|
|
2436
3045
|
figTopWithRod.addSecond(
|
|
2437
|
-
|
|
3046
|
+
ctrRectangle(px, rodPy0 + j * rodPyStep, param.rod3, rodPlateH, rodPlateH / 4)
|
|
2438
3047
|
);
|
|
2439
3048
|
}
|
|
2440
3049
|
}
|
|
@@ -2442,6 +3051,7 @@ function pGeom6(t, param, suffix = "") {
|
|
|
2442
3051
|
faceSide: figSide,
|
|
2443
3052
|
faceFace: figFace,
|
|
2444
3053
|
faceTop: figTop,
|
|
3054
|
+
faceButtress: figButtress,
|
|
2445
3055
|
faceTopWithRods: figTopWithRod
|
|
2446
3056
|
};
|
|
2447
3057
|
const designName = rGeome.partName;
|
|
@@ -2450,7 +3060,7 @@ function pGeom6(t, param, suffix = "") {
|
|
|
2450
3060
|
{
|
|
2451
3061
|
outName: `subpax_${designName}_side`,
|
|
2452
3062
|
face: `${designName}_faceSide`,
|
|
2453
|
-
extrudeMethod:
|
|
3063
|
+
extrudeMethod: EExtrude6.eLinearOrtho,
|
|
2454
3064
|
length: param.L1,
|
|
2455
3065
|
rotate: [0, 0, 0],
|
|
2456
3066
|
translate: [0, 0, -param.L1 / 2]
|
|
@@ -2458,7 +3068,7 @@ function pGeom6(t, param, suffix = "") {
|
|
|
2458
3068
|
{
|
|
2459
3069
|
outName: `subpax_${designName}_face`,
|
|
2460
3070
|
face: `${designName}_faceFace`,
|
|
2461
|
-
extrudeMethod:
|
|
3071
|
+
extrudeMethod: EExtrude6.eLinearOrtho,
|
|
2462
3072
|
length: param.L2,
|
|
2463
3073
|
rotate: [0, Math.PI / 2, 0],
|
|
2464
3074
|
translate: [-param.L2 / 2, 0, 0]
|
|
@@ -2467,7 +3077,7 @@ function pGeom6(t, param, suffix = "") {
|
|
|
2467
3077
|
volumes: [
|
|
2468
3078
|
{
|
|
2469
3079
|
outName: `pax_${designName}`,
|
|
2470
|
-
boolMethod:
|
|
3080
|
+
boolMethod: EBVolume7.eUnion,
|
|
2471
3081
|
inList: [`subpax_${designName}_side`, `subpax_${designName}_face`]
|
|
2472
3082
|
}
|
|
2473
3083
|
]
|
|
@@ -2484,52 +3094,52 @@ function pGeom6(t, param, suffix = "") {
|
|
|
2484
3094
|
var swingDef = {
|
|
2485
3095
|
pTitle: "Heliostat swing",
|
|
2486
3096
|
pDescription: "The swing for the heliostat inclination",
|
|
2487
|
-
pDef:
|
|
2488
|
-
pGeom:
|
|
3097
|
+
pDef: pDef7,
|
|
3098
|
+
pGeom: pGeom7
|
|
2489
3099
|
};
|
|
2490
3100
|
|
|
2491
3101
|
// src/heliostat/heliostat.ts
|
|
2492
|
-
var
|
|
3102
|
+
var pDef8 = {
|
|
2493
3103
|
partName: "heliostat",
|
|
2494
3104
|
params: [
|
|
2495
3105
|
//pNumber(name, unit, init, min, max, step)
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
3106
|
+
pNumber8("H1", "mm", 3e3, 10, 4e4, 10),
|
|
3107
|
+
pNumber8("H2", "mm", 2500, 50, 4e4, 10),
|
|
3108
|
+
pNumber8("D1", "mm", 1e3, 20, 4e3, 10),
|
|
3109
|
+
pNumber8("D2", "mm", 700, 20, 4e3, 10),
|
|
3110
|
+
pNumber8("E1", "mm", 30, 1, 80, 1),
|
|
3111
|
+
pSectionSeparator7("rake"),
|
|
3112
|
+
pNumber8("H3", "mm", 200, 1, 500, 1),
|
|
3113
|
+
pNumber8("H4", "mm", 800, 1, 4e3, 1),
|
|
3114
|
+
pNumber8("H5", "mm", 3e3, 50, 6e3, 10),
|
|
3115
|
+
pNumber8("H6", "mm", 200, 1, 4e3, 1),
|
|
3116
|
+
pNumber8("H7", "mm", 800, 1, 4e3, 1),
|
|
3117
|
+
pNumber8("H8", "mm", 200, 1, 4e3, 1),
|
|
3118
|
+
pNumber8("D3", "mm", 900, 20, 4e3, 10),
|
|
3119
|
+
pNumber8("D4", "mm", 400, 20, 4e3, 10),
|
|
3120
|
+
pNumber8("D5", "mm", 300, 20, 1e3, 10),
|
|
3121
|
+
pNumber8("D6", "mm", 200, 10, 1e3, 10),
|
|
3122
|
+
pNumber8("D7", "mm", 400, 10, 1e3, 10),
|
|
3123
|
+
pSectionSeparator7("rake diagonal"),
|
|
3124
|
+
pNumber8("D9", "mm", 100, 1, 1e3, 1),
|
|
3125
|
+
pNumber8("L7", "mm", 100, 1, 1e3, 1),
|
|
3126
|
+
pNumber8("L8", "mm", 200, 1, 1e3, 1),
|
|
3127
|
+
pSectionSeparator7("spider"),
|
|
3128
|
+
pNumber8("D8", "mm", 100, 1, 1e3, 1),
|
|
3129
|
+
pNumber8("S1", "mm", 250, 1, 800, 1),
|
|
3130
|
+
pNumber8("S2", "mm", 200, 1, 800, 1),
|
|
3131
|
+
pNumber8("E2", "mm", 50, 1, 80, 1),
|
|
3132
|
+
pSectionSeparator7("swing"),
|
|
3133
|
+
pNumber8("L1", "mm", 12500, 100, 4e4, 10),
|
|
3134
|
+
pNumber8("L2", "mm", 6e3, 100, 4e4, 10),
|
|
3135
|
+
pNumber8("L3", "mm", 100, 1, 500, 1),
|
|
3136
|
+
pNumber8("L4", "mm", 600, 1, 4e3, 1),
|
|
3137
|
+
pNumber8("L5", "mm", 2e3, 10, 6e3, 1),
|
|
3138
|
+
pNumber8("L6", "mm", 2e3, 1, 6e3, 1),
|
|
3139
|
+
pNumber8("H9", "mm", 100, 1, 400, 1),
|
|
3140
|
+
pSectionSeparator7("motion amplitude"),
|
|
3141
|
+
pNumber8("al", "degree", 80, 0, 95, 1),
|
|
3142
|
+
pNumber8("ar", "degree", 80, 0, 95, 1)
|
|
2533
3143
|
],
|
|
2534
3144
|
paramSvg: {
|
|
2535
3145
|
H1: "heliostat_overview.svg",
|
|
@@ -2572,30 +3182,30 @@ var pDef7 = {
|
|
|
2572
3182
|
// every 0.5 second
|
|
2573
3183
|
}
|
|
2574
3184
|
};
|
|
2575
|
-
function
|
|
2576
|
-
const rGeome =
|
|
2577
|
-
const figSide =
|
|
2578
|
-
const figFace =
|
|
3185
|
+
function pGeom8(t, param, suffix = "") {
|
|
3186
|
+
const rGeome = initGeom8(pDef8.partName + suffix);
|
|
3187
|
+
const figSide = figure8();
|
|
3188
|
+
const figFace = figure8();
|
|
2579
3189
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
2580
3190
|
`;
|
|
2581
3191
|
try {
|
|
2582
3192
|
const helioHeight = param.H1 + param.H2 - param.H3 + param.H4 + param.H5 - param.H6 + param.H7;
|
|
2583
|
-
rGeome.logstr += `heliostat-height: ${
|
|
3193
|
+
rGeome.logstr += `heliostat-height: ${ffix10(helioHeight)}, diameter ${ffix10(param.D1)} m
|
|
2584
3194
|
`;
|
|
2585
|
-
rGeome.logstr += `heliostat-swing-length: ${
|
|
3195
|
+
rGeome.logstr += `heliostat-swing-length: ${ffix10(param.L1)}, width ${ffix10(param.L2)} m
|
|
2586
3196
|
`;
|
|
2587
3197
|
const posAngleMid = (param.al - param.ar) / 2;
|
|
2588
|
-
const posAngleDegree = posAngleMid - Math.sin(2 * Math.PI * t /
|
|
2589
|
-
const posAngle =
|
|
2590
|
-
rGeome.logstr += `swing position angle: ${
|
|
3198
|
+
const posAngleDegree = posAngleMid - Math.sin(2 * Math.PI * t / pDef8.sim.tMax) * (param.al + param.ar) / 2;
|
|
3199
|
+
const posAngle = degToRad4(posAngleDegree);
|
|
3200
|
+
rGeome.logstr += `swing position angle: ${ffix10(radToDeg6(posAngle))} degree
|
|
2591
3201
|
`;
|
|
2592
3202
|
const rakePosY = param.H1 + param.H2 - param.H3;
|
|
2593
3203
|
const spiderPosY = rakePosY + param.H4 + param.H5 - param.H6 + param.H7;
|
|
2594
3204
|
const swingPosY = spiderPosY + param.H8;
|
|
2595
|
-
const poleStaticParam =
|
|
2596
|
-
const rakeParam =
|
|
2597
|
-
const spiderParam =
|
|
2598
|
-
const swingParam =
|
|
3205
|
+
const poleStaticParam = designParam3(poleStaticDef.pDef);
|
|
3206
|
+
const rakeParam = designParam3(rakeDef.pDef);
|
|
3207
|
+
const spiderParam = designParam3(spiderDef.pDef);
|
|
3208
|
+
const swingParam = designParam3(swingDef.pDef);
|
|
2599
3209
|
poleStaticParam.setVal("H1", param.H1);
|
|
2600
3210
|
poleStaticParam.setVal("H2", param.H2);
|
|
2601
3211
|
poleStaticParam.setVal("D1", param.D1);
|
|
@@ -2613,6 +3223,7 @@ function pGeom7(t, param, suffix = "") {
|
|
|
2613
3223
|
poleStaticParam.setVal("D4", param.H1 / 4);
|
|
2614
3224
|
poleStaticParam.setVal("L2", param.H1 / 80);
|
|
2615
3225
|
poleStaticParam.setVal("E3", param.H1 / 80);
|
|
3226
|
+
poleStaticParam.setVal("holders", 0);
|
|
2616
3227
|
rakeParam.setVal("H1", param.H4);
|
|
2617
3228
|
rakeParam.setVal("H2", param.H5);
|
|
2618
3229
|
rakeParam.setVal("H3", param.H4 - 2 * param.E1);
|
|
@@ -2686,17 +3297,17 @@ function pGeom7(t, param, suffix = "") {
|
|
|
2686
3297
|
poleStaticParam.getParamVal(),
|
|
2687
3298
|
poleStaticParam.getSuffix()
|
|
2688
3299
|
);
|
|
2689
|
-
|
|
2690
|
-
rGeome.logstr +=
|
|
3300
|
+
checkGeom3(poleStaticGeom);
|
|
3301
|
+
rGeome.logstr += prefixLog3(poleStaticGeom.logstr, poleStaticParam.getPartNameSuffix());
|
|
2691
3302
|
const rakeGeom = rakeDef.pGeom(0, rakeParam.getParamVal(), rakeParam.getSuffix());
|
|
2692
|
-
|
|
2693
|
-
rGeome.logstr +=
|
|
3303
|
+
checkGeom3(rakeGeom);
|
|
3304
|
+
rGeome.logstr += prefixLog3(rakeGeom.logstr, rakeParam.getPartNameSuffix());
|
|
2694
3305
|
const spiderGeom = spiderDef.pGeom(0, spiderParam.getParamVal(), spiderParam.getSuffix());
|
|
2695
|
-
|
|
2696
|
-
rGeome.logstr +=
|
|
3306
|
+
checkGeom3(spiderGeom);
|
|
3307
|
+
rGeome.logstr += prefixLog3(spiderGeom.logstr, spiderParam.getPartNameSuffix());
|
|
2697
3308
|
const swingGeom = swingDef.pGeom(0, swingParam.getParamVal(), swingParam.getSuffix());
|
|
2698
|
-
|
|
2699
|
-
rGeome.logstr +=
|
|
3309
|
+
checkGeom3(swingGeom);
|
|
3310
|
+
rGeome.logstr += prefixLog3(swingGeom.logstr, swingParam.getPartNameSuffix());
|
|
2700
3311
|
figSide.mergeFigure(poleStaticGeom.fig.poleCut);
|
|
2701
3312
|
figSide.mergeFigure(rakeGeom.fig.faceBeam.translate(0, rakePosY));
|
|
2702
3313
|
figSide.mergeFigure(
|
|
@@ -2749,7 +3360,7 @@ function pGeom7(t, param, suffix = "") {
|
|
|
2749
3360
|
volumes: [
|
|
2750
3361
|
{
|
|
2751
3362
|
outName: `pax_${designName}`,
|
|
2752
|
-
boolMethod:
|
|
3363
|
+
boolMethod: EBVolume8.eUnion,
|
|
2753
3364
|
inList: [
|
|
2754
3365
|
`inpax_${designName}_poleStatic`,
|
|
2755
3366
|
`inpax_${designName}_rake`,
|
|
@@ -2800,81 +3411,81 @@ function pGeom7(t, param, suffix = "") {
|
|
|
2800
3411
|
var heliostatDef = {
|
|
2801
3412
|
pTitle: "Heliostat overview",
|
|
2802
3413
|
pDescription: "The heliostat inclination mechanism",
|
|
2803
|
-
pDef:
|
|
2804
|
-
pGeom:
|
|
3414
|
+
pDef: pDef8,
|
|
3415
|
+
pGeom: pGeom8
|
|
2805
3416
|
};
|
|
2806
3417
|
|
|
2807
3418
|
// src/heliostat/heliostat_2.ts
|
|
3419
|
+
import {
|
|
3420
|
+
designParam as designParam5,
|
|
3421
|
+
checkGeom as checkGeom5,
|
|
3422
|
+
prefixLog as prefixLog5,
|
|
3423
|
+
figure as figure10,
|
|
3424
|
+
degToRad as degToRad5,
|
|
3425
|
+
radToDeg as radToDeg8,
|
|
3426
|
+
ffix as ffix12,
|
|
3427
|
+
pNumber as pNumber10,
|
|
3428
|
+
pSectionSeparator as pSectionSeparator9,
|
|
3429
|
+
initGeom as initGeom10,
|
|
3430
|
+
EBVolume as EBVolume10
|
|
3431
|
+
} from "geometrix";
|
|
3432
|
+
|
|
3433
|
+
// src/heliostat/rake_stopper.ts
|
|
2808
3434
|
import {
|
|
2809
3435
|
designParam as designParam4,
|
|
2810
3436
|
checkGeom as checkGeom4,
|
|
2811
3437
|
prefixLog as prefixLog4,
|
|
3438
|
+
contour as contour10,
|
|
3439
|
+
contourCircle as contourCircle8,
|
|
2812
3440
|
figure as figure9,
|
|
2813
|
-
degToRad as degToRad3,
|
|
2814
3441
|
radToDeg as radToDeg7,
|
|
2815
|
-
ffix as
|
|
3442
|
+
ffix as ffix11,
|
|
2816
3443
|
pNumber as pNumber9,
|
|
2817
3444
|
pSectionSeparator as pSectionSeparator8,
|
|
2818
3445
|
initGeom as initGeom9,
|
|
3446
|
+
EExtrude as EExtrude7,
|
|
2819
3447
|
EBVolume as EBVolume9
|
|
2820
3448
|
} from "geometrix";
|
|
2821
|
-
|
|
2822
|
-
// src/heliostat/rake_stopper.ts
|
|
2823
|
-
import {
|
|
2824
|
-
designParam as designParam3,
|
|
2825
|
-
checkGeom as checkGeom3,
|
|
2826
|
-
prefixLog as prefixLog3,
|
|
2827
|
-
contour as contour8,
|
|
2828
|
-
contourCircle as contourCircle7,
|
|
2829
|
-
figure as figure8,
|
|
2830
|
-
radToDeg as radToDeg6,
|
|
2831
|
-
ffix as ffix9,
|
|
2832
|
-
pNumber as pNumber8,
|
|
2833
|
-
pSectionSeparator as pSectionSeparator7,
|
|
2834
|
-
initGeom as initGeom8,
|
|
2835
|
-
EExtrude as EExtrude6,
|
|
2836
|
-
EBVolume as EBVolume8
|
|
2837
|
-
} from "geometrix";
|
|
2838
|
-
var pDef8 = {
|
|
3449
|
+
var pDef9 = {
|
|
2839
3450
|
partName: "rake_stopper",
|
|
2840
3451
|
params: [
|
|
2841
3452
|
//pNumber(name, unit, init, min, max, step)
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
3453
|
+
pNumber9("D1", "mm", 600, 10, 4e3, 10),
|
|
3454
|
+
pNumber9("D2", "mm", 400, 10, 4e3, 10),
|
|
3455
|
+
pNumber9("D3", "mm", 400, 1, 4e3, 1),
|
|
3456
|
+
pNumber9("H1", "mm", 800, 1, 4e3, 1),
|
|
3457
|
+
pNumber9("H2", "mm", 3e3, 20, 6e3, 10),
|
|
3458
|
+
pNumber9("H3", "mm", 400, 0, 4e3, 1),
|
|
3459
|
+
pNumber9("E1", "mm", 20, 1, 80, 1),
|
|
3460
|
+
pNumber9("E3", "mm", 30, 1, 80, 1),
|
|
3461
|
+
pSectionSeparator8("transversal"),
|
|
3462
|
+
pNumber9("H4", "mm", 200, 1, 1e3, 1),
|
|
3463
|
+
pNumber9("D4", "mm", 300, 1, 1e3, 1),
|
|
3464
|
+
pNumber9("E4", "mm", 20, 1, 80, 1),
|
|
3465
|
+
pNumber9("H5", "mm", 400, 1, 2e3, 1),
|
|
3466
|
+
pNumber9("D5", "mm", 200, 1, 1e3, 1),
|
|
3467
|
+
pNumber9("L4", "mm", 300, 1, 1e3, 1),
|
|
3468
|
+
pNumber9("L5", "mm", 2e3, 1, 4e3, 1),
|
|
3469
|
+
pNumber9("L6", "mm", 2e3, 1, 4e3, 1),
|
|
3470
|
+
pNumber9("D8", "mm", 400, 1, 1e3, 1),
|
|
3471
|
+
pSectionSeparator8("diagonal"),
|
|
3472
|
+
pNumber9("D6", "mm", 100, 1, 600, 1),
|
|
3473
|
+
pNumber9("E6", "mm", 10, 1, 80, 1),
|
|
3474
|
+
pNumber9("L7", "mm", 100, 1, 1e3, 1),
|
|
3475
|
+
pNumber9("L8", "mm", 200, 1, 1e3, 1),
|
|
3476
|
+
pSectionSeparator8("base"),
|
|
3477
|
+
pNumber9("N1", "", 24, 3, 100, 1),
|
|
3478
|
+
pNumber9("D7", "mm", 40, 1, 100, 1),
|
|
3479
|
+
pNumber9("L1", "mm", 30, 1, 300, 1),
|
|
3480
|
+
pSectionSeparator8("door"),
|
|
3481
|
+
pNumber9("H6", "mm", 100, 1, 1e3, 1),
|
|
3482
|
+
pNumber9("H7", "mm", 600, 1, 2e3, 1),
|
|
3483
|
+
pNumber9("L9", "mm", 300, 1, 1e3, 1),
|
|
3484
|
+
pNumber9("R9", "mm", 50, 0, 300, 1),
|
|
3485
|
+
pSectionSeparator8("stopper"),
|
|
3486
|
+
pNumber9("S1", "mm", 100, 1, 300, 1),
|
|
3487
|
+
pNumber9("S2", "mm", 2e3, 1, 8e3, 1),
|
|
3488
|
+
pNumber9("E7", "mm", 5, 1, 80, 1)
|
|
2878
3489
|
],
|
|
2879
3490
|
paramSvg: {
|
|
2880
3491
|
D1: "rake_face.svg",
|
|
@@ -2916,33 +3527,33 @@ var pDef8 = {
|
|
|
2916
3527
|
// every 0.5 second
|
|
2917
3528
|
}
|
|
2918
3529
|
};
|
|
2919
|
-
function
|
|
2920
|
-
const rGeome =
|
|
3530
|
+
function pGeom9(t, param, suffix = "") {
|
|
3531
|
+
const rGeome = initGeom9(pDef9.partName + suffix);
|
|
2921
3532
|
let ctrRect;
|
|
2922
|
-
const figCone =
|
|
2923
|
-
const figBeam =
|
|
2924
|
-
const figBeamHollow =
|
|
2925
|
-
const figDisc =
|
|
2926
|
-
const figHand =
|
|
2927
|
-
const figWing =
|
|
2928
|
-
const figWingHollow =
|
|
2929
|
-
const figDoor =
|
|
2930
|
-
const figStopperTop =
|
|
2931
|
-
const figStopperSide =
|
|
2932
|
-
const figStopperSideH =
|
|
2933
|
-
const figStopperFaceT =
|
|
2934
|
-
const figStopperFaceTH =
|
|
2935
|
-
const figStopperFaceB =
|
|
2936
|
-
const figStopperFaceBH =
|
|
3533
|
+
const figCone = figure9();
|
|
3534
|
+
const figBeam = figure9();
|
|
3535
|
+
const figBeamHollow = figure9();
|
|
3536
|
+
const figDisc = figure9();
|
|
3537
|
+
const figHand = figure9();
|
|
3538
|
+
const figWing = figure9();
|
|
3539
|
+
const figWingHollow = figure9();
|
|
3540
|
+
const figDoor = figure9();
|
|
3541
|
+
const figStopperTop = figure9();
|
|
3542
|
+
const figStopperSide = figure9();
|
|
3543
|
+
const figStopperSideH = figure9();
|
|
3544
|
+
const figStopperFaceT = figure9();
|
|
3545
|
+
const figStopperFaceTH = figure9();
|
|
3546
|
+
const figStopperFaceB = figure9();
|
|
3547
|
+
const figStopperFaceBH = figure9();
|
|
2937
3548
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
2938
3549
|
`;
|
|
2939
3550
|
try {
|
|
2940
3551
|
const R1 = param.D1 / 2;
|
|
2941
3552
|
const H1H2 = param.H1 + param.H2;
|
|
2942
3553
|
const H1H5 = H1H2 - param.H4 + param.H5;
|
|
2943
|
-
rGeome.logstr += `cone-height: ${
|
|
3554
|
+
rGeome.logstr += `cone-height: ${ffix11(H1H2)} mm
|
|
2944
3555
|
`;
|
|
2945
|
-
rGeome.logstr += `cone-height total: ${
|
|
3556
|
+
rGeome.logstr += `cone-height total: ${ffix11(H1H5)} mm
|
|
2946
3557
|
`;
|
|
2947
3558
|
if (2 * param.E7 >= param.S1) {
|
|
2948
3559
|
throw `err135: E7 ${param.E7} too large compare to S1 ${param.S1}`;
|
|
@@ -2952,7 +3563,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
2952
3563
|
}
|
|
2953
3564
|
const stopper1H = H1H5 - param.S2;
|
|
2954
3565
|
if (stopper1H < 0) {
|
|
2955
|
-
throw `err143: S2 ${param.S2} too large compare to H1H5 ${
|
|
3566
|
+
throw `err143: S2 ${param.S2} too large compare to H1H5 ${ffix11(H1H5)}`;
|
|
2956
3567
|
}
|
|
2957
3568
|
const stopper2H = param.H1 + param.H2 - param.H4 + param.D4 / 2;
|
|
2958
3569
|
const stopper3H = param.H1 + param.L8 - param.S1;
|
|
@@ -2961,10 +3572,10 @@ function pGeom8(t, param, suffix = "") {
|
|
|
2961
3572
|
const yWidth = width * Math.sin(angle);
|
|
2962
3573
|
const xHeight = -height * Math.sin(angle);
|
|
2963
3574
|
const yHeight = height * Math.cos(angle);
|
|
2964
|
-
const rCtr =
|
|
3575
|
+
const rCtr = contour10(xpos, ypos).addSegStrokeA(xpos + xWidth, ypos + yWidth).addSegStrokeA(xpos + xWidth + xHeight, ypos + yWidth + yHeight).addSegStrokeA(xpos + xHeight, ypos + yHeight).closeSegStroke();
|
|
2965
3576
|
return rCtr;
|
|
2966
3577
|
};
|
|
2967
|
-
const rakeParam =
|
|
3578
|
+
const rakeParam = designParam4(rakeDef.pDef);
|
|
2968
3579
|
rakeParam.setVal("D1", param.D1);
|
|
2969
3580
|
rakeParam.setVal("D2", param.D2);
|
|
2970
3581
|
rakeParam.setVal("D3", param.D3);
|
|
@@ -2994,8 +3605,8 @@ function pGeom8(t, param, suffix = "") {
|
|
|
2994
3605
|
rakeParam.setVal("L9", param.L9);
|
|
2995
3606
|
rakeParam.setVal("R9", param.R9);
|
|
2996
3607
|
const rakeGeom = rakeDef.pGeom(0, rakeParam.getParamVal(), rakeParam.getSuffix());
|
|
2997
|
-
|
|
2998
|
-
rGeome.logstr +=
|
|
3608
|
+
checkGeom4(rakeGeom);
|
|
3609
|
+
rGeome.logstr += prefixLog4(rakeGeom.logstr, rakeParam.getPartNameSuffix());
|
|
2999
3610
|
figCone.mergeFigure(rakeGeom.fig.faceCone);
|
|
3000
3611
|
figBeam.mergeFigure(rakeGeom.fig.faceBeam);
|
|
3001
3612
|
figBeamHollow.mergeFigure(rakeGeom.fig.faceBeamHollow);
|
|
@@ -3023,17 +3634,17 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3023
3634
|
figStopperTop.addMain(ctrRect(S2s, param.S1, 0, R1, 0));
|
|
3024
3635
|
figStopperTop.addMain(ctrRect(S2s, S1h, 0, R1 + param.E7, 0));
|
|
3025
3636
|
figStopperSide.mergeFigure(rakeGeom.fig.faceBeam, true);
|
|
3026
|
-
figStopperSide.addMain(
|
|
3027
|
-
figStopperSide.addMain(
|
|
3028
|
-
figStopperSide.addMain(
|
|
3029
|
-
figStopperSide.addMain(
|
|
3637
|
+
figStopperSide.addMain(contourCircle8(-R1 - S1r, stopper1H + S1r, S1r));
|
|
3638
|
+
figStopperSide.addMain(contourCircle8(-R1 - S1r, stopper1H + S1r, S1hr));
|
|
3639
|
+
figStopperSide.addMain(contourCircle8(param.S2 - S1r, stopper2H + S1r, S1r));
|
|
3640
|
+
figStopperSide.addMain(contourCircle8(param.S2 - S1r, stopper2H + S1r, S1hr));
|
|
3030
3641
|
figStopperSide.addSecond(ctrRect(S2s, param.S1, 0, stopper2H, 0));
|
|
3031
3642
|
figStopperSide.addSecond(ctrRect(S2s, S1h, 0, stopper2H + param.E7, 0));
|
|
3032
3643
|
const stopper3Ly = stopper2H + param.S1 / 2 - stopper3H;
|
|
3033
3644
|
const stopper3L = Math.sqrt(S2s ** 2 + stopper3Ly ** 2);
|
|
3034
3645
|
const stopper3A = Math.atan2(stopper3Ly, S2s);
|
|
3035
|
-
rGeome.logstr += `stopper-rod: L ${
|
|
3036
|
-
|
|
3646
|
+
rGeome.logstr += `stopper-rod: L ${ffix11(stopper3L)} mm, A ${ffix11(
|
|
3647
|
+
radToDeg7(stopper3A)
|
|
3037
3648
|
)} degree
|
|
3038
3649
|
`;
|
|
3039
3650
|
const stp3posdX = S1r * Math.sin(stopper3A);
|
|
@@ -3045,30 +3656,30 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3045
3656
|
const stp3posY2 = stopper3H - stp3posdY2;
|
|
3046
3657
|
figStopperSide.addSecond(ctrRect(stopper3L, S1h, stp3posdX2, stp3posY2, stopper3A));
|
|
3047
3658
|
figStopperSideH.mergeFigure(rakeGeom.fig.faceBeam, true);
|
|
3048
|
-
figStopperSideH.addSecond(
|
|
3049
|
-
figStopperSideH.addMain(
|
|
3050
|
-
figStopperSideH.addSecond(
|
|
3051
|
-
figStopperSideH.addMain(
|
|
3659
|
+
figStopperSideH.addSecond(contourCircle8(-R1 - S1r, stopper1H + S1r, S1r));
|
|
3660
|
+
figStopperSideH.addMain(contourCircle8(-R1 - S1r, stopper1H + S1r, S1hr));
|
|
3661
|
+
figStopperSideH.addSecond(contourCircle8(param.S2 - S1r, stopper2H + S1r, S1r));
|
|
3662
|
+
figStopperSideH.addMain(contourCircle8(param.S2 - S1r, stopper2H + S1r, S1hr));
|
|
3052
3663
|
figStopperFaceT.mergeFigure(rakeGeom.fig.faceCone, true);
|
|
3053
|
-
figStopperFaceT.addMain(
|
|
3054
|
-
figStopperFaceT.addMain(
|
|
3055
|
-
figStopperFaceT.addMain(
|
|
3056
|
-
figStopperFaceT.addMain(
|
|
3664
|
+
figStopperFaceT.addMain(contourCircle8(-param.L5 / 2 + S1r, stopper2H + S1r, S1r));
|
|
3665
|
+
figStopperFaceT.addMain(contourCircle8(-param.L5 / 2 + S1r, stopper2H + S1r, S1hr));
|
|
3666
|
+
figStopperFaceT.addMain(contourCircle8(param.L5 / 2 - S1r, stopper2H + S1r, S1r));
|
|
3667
|
+
figStopperFaceT.addMain(contourCircle8(param.L5 / 2 - S1r, stopper2H + S1r, S1hr));
|
|
3057
3668
|
figStopperFaceTH.mergeFigure(rakeGeom.fig.faceCone, true);
|
|
3058
|
-
figStopperFaceTH.addSecond(
|
|
3059
|
-
figStopperFaceTH.addMain(
|
|
3060
|
-
figStopperFaceTH.addSecond(
|
|
3061
|
-
figStopperFaceTH.addMain(
|
|
3669
|
+
figStopperFaceTH.addSecond(contourCircle8(-param.L5 / 2 + S1r, stopper2H + S1r, S1r));
|
|
3670
|
+
figStopperFaceTH.addMain(contourCircle8(-param.L5 / 2 + S1r, stopper2H + S1r, S1hr));
|
|
3671
|
+
figStopperFaceTH.addSecond(contourCircle8(param.L5 / 2 - S1r, stopper2H + S1r, S1r));
|
|
3672
|
+
figStopperFaceTH.addMain(contourCircle8(param.L5 / 2 - S1r, stopper2H + S1r, S1hr));
|
|
3062
3673
|
figStopperFaceB.mergeFigure(rakeGeom.fig.faceCone, true);
|
|
3063
|
-
figStopperFaceB.addMain(
|
|
3064
|
-
figStopperFaceB.addMain(
|
|
3065
|
-
figStopperFaceB.addMain(
|
|
3066
|
-
figStopperFaceB.addMain(
|
|
3674
|
+
figStopperFaceB.addMain(contourCircle8(-R1 - S1r, 0, S1r));
|
|
3675
|
+
figStopperFaceB.addMain(contourCircle8(-R1 - S1r, 0, S1hr));
|
|
3676
|
+
figStopperFaceB.addMain(contourCircle8(R1 + S1r, 0, S1r));
|
|
3677
|
+
figStopperFaceB.addMain(contourCircle8(R1 + S1r, 0, S1hr));
|
|
3067
3678
|
figStopperFaceBH.mergeFigure(rakeGeom.fig.faceCone, true);
|
|
3068
|
-
figStopperFaceBH.addSecond(
|
|
3069
|
-
figStopperFaceBH.addMain(
|
|
3070
|
-
figStopperFaceBH.addSecond(
|
|
3071
|
-
figStopperFaceBH.addMain(
|
|
3679
|
+
figStopperFaceBH.addSecond(contourCircle8(-R1 - S1r, 0, S1r));
|
|
3680
|
+
figStopperFaceBH.addMain(contourCircle8(-R1 - S1r, 0, S1hr));
|
|
3681
|
+
figStopperFaceBH.addSecond(contourCircle8(R1 + S1r, 0, S1r));
|
|
3682
|
+
figStopperFaceBH.addMain(contourCircle8(R1 + S1r, 0, S1hr));
|
|
3072
3683
|
rGeome.fig = {
|
|
3073
3684
|
faceCone: figCone,
|
|
3074
3685
|
faceBeam: figBeam,
|
|
@@ -3101,7 +3712,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3101
3712
|
{
|
|
3102
3713
|
outName: `subpax_${designName}_stpSide`,
|
|
3103
3714
|
face: `${designName}_faceStopperSide`,
|
|
3104
|
-
extrudeMethod:
|
|
3715
|
+
extrudeMethod: EExtrude7.eLinearOrtho,
|
|
3105
3716
|
length: param.L5,
|
|
3106
3717
|
rotate: [Math.PI / 2, 0, 0],
|
|
3107
3718
|
translate: [0, param.L5 / 2, 0]
|
|
@@ -3109,7 +3720,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3109
3720
|
{
|
|
3110
3721
|
outName: `subpax_${designName}_stpSideH`,
|
|
3111
3722
|
face: `${designName}_faceStopperSideH`,
|
|
3112
|
-
extrudeMethod:
|
|
3723
|
+
extrudeMethod: EExtrude7.eLinearOrtho,
|
|
3113
3724
|
length: param.L5,
|
|
3114
3725
|
rotate: [Math.PI / 2, 0, 0],
|
|
3115
3726
|
translate: [0, param.L5 / 2, 0]
|
|
@@ -3117,7 +3728,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3117
3728
|
{
|
|
3118
3729
|
outName: `subpax_${designName}_stpFaceT`,
|
|
3119
3730
|
face: `${designName}_faceStopperFaceT`,
|
|
3120
|
-
extrudeMethod:
|
|
3731
|
+
extrudeMethod: EExtrude7.eLinearOrtho,
|
|
3121
3732
|
length: S2s,
|
|
3122
3733
|
rotate: [Math.PI / 2, 0, Math.PI / 2],
|
|
3123
3734
|
translate: [0, 0, 0]
|
|
@@ -3125,7 +3736,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3125
3736
|
{
|
|
3126
3737
|
outName: `subpax_${designName}_stpFaceTH`,
|
|
3127
3738
|
face: `${designName}_faceStopperFaceTH`,
|
|
3128
|
-
extrudeMethod:
|
|
3739
|
+
extrudeMethod: EExtrude7.eLinearOrtho,
|
|
3129
3740
|
length: S2s,
|
|
3130
3741
|
rotate: [Math.PI / 2, 0, Math.PI / 2],
|
|
3131
3742
|
translate: [0, 0, 0]
|
|
@@ -3133,7 +3744,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3133
3744
|
{
|
|
3134
3745
|
outName: `subpax_${designName}_stpFaceB`,
|
|
3135
3746
|
face: `${designName}_faceStopperFaceB`,
|
|
3136
|
-
extrudeMethod:
|
|
3747
|
+
extrudeMethod: EExtrude7.eLinearOrtho,
|
|
3137
3748
|
length: stopper3L,
|
|
3138
3749
|
rotate: [Math.PI / 2 - stopper3A, 0, Math.PI / 2],
|
|
3139
3750
|
translate: [0, 0, stopper3H]
|
|
@@ -3141,7 +3752,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3141
3752
|
{
|
|
3142
3753
|
outName: `subpax_${designName}_stpFaceBH`,
|
|
3143
3754
|
face: `${designName}_faceStopperFaceBH`,
|
|
3144
|
-
extrudeMethod:
|
|
3755
|
+
extrudeMethod: EExtrude7.eLinearOrtho,
|
|
3145
3756
|
length: stopper3L,
|
|
3146
3757
|
rotate: [Math.PI / 2 - stopper3A, 0, Math.PI / 2],
|
|
3147
3758
|
translate: [0, 0, stopper3H]
|
|
@@ -3150,7 +3761,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3150
3761
|
volumes: [
|
|
3151
3762
|
{
|
|
3152
3763
|
outName: `ipax_${designName}_plus`,
|
|
3153
|
-
boolMethod:
|
|
3764
|
+
boolMethod: EBVolume9.eUnion,
|
|
3154
3765
|
inList: [
|
|
3155
3766
|
`subpax_${designName}_stpSide`,
|
|
3156
3767
|
`subpax_${designName}_stpFaceT`,
|
|
@@ -3159,7 +3770,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3159
3770
|
},
|
|
3160
3771
|
{
|
|
3161
3772
|
outName: `ipax_${designName}_hollow`,
|
|
3162
|
-
boolMethod:
|
|
3773
|
+
boolMethod: EBVolume9.eUnion,
|
|
3163
3774
|
inList: [
|
|
3164
3775
|
`subpax_${designName}_stpSideH`,
|
|
3165
3776
|
`subpax_${designName}_stpFaceTH`,
|
|
@@ -3168,12 +3779,12 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3168
3779
|
},
|
|
3169
3780
|
{
|
|
3170
3781
|
outName: `ipax_${designName}_stopper`,
|
|
3171
|
-
boolMethod:
|
|
3782
|
+
boolMethod: EBVolume9.eSubstraction,
|
|
3172
3783
|
inList: [`ipax_${designName}_plus`, `ipax_${designName}_hollow`]
|
|
3173
3784
|
},
|
|
3174
3785
|
{
|
|
3175
3786
|
outName: `pax_${designName}`,
|
|
3176
|
-
boolMethod:
|
|
3787
|
+
boolMethod: EBVolume9.eUnion,
|
|
3177
3788
|
inList: [`inpax_${designName}_rake`, `ipax_${designName}_stopper`]
|
|
3178
3789
|
}
|
|
3179
3790
|
]
|
|
@@ -3190,47 +3801,47 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3190
3801
|
var rakeStopperDef = {
|
|
3191
3802
|
pTitle: "Heliostat rake with stopper",
|
|
3192
3803
|
pDescription: "The rake-stopper on top of the V-Axis of the heliostat",
|
|
3193
|
-
pDef:
|
|
3194
|
-
pGeom:
|
|
3804
|
+
pDef: pDef9,
|
|
3805
|
+
pGeom: pGeom9
|
|
3195
3806
|
};
|
|
3196
3807
|
|
|
3197
3808
|
// src/heliostat/heliostat_2.ts
|
|
3198
|
-
var
|
|
3809
|
+
var pDef10 = {
|
|
3199
3810
|
partName: "heliostat_2",
|
|
3200
3811
|
params: [
|
|
3201
3812
|
//pNumber(name, unit, init, min, max, step)
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3813
|
+
pNumber10("H1", "mm", 3e3, 10, 4e4, 10),
|
|
3814
|
+
pNumber10("H2", "mm", 2500, 50, 4e4, 10),
|
|
3815
|
+
pNumber10("D1", "mm", 1e3, 20, 4e3, 10),
|
|
3816
|
+
pNumber10("D2", "mm", 700, 20, 4e3, 10),
|
|
3817
|
+
pNumber10("E1", "mm", 30, 1, 80, 1),
|
|
3818
|
+
pSectionSeparator9("rake"),
|
|
3819
|
+
pNumber10("H3", "mm", 200, 1, 500, 1),
|
|
3820
|
+
pNumber10("H4", "mm", 800, 1, 4e3, 1),
|
|
3821
|
+
pNumber10("H5", "mm", 3e3, 50, 6e3, 10),
|
|
3822
|
+
pNumber10("H6", "mm", 200, 1, 4e3, 1),
|
|
3823
|
+
pNumber10("H7", "mm", 400, 1, 4e3, 1),
|
|
3824
|
+
pNumber10("D3", "mm", 900, 20, 4e3, 10),
|
|
3825
|
+
pNumber10("D4", "mm", 400, 20, 4e3, 10),
|
|
3826
|
+
pNumber10("D5", "mm", 300, 20, 1e3, 10),
|
|
3827
|
+
pNumber10("D6", "mm", 200, 10, 1e3, 10),
|
|
3828
|
+
pNumber10("D7", "mm", 400, 10, 1e3, 10),
|
|
3829
|
+
pSectionSeparator9("rake diagonal"),
|
|
3830
|
+
pNumber10("D9", "mm", 100, 1, 1e3, 1),
|
|
3831
|
+
pNumber10("L7", "mm", 100, 1, 1e3, 1),
|
|
3832
|
+
pNumber10("L8", "mm", 200, 1, 1e3, 1),
|
|
3833
|
+
pSectionSeparator9("rake stopper"),
|
|
3834
|
+
pNumber10("S1", "mm", 100, 1, 800, 1),
|
|
3835
|
+
pSectionSeparator9("swing"),
|
|
3836
|
+
pNumber10("L1", "mm", 12500, 100, 4e4, 10),
|
|
3837
|
+
pNumber10("L2", "mm", 6e3, 100, 4e4, 10),
|
|
3838
|
+
pNumber10("L3", "mm", 100, 1, 500, 1),
|
|
3839
|
+
pNumber10("L4", "mm", 600, 1, 4e3, 1),
|
|
3840
|
+
pNumber10("L5", "mm", 2e3, 10, 6e3, 10),
|
|
3841
|
+
pNumber10("L6", "mm", 2e3, 1, 6e3, 1),
|
|
3842
|
+
pNumber10("H9", "mm", 100, 1, 400, 1),
|
|
3843
|
+
pSectionSeparator9("motion amplitude"),
|
|
3844
|
+
pNumber10("al", "degree", 80, 0, 95, 1)
|
|
3234
3845
|
],
|
|
3235
3846
|
paramSvg: {
|
|
3236
3847
|
H1: "heliostat_overview.svg",
|
|
@@ -3268,28 +3879,28 @@ var pDef9 = {
|
|
|
3268
3879
|
// every 0.5 second
|
|
3269
3880
|
}
|
|
3270
3881
|
};
|
|
3271
|
-
function
|
|
3272
|
-
const rGeome =
|
|
3273
|
-
const figSide =
|
|
3274
|
-
const figFace =
|
|
3275
|
-
const figTop =
|
|
3882
|
+
function pGeom10(t, param, suffix = "") {
|
|
3883
|
+
const rGeome = initGeom10(pDef10.partName + suffix);
|
|
3884
|
+
const figSide = figure10();
|
|
3885
|
+
const figFace = figure10();
|
|
3886
|
+
const figTop = figure10();
|
|
3276
3887
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
3277
3888
|
`;
|
|
3278
3889
|
try {
|
|
3279
3890
|
const helioHeight = param.H1 + param.H2 - param.H3 + param.H4 + param.H5 - param.H6 + param.H7;
|
|
3280
|
-
rGeome.logstr += `heliostat-height: ${
|
|
3891
|
+
rGeome.logstr += `heliostat-height: ${ffix12(helioHeight)}, diameter ${ffix12(param.D1)} m
|
|
3281
3892
|
`;
|
|
3282
|
-
rGeome.logstr += `heliostat-swing-length: ${
|
|
3893
|
+
rGeome.logstr += `heliostat-swing-length: ${ffix12(param.L1)}, width ${ffix12(param.L2)} m
|
|
3283
3894
|
`;
|
|
3284
|
-
const posAngleDegree = param.al * t /
|
|
3285
|
-
const posAngle =
|
|
3286
|
-
rGeome.logstr += `swing position angle: ${
|
|
3895
|
+
const posAngleDegree = param.al * t / pDef10.sim.tMax;
|
|
3896
|
+
const posAngle = degToRad5(posAngleDegree);
|
|
3897
|
+
rGeome.logstr += `swing position angle: ${ffix12(radToDeg8(posAngle))} degree
|
|
3287
3898
|
`;
|
|
3288
3899
|
const rakePosY = param.H1 + param.H2 - param.H3;
|
|
3289
3900
|
const swingPosY = rakePosY + param.H4 + param.H5 - param.H6 + param.H7;
|
|
3290
|
-
const poleStaticParam =
|
|
3291
|
-
const rakeParam =
|
|
3292
|
-
const swingParam =
|
|
3901
|
+
const poleStaticParam = designParam5(poleStaticDef.pDef);
|
|
3902
|
+
const rakeParam = designParam5(rakeStopperDef.pDef);
|
|
3903
|
+
const swingParam = designParam5(swingDef.pDef);
|
|
3293
3904
|
poleStaticParam.setVal("H1", param.H1);
|
|
3294
3905
|
poleStaticParam.setVal("H2", param.H2);
|
|
3295
3906
|
poleStaticParam.setVal("D1", param.D1);
|
|
@@ -3307,6 +3918,7 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3307
3918
|
poleStaticParam.setVal("D4", param.H1 / 4);
|
|
3308
3919
|
poleStaticParam.setVal("L2", param.H1 / 80);
|
|
3309
3920
|
poleStaticParam.setVal("E3", param.H1 / 80);
|
|
3921
|
+
poleStaticParam.setVal("holders", 0);
|
|
3310
3922
|
rakeParam.setVal("H1", param.H4);
|
|
3311
3923
|
rakeParam.setVal("H2", param.H5);
|
|
3312
3924
|
rakeParam.setVal("H3", param.H4 - 2 * param.E1);
|
|
@@ -3370,14 +3982,14 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3370
3982
|
poleStaticParam.getParamVal(),
|
|
3371
3983
|
poleStaticParam.getSuffix()
|
|
3372
3984
|
);
|
|
3373
|
-
|
|
3374
|
-
rGeome.logstr +=
|
|
3985
|
+
checkGeom5(poleStaticGeom);
|
|
3986
|
+
rGeome.logstr += prefixLog5(poleStaticGeom.logstr, poleStaticParam.getPartNameSuffix());
|
|
3375
3987
|
const rakeGeom = rakeStopperDef.pGeom(0, rakeParam.getParamVal(), rakeParam.getSuffix());
|
|
3376
|
-
|
|
3377
|
-
rGeome.logstr +=
|
|
3988
|
+
checkGeom5(rakeGeom);
|
|
3989
|
+
rGeome.logstr += prefixLog5(rakeGeom.logstr, rakeParam.getPartNameSuffix());
|
|
3378
3990
|
const swingGeom = swingDef.pGeom(0, swingParam.getParamVal(), swingParam.getSuffix());
|
|
3379
|
-
|
|
3380
|
-
rGeome.logstr +=
|
|
3991
|
+
checkGeom5(swingGeom);
|
|
3992
|
+
rGeome.logstr += prefixLog5(swingGeom.logstr, swingParam.getPartNameSuffix());
|
|
3381
3993
|
figSide.mergeFigure(poleStaticGeom.fig.poleCut);
|
|
3382
3994
|
figSide.mergeFigure(rakeGeom.fig.faceStopperSide.translate(0, rakePosY));
|
|
3383
3995
|
figSide.mergeFigure(
|
|
@@ -3423,7 +4035,7 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3423
4035
|
volumes: [
|
|
3424
4036
|
{
|
|
3425
4037
|
outName: `pax_${designName}`,
|
|
3426
|
-
boolMethod:
|
|
4038
|
+
boolMethod: EBVolume10.eUnion,
|
|
3427
4039
|
inList: [
|
|
3428
4040
|
`inpax_${designName}_poleStatic`,
|
|
3429
4041
|
`inpax_${designName}_rake`,
|
|
@@ -3467,43 +4079,43 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3467
4079
|
var heliostat_2Def = {
|
|
3468
4080
|
pTitle: "Heliostat-2 overview",
|
|
3469
4081
|
pDescription: "The heliostat-2 inclination mechanism",
|
|
3470
|
-
pDef:
|
|
3471
|
-
pGeom:
|
|
4082
|
+
pDef: pDef10,
|
|
4083
|
+
pGeom: pGeom10
|
|
3472
4084
|
};
|
|
3473
4085
|
|
|
3474
4086
|
// src/heliostat/base.ts
|
|
3475
4087
|
import {
|
|
3476
|
-
contour as
|
|
3477
|
-
contourCircle as
|
|
3478
|
-
figure as
|
|
3479
|
-
ffix as
|
|
3480
|
-
pNumber as
|
|
3481
|
-
pSectionSeparator as
|
|
3482
|
-
initGeom as
|
|
3483
|
-
EExtrude as
|
|
3484
|
-
EBVolume as
|
|
4088
|
+
contour as contour11,
|
|
4089
|
+
contourCircle as contourCircle9,
|
|
4090
|
+
figure as figure11,
|
|
4091
|
+
ffix as ffix13,
|
|
4092
|
+
pNumber as pNumber11,
|
|
4093
|
+
pSectionSeparator as pSectionSeparator10,
|
|
4094
|
+
initGeom as initGeom11,
|
|
4095
|
+
EExtrude as EExtrude8,
|
|
4096
|
+
EBVolume as EBVolume11
|
|
3485
4097
|
} from "geometrix";
|
|
3486
|
-
var
|
|
4098
|
+
var pDef11 = {
|
|
3487
4099
|
partName: "base",
|
|
3488
4100
|
params: [
|
|
3489
4101
|
//pNumber(name, unit, init, min, max, step)
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
4102
|
+
pNumber11("D1", "mm", 600, 10, 4e3, 10),
|
|
4103
|
+
pNumber11("D2", "mm", 700, 10, 4e3, 10),
|
|
4104
|
+
pNumber11("D3", "mm", 400, 10, 4e3, 10),
|
|
4105
|
+
pNumber11("D4", "mm", 500, 10, 4e3, 10),
|
|
4106
|
+
pNumber11("E1", "mm", 30, 1, 80, 1),
|
|
4107
|
+
pNumber11("E2", "mm", 30, 1, 80, 1),
|
|
4108
|
+
pNumber11("E3", "mm", 30, 1, 80, 1),
|
|
4109
|
+
pNumber11("H1", "mm", 800, 10, 4e3, 10),
|
|
4110
|
+
pNumber11("H2", "mm", 50, 1, 4e3, 1),
|
|
4111
|
+
pSectionSeparator10("side holes"),
|
|
4112
|
+
pNumber11("H3", "mm", 400, 10, 4e3, 10),
|
|
4113
|
+
pNumber11("N2", "", 12, 1, 100, 1),
|
|
4114
|
+
pNumber11("L2", "mm", 100, 1, 400, 1),
|
|
4115
|
+
pSectionSeparator10("base holes"),
|
|
4116
|
+
pNumber11("N1", "", 24, 3, 100, 1),
|
|
4117
|
+
pNumber11("D5", "mm", 40, 1, 100, 1),
|
|
4118
|
+
pNumber11("L1", "mm", 34, 1, 300, 1)
|
|
3507
4119
|
],
|
|
3508
4120
|
paramSvg: {
|
|
3509
4121
|
D1: "base_cut.svg",
|
|
@@ -3529,14 +4141,14 @@ var pDef10 = {
|
|
|
3529
4141
|
// every 0.5 second
|
|
3530
4142
|
}
|
|
3531
4143
|
};
|
|
3532
|
-
function
|
|
3533
|
-
const rGeome =
|
|
4144
|
+
function pGeom11(t, param, suffix = "") {
|
|
4145
|
+
const rGeome = initGeom11(pDef11.partName + suffix);
|
|
3534
4146
|
let ctrBaseCut1;
|
|
3535
4147
|
let ctrBaseCut2;
|
|
3536
4148
|
let ctrHollow;
|
|
3537
|
-
const figCut =
|
|
3538
|
-
const figTop =
|
|
3539
|
-
const figHollow =
|
|
4149
|
+
const figCut = figure11();
|
|
4150
|
+
const figTop = figure11();
|
|
4151
|
+
const figHollow = figure11();
|
|
3540
4152
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
3541
4153
|
`;
|
|
3542
4154
|
try {
|
|
@@ -3552,19 +4164,19 @@ function pGeom10(t, param, suffix = "") {
|
|
|
3552
4164
|
if (R4 > R1 - param.E2) {
|
|
3553
4165
|
throw `err189: D4 ${param.D4} too large compare to D1 ${param.D1} and E2 ${param.E2}`;
|
|
3554
4166
|
}
|
|
3555
|
-
rGeome.logstr += `base-height: ${
|
|
4167
|
+
rGeome.logstr += `base-height: ${ffix13(param.H1)} mm
|
|
3556
4168
|
`;
|
|
3557
|
-
rGeome.logstr += `base-external-diameter: ${
|
|
4169
|
+
rGeome.logstr += `base-external-diameter: ${ffix13(param.D2)} mm
|
|
3558
4170
|
`;
|
|
3559
4171
|
const interHollow = param.D1 * Math.PI / param.N2 - param.L2;
|
|
3560
|
-
rGeome.logstr += `inter-hollow: ${
|
|
4172
|
+
rGeome.logstr += `inter-hollow: ${ffix13(interHollow)} mm
|
|
3561
4173
|
`;
|
|
3562
4174
|
ctrBaseCut1 = function(orient) {
|
|
3563
|
-
const rBaseCut1 =
|
|
4175
|
+
const rBaseCut1 = contour11(orient * R2, 0).addSegStrokeA(orient * R2, param.E3).addSegStrokeA(orient * R1, param.E3).addSegStrokeA(orient * R1, param.H1).addSegStrokeA(orient * (R1 - param.E2), param.H1).addSegStrokeA(orient * (R1 - param.E2), param.E3).addSegStrokeA(orient * R4, param.E3).addSegStrokeA(orient * R4, 0).closeSegStroke();
|
|
3564
4176
|
return rBaseCut1;
|
|
3565
4177
|
};
|
|
3566
4178
|
ctrBaseCut2 = function(orient) {
|
|
3567
|
-
const rBaseCut2 =
|
|
4179
|
+
const rBaseCut2 = contour11(orient * R2, 0).addSegStrokeA(orient * R2, param.E3).addSegStrokeA(orient * R1, param.E3).addSegStrokeA(orient * R1, param.H1).addSegStrokeA(orient * R3, param.H1).addSegStrokeA(orient * R3, param.H1 - param.E1).addSegStrokeA(orient * (R1 - param.E2), param.H1 - param.E1).addSegStrokeA(orient * (R1 - param.E2), param.E3).addSegStrokeA(orient * R4, param.E3).addSegStrokeA(orient * R4, 0).closeSegStroke();
|
|
3568
4180
|
return rBaseCut2;
|
|
3569
4181
|
};
|
|
3570
4182
|
if (param.H1 < param.E3 + param.H2 + param.H3 + param.E1) {
|
|
@@ -3579,7 +4191,7 @@ function pGeom10(t, param, suffix = "") {
|
|
|
3579
4191
|
}
|
|
3580
4192
|
const hollowH = param.E3 + param.H2 + RL2;
|
|
3581
4193
|
ctrHollow = function(orient) {
|
|
3582
|
-
const rHollow =
|
|
4194
|
+
const rHollow = contour11(orient * RL2, hollowH).addSegStrokeA(orient * RL2, hollowH + param.H3 - param.L2).addPointA(-orient * RL2, hollowH + param.H3 - param.L2).addSegArc(RL2, false, true).addSegStrokeA(-orient * RL2, hollowH).closeSegArc(RL2, false, true);
|
|
3583
4195
|
return rHollow;
|
|
3584
4196
|
};
|
|
3585
4197
|
figCut.addMain(ctrBaseCut1(1));
|
|
@@ -3596,18 +4208,18 @@ function pGeom10(t, param, suffix = "") {
|
|
|
3596
4208
|
if (param.N1 * holeAngle > 2 * Math.PI) {
|
|
3597
4209
|
throw `err134: N1 ${param.N1} too large compare to D5 ${param.D5}, L1 ${param.L1}, D2 ${param.D2}`;
|
|
3598
4210
|
}
|
|
3599
|
-
figTop.addMain(
|
|
3600
|
-
figTop.addMain(
|
|
4211
|
+
figTop.addMain(contourCircle9(0, 0, R1));
|
|
4212
|
+
figTop.addMain(contourCircle9(0, 0, R3));
|
|
3601
4213
|
const posR = R3 + param.L1;
|
|
3602
4214
|
const posA = 2 * Math.PI / param.N1;
|
|
3603
4215
|
for (let i = 0; i < param.N1; i++) {
|
|
3604
4216
|
const posX = posR * Math.cos(i * posA);
|
|
3605
4217
|
const posY = posR * Math.sin(i * posA);
|
|
3606
|
-
figTop.addMain(
|
|
4218
|
+
figTop.addMain(contourCircle9(posX, posY, R5));
|
|
3607
4219
|
}
|
|
3608
|
-
figTop.addSecond(
|
|
3609
|
-
figTop.addSecond(
|
|
3610
|
-
figTop.addSecond(
|
|
4220
|
+
figTop.addSecond(contourCircle9(0, 0, R1 - param.E1));
|
|
4221
|
+
figTop.addSecond(contourCircle9(0, 0, R2));
|
|
4222
|
+
figTop.addSecond(contourCircle9(0, 0, R4));
|
|
3611
4223
|
figHollow.addMain(ctrHollow(1));
|
|
3612
4224
|
figHollow.addSecond(ctrBaseCut2(1));
|
|
3613
4225
|
figHollow.addSecond(ctrBaseCut2(-1));
|
|
@@ -3623,7 +4235,7 @@ function pGeom10(t, param, suffix = "") {
|
|
|
3623
4235
|
const rHollow = {
|
|
3624
4236
|
outName: `subpax_${designName}_hollow_${idx}`,
|
|
3625
4237
|
face: `${designName}_faceHollow`,
|
|
3626
|
-
extrudeMethod:
|
|
4238
|
+
extrudeMethod: EExtrude8.eLinearOrtho,
|
|
3627
4239
|
length: R2 + param.E2,
|
|
3628
4240
|
rotate: [Math.PI / 2, 0, idx * hollowStep],
|
|
3629
4241
|
translate: [0, 0, 0]
|
|
@@ -3636,14 +4248,14 @@ function pGeom10(t, param, suffix = "") {
|
|
|
3636
4248
|
{
|
|
3637
4249
|
outName: `subpax_${designName}_cut`,
|
|
3638
4250
|
face: `${designName}_faceCut`,
|
|
3639
|
-
extrudeMethod:
|
|
4251
|
+
extrudeMethod: EExtrude8.eRotate,
|
|
3640
4252
|
rotate: [0, 0, 0],
|
|
3641
4253
|
translate: [Math.PI / 2, 0, 0]
|
|
3642
4254
|
},
|
|
3643
4255
|
{
|
|
3644
4256
|
outName: `subpax_${designName}_top`,
|
|
3645
4257
|
face: `${designName}_faceTop`,
|
|
3646
|
-
extrudeMethod:
|
|
4258
|
+
extrudeMethod: EExtrude8.eLinearOrtho,
|
|
3647
4259
|
length: param.E1,
|
|
3648
4260
|
rotate: [0, 0, 0],
|
|
3649
4261
|
translate: [0, 0, param.H1 - param.E1]
|
|
@@ -3653,17 +4265,17 @@ function pGeom10(t, param, suffix = "") {
|
|
|
3653
4265
|
volumes: [
|
|
3654
4266
|
{
|
|
3655
4267
|
outName: `ipax_${designName}_hollows`,
|
|
3656
|
-
boolMethod:
|
|
4268
|
+
boolMethod: EBVolume11.eUnion,
|
|
3657
4269
|
inList: [...lVolHollow]
|
|
3658
4270
|
},
|
|
3659
4271
|
{
|
|
3660
4272
|
outName: `ipax_${designName}_cylinder`,
|
|
3661
|
-
boolMethod:
|
|
4273
|
+
boolMethod: EBVolume11.eSubstraction,
|
|
3662
4274
|
inList: [`subpax_${designName}_cut`, `ipax_${designName}_hollows`]
|
|
3663
4275
|
},
|
|
3664
4276
|
{
|
|
3665
4277
|
outName: `pax_${designName}`,
|
|
3666
|
-
boolMethod:
|
|
4278
|
+
boolMethod: EBVolume11.eUnion,
|
|
3667
4279
|
inList: [`ipax_${designName}_cylinder`, `subpax_${designName}_top`]
|
|
3668
4280
|
}
|
|
3669
4281
|
]
|
|
@@ -3680,149 +4292,16 @@ function pGeom10(t, param, suffix = "") {
|
|
|
3680
4292
|
var baseDef = {
|
|
3681
4293
|
pTitle: "Heliostat base",
|
|
3682
4294
|
pDescription: "The base for the static-pole of the heliostat",
|
|
3683
|
-
pDef: pDef10,
|
|
3684
|
-
pGeom: pGeom10
|
|
3685
|
-
};
|
|
3686
|
-
|
|
3687
|
-
// src/heliostat/vaxis.ts
|
|
3688
|
-
import {
|
|
3689
|
-
contour as contour10,
|
|
3690
|
-
contourCircle as contourCircle9,
|
|
3691
|
-
figure as figure11,
|
|
3692
|
-
ffix as ffix12,
|
|
3693
|
-
pNumber as pNumber11,
|
|
3694
|
-
pSectionSeparator as pSectionSeparator10,
|
|
3695
|
-
initGeom as initGeom11,
|
|
3696
|
-
EExtrude as EExtrude8,
|
|
3697
|
-
EBVolume as EBVolume11
|
|
3698
|
-
} from "geometrix";
|
|
3699
|
-
var pDef11 = {
|
|
3700
|
-
partName: "vaxis",
|
|
3701
|
-
params: [
|
|
3702
|
-
//pNumber(name, unit, init, min, max, step)
|
|
3703
|
-
pNumber11("D1", "mm", 600, 1, 4e3, 1),
|
|
3704
|
-
pNumber11("D2", "mm", 400, 1, 4e3, 1),
|
|
3705
|
-
pNumber11("H1", "mm", 8e3, 10, 4e4, 10),
|
|
3706
|
-
pNumber11("E1", "mm", 5, 1, 80, 1),
|
|
3707
|
-
pNumber11("E2", "mm", 30, 1, 80, 1),
|
|
3708
|
-
pSectionSeparator10("base holes"),
|
|
3709
|
-
pNumber11("N1", "", 24, 3, 100, 1),
|
|
3710
|
-
pNumber11("D3", "mm", 40, 1, 100, 1),
|
|
3711
|
-
pNumber11("L1", "mm", 45, 1, 300, 1)
|
|
3712
|
-
],
|
|
3713
|
-
paramSvg: {
|
|
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"
|
|
3722
|
-
},
|
|
3723
|
-
sim: {
|
|
3724
|
-
tMax: 180,
|
|
3725
|
-
tStep: 0.5,
|
|
3726
|
-
tUpdate: 500
|
|
3727
|
-
// every 0.5 second
|
|
3728
|
-
}
|
|
3729
|
-
};
|
|
3730
|
-
function pGeom11(t, param, suffix = "") {
|
|
3731
|
-
const rGeome = initGeom11(pDef11.partName + suffix);
|
|
3732
|
-
let ctrPoleProfile;
|
|
3733
|
-
const figCut = figure11();
|
|
3734
|
-
const figBottom = figure11();
|
|
3735
|
-
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
3736
|
-
`;
|
|
3737
|
-
try {
|
|
3738
|
-
const R1 = param.D1 / 2;
|
|
3739
|
-
const R2 = param.D2 / 2;
|
|
3740
|
-
const R3 = param.D3 / 2;
|
|
3741
|
-
rGeome.logstr += `vaxis-height: ${ffix12(param.H1)} mm
|
|
3742
|
-
`;
|
|
3743
|
-
const ctrCylinder = contour10(R1, 0).addSegStrokeA(R1, param.H1).addSegStrokeA(R1 - param.E1, param.H1).addSegStrokeA(R1 - param.E1, 0).closeSegStroke();
|
|
3744
|
-
figCut.addMain(ctrCylinder);
|
|
3745
|
-
ctrPoleProfile = function(orient) {
|
|
3746
|
-
const rPoleProfile = contour10(orient * R1, 0).addSegStrokeA(orient * R1, param.H1).addSegStrokeA(orient * R2, param.H1).addSegStrokeA(orient * R2, param.H1 - param.E2).addSegStrokeA(orient * (R1 - param.E1), param.H1 - param.E2).addSegStrokeA(orient * (R1 - param.E1), param.E2).addSegStrokeA(orient * R2, param.E2).addSegStrokeA(orient * R2, 0).closeSegStroke();
|
|
3747
|
-
return rPoleProfile;
|
|
3748
|
-
};
|
|
3749
|
-
figCut.addSecond(ctrPoleProfile(1));
|
|
3750
|
-
figCut.addSecond(ctrPoleProfile(-1));
|
|
3751
|
-
figBottom.addMain(contourCircle9(0, 0, R1));
|
|
3752
|
-
figBottom.addMain(contourCircle9(0, 0, R2));
|
|
3753
|
-
const posR = R2 + param.L1;
|
|
3754
|
-
const posA = 2 * Math.PI / param.N1;
|
|
3755
|
-
for (let i = 0; i < param.N1; i++) {
|
|
3756
|
-
const posX = posR * Math.cos(i * posA);
|
|
3757
|
-
const posY = posR * Math.sin(i * posA);
|
|
3758
|
-
figBottom.addMain(contourCircle9(posX, posY, R3));
|
|
3759
|
-
}
|
|
3760
|
-
figBottom.addSecond(contourCircle9(0, 0, R1 - param.E1));
|
|
3761
|
-
rGeome.fig = {
|
|
3762
|
-
faceCut: figCut,
|
|
3763
|
-
faceBottom: figBottom
|
|
3764
|
-
};
|
|
3765
|
-
const designName = rGeome.partName;
|
|
3766
|
-
rGeome.vol = {
|
|
3767
|
-
extrudes: [
|
|
3768
|
-
{
|
|
3769
|
-
outName: `subpax_${designName}_pole`,
|
|
3770
|
-
face: `${designName}_faceCut`,
|
|
3771
|
-
extrudeMethod: EExtrude8.eRotate,
|
|
3772
|
-
rotate: [0, 0, 0],
|
|
3773
|
-
translate: [0, 0, 0]
|
|
3774
|
-
},
|
|
3775
|
-
{
|
|
3776
|
-
outName: `subpax_${designName}_bottom`,
|
|
3777
|
-
face: `${designName}_faceBottom`,
|
|
3778
|
-
extrudeMethod: EExtrude8.eLinearOrtho,
|
|
3779
|
-
length: param.E2,
|
|
3780
|
-
rotate: [0, 0, 0],
|
|
3781
|
-
translate: [0, 0, 0]
|
|
3782
|
-
},
|
|
3783
|
-
{
|
|
3784
|
-
outName: `subpax_${designName}_top`,
|
|
3785
|
-
face: `${designName}_faceBottom`,
|
|
3786
|
-
extrudeMethod: EExtrude8.eLinearOrtho,
|
|
3787
|
-
length: param.E2,
|
|
3788
|
-
rotate: [0, 0, 0],
|
|
3789
|
-
translate: [0, 0, param.H1 - param.E2]
|
|
3790
|
-
}
|
|
3791
|
-
],
|
|
3792
|
-
volumes: [
|
|
3793
|
-
{
|
|
3794
|
-
outName: `pax_${designName}`,
|
|
3795
|
-
boolMethod: EBVolume11.eUnion,
|
|
3796
|
-
inList: [
|
|
3797
|
-
`subpax_${designName}_pole`,
|
|
3798
|
-
`subpax_${designName}_bottom`,
|
|
3799
|
-
`subpax_${designName}_top`
|
|
3800
|
-
]
|
|
3801
|
-
}
|
|
3802
|
-
]
|
|
3803
|
-
};
|
|
3804
|
-
rGeome.sub = {};
|
|
3805
|
-
rGeome.logstr += "V-Axis drawn successfully!\n";
|
|
3806
|
-
rGeome.calcErr = false;
|
|
3807
|
-
} catch (emsg) {
|
|
3808
|
-
rGeome.logstr += emsg;
|
|
3809
|
-
console.log(emsg);
|
|
3810
|
-
}
|
|
3811
|
-
return rGeome;
|
|
3812
|
-
}
|
|
3813
|
-
var vaxisDef = {
|
|
3814
|
-
pTitle: "Heliostat V-Axis",
|
|
3815
|
-
pDescription: "The vertical axis inside the pole of an heliostat",
|
|
3816
4295
|
pDef: pDef11,
|
|
3817
4296
|
pGeom: pGeom11
|
|
3818
4297
|
};
|
|
3819
4298
|
|
|
3820
|
-
// src/heliostat/
|
|
4299
|
+
// src/heliostat/vaxis.ts
|
|
3821
4300
|
import {
|
|
3822
|
-
contour as
|
|
4301
|
+
contour as contour12,
|
|
3823
4302
|
contourCircle as contourCircle10,
|
|
3824
4303
|
figure as figure12,
|
|
3825
|
-
ffix as
|
|
4304
|
+
ffix as ffix14,
|
|
3826
4305
|
pNumber as pNumber12,
|
|
3827
4306
|
pSectionSeparator as pSectionSeparator11,
|
|
3828
4307
|
initGeom as initGeom12,
|
|
@@ -3830,33 +4309,28 @@ import {
|
|
|
3830
4309
|
EBVolume as EBVolume12
|
|
3831
4310
|
} from "geometrix";
|
|
3832
4311
|
var pDef12 = {
|
|
3833
|
-
partName: "
|
|
4312
|
+
partName: "vaxis",
|
|
3834
4313
|
params: [
|
|
3835
4314
|
//pNumber(name, unit, init, min, max, step)
|
|
3836
|
-
pNumber12("D1", "mm",
|
|
3837
|
-
pNumber12("
|
|
3838
|
-
pNumber12("H1", "mm",
|
|
3839
|
-
pNumber12("
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
pNumber12("
|
|
3843
|
-
pNumber12("
|
|
3844
|
-
|
|
3845
|
-
pNumber12("N1", "", 100, 3, 1e4, 1),
|
|
3846
|
-
pNumber12("L2", "mm", 30, 1, 200, 1),
|
|
3847
|
-
pNumber12("L3", "mm", 30, 1, 200, 1)
|
|
4315
|
+
pNumber12("D1", "mm", 600, 1, 4e3, 1),
|
|
4316
|
+
pNumber12("D2", "mm", 400, 1, 4e3, 1),
|
|
4317
|
+
pNumber12("H1", "mm", 8e3, 10, 4e4, 10),
|
|
4318
|
+
pNumber12("E1", "mm", 5, 1, 80, 1),
|
|
4319
|
+
pNumber12("E2", "mm", 30, 1, 80, 1),
|
|
4320
|
+
pSectionSeparator11("base holes"),
|
|
4321
|
+
pNumber12("N1", "", 24, 3, 100, 1),
|
|
4322
|
+
pNumber12("D3", "mm", 40, 1, 100, 1),
|
|
4323
|
+
pNumber12("L1", "mm", 45, 1, 300, 1)
|
|
3848
4324
|
],
|
|
3849
4325
|
paramSvg: {
|
|
3850
|
-
D1: "
|
|
3851
|
-
|
|
3852
|
-
H1: "
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
L2: "ring_top.svg",
|
|
3859
|
-
L3: "ring_top.svg"
|
|
4326
|
+
D1: "vaxis_cut.svg",
|
|
4327
|
+
D2: "vaxis_cut.svg",
|
|
4328
|
+
H1: "vaxis_cut.svg",
|
|
4329
|
+
E1: "vaxis_cut.svg",
|
|
4330
|
+
E2: "vaxis_cut.svg",
|
|
4331
|
+
N1: "vaxis_ends.svg",
|
|
4332
|
+
D3: "vaxis_ends.svg",
|
|
4333
|
+
L1: "vaxis_ends.svg"
|
|
3860
4334
|
},
|
|
3861
4335
|
sim: {
|
|
3862
4336
|
tMax: 180,
|
|
@@ -3867,328 +4341,134 @@ var pDef12 = {
|
|
|
3867
4341
|
};
|
|
3868
4342
|
function pGeom12(t, param, suffix = "") {
|
|
3869
4343
|
const rGeome = initGeom12(pDef12.partName + suffix);
|
|
3870
|
-
|
|
3871
|
-
const
|
|
3872
|
-
const
|
|
4344
|
+
let ctrPoleProfile;
|
|
4345
|
+
const figCut = figure12();
|
|
4346
|
+
const figBottom = figure12();
|
|
3873
4347
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
3874
4348
|
`;
|
|
3875
4349
|
try {
|
|
3876
4350
|
const R1 = param.D1 / 2;
|
|
3877
4351
|
const R2 = param.D2 / 2;
|
|
3878
4352
|
const R3 = param.D3 / 2;
|
|
3879
|
-
|
|
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
|
|
4353
|
+
rGeome.logstr += `vaxis-height: ${ffix14(param.H1)} mm
|
|
3890
4354
|
`;
|
|
3891
|
-
const
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
4355
|
+
const ctrCylinder = contour12(R1, 0).addSegStrokeA(R1, param.H1).addSegStrokeA(R1 - param.E1, param.H1).addSegStrokeA(R1 - param.E1, 0).closeSegStroke();
|
|
4356
|
+
figCut.addMain(ctrCylinder);
|
|
4357
|
+
ctrPoleProfile = function(orient) {
|
|
4358
|
+
const rPoleProfile = contour12(orient * R1, 0).addSegStrokeA(orient * R1, param.H1).addSegStrokeA(orient * R2, param.H1).addSegStrokeA(orient * R2, param.H1 - param.E2).addSegStrokeA(orient * (R1 - param.E1), param.H1 - param.E2).addSegStrokeA(orient * (R1 - param.E1), param.E2).addSegStrokeA(orient * R2, param.E2).addSegStrokeA(orient * R2, 0).closeSegStroke();
|
|
4359
|
+
return rPoleProfile;
|
|
4360
|
+
};
|
|
4361
|
+
figCut.addSecond(ctrPoleProfile(1));
|
|
4362
|
+
figCut.addSecond(ctrPoleProfile(-1));
|
|
4363
|
+
figBottom.addMain(contourCircle10(0, 0, R1));
|
|
4364
|
+
figBottom.addMain(contourCircle10(0, 0, R2));
|
|
4365
|
+
const posR = R2 + param.L1;
|
|
4366
|
+
const posA = 2 * Math.PI / param.N1;
|
|
3895
4367
|
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
4368
|
const posX = posR * Math.cos(i * posA);
|
|
3910
4369
|
const posY = posR * Math.sin(i * posA);
|
|
3911
|
-
|
|
3912
|
-
figRingTeeth.addSecond(contourCircle10(posX, posY, R2));
|
|
4370
|
+
figBottom.addMain(contourCircle10(posX, posY, R3));
|
|
3913
4371
|
}
|
|
3914
|
-
|
|
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;
|
|
3922
|
-
};
|
|
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;
|
|
3926
|
-
};
|
|
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));
|
|
4372
|
+
figBottom.addSecond(contourCircle10(0, 0, R1 - param.E1));
|
|
3938
4373
|
rGeome.fig = {
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
faceSection: figSection
|
|
4374
|
+
faceCut: figCut,
|
|
4375
|
+
faceBottom: figBottom
|
|
3942
4376
|
};
|
|
3943
4377
|
const designName = rGeome.partName;
|
|
3944
4378
|
rGeome.vol = {
|
|
3945
4379
|
extrudes: [
|
|
3946
4380
|
{
|
|
3947
|
-
outName: `subpax_${designName}
|
|
3948
|
-
face: `${designName}
|
|
3949
|
-
extrudeMethod: EExtrude9.
|
|
3950
|
-
length: param.H1,
|
|
4381
|
+
outName: `subpax_${designName}_pole`,
|
|
4382
|
+
face: `${designName}_faceCut`,
|
|
4383
|
+
extrudeMethod: EExtrude9.eRotate,
|
|
3951
4384
|
rotate: [0, 0, 0],
|
|
3952
4385
|
translate: [0, 0, 0]
|
|
3953
4386
|
},
|
|
3954
4387
|
{
|
|
3955
|
-
outName: `subpax_${designName}
|
|
3956
|
-
face: `${designName}
|
|
4388
|
+
outName: `subpax_${designName}_bottom`,
|
|
4389
|
+
face: `${designName}_faceBottom`,
|
|
3957
4390
|
extrudeMethod: EExtrude9.eLinearOrtho,
|
|
3958
|
-
length:
|
|
4391
|
+
length: param.E2,
|
|
3959
4392
|
rotate: [0, 0, 0],
|
|
3960
4393
|
translate: [0, 0, 0]
|
|
4394
|
+
},
|
|
4395
|
+
{
|
|
4396
|
+
outName: `subpax_${designName}_top`,
|
|
4397
|
+
face: `${designName}_faceBottom`,
|
|
4398
|
+
extrudeMethod: EExtrude9.eLinearOrtho,
|
|
4399
|
+
length: param.E2,
|
|
4400
|
+
rotate: [0, 0, 0],
|
|
4401
|
+
translate: [0, 0, param.H1 - param.E2]
|
|
3961
4402
|
}
|
|
3962
4403
|
],
|
|
3963
4404
|
volumes: [
|
|
3964
4405
|
{
|
|
3965
4406
|
outName: `pax_${designName}`,
|
|
3966
4407
|
boolMethod: EBVolume12.eUnion,
|
|
3967
|
-
inList: [
|
|
4408
|
+
inList: [
|
|
4409
|
+
`subpax_${designName}_pole`,
|
|
4410
|
+
`subpax_${designName}_bottom`,
|
|
4411
|
+
`subpax_${designName}_top`
|
|
4412
|
+
]
|
|
3968
4413
|
}
|
|
3969
4414
|
]
|
|
3970
4415
|
};
|
|
3971
4416
|
rGeome.sub = {};
|
|
3972
|
-
rGeome.logstr += "
|
|
3973
|
-
rGeome.calcErr = false;
|
|
3974
|
-
} catch (emsg) {
|
|
3975
|
-
rGeome.logstr += emsg;
|
|
3976
|
-
console.log(emsg);
|
|
3977
|
-
}
|
|
3978
|
-
return rGeome;
|
|
3979
|
-
}
|
|
3980
|
-
var ringDef = {
|
|
3981
|
-
pTitle: "Heliostat ring",
|
|
3982
|
-
pDescription: "The gear ring for adjusting the azimuth of the heliostat",
|
|
3983
|
-
pDef: pDef12,
|
|
3984
|
-
pGeom: pGeom12
|
|
3985
|
-
};
|
|
3986
|
-
|
|
3987
|
-
// src/heliostat/vaxis_holder.ts
|
|
3988
|
-
import {
|
|
3989
|
-
point as point4,
|
|
3990
|
-
contour as contour13,
|
|
3991
|
-
contourCircle as contourCircle11,
|
|
3992
|
-
figure as figure13,
|
|
3993
|
-
degToRad as degToRad5,
|
|
3994
|
-
ffix as ffix15,
|
|
3995
|
-
pNumber as pNumber13,
|
|
3996
|
-
pSectionSeparator as pSectionSeparator12,
|
|
3997
|
-
initGeom as initGeom13,
|
|
3998
|
-
transform3d,
|
|
3999
|
-
EExtrude as EExtrude10,
|
|
4000
|
-
EBVolume as EBVolume13
|
|
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);
|
|
4417
|
+
rGeome.logstr += "V-Axis drawn successfully!\n";
|
|
4418
|
+
rGeome.calcErr = false;
|
|
4419
|
+
} catch (emsg) {
|
|
4420
|
+
rGeome.logstr += emsg;
|
|
4421
|
+
console.log(emsg);
|
|
4151
4422
|
}
|
|
4152
|
-
return
|
|
4423
|
+
return rGeome;
|
|
4153
4424
|
}
|
|
4425
|
+
var vaxisDef = {
|
|
4426
|
+
pTitle: "Heliostat V-Axis",
|
|
4427
|
+
pDescription: "The vertical axis inside the pole of an heliostat",
|
|
4428
|
+
pDef: pDef12,
|
|
4429
|
+
pGeom: pGeom12
|
|
4430
|
+
};
|
|
4154
4431
|
|
|
4155
|
-
// src/heliostat/
|
|
4432
|
+
// src/heliostat/ring.ts
|
|
4433
|
+
import {
|
|
4434
|
+
contour as contour13,
|
|
4435
|
+
contourCircle as contourCircle11,
|
|
4436
|
+
figure as figure13,
|
|
4437
|
+
ffix as ffix15,
|
|
4438
|
+
pNumber as pNumber13,
|
|
4439
|
+
pSectionSeparator as pSectionSeparator12,
|
|
4440
|
+
initGeom as initGeom13,
|
|
4441
|
+
EExtrude as EExtrude10,
|
|
4442
|
+
EBVolume as EBVolume13
|
|
4443
|
+
} from "geometrix";
|
|
4156
4444
|
var pDef13 = {
|
|
4157
|
-
partName: "
|
|
4445
|
+
partName: "ring",
|
|
4158
4446
|
params: [
|
|
4159
4447
|
//pNumber(name, unit, init, min, max, step)
|
|
4160
|
-
pNumber13("
|
|
4161
|
-
pNumber13("
|
|
4162
|
-
pNumber13("
|
|
4163
|
-
pNumber13("
|
|
4164
|
-
pSectionSeparator12("
|
|
4165
|
-
pNumber13("
|
|
4166
|
-
pNumber13("
|
|
4167
|
-
pNumber13("
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
pNumber13("
|
|
4171
|
-
pNumber13("
|
|
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)
|
|
4448
|
+
pNumber13("D1", "mm", 400, 1, 2e3, 1),
|
|
4449
|
+
pNumber13("D3", "mm", 800, 1, 4e3, 1),
|
|
4450
|
+
pNumber13("H1", "mm", 20, 1, 100, 1),
|
|
4451
|
+
pNumber13("H2", "mm", 100, 1, 600, 1),
|
|
4452
|
+
pSectionSeparator12("ring holes"),
|
|
4453
|
+
pNumber13("N2", "", 24, 3, 100, 1),
|
|
4454
|
+
pNumber13("D2", "mm", 40, 1, 100, 1),
|
|
4455
|
+
pNumber13("L1", "mm", 45, 1, 300, 1),
|
|
4456
|
+
pSectionSeparator12("ring fake teeth"),
|
|
4457
|
+
pNumber13("N1", "", 100, 3, 1e4, 1),
|
|
4458
|
+
pNumber13("L2", "mm", 30, 1, 200, 1),
|
|
4459
|
+
pNumber13("L3", "mm", 30, 1, 200, 1)
|
|
4176
4460
|
],
|
|
4177
4461
|
paramSvg: {
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
PHA: "vaxis_holder_section.svg",
|
|
4189
|
-
PHL1: "vaxis_holder_section.svg",
|
|
4190
|
-
PHE2: "vaxis_holder_section.svg",
|
|
4191
|
-
PHE3: "vaxis_holder_top.svg"
|
|
4462
|
+
D1: "ring_top.svg",
|
|
4463
|
+
D3: "ring_top.svg",
|
|
4464
|
+
H1: "ring_section.svg",
|
|
4465
|
+
H2: "ring_section.svg",
|
|
4466
|
+
N2: "ring_top.svg",
|
|
4467
|
+
D2: "ring_top.svg",
|
|
4468
|
+
L1: "ring_top.svg",
|
|
4469
|
+
N1: "ring_top.svg",
|
|
4470
|
+
L2: "ring_top.svg",
|
|
4471
|
+
L3: "ring_top.svg"
|
|
4192
4472
|
},
|
|
4193
4473
|
sim: {
|
|
4194
4474
|
tMax: 180,
|
|
@@ -4199,168 +4479,109 @@ var pDef13 = {
|
|
|
4199
4479
|
};
|
|
4200
4480
|
function pGeom13(t, param, suffix = "") {
|
|
4201
4481
|
const rGeome = initGeom13(pDef13.partName + suffix);
|
|
4202
|
-
const
|
|
4203
|
-
const
|
|
4204
|
-
const
|
|
4205
|
-
const figButtress2 = figure13();
|
|
4482
|
+
const figRingBase = figure13();
|
|
4483
|
+
const figRingTeeth = figure13();
|
|
4484
|
+
const figSection = figure13();
|
|
4206
4485
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4207
4486
|
`;
|
|
4208
4487
|
try {
|
|
4209
|
-
const
|
|
4210
|
-
const
|
|
4211
|
-
const
|
|
4212
|
-
const
|
|
4213
|
-
|
|
4214
|
-
|
|
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}`;
|
|
4488
|
+
const R1 = param.D1 / 2;
|
|
4489
|
+
const R2 = param.D2 / 2;
|
|
4490
|
+
const R3 = param.D3 / 2;
|
|
4491
|
+
const ringHeight = param.H1 + param.H2;
|
|
4492
|
+
if (param.L1 < R2) {
|
|
4493
|
+
throw `err203: L1 ${param.L1} too small compare to D2 ${param.D2}`;
|
|
4224
4494
|
}
|
|
4225
|
-
|
|
4226
|
-
`;
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
rGeome.logstr += `
|
|
4232
|
-
`;
|
|
4233
|
-
rGeome.logstr += `vaxis_holder D2-next: ${ffix15(2 * R2next)} mm
|
|
4495
|
+
if (R1 + param.L1 + R2 > R3 - param.L2 - param.L3) {
|
|
4496
|
+
throw `err204: D3 ${param.D3} too small compare to D1 ${param.D1}, L1 ${param.L1}, L2 ${param.L2}, L3 ${param.L3}`;
|
|
4497
|
+
}
|
|
4498
|
+
if (2 * Math.atan2(R2, R1 + param.L1) > 2 * Math.PI / param.N2) {
|
|
4499
|
+
throw `err205: D2 ${param.D2} too large compare to N2 ${param.N2}`;
|
|
4500
|
+
}
|
|
4501
|
+
rGeome.logstr += `ring-height: ${ffix15(ringHeight)} mm
|
|
4234
4502
|
`;
|
|
4235
|
-
const
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
const
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
const
|
|
4503
|
+
const tR1 = R3 - param.L2;
|
|
4504
|
+
const tR2 = tR1 - param.L3;
|
|
4505
|
+
const tA = 2 * Math.PI / (2 * param.N1);
|
|
4506
|
+
const ctrTeeth = contour13(tR1, 0);
|
|
4507
|
+
for (let i = 0; i < param.N1; i++) {
|
|
4508
|
+
const ti1 = 2 * i + 1;
|
|
4509
|
+
const ti2 = 2 * i + 2;
|
|
4510
|
+
const p1X = tR2 * Math.cos(ti1 * tA);
|
|
4511
|
+
const p1Y = tR2 * Math.sin(ti1 * tA);
|
|
4512
|
+
const p2X = tR1 * Math.cos(ti2 * tA);
|
|
4513
|
+
const p2Y = tR1 * Math.sin(ti2 * tA);
|
|
4514
|
+
ctrTeeth.addSegStrokeA(p1X, p1Y).addSegStrokeA(p2X, p2Y);
|
|
4515
|
+
}
|
|
4516
|
+
figRingBase.addMain(contourCircle11(0, 0, R3));
|
|
4517
|
+
figRingBase.addMain(contourCircle11(0, 0, R1));
|
|
4518
|
+
const posR = R1 + param.L1;
|
|
4519
|
+
const posA = 2 * Math.PI / param.N2;
|
|
4520
|
+
for (let i = 0; i < param.N2; i++) {
|
|
4521
|
+
const posX = posR * Math.cos(i * posA);
|
|
4522
|
+
const posY = posR * Math.sin(i * posA);
|
|
4523
|
+
figRingBase.addMain(contourCircle11(posX, posY, R2));
|
|
4524
|
+
figRingTeeth.addSecond(contourCircle11(posX, posY, R2));
|
|
4525
|
+
}
|
|
4526
|
+
figRingBase.addSecond(ctrTeeth);
|
|
4527
|
+
figRingTeeth.addMain(contourCircle11(0, 0, R3));
|
|
4528
|
+
figRingTeeth.addMain(ctrTeeth);
|
|
4529
|
+
figRingTeeth.addSecond(contourCircle11(0, 0, R1));
|
|
4530
|
+
const ctrInner = contour13(R1, 0).addSegStrokeA(-R1, 0).addSegStrokeA(-R1, -param.H1).addSegStrokeA(R1, -param.H1).closeSegStroke();
|
|
4531
|
+
const ctrScrewHole = function(rnl) {
|
|
4532
|
+
const rCtr = contour13(rnl * (R1 + param.L1) + R2, 0).addSegStrokeR(-2 * R2, 0).addSegStrokeR(0, -param.H1).addSegStrokeR(2 * R2, 0).closeSegStroke();
|
|
4245
4533
|
return rCtr;
|
|
4246
4534
|
};
|
|
4247
|
-
|
|
4248
|
-
|
|
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();
|
|
4535
|
+
const ctrGearTeeth = function(rnl) {
|
|
4536
|
+
const rCtr = contour13(rnl * (R3 - param.L2), -param.H1).addSegStrokeR(-rnl * param.L3, 0).addSegStrokeR(0, -param.H2).addSegStrokeR(rnl * param.L3, 0).closeSegStroke();
|
|
4255
4537
|
return rCtr;
|
|
4256
4538
|
};
|
|
4257
|
-
const
|
|
4258
|
-
const rCtr = contour13(rnl * (
|
|
4539
|
+
const ctrL = function(rnl) {
|
|
4540
|
+
const rCtr = contour13(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();
|
|
4259
4541
|
return rCtr;
|
|
4260
4542
|
};
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
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));
|
|
4284
|
-
}
|
|
4543
|
+
figSection.addSecond(ctrInner);
|
|
4544
|
+
figSection.addSecond(ctrScrewHole(1));
|
|
4545
|
+
figSection.addSecond(ctrScrewHole(-1));
|
|
4546
|
+
figSection.addSecond(ctrGearTeeth(1));
|
|
4547
|
+
figSection.addSecond(ctrGearTeeth(-1));
|
|
4548
|
+
figSection.addMain(ctrL(1));
|
|
4549
|
+
figSection.addSecond(ctrL(-1));
|
|
4285
4550
|
rGeome.fig = {
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
faceButtress2: figButtress2
|
|
4551
|
+
faceRingBase: figRingBase,
|
|
4552
|
+
faceRingTeeth: figRingTeeth,
|
|
4553
|
+
faceSection: figSection
|
|
4290
4554
|
};
|
|
4291
4555
|
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
4556
|
rGeome.vol = {
|
|
4330
4557
|
extrudes: [
|
|
4331
4558
|
{
|
|
4332
|
-
outName: `subpax_${designName}
|
|
4333
|
-
face: `${designName}
|
|
4334
|
-
extrudeMethod: EExtrude10.
|
|
4559
|
+
outName: `subpax_${designName}_base`,
|
|
4560
|
+
face: `${designName}_faceRingBase`,
|
|
4561
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4562
|
+
length: param.H1,
|
|
4335
4563
|
rotate: [0, 0, 0],
|
|
4336
4564
|
translate: [0, 0, 0]
|
|
4337
4565
|
},
|
|
4338
4566
|
{
|
|
4339
|
-
outName: `subpax_${designName}
|
|
4340
|
-
face: `${designName}
|
|
4567
|
+
outName: `subpax_${designName}_teeth`,
|
|
4568
|
+
face: `${designName}_faceRingTeeth`,
|
|
4341
4569
|
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4342
|
-
length:
|
|
4570
|
+
length: ringHeight,
|
|
4343
4571
|
rotate: [0, 0, 0],
|
|
4344
|
-
translate: [0, 0,
|
|
4345
|
-
}
|
|
4346
|
-
...preExtrude1,
|
|
4347
|
-
...preExtrude2
|
|
4572
|
+
translate: [0, 0, 0]
|
|
4573
|
+
}
|
|
4348
4574
|
],
|
|
4349
4575
|
volumes: [
|
|
4350
4576
|
{
|
|
4351
4577
|
outName: `pax_${designName}`,
|
|
4352
4578
|
boolMethod: EBVolume13.eUnion,
|
|
4353
|
-
inList: [
|
|
4354
|
-
`subpax_${designName}_petal`,
|
|
4355
|
-
`subpax_${designName}_outer`,
|
|
4356
|
-
...b1List,
|
|
4357
|
-
...b2List
|
|
4358
|
-
]
|
|
4579
|
+
inList: [`subpax_${designName}_base`, `subpax_${designName}_teeth`]
|
|
4359
4580
|
}
|
|
4360
4581
|
]
|
|
4361
4582
|
};
|
|
4362
4583
|
rGeome.sub = {};
|
|
4363
|
-
rGeome.logstr += "
|
|
4584
|
+
rGeome.logstr += "ring drawn successfully!\n";
|
|
4364
4585
|
rGeome.calcErr = false;
|
|
4365
4586
|
} catch (emsg) {
|
|
4366
4587
|
rGeome.logstr += emsg;
|
|
@@ -4368,9 +4589,9 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4368
4589
|
}
|
|
4369
4590
|
return rGeome;
|
|
4370
4591
|
}
|
|
4371
|
-
var
|
|
4372
|
-
pTitle: "Heliostat
|
|
4373
|
-
pDescription: "The
|
|
4592
|
+
var ringDef = {
|
|
4593
|
+
pTitle: "Heliostat ring",
|
|
4594
|
+
pDescription: "The gear ring for adjusting the azimuth of the heliostat",
|
|
4374
4595
|
pDef: pDef13,
|
|
4375
4596
|
pGeom: pGeom13
|
|
4376
4597
|
};
|
|
@@ -4516,8 +4737,8 @@ var ringGuidanceDef = {
|
|
|
4516
4737
|
|
|
4517
4738
|
// src/heliostat/vaxis_guidance.ts
|
|
4518
4739
|
import {
|
|
4519
|
-
contour as contour15,
|
|
4520
4740
|
contourCircle as contourCircle13,
|
|
4741
|
+
ctrRectangle as ctrRectangle2,
|
|
4521
4742
|
figure as figure15,
|
|
4522
4743
|
ffix as ffix17,
|
|
4523
4744
|
pNumber as pNumber15,
|
|
@@ -4610,15 +4831,11 @@ function pGeom15(t, param, suffix = "") {
|
|
|
4610
4831
|
rGeome.logstr += innerLog;
|
|
4611
4832
|
figTop.addMain(innerCtr);
|
|
4612
4833
|
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
4834
|
const w1 = R1 - R6 + R4;
|
|
4618
|
-
figSection.addMain(
|
|
4619
|
-
figSection.addMain(
|
|
4620
|
-
figSection.addSecond(
|
|
4621
|
-
figSection.addSecond(
|
|
4835
|
+
figSection.addMain(ctrRectangle2(R6, 0, w1, param.T1));
|
|
4836
|
+
figSection.addMain(ctrRectangle2(-R6 - w1, 0, w1, param.T1));
|
|
4837
|
+
figSection.addSecond(ctrRectangle2(R1 - R3, 0, 2 * R3, param.T1));
|
|
4838
|
+
figSection.addSecond(ctrRectangle2(-R1 - R3, 0, 2 * R3, param.T1));
|
|
4622
4839
|
rGeome.fig = {
|
|
4623
4840
|
faceTop: figTop,
|
|
4624
4841
|
faceSection: figSection
|
|
@@ -4661,7 +4878,7 @@ var vaxisGuidanceDef = {
|
|
|
4661
4878
|
|
|
4662
4879
|
// src/heliostat/rod.ts
|
|
4663
4880
|
import {
|
|
4664
|
-
contour as
|
|
4881
|
+
contour as contour15,
|
|
4665
4882
|
contourCircle as contourCircle14,
|
|
4666
4883
|
figure as figure16,
|
|
4667
4884
|
ffix as ffix18,
|
|
@@ -4733,7 +4950,7 @@ function pGeom16(t, param, suffix = "") {
|
|
|
4733
4950
|
`;
|
|
4734
4951
|
ctrPlate = function(py) {
|
|
4735
4952
|
const rPlate = [];
|
|
4736
|
-
const plateExt =
|
|
4953
|
+
const plateExt = contour15(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
4954
|
rPlate.push(plateExt);
|
|
4738
4955
|
for (let i = 1; i < param.N3 + 1; i++) {
|
|
4739
4956
|
rPlate.push(contourCircle14(param.L4 / 2 - param.L7, py + i * n3step, R2));
|
|
@@ -4748,16 +4965,16 @@ function pGeom16(t, param, suffix = "") {
|
|
|
4748
4965
|
return rPlate;
|
|
4749
4966
|
};
|
|
4750
4967
|
ctrRod = function(py, ly) {
|
|
4751
|
-
const rRod =
|
|
4968
|
+
const rRod = contour15(param.L2 / 2, py).addSegStrokeA(param.L2 / 2, py + ly).addSegStrokeA(-param.L2 / 2, py + ly).addSegStrokeA(-param.L2 / 2, py).closeSegStroke();
|
|
4752
4969
|
return rRod;
|
|
4753
4970
|
};
|
|
4754
4971
|
const L2h = param.L2 / 2;
|
|
4755
4972
|
const L4h = param.L4 / 2;
|
|
4756
4973
|
const L2hi = (param.L2 - 2 * param.E1) / 2;
|
|
4757
4974
|
const H1i = param.H1 - param.E1;
|
|
4758
|
-
const ctrRodExt =
|
|
4759
|
-
const ctrRodInt =
|
|
4760
|
-
const ctrPlateSide =
|
|
4975
|
+
const ctrRodExt = contour15(L2h, 0).addSegStrokeA(L2h, param.H1).addSegStrokeA(-L2h, param.H1).addSegStrokeA(-L2h, 0).closeSegStroke();
|
|
4976
|
+
const ctrRodInt = contour15(L2hi, param.E1).addSegStrokeA(L2hi, H1i).addSegStrokeA(-L2hi, H1i).addSegStrokeA(-L2hi, param.E1).closeSegStroke();
|
|
4977
|
+
const ctrPlateSide = contour15(L4h, param.H1).addSegStrokeA(L4h, param.H1 + param.E2).addSegStrokeA(-L4h, param.H1 + param.E2).addSegStrokeA(-L4h, param.H1).closeSegStroke();
|
|
4761
4978
|
figCut.addMain(ctrRodExt);
|
|
4762
4979
|
figCut.addMain(ctrRodInt);
|
|
4763
4980
|
figCut.addSecond(ctrPlateSide);
|
|
@@ -4819,7 +5036,7 @@ var rodDef = {
|
|
|
4819
5036
|
|
|
4820
5037
|
// src/heliostat/trapeze.ts
|
|
4821
5038
|
import {
|
|
4822
|
-
contour as
|
|
5039
|
+
contour as contour16,
|
|
4823
5040
|
contourCircle as contourCircle15,
|
|
4824
5041
|
figure as figure17,
|
|
4825
5042
|
radToDeg as radToDeg9,
|
|
@@ -4931,27 +5148,27 @@ function pGeom17(t, param, suffix = "") {
|
|
|
4931
5148
|
const rodFPl = Math.sqrt((rodFootprintLength / 2) ** 2 + (param.D3 / 2) ** 2);
|
|
4932
5149
|
const rodFPa = Math.atan2(param.D3, rodFootprintLength);
|
|
4933
5150
|
ctrRodFootprint = function(px, py, angle) {
|
|
4934
|
-
const rCtr =
|
|
5151
|
+
const rCtr = contour16(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
5152
|
return rCtr;
|
|
4936
5153
|
};
|
|
4937
5154
|
ctrRod = function(px, py, angle) {
|
|
4938
5155
|
const px0 = px + rodFPl * Math.cos(angle + Math.PI - rodFPa);
|
|
4939
5156
|
const py0 = py + rodFPl * Math.sin(angle + Math.PI - rodFPa);
|
|
4940
|
-
const rCtr =
|
|
5157
|
+
const rCtr = contour16(px0, py0).addSegStrokeRP(angle + Math.PI, rod_xy).addSegStrokeRP(angle - Math.PI / 2, param.D3).addSegStrokeRP(angle, rod_xy).closeSegStroke();
|
|
4941
5158
|
return rCtr;
|
|
4942
5159
|
};
|
|
4943
5160
|
if (param.R1 > param.L1 / 4 || param.R1 > param.L2 / 4) {
|
|
4944
5161
|
throw `err614: R1 ${param.R1} too large compare to L1 ${param.L1} or L2 ${param.L2}`;
|
|
4945
5162
|
}
|
|
4946
|
-
const ctrFrameExt =
|
|
5163
|
+
const ctrFrameExt = contour16(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
5164
|
if (param.R2 > (param.L1 - 2 * param.L5) / 4 || param.R2 > (param.L2 - 2 * param.L5) / 4) {
|
|
4948
5165
|
throw `err627: R2 ${param.R2} too large compare to L1 ${param.L1}, L2 ${param.L2} and L5 ${param.L5}`;
|
|
4949
5166
|
}
|
|
4950
|
-
const ctrFrameInt =
|
|
5167
|
+
const ctrFrameInt = contour16(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
5168
|
if (param.R3 > param.L3 / 4 || param.R3 > param.L4 / 4) {
|
|
4952
5169
|
throw `err639: R3 ${param.R3} too large compare to L3 ${param.L3} or L4 ${param.L4}`;
|
|
4953
5170
|
}
|
|
4954
|
-
const ctrPlate =
|
|
5171
|
+
const ctrPlate = contour16(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
5172
|
figFrame.addMain(ctrFrameExt);
|
|
4956
5173
|
figFrame.addMain(ctrFrameInt);
|
|
4957
5174
|
figFrame.addSecond(ctrPlate);
|
|
@@ -5064,7 +5281,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5064
5281
|
const pad3y = pad3 + (rodFootprintLength / 2 + rodFootprintBack) * Math.sin(rod_xy_angle);
|
|
5065
5282
|
const rodExtrudeLength = rod_slope_length + 2 * (rodFootprintLength + rodFootprintBack + rodFootprintHeight);
|
|
5066
5283
|
const cutL = rodExtrudeLength + param.L3 + param.L4 + rodFootprintHeight;
|
|
5067
|
-
const ctrCutRod =
|
|
5284
|
+
const ctrCutRod = contour16(cutL, cutL).addSegStrokeA(-cutL, cutL).addSegStrokeA(-cutL, -cutL).addSegStrokeA(cutL, -cutL).closeSegStroke();
|
|
5068
5285
|
figCutRod.addMain(ctrCutRod);
|
|
5069
5286
|
rGeome.fig = {
|
|
5070
5287
|
faceFrame: figFrame,
|
|
@@ -5270,11 +5487,11 @@ var trapezeDef = {
|
|
|
5270
5487
|
|
|
5271
5488
|
// src/heliostat/surface.ts
|
|
5272
5489
|
import {
|
|
5273
|
-
contour as
|
|
5490
|
+
contour as contour17,
|
|
5274
5491
|
figure as figure18,
|
|
5275
5492
|
ffix as ffix20,
|
|
5276
5493
|
pNumber as pNumber18,
|
|
5277
|
-
pCheckbox as
|
|
5494
|
+
pCheckbox as pCheckbox4,
|
|
5278
5495
|
pDropdown as pDropdown2,
|
|
5279
5496
|
pSectionSeparator as pSectionSeparator17,
|
|
5280
5497
|
initGeom as initGeom18,
|
|
@@ -5292,19 +5509,19 @@ var pDef18 = {
|
|
|
5292
5509
|
pNumber18("ny", "", 9, 1, 40, 1),
|
|
5293
5510
|
pSectionSeparator17("main fantasia"),
|
|
5294
5511
|
pDropdown2("main_direction", ["horizontal", "vertical"]),
|
|
5295
|
-
|
|
5512
|
+
pCheckbox4("crenel", false),
|
|
5296
5513
|
pNumber18("first_row", "", 9, 1, 40, 1),
|
|
5297
5514
|
pNumber18("second_row", "", 9, 1, 40, 1),
|
|
5298
5515
|
pSectionSeparator17("horizontal spacing"),
|
|
5299
5516
|
pNumber18("EH", "mm", 10, 0, 1e3, 1),
|
|
5300
|
-
|
|
5517
|
+
pCheckbox4("EH_gradient", false),
|
|
5301
5518
|
pNumber18("EH_sup", "mm", 500, 0, 1e3, 1),
|
|
5302
5519
|
pNumber18("EH_cycle", "", 1, 0, 3, 0.05),
|
|
5303
5520
|
pNumber18("EH_start", "", 0, 0, 1, 0.05),
|
|
5304
5521
|
pDropdown2("EH_shape", ["sinusoid", "triangle", "sawUp", "sawDown"]),
|
|
5305
5522
|
pSectionSeparator17("vertical spacing"),
|
|
5306
5523
|
pNumber18("EV", "mm", 10, 0, 1e3, 1),
|
|
5307
|
-
|
|
5524
|
+
pCheckbox4("EV_gradient", false),
|
|
5308
5525
|
pNumber18("EV_sup", "mm", 500, 0, 1e3, 1),
|
|
5309
5526
|
pNumber18("EV_cycle", "", 1, 0, 3, 0.05),
|
|
5310
5527
|
pNumber18("EV_start", "", 0, 0, 1, 0.05),
|
|
@@ -5491,7 +5708,7 @@ function pGeom18(t, param, suffix = "") {
|
|
|
5491
5708
|
const ox = -gLenHorizontal / 2;
|
|
5492
5709
|
const oy = -gLenVertical / 2;
|
|
5493
5710
|
ctrPanelProfile = function(px, py) {
|
|
5494
|
-
const rPanelProfile =
|
|
5711
|
+
const rPanelProfile = contour17(px, py).addSegStrokeA(px + param.LH, py).addSegStrokeA(px + param.LH, py + param.LV).addSegStrokeA(px, py + param.LV).closeSegStroke();
|
|
5495
5712
|
return rPanelProfile;
|
|
5496
5713
|
};
|
|
5497
5714
|
const panelPositions = [];
|
|
@@ -5567,7 +5784,7 @@ var surfaceDef = {
|
|
|
5567
5784
|
};
|
|
5568
5785
|
|
|
5569
5786
|
// src/dummy/circles.ts
|
|
5570
|
-
import { degToRad as degToRad6, point as
|
|
5787
|
+
import { degToRad as degToRad6, point as point6, figure as figure19, pNumber as pNumber19, initGeom as initGeom19 } from "geometrix";
|
|
5571
5788
|
var pDef19 = {
|
|
5572
5789
|
partName: "circles",
|
|
5573
5790
|
params: [
|
|
@@ -5593,8 +5810,8 @@ function pGeom19(t, param, suffix = "") {
|
|
|
5593
5810
|
`;
|
|
5594
5811
|
try {
|
|
5595
5812
|
const figOne = figure19();
|
|
5596
|
-
const p1 =
|
|
5597
|
-
const p2 =
|
|
5813
|
+
const p1 = point6(10, 10);
|
|
5814
|
+
const p2 = point6(10, 30);
|
|
5598
5815
|
figOne.addPoint(p2);
|
|
5599
5816
|
for (let i = 0; i < 20; i++) {
|
|
5600
5817
|
figOne.addPoint(
|
|
@@ -5618,7 +5835,7 @@ var circlesDef = {
|
|
|
5618
5835
|
};
|
|
5619
5836
|
|
|
5620
5837
|
// src/dummy/rectangle.ts
|
|
5621
|
-
import { point as
|
|
5838
|
+
import { point as point7, figure as figure20, pNumber as pNumber20, initGeom as initGeom20 } from "geometrix";
|
|
5622
5839
|
var pDef20 = {
|
|
5623
5840
|
partName: "rectangle",
|
|
5624
5841
|
params: [
|
|
@@ -5642,10 +5859,10 @@ function pGeom20(t, param, suffix = "") {
|
|
|
5642
5859
|
`;
|
|
5643
5860
|
try {
|
|
5644
5861
|
const figOne = figure20();
|
|
5645
|
-
const p1 =
|
|
5646
|
-
const p2 =
|
|
5647
|
-
const p3 =
|
|
5648
|
-
const p4 =
|
|
5862
|
+
const p1 = point7(10, 10);
|
|
5863
|
+
const p2 = point7(10 + param.width, 10);
|
|
5864
|
+
const p3 = point7(10 + param.width, 10 + param.height);
|
|
5865
|
+
const p4 = point7(10, 10 + param.height);
|
|
5649
5866
|
const angle = t * Math.PI / 180;
|
|
5650
5867
|
figOne.addPoint(p1);
|
|
5651
5868
|
figOne.addPoint(p2.rotate(p1, angle));
|
|
@@ -5669,7 +5886,7 @@ var rectangleDef = {
|
|
|
5669
5886
|
|
|
5670
5887
|
// src/dummy/pole_static.ts
|
|
5671
5888
|
import {
|
|
5672
|
-
contour as
|
|
5889
|
+
contour as contour18,
|
|
5673
5890
|
contourCircle as contourCircle16,
|
|
5674
5891
|
figure as figure21,
|
|
5675
5892
|
pNumber as pNumber21,
|
|
@@ -5701,7 +5918,7 @@ function pGeom21(t, param, suffix = "") {
|
|
|
5701
5918
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5702
5919
|
`;
|
|
5703
5920
|
try {
|
|
5704
|
-
const ctrPoleFace =
|
|
5921
|
+
const ctrPoleFace = contour18(-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();
|
|
5705
5922
|
figFace.addMain(ctrPoleFace);
|
|
5706
5923
|
figFace.addMain(contourCircle16(0, 0, param.radius));
|
|
5707
5924
|
rGeome.fig = {
|
|
@@ -5724,7 +5941,7 @@ var dummyPoleStaticDef = {
|
|
|
5724
5941
|
};
|
|
5725
5942
|
|
|
5726
5943
|
// src/geometrix_verification/verify_point.ts
|
|
5727
|
-
import { degToRad as degToRad7, point as
|
|
5944
|
+
import { degToRad as degToRad7, point as point8, figure as figure22, pNumber as pNumber22, initGeom as initGeom22 } from "geometrix";
|
|
5728
5945
|
var pDef22 = {
|
|
5729
5946
|
partName: "verify_point",
|
|
5730
5947
|
params: [
|
|
@@ -5757,8 +5974,8 @@ function pGeom22(t, param, suffix = "") {
|
|
|
5757
5974
|
`;
|
|
5758
5975
|
try {
|
|
5759
5976
|
const figOne = figure22();
|
|
5760
|
-
const p1 =
|
|
5761
|
-
const p2 =
|
|
5977
|
+
const p1 = point8(param.p1x, param.p1y + t);
|
|
5978
|
+
const p2 = point8(0, 0).setPolar(degToRad7(param.p2a), param.p2l);
|
|
5762
5979
|
const p3 = p1.rotateOrig(degToRad7(param.rotateOrig));
|
|
5763
5980
|
const p4 = p1.scaleOrig(param.scaleOrig);
|
|
5764
5981
|
figOne.addPoint(p1);
|
|
@@ -5782,7 +5999,7 @@ var verifyPoint1Def = {
|
|
|
5782
5999
|
};
|
|
5783
6000
|
|
|
5784
6001
|
// src/geometrix_verification/verify_point_2.ts
|
|
5785
|
-
import { point as
|
|
6002
|
+
import { point as point9, figure as figure23, pNumber as pNumber23, initGeom as initGeom23 } from "geometrix";
|
|
5786
6003
|
var pDef23 = {
|
|
5787
6004
|
partName: "verify_point_2",
|
|
5788
6005
|
params: [
|
|
@@ -5817,9 +6034,9 @@ function pGeom23(t, param, suffix = "") {
|
|
|
5817
6034
|
`;
|
|
5818
6035
|
try {
|
|
5819
6036
|
const figOne = figure23();
|
|
5820
|
-
const p1 =
|
|
5821
|
-
const p2 =
|
|
5822
|
-
const p3 =
|
|
6037
|
+
const p1 = point9(param.p1x, param.p1y + t);
|
|
6038
|
+
const p2 = point9(param.p2x, param.p2y);
|
|
6039
|
+
const p3 = point9(param.p3x, param.p3y);
|
|
5823
6040
|
const mp1p2 = p1.middlePoint(p2);
|
|
5824
6041
|
const ep1p2 = p1.equidistantPoint(p2, param.dist, p3);
|
|
5825
6042
|
figOne.addPoint(p1);
|
|
@@ -5844,7 +6061,7 @@ var verifyPoint2Def = {
|
|
|
5844
6061
|
};
|
|
5845
6062
|
|
|
5846
6063
|
// src/geometrix_verification/verify_line.ts
|
|
5847
|
-
import { point as
|
|
6064
|
+
import { point as point10, line, linePP, figure as figure24, pNumber as pNumber24, initGeom as initGeom24 } from "geometrix";
|
|
5848
6065
|
var pDef24 = {
|
|
5849
6066
|
partName: "verify_line",
|
|
5850
6067
|
params: [
|
|
@@ -5877,19 +6094,19 @@ function pGeom24(t, param, suffix = "") {
|
|
|
5877
6094
|
`;
|
|
5878
6095
|
try {
|
|
5879
6096
|
const figOne = figure24();
|
|
5880
|
-
const p1 =
|
|
5881
|
-
const p2 =
|
|
5882
|
-
const p3 =
|
|
6097
|
+
const p1 = point10(param.p1x, param.p1y + t);
|
|
6098
|
+
const p2 = point10(param.p2x, param.p2y);
|
|
6099
|
+
const p3 = point10(param.p3x, param.p3y);
|
|
5883
6100
|
figOne.addPoint(p1);
|
|
5884
6101
|
figOne.addPoint(p2);
|
|
5885
6102
|
figOne.addPoint(p3);
|
|
5886
6103
|
const l1 = line(0, 0, 0).setFromPoints(p1, p2);
|
|
5887
6104
|
figOne.addLine(l1);
|
|
5888
|
-
figOne.addPoint(
|
|
5889
|
-
figOne.addPoint(
|
|
6105
|
+
figOne.addPoint(point10(l1.getAxisXIntersection(), 0));
|
|
6106
|
+
figOne.addPoint(point10(0, l1.getAxisYIntersection()));
|
|
5890
6107
|
const p4 = l1.projectOrig();
|
|
5891
6108
|
figOne.addPoint(p4);
|
|
5892
|
-
const p0 =
|
|
6109
|
+
const p0 = point10(0, 0);
|
|
5893
6110
|
if (!p0.isEqual(p4)) {
|
|
5894
6111
|
const l2 = linePP(p0, p4);
|
|
5895
6112
|
figOne.addLine(l2);
|
|
@@ -5916,7 +6133,7 @@ var verifyLine1Def = {
|
|
|
5916
6133
|
};
|
|
5917
6134
|
|
|
5918
6135
|
// src/geometrix_verification/verify_line_2.ts
|
|
5919
|
-
import { degToRad as degToRad8, point as
|
|
6136
|
+
import { degToRad as degToRad8, point as point11, line as line2, figure as figure25, pNumber as pNumber25, initGeom as initGeom25 } from "geometrix";
|
|
5920
6137
|
var pDef25 = {
|
|
5921
6138
|
partName: "verify_line_2",
|
|
5922
6139
|
params: [
|
|
@@ -5953,9 +6170,9 @@ function pGeom25(t, param, suffix = "") {
|
|
|
5953
6170
|
`;
|
|
5954
6171
|
try {
|
|
5955
6172
|
const figOne = figure25();
|
|
5956
|
-
const p1 =
|
|
5957
|
-
const p2 =
|
|
5958
|
-
const p3 =
|
|
6173
|
+
const p1 = point11(param.l1cx, param.l1cy);
|
|
6174
|
+
const p2 = point11(param.l2cx, param.l2cy);
|
|
6175
|
+
const p3 = point11(param.p3x, param.p3y);
|
|
5959
6176
|
figOne.addPoint(p1);
|
|
5960
6177
|
figOne.addPoint(p2);
|
|
5961
6178
|
figOne.addPoint(p3);
|
|
@@ -5971,7 +6188,7 @@ function pGeom25(t, param, suffix = "") {
|
|
|
5971
6188
|
rGeome.logstr += `dist(l2, p3) = ${l2.distanceToPoint(p3)}
|
|
5972
6189
|
`;
|
|
5973
6190
|
const bisector2 = l1.bisector(l2, p3);
|
|
5974
|
-
const pBisec =
|
|
6191
|
+
const pBisec = point11(bisector2.cx, bisector2.cy).translatePolar(bisector2.ca, 30);
|
|
5975
6192
|
figOne.addPoint(pBisec);
|
|
5976
6193
|
rGeome.fig = { one: figOne };
|
|
5977
6194
|
rGeome.logstr += "verify_line_2 drawn successfully!\n";
|
|
@@ -5990,7 +6207,7 @@ var verifyLine2Def = {
|
|
|
5990
6207
|
};
|
|
5991
6208
|
|
|
5992
6209
|
// src/geometrix_verification/verify_line_3.ts
|
|
5993
|
-
import { point as
|
|
6210
|
+
import { point as point12, bisector, circleCenter, figure as figure26, pNumber as pNumber26, initGeom as initGeom26 } from "geometrix";
|
|
5994
6211
|
var pDef26 = {
|
|
5995
6212
|
partName: "verify_line_3",
|
|
5996
6213
|
params: [
|
|
@@ -6023,9 +6240,9 @@ function pGeom26(t, param, suffix = "") {
|
|
|
6023
6240
|
`;
|
|
6024
6241
|
try {
|
|
6025
6242
|
const figOne = figure26();
|
|
6026
|
-
const p1 =
|
|
6027
|
-
const p2 =
|
|
6028
|
-
const p3 =
|
|
6243
|
+
const p1 = point12(param.p1x, param.p1y + t);
|
|
6244
|
+
const p2 = point12(param.p2x, param.p2y);
|
|
6245
|
+
const p3 = point12(param.p3x, param.p3y);
|
|
6029
6246
|
figOne.addPoint(p1);
|
|
6030
6247
|
figOne.addPoint(p2);
|
|
6031
6248
|
figOne.addPoint(p3);
|
|
@@ -6050,7 +6267,7 @@ var verifyLine3Def = {
|
|
|
6050
6267
|
};
|
|
6051
6268
|
|
|
6052
6269
|
// src/geometrix_verification/verify_vector.ts
|
|
6053
|
-
import { degToRad as degToRad9, point as
|
|
6270
|
+
import { degToRad as degToRad9, point as point13, vector, figure as figure27, pNumber as pNumber27, initGeom as initGeom27 } from "geometrix";
|
|
6054
6271
|
var pDef27 = {
|
|
6055
6272
|
partName: "verify_vector",
|
|
6056
6273
|
params: [
|
|
@@ -6087,8 +6304,8 @@ function pGeom27(t, param, suffix = "") {
|
|
|
6087
6304
|
`;
|
|
6088
6305
|
try {
|
|
6089
6306
|
const figOne = figure27();
|
|
6090
|
-
const p1 =
|
|
6091
|
-
const p2 =
|
|
6307
|
+
const p1 = point13(param.p1x, param.p1y + t);
|
|
6308
|
+
const p2 = point13(param.p2x, param.p2y);
|
|
6092
6309
|
const v1 = vector(degToRad9(param.v1a), param.v1l, p1);
|
|
6093
6310
|
const v2 = vector(degToRad9(param.v2a), param.v2l, p1);
|
|
6094
6311
|
figOne.addPoint(p1);
|
|
@@ -6116,7 +6333,7 @@ var verifyVector1Def = {
|
|
|
6116
6333
|
};
|
|
6117
6334
|
|
|
6118
6335
|
// src/geometrix_verification/verify_contour_1.ts
|
|
6119
|
-
import { contour as
|
|
6336
|
+
import { contour as contour19, contourCircle as contourCircle17, figure as figure28, pNumber as pNumber28, initGeom as initGeom28 } from "geometrix";
|
|
6120
6337
|
var pDef28 = {
|
|
6121
6338
|
partName: "verify_contour_1",
|
|
6122
6339
|
params: [
|
|
@@ -6161,7 +6378,7 @@ function pGeom28(t, param, suffix = "") {
|
|
|
6161
6378
|
const c12 = 2 * r1 + d1;
|
|
6162
6379
|
const c2 = c1 + c12;
|
|
6163
6380
|
const c3 = c1 + 2 * c12;
|
|
6164
|
-
const ctr1 =
|
|
6381
|
+
const ctr1 = contour19(0, 0);
|
|
6165
6382
|
ctr1.addSegStrokeA(w1, 0);
|
|
6166
6383
|
ctr1.addSegStrokeA(w1, h1);
|
|
6167
6384
|
ctr1.addSegStrokeA(0, h1);
|
|
@@ -6174,7 +6391,7 @@ function pGeom28(t, param, suffix = "") {
|
|
|
6174
6391
|
const ctr2 = contourCircle17(w1 + r2, 3 * c1, r2);
|
|
6175
6392
|
ctr2.check();
|
|
6176
6393
|
figOne.addSecond(ctr2);
|
|
6177
|
-
const ctr3 =
|
|
6394
|
+
const ctr3 = contour19(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();
|
|
6178
6395
|
ctr3.check();
|
|
6179
6396
|
figOne.addSecond(ctr3);
|
|
6180
6397
|
rGeome.fig = { one: figOne };
|
|
@@ -6194,7 +6411,7 @@ var verifyContour1Def = {
|
|
|
6194
6411
|
};
|
|
6195
6412
|
|
|
6196
6413
|
// src/geometrix_verification/verify_contour_2.ts
|
|
6197
|
-
import { degToRad as degToRad10, contour as
|
|
6414
|
+
import { degToRad as degToRad10, contour as contour20, figure as figure29, pNumber as pNumber29, initGeom as initGeom29 } from "geometrix";
|
|
6198
6415
|
var pDef29 = {
|
|
6199
6416
|
partName: "verify_contour_2",
|
|
6200
6417
|
params: [
|
|
@@ -6227,7 +6444,7 @@ function pGeom29(t, param, suffix = "") {
|
|
|
6227
6444
|
const ata = param.a1 + t;
|
|
6228
6445
|
const at1 = param.at1 + t;
|
|
6229
6446
|
const at2 = param.at2 + t;
|
|
6230
|
-
const ctr1 =
|
|
6447
|
+
const ctr1 = contour20(20, 20);
|
|
6231
6448
|
ctr1.addSegStrokeA(40, 20);
|
|
6232
6449
|
ctr1.addPointA(60, 20).addSegArc(r1, true, true);
|
|
6233
6450
|
ctr1.addPointA(80, 20).addSegArc(r1, true, false);
|
|
@@ -6254,7 +6471,7 @@ function pGeom29(t, param, suffix = "") {
|
|
|
6254
6471
|
ctr1.closeSegStroke();
|
|
6255
6472
|
ctr1.check();
|
|
6256
6473
|
figOne.addMain(ctr1);
|
|
6257
|
-
const ctr2 =
|
|
6474
|
+
const ctr2 = contour20(20, -20);
|
|
6258
6475
|
ctr2.addSegStrokeA(40, -40);
|
|
6259
6476
|
ctr2.addPointA(60, -60).addSegArc(r1, true, true);
|
|
6260
6477
|
ctr2.addPointA(80, -80).addSegArc(r1, true, false);
|
|
@@ -6264,13 +6481,13 @@ function pGeom29(t, param, suffix = "") {
|
|
|
6264
6481
|
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();
|
|
6265
6482
|
ctr2.check();
|
|
6266
6483
|
figOne.addMain(ctr2);
|
|
6267
|
-
const ctr3 =
|
|
6484
|
+
const ctr3 = contour20(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);
|
|
6268
6485
|
ctr3.check();
|
|
6269
6486
|
figOne.addMain(ctr3);
|
|
6270
|
-
const ctr4 =
|
|
6487
|
+
const ctr4 = contour20(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);
|
|
6271
6488
|
ctr4.check();
|
|
6272
6489
|
figOne.addMain(ctr4);
|
|
6273
|
-
const ctr5 =
|
|
6490
|
+
const ctr5 = contour20(100, 500);
|
|
6274
6491
|
for (let i = 0; i < 8; i++) {
|
|
6275
6492
|
const adir = i * 45;
|
|
6276
6493
|
const adirRad = degToRad10(adir);
|
|
@@ -6295,7 +6512,7 @@ var verifyContour2Def = {
|
|
|
6295
6512
|
};
|
|
6296
6513
|
|
|
6297
6514
|
// src/geometrix_verification/verify_contour_3.ts
|
|
6298
|
-
import { degToRad as degToRad11, contour as
|
|
6515
|
+
import { degToRad as degToRad11, contour as contour21, figure as figure30, pNumber as pNumber30, initGeom as initGeom30 } from "geometrix";
|
|
6299
6516
|
var pDef30 = {
|
|
6300
6517
|
partName: "verify_contour_3",
|
|
6301
6518
|
params: [
|
|
@@ -6334,11 +6551,11 @@ function pGeom30(t, param, suffix = "") {
|
|
|
6334
6551
|
const r4 = param.r4 + t;
|
|
6335
6552
|
const r5 = param.r5 + t;
|
|
6336
6553
|
const r6 = param.r6 + t;
|
|
6337
|
-
const ctr1 =
|
|
6554
|
+
const ctr1 = contour21(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);
|
|
6338
6555
|
rGeome.logstr += ctr1.check();
|
|
6339
6556
|
figOne.addMain(ctr1);
|
|
6340
6557
|
const l2 = 100;
|
|
6341
|
-
const ctr2 =
|
|
6558
|
+
const ctr2 = contour21(300, 0);
|
|
6342
6559
|
for (let i = 0; i < 4; i++) {
|
|
6343
6560
|
const angle = 90 * (1 - i);
|
|
6344
6561
|
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);
|
|
@@ -6347,7 +6564,7 @@ function pGeom30(t, param, suffix = "") {
|
|
|
6347
6564
|
figOne.addMain(ctr2);
|
|
6348
6565
|
const l3 = 100;
|
|
6349
6566
|
const ra3 = 70;
|
|
6350
|
-
const ctr3 =
|
|
6567
|
+
const ctr3 = contour21(0, 600).addSegStrokeR(l3, l3);
|
|
6351
6568
|
for (let i = 0; i < 3; i++) {
|
|
6352
6569
|
const large = (i & 1) === 0 ? false : true;
|
|
6353
6570
|
const ccw = (i & 2) === 0 ? false : true;
|
|
@@ -6363,70 +6580,70 @@ function pGeom30(t, param, suffix = "") {
|
|
|
6363
6580
|
ctr3.addSegStrokeR(l3, 0).addSegStrokeR(l3, -l3).closeSegStroke();
|
|
6364
6581
|
rGeome.logstr += ctr3.check();
|
|
6365
6582
|
figOne.addMain(ctr3);
|
|
6366
|
-
const ctr3b =
|
|
6583
|
+
const ctr3b = contour21(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();
|
|
6367
6584
|
rGeome.logstr += ctr3b.check();
|
|
6368
6585
|
figOne.addMain(ctr3b);
|
|
6369
6586
|
const l4 = 200;
|
|
6370
6587
|
const ra4 = 180;
|
|
6371
|
-
const ctr4 =
|
|
6588
|
+
const ctr4 = contour21(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);
|
|
6372
6589
|
rGeome.logstr += ctr4.check();
|
|
6373
6590
|
figOne.addMain(ctr4);
|
|
6374
|
-
const ctr4b =
|
|
6591
|
+
const ctr4b = contour21(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);
|
|
6375
6592
|
rGeome.logstr += ctr4b.check();
|
|
6376
6593
|
figOne.addMain(ctr4b);
|
|
6377
|
-
const ctr4c =
|
|
6594
|
+
const ctr4c = contour21(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);
|
|
6378
6595
|
rGeome.logstr += ctr4c.check();
|
|
6379
6596
|
figOne.addMain(ctr4c);
|
|
6380
|
-
const ctr4d =
|
|
6597
|
+
const ctr4d = contour21(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);
|
|
6381
6598
|
rGeome.logstr += ctr4d.check();
|
|
6382
6599
|
figOne.addMain(ctr4d);
|
|
6383
6600
|
const l4b = 3 * l4;
|
|
6384
6601
|
const ra4b = 3 * ra4;
|
|
6385
|
-
const ctr4e =
|
|
6602
|
+
const ctr4e = contour21(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);
|
|
6386
6603
|
rGeome.logstr += ctr4e.check();
|
|
6387
6604
|
figOne.addMain(ctr4e);
|
|
6388
|
-
const ctr4f =
|
|
6605
|
+
const ctr4f = contour21(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);
|
|
6389
6606
|
rGeome.logstr += ctr4f.check();
|
|
6390
6607
|
figOne.addMain(ctr4f);
|
|
6391
|
-
const ctr4g =
|
|
6608
|
+
const ctr4g = contour21(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);
|
|
6392
6609
|
rGeome.logstr += ctr4g.check();
|
|
6393
6610
|
figOne.addMain(ctr4g);
|
|
6394
6611
|
const c099 = 0.999;
|
|
6395
|
-
const ctr4h =
|
|
6612
|
+
const ctr4h = contour21(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);
|
|
6396
6613
|
rGeome.logstr += ctr4h.check();
|
|
6397
6614
|
figOne.addMain(ctr4h);
|
|
6398
6615
|
const l5 = 200;
|
|
6399
6616
|
const ra5 = 180;
|
|
6400
|
-
const ctr5 =
|
|
6617
|
+
const ctr5 = contour21(0, 3e3).addSegStrokeR(l5, 0).addCornerWidened(r5).addSegStrokeR(0, l5).addCornerWidened(r5).closeSegStroke().addCornerWidened(r5);
|
|
6401
6618
|
rGeome.logstr += ctr5.check();
|
|
6402
6619
|
figOne.addMain(ctr5);
|
|
6403
|
-
const ctr5b =
|
|
6620
|
+
const ctr5b = contour21(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);
|
|
6404
6621
|
rGeome.logstr += ctr5b.check();
|
|
6405
6622
|
figOne.addMain(ctr5b);
|
|
6406
|
-
const ctr5d =
|
|
6623
|
+
const ctr5d = contour21(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);
|
|
6407
6624
|
rGeome.logstr += ctr5d.check();
|
|
6408
6625
|
figOne.addMain(ctr5d);
|
|
6409
|
-
const ctr5e =
|
|
6626
|
+
const ctr5e = contour21(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);
|
|
6410
6627
|
rGeome.logstr += ctr5e.check();
|
|
6411
6628
|
figOne.addMain(ctr5e);
|
|
6412
|
-
const ctr5f =
|
|
6629
|
+
const ctr5f = contour21(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);
|
|
6413
6630
|
rGeome.logstr += ctr5f.check();
|
|
6414
6631
|
figOne.addMain(ctr5f);
|
|
6415
6632
|
const l6 = 200;
|
|
6416
6633
|
const ra6 = 180;
|
|
6417
|
-
const ctr6 =
|
|
6634
|
+
const ctr6 = contour21(0, 4e3).addSegStrokeR(l6, 0).addCornerWideAcc(r6).addSegStrokeR(0, l6).addCornerWideAcc(r6).closeSegStroke().addCornerWideAcc(r6);
|
|
6418
6635
|
rGeome.logstr += ctr6.check();
|
|
6419
6636
|
figOne.addMain(ctr6);
|
|
6420
|
-
const ctr6b =
|
|
6637
|
+
const ctr6b = contour21(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);
|
|
6421
6638
|
rGeome.logstr += ctr6b.check();
|
|
6422
6639
|
figOne.addMain(ctr6b);
|
|
6423
|
-
const ctr6d =
|
|
6640
|
+
const ctr6d = contour21(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);
|
|
6424
6641
|
rGeome.logstr += ctr6d.check();
|
|
6425
6642
|
figOne.addMain(ctr6d);
|
|
6426
|
-
const ctr6e =
|
|
6643
|
+
const ctr6e = contour21(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);
|
|
6427
6644
|
rGeome.logstr += ctr6e.check();
|
|
6428
6645
|
figOne.addMain(ctr6e);
|
|
6429
|
-
const ctr6f =
|
|
6646
|
+
const ctr6f = contour21(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);
|
|
6430
6647
|
rGeome.logstr += ctr6f.check();
|
|
6431
6648
|
figOne.addMain(ctr6f);
|
|
6432
6649
|
rGeome.fig = { one: figOne };
|
|
@@ -6446,7 +6663,7 @@ var verifyContour3Def = {
|
|
|
6446
6663
|
};
|
|
6447
6664
|
|
|
6448
6665
|
// src/geometrix_verification/verify_contour_4.ts
|
|
6449
|
-
import { contour as
|
|
6666
|
+
import { contour as contour22, figure as figure31, pNumber as pNumber31, initGeom as initGeom31 } from "geometrix";
|
|
6450
6667
|
var pDef31 = {
|
|
6451
6668
|
partName: "verify_contour_4",
|
|
6452
6669
|
params: [
|
|
@@ -6478,8 +6695,8 @@ function pGeom31(t, param, suffix = "") {
|
|
|
6478
6695
|
const r1 = param.r1;
|
|
6479
6696
|
const l1 = 50 + t;
|
|
6480
6697
|
const as = 2 * Math.PI / (n2 * 3);
|
|
6481
|
-
const ctr2b =
|
|
6482
|
-
const ctr1 =
|
|
6698
|
+
const ctr2b = contour22(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);
|
|
6699
|
+
const ctr1 = contour22(l1, 0);
|
|
6483
6700
|
const ctr1b = ctr2b.clone().addCornerRounded(r1);
|
|
6484
6701
|
for (let i = 0; i < n1; i++) {
|
|
6485
6702
|
const ctr1c = ctr1b.rotate(0, 0, i * 3 * as).scale(0, 0, 1 + i * 0.2, true);
|
|
@@ -6488,7 +6705,7 @@ function pGeom31(t, param, suffix = "") {
|
|
|
6488
6705
|
ctr1.closeSegStroke();
|
|
6489
6706
|
rGeome.logstr += ctr1.check();
|
|
6490
6707
|
figOne.addMain(ctr1);
|
|
6491
|
-
const ctr5 =
|
|
6708
|
+
const ctr5 = contour22(l1, 0);
|
|
6492
6709
|
for (let i = 0; i < n1; i++) {
|
|
6493
6710
|
ctr5.addPartial(ctr1b.rotate(0, 0, i * 3 * as).scale(0, 0, 1 + i * 0.2, false));
|
|
6494
6711
|
}
|
|
@@ -6525,11 +6742,11 @@ var verifyContour4Def = {
|
|
|
6525
6742
|
|
|
6526
6743
|
// src/geometrix_verification/verify_exports_1.ts
|
|
6527
6744
|
import {
|
|
6528
|
-
contour as
|
|
6745
|
+
contour as contour23,
|
|
6529
6746
|
contourCircle as contourCircle18,
|
|
6530
6747
|
figure as figure32,
|
|
6531
6748
|
pNumber as pNumber32,
|
|
6532
|
-
pCheckbox as
|
|
6749
|
+
pCheckbox as pCheckbox5,
|
|
6533
6750
|
initGeom as initGeom32,
|
|
6534
6751
|
EExtrude as EExtrude16,
|
|
6535
6752
|
EBVolume as EBVolume19
|
|
@@ -6538,11 +6755,11 @@ var pDef32 = {
|
|
|
6538
6755
|
partName: "verify_exports_1",
|
|
6539
6756
|
params: [
|
|
6540
6757
|
//pNumber(name, unit, init, min, max, step)
|
|
6541
|
-
|
|
6758
|
+
pCheckbox5("circle", true),
|
|
6542
6759
|
pNumber32("circle-size", "mm", 100, 1, 1e3, 1),
|
|
6543
|
-
|
|
6760
|
+
pCheckbox5("contour", true),
|
|
6544
6761
|
pNumber32("contour-size", "mm", 30, 1, 1e3, 1),
|
|
6545
|
-
|
|
6762
|
+
pCheckbox5("contour-arc-large", false)
|
|
6546
6763
|
],
|
|
6547
6764
|
paramSvg: {
|
|
6548
6765
|
circle: "default_param_blank.svg",
|
|
@@ -6570,7 +6787,7 @@ function pGeom32(t, param, suffix = "") {
|
|
|
6570
6787
|
if (param.contour === 1) {
|
|
6571
6788
|
const csize = param["contour-size"];
|
|
6572
6789
|
const carcl = param["contour-arc-large"] === 1 ? true : false;
|
|
6573
|
-
const ctr1 =
|
|
6790
|
+
const ctr1 = contour23(0, 0).addSegStrokeA(csize, 0).addPointA(csize, csize).addSegArc(csize * 0.8, carcl, true).closeSegStroke();
|
|
6574
6791
|
figOne.addMain(ctr1);
|
|
6575
6792
|
}
|
|
6576
6793
|
rGeome.fig = { one: figOne };
|