designix 0.5.25 → 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.d.ts +10 -2
- package/dist/index.js +2120 -1006
- package/dist/pgdsvg/heliostat.svg +1 -1
- package/dist/pgdsvg/heliostat_overview.svg +1 -1
- package/dist/pgdsvg/heliostat_side.svg +1 -1
- package/dist/pgdsvg/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/ring.svg +1 -0
- package/dist/pgdsvg/ring_guidance.svg +1 -0
- package/dist/pgdsvg/ring_guidance_top.svg +1 -0
- package/dist/pgdsvg/ring_section.svg +1 -0
- package/dist/pgdsvg/ring_top.svg +1 -0
- package/dist/pgdsvg/swing.svg +1 -1
- package/dist/pgdsvg/swing_buttress.svg +1 -0
- package/dist/pgdsvg/swing_side.svg +1 -1
- package/dist/pgdsvg/vaxis.svg +1 -0
- package/dist/pgdsvg/vaxis_guidance.svg +1 -0
- package/dist/pgdsvg/vaxis_guidance_spring.svg +1 -0
- package/dist/pgdsvg/vaxis_guidance_top.svg +1 -0
- package/dist/pgdsvg/vaxis_holder.svg +1 -0
- package/dist/pgdsvg/vaxis_holder_section.svg +1 -0
- package/dist/pgdsvg/vaxis_holder_top.svg +1 -0
- package/package.json +11 -10
- package/dist/pgdsvg/pole_rotor.svg +0 -1
- /package/dist/pgdsvg/{pole_rotor_cut.svg → vaxis_cut.svg} +0 -0
- /package/dist/pgdsvg/{pole_rotor_ends.svg → vaxis_ends.svg} +0 -0
package/dist/index.js
CHANGED
|
@@ -1427,50 +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
|
-
|
|
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
|
|
1441
1460
|
} from "geometrix";
|
|
1442
1461
|
|
|
1443
|
-
// src/heliostat/
|
|
1462
|
+
// src/heliostat/vaxis_holder.ts
|
|
1444
1463
|
import {
|
|
1445
|
-
|
|
1464
|
+
point as point4,
|
|
1465
|
+
contour as contour5,
|
|
1446
1466
|
contourCircle as contourCircle3,
|
|
1447
1467
|
figure as figure3,
|
|
1448
|
-
|
|
1449
|
-
ffix as
|
|
1468
|
+
degToRad as degToRad3,
|
|
1469
|
+
ffix as ffix5,
|
|
1450
1470
|
pNumber as pNumber3,
|
|
1471
|
+
pSectionSeparator as pSectionSeparator2,
|
|
1451
1472
|
initGeom as initGeom3,
|
|
1473
|
+
transform3d,
|
|
1452
1474
|
EExtrude as EExtrude2,
|
|
1453
1475
|
EBVolume as EBVolume3
|
|
1454
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
|
|
1455
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
|
+
|
|
1853
|
+
// src/heliostat/pole_static.ts
|
|
1854
|
+
var pDef4 = {
|
|
1456
1855
|
partName: "pole_static",
|
|
1457
1856
|
params: [
|
|
1458
1857
|
//pNumber(name, unit, init, min, max, step)
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
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)
|
|
1474
1902
|
],
|
|
1475
1903
|
paramSvg: {
|
|
1476
1904
|
D1: "pole_stator_cut.svg",
|
|
@@ -1487,7 +1915,30 @@ var pDef3 = {
|
|
|
1487
1915
|
H3: "pole_stator_face.svg",
|
|
1488
1916
|
H4: "pole_stator_face.svg",
|
|
1489
1917
|
L2: "pole_stator_face.svg",
|
|
1490
|
-
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"
|
|
1491
1942
|
},
|
|
1492
1943
|
sim: {
|
|
1493
1944
|
tMax: 180,
|
|
@@ -1496,40 +1947,77 @@ var pDef3 = {
|
|
|
1496
1947
|
// every 0.5 second
|
|
1497
1948
|
}
|
|
1498
1949
|
};
|
|
1499
|
-
function
|
|
1500
|
-
const rGeome =
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
const
|
|
1504
|
-
const
|
|
1505
|
-
const
|
|
1506
|
-
const
|
|
1507
|
-
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();
|
|
1508
1963
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
1509
1964
|
`;
|
|
1510
1965
|
try {
|
|
1511
1966
|
const R1 = param.D1 / 2;
|
|
1512
1967
|
const R2 = param.D2 / 2;
|
|
1513
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;
|
|
1514
1981
|
if (R2 > R1) {
|
|
1515
1982
|
throw `err091: D2 ${param.D2} is larger than D1 ${param.D1}`;
|
|
1516
1983
|
}
|
|
1517
1984
|
if (R3 + param.E2 > R1) {
|
|
1518
1985
|
throw `err095: D3 ${param.D3} and E2 ${param.E2} are too large compare to D1 ${param.D1}`;
|
|
1519
1986
|
}
|
|
1520
|
-
|
|
1521
|
-
|
|
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
|
|
1522
1996
|
`;
|
|
1523
|
-
|
|
1524
|
-
rGeome.logstr += `cone-half-angle: ${ffix4(radToDeg2(coneAngle))} degree
|
|
1997
|
+
rGeome.logstr += `cone-half-angle: ${ffix6(radToDeg3(coneAngle))} degree
|
|
1525
1998
|
`;
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
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(
|
|
1530
2008
|
-orient * param.E2 * Math.cos(coneAngle),
|
|
1531
2009
|
-param.E2 * Math.sin(coneAngle)
|
|
1532
|
-
)
|
|
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);
|
|
1533
2021
|
if (withR3) {
|
|
1534
2022
|
rPoleProfile.addSegStrokeA(orient * (R1 - param.E2), param.E1).addSegStrokeA(orient * R3, param.E1).addSegStrokeA(orient * R3, 0);
|
|
1535
2023
|
} else {
|
|
@@ -1549,53 +2037,172 @@ function pGeom3(t, param, suffix = "") {
|
|
|
1549
2037
|
if (R4 - param.L2 < 0) {
|
|
1550
2038
|
throw `err121: D4 ${param.D4} is too small compare to L2 ${param.L2}`;
|
|
1551
2039
|
}
|
|
1552
|
-
ctrDoorFace = function(pL2) {
|
|
2040
|
+
const ctrDoorFace = function(pL2) {
|
|
1553
2041
|
const R4b = R4 - pL2;
|
|
1554
2042
|
const H3b = param.H3 + R4;
|
|
1555
|
-
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();
|
|
1556
2044
|
return rCtrDoorFace;
|
|
1557
2045
|
};
|
|
1558
2046
|
figFace.addMain(ctrDoorFace(0));
|
|
1559
2047
|
figFace.addMain(ctrDoorFace(param.L2));
|
|
1560
|
-
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();
|
|
1561
2049
|
figFace.addSecond(ctrPoleFace);
|
|
1562
|
-
const ctrDoorSide =
|
|
2050
|
+
const ctrDoorSide = contour6(-R1, param.H3).addSegStrokeR(0, param.H4).addSegStrokeR(-param.E3, 0).addSegStrokeR(0, -param.H4).closeSegStroke();
|
|
1563
2051
|
figFace.addSecond(ctrDoorSide);
|
|
1564
|
-
figBottom.addMain(
|
|
1565
|
-
figBottom.addMain(
|
|
2052
|
+
figBottom.addMain(contourCircle4(0, 0, R1));
|
|
2053
|
+
figBottom.addMain(contourCircle4(0, 0, R3));
|
|
1566
2054
|
const posR = R3 + param.L1;
|
|
1567
2055
|
const posA = 2 * Math.PI / param.N1;
|
|
1568
2056
|
for (let i = 0; i < param.N1; i++) {
|
|
1569
2057
|
const posX = posR * Math.cos(i * posA);
|
|
1570
2058
|
const posY = posR * Math.sin(i * posA);
|
|
1571
|
-
figBottom.addMain(
|
|
2059
|
+
figBottom.addMain(contourCircle4(posX, posY, param.D5 / 2));
|
|
1572
2060
|
}
|
|
1573
|
-
figBottom.addSecond(
|
|
1574
|
-
figBottom.addSecond(
|
|
1575
|
-
figEmptyPole.addMain(
|
|
1576
|
-
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));
|
|
1577
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
|
+
}
|
|
1578
2179
|
rGeome.fig = {
|
|
1579
2180
|
poleCut: figCut,
|
|
1580
2181
|
poleFace: figFace,
|
|
1581
2182
|
poleBottom: figBottom,
|
|
1582
2183
|
emptyPole: figEmptyPole,
|
|
1583
|
-
emptyDoor: figEmptyDoor
|
|
2184
|
+
emptyDoor: figEmptyDoor,
|
|
2185
|
+
holderB2Section: figHolderB2Section,
|
|
2186
|
+
holderB2Top: figHolderB2Top,
|
|
2187
|
+
holderB1Section: figHolderB1Section,
|
|
2188
|
+
holderB1Top: figHolderB1Top,
|
|
2189
|
+
holderASection: figHolderASection,
|
|
2190
|
+
holderATop: figHolderATop
|
|
1584
2191
|
};
|
|
1585
|
-
const designName = rGeome.partName;
|
|
1586
2192
|
rGeome.vol = {
|
|
2193
|
+
inherits: inheritList,
|
|
1587
2194
|
extrudes: [
|
|
1588
2195
|
{
|
|
1589
2196
|
outName: `subpax_${designName}_pole`,
|
|
1590
2197
|
face: `${designName}_poleCut`,
|
|
1591
|
-
extrudeMethod:
|
|
2198
|
+
extrudeMethod: EExtrude3.eRotate,
|
|
1592
2199
|
rotate: [0, 0, 0],
|
|
1593
2200
|
translate: [0, 0, 0]
|
|
1594
2201
|
},
|
|
1595
2202
|
{
|
|
1596
2203
|
outName: `subpax_${designName}_bottom`,
|
|
1597
2204
|
face: `${designName}_poleBottom`,
|
|
1598
|
-
extrudeMethod:
|
|
2205
|
+
extrudeMethod: EExtrude3.eLinearOrtho,
|
|
1599
2206
|
length: param.E1,
|
|
1600
2207
|
rotate: [0, 0, 0],
|
|
1601
2208
|
translate: [0, 0, 0]
|
|
@@ -1603,7 +2210,7 @@ function pGeom3(t, param, suffix = "") {
|
|
|
1603
2210
|
{
|
|
1604
2211
|
outName: `subpax_${designName}_door`,
|
|
1605
2212
|
face: `${designName}_poleFace`,
|
|
1606
|
-
extrudeMethod:
|
|
2213
|
+
extrudeMethod: EExtrude3.eLinearOrtho,
|
|
1607
2214
|
length: R1 + param.E3,
|
|
1608
2215
|
rotate: [Math.PI / 2, 0, 0],
|
|
1609
2216
|
translate: [0, 0, 0]
|
|
@@ -1611,7 +2218,7 @@ function pGeom3(t, param, suffix = "") {
|
|
|
1611
2218
|
{
|
|
1612
2219
|
outName: `subpax_${designName}_emptyPole`,
|
|
1613
2220
|
face: `${designName}_emptyPole`,
|
|
1614
|
-
extrudeMethod:
|
|
2221
|
+
extrudeMethod: EExtrude3.eLinearOrtho,
|
|
1615
2222
|
length: param.H1,
|
|
1616
2223
|
rotate: [0, 0, 0],
|
|
1617
2224
|
translate: [0, 0, 0]
|
|
@@ -1619,7 +2226,7 @@ function pGeom3(t, param, suffix = "") {
|
|
|
1619
2226
|
{
|
|
1620
2227
|
outName: `subpax_${designName}_emptyDoor`,
|
|
1621
2228
|
face: `${designName}_emptyDoor`,
|
|
1622
|
-
extrudeMethod:
|
|
2229
|
+
extrudeMethod: EExtrude3.eLinearOrtho,
|
|
1623
2230
|
length: R1 + param.E3 + 10,
|
|
1624
2231
|
rotate: [Math.PI / 2, 0, 0],
|
|
1625
2232
|
translate: [0, 0, 0]
|
|
@@ -1629,21 +2236,22 @@ function pGeom3(t, param, suffix = "") {
|
|
|
1629
2236
|
{
|
|
1630
2237
|
outName: `ipax_${designName}_door`,
|
|
1631
2238
|
//boolMethod: EBVolume.eSubstraction,
|
|
1632
|
-
boolMethod:
|
|
2239
|
+
boolMethod: EBVolume4.eIntersection,
|
|
1633
2240
|
inList: [`subpax_${designName}_door`, `subpax_${designName}_emptyPole`]
|
|
1634
2241
|
},
|
|
1635
2242
|
{
|
|
1636
2243
|
outName: `ipax_${designName}_pole`,
|
|
1637
|
-
boolMethod:
|
|
2244
|
+
boolMethod: EBVolume4.eSubstraction,
|
|
1638
2245
|
inList: [`subpax_${designName}_pole`, `subpax_${designName}_emptyDoor`]
|
|
1639
2246
|
},
|
|
1640
2247
|
{
|
|
1641
2248
|
outName: `pax_${designName}`,
|
|
1642
|
-
boolMethod:
|
|
2249
|
+
boolMethod: EBVolume4.eUnion,
|
|
1643
2250
|
inList: [
|
|
1644
2251
|
`ipax_${designName}_pole`,
|
|
1645
2252
|
`subpax_${designName}_bottom`,
|
|
1646
|
-
`ipax_${designName}_door
|
|
2253
|
+
`ipax_${designName}_door`,
|
|
2254
|
+
...inheritNames
|
|
1647
2255
|
]
|
|
1648
2256
|
}
|
|
1649
2257
|
]
|
|
@@ -1660,54 +2268,59 @@ function pGeom3(t, param, suffix = "") {
|
|
|
1660
2268
|
var poleStaticDef = {
|
|
1661
2269
|
pTitle: "Heliostat pole static",
|
|
1662
2270
|
pDescription: "The vertical pole of an heliostat",
|
|
1663
|
-
pDef:
|
|
1664
|
-
pGeom:
|
|
2271
|
+
pDef: pDef4,
|
|
2272
|
+
pGeom: pGeom4
|
|
1665
2273
|
};
|
|
1666
2274
|
|
|
1667
2275
|
// src/heliostat/rake.ts
|
|
1668
2276
|
import {
|
|
1669
|
-
contour as
|
|
1670
|
-
contourCircle as
|
|
1671
|
-
figure as
|
|
1672
|
-
radToDeg as
|
|
1673
|
-
ffix as
|
|
1674
|
-
pNumber as
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
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
|
|
1678
2287
|
} from "geometrix";
|
|
1679
|
-
var
|
|
2288
|
+
var pDef5 = {
|
|
1680
2289
|
partName: "rake",
|
|
1681
2290
|
params: [
|
|
1682
2291
|
//pNumber(name, unit, init, min, max, step)
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
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)
|
|
1711
2324
|
],
|
|
1712
2325
|
paramSvg: {
|
|
1713
2326
|
D1: "rake_face.svg",
|
|
@@ -1746,19 +2359,19 @@ var pDef4 = {
|
|
|
1746
2359
|
// every 0.5 second
|
|
1747
2360
|
}
|
|
1748
2361
|
};
|
|
1749
|
-
function
|
|
1750
|
-
const rGeome =
|
|
2362
|
+
function pGeom5(t, param, suffix = "") {
|
|
2363
|
+
const rGeome = initGeom5(pDef5.partName + suffix);
|
|
1751
2364
|
let ctrCone;
|
|
1752
2365
|
let ctrConePlus;
|
|
1753
2366
|
let ctrRect;
|
|
1754
|
-
const figCone =
|
|
1755
|
-
const figBeam =
|
|
1756
|
-
const figBeamHollow =
|
|
1757
|
-
const figDisc =
|
|
1758
|
-
const figHand =
|
|
1759
|
-
const figWing =
|
|
1760
|
-
const figWingHollow =
|
|
1761
|
-
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();
|
|
1762
2375
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
1763
2376
|
`;
|
|
1764
2377
|
try {
|
|
@@ -1772,9 +2385,9 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1772
2385
|
const R8 = param.D8 / 2;
|
|
1773
2386
|
const H1H2 = param.H1 + param.H2;
|
|
1774
2387
|
const H1H5 = H1H2 - param.H4 + param.H5;
|
|
1775
|
-
rGeome.logstr += `cone-height: ${
|
|
2388
|
+
rGeome.logstr += `cone-height: ${ffix7(H1H2)} mm
|
|
1776
2389
|
`;
|
|
1777
|
-
rGeome.logstr += `cone-height total: ${
|
|
2390
|
+
rGeome.logstr += `cone-height total: ${ffix7(H1H5)} mm
|
|
1778
2391
|
`;
|
|
1779
2392
|
if (param.D2 > param.D1) {
|
|
1780
2393
|
throw `err110: D2 ${param.D2} is larger than D1 ${param.D1}`;
|
|
@@ -1808,12 +2421,12 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1808
2421
|
throw `err140: H2 ${param.H2} too small compare to L8 ${param.L8}, H4 ${param.H4} and D4 ${param.D4}`;
|
|
1809
2422
|
}
|
|
1810
2423
|
const coneAngle = Math.atan2(R1 - R2, param.H2);
|
|
1811
|
-
rGeome.logstr += `cone-angle: ${
|
|
2424
|
+
rGeome.logstr += `cone-angle: ${ffix7(radToDeg4(coneAngle))} degree
|
|
1812
2425
|
`;
|
|
1813
2426
|
const wingLx = beamL / 2 - param.L7 - R1 + param.L8 * Math.tan(coneAngle);
|
|
1814
2427
|
const wingL = Math.sqrt(wingLx ** 2 + wingLy ** 2);
|
|
1815
2428
|
const wingAngle = Math.atan2(wingLx, wingLy);
|
|
1816
|
-
rGeome.logstr += `wing-angle: ${
|
|
2429
|
+
rGeome.logstr += `wing-angle: ${ffix7(radToDeg4(wingAngle))} degree
|
|
1817
2430
|
`;
|
|
1818
2431
|
const wingLPre = param.E1 / Math.sin(wingAngle + coneAngle);
|
|
1819
2432
|
const wingL2 = wingL + param.E4 / Math.cos(wingAngle) + wingLPre;
|
|
@@ -1837,11 +2450,11 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1837
2450
|
const coneSlopeY = param.E1 * Math.sin(coneAngle);
|
|
1838
2451
|
const coneFC = param.E1 * Math.tan(coneAngle / 2);
|
|
1839
2452
|
ctrCone = function(orient) {
|
|
1840
|
-
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();
|
|
1841
2454
|
return rCtr;
|
|
1842
2455
|
};
|
|
1843
2456
|
ctrConePlus = function(orient) {
|
|
1844
|
-
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();
|
|
1845
2458
|
return rCtr;
|
|
1846
2459
|
};
|
|
1847
2460
|
ctrRect = function(width, height, xpos, ypos, angle) {
|
|
@@ -1849,10 +2462,10 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1849
2462
|
const yWidth = width * Math.sin(angle);
|
|
1850
2463
|
const xHeight = -height * Math.sin(angle);
|
|
1851
2464
|
const yHeight = height * Math.cos(angle);
|
|
1852
|
-
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();
|
|
1853
2466
|
return rCtr;
|
|
1854
2467
|
};
|
|
1855
|
-
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();
|
|
1856
2469
|
figCone.addMain(ctrCone(1));
|
|
1857
2470
|
figCone.addSecond(ctrConePlus(1));
|
|
1858
2471
|
figCone.addSecond(ctrConePlus(-1));
|
|
@@ -1870,30 +2483,30 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1870
2483
|
figCone.addSecond(ctrRect(2 * R6, wingL2, -wingPosX, wingPosY, wingAngle));
|
|
1871
2484
|
figCone.addSecond(ctrRect(2 * wingHR, wingL2, -wingHPosX, wingHPosY, wingAngle));
|
|
1872
2485
|
figCone.addSecond(ctrDoor);
|
|
1873
|
-
const ctrHand =
|
|
1874
|
-
figBeam.addMain(
|
|
1875
|
-
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));
|
|
1876
2489
|
figBeam.addSecond(ctrConePlus(1));
|
|
1877
2490
|
figBeam.addSecond(ctrConePlus(-1));
|
|
1878
2491
|
figBeam.addSecond(ctrHand);
|
|
1879
|
-
figBeam.addSecond(
|
|
2492
|
+
figBeam.addSecond(contourCircle5(0, beamH + param.H5, R5));
|
|
1880
2493
|
figBeam.addSecond(ctrRect(2 * R6, wingLy, -R6, param.H1 + param.L8, 0));
|
|
1881
2494
|
figBeam.addSecond(ctrRect(2 * wingHR, wingLy, -wingHR, param.H1 + param.L8, 0));
|
|
1882
2495
|
figBeam.addSecond(ctrDoor);
|
|
1883
|
-
figBeamHollow.addMain(
|
|
1884
|
-
figBeamHollow.addSecond(
|
|
2496
|
+
figBeamHollow.addMain(contourCircle5(0, beamH, R4 - param.E4));
|
|
2497
|
+
figBeamHollow.addSecond(contourCircle5(0, beamH, R4));
|
|
1885
2498
|
figBeamHollow.addSecond(ctrHand);
|
|
1886
|
-
figDisc.addMain(
|
|
1887
|
-
figDisc.addMain(
|
|
2499
|
+
figDisc.addMain(contourCircle5(0, 0, R1));
|
|
2500
|
+
figDisc.addMain(contourCircle5(0, 0, R3));
|
|
1888
2501
|
const posR = R3 + param.L1;
|
|
1889
2502
|
const posA = 2 * Math.PI / param.N1;
|
|
1890
2503
|
for (let i = 0; i < param.N1; i++) {
|
|
1891
2504
|
const posX = posR * Math.cos(i * posA);
|
|
1892
2505
|
const posY = posR * Math.sin(i * posA);
|
|
1893
|
-
figDisc.addMain(
|
|
2506
|
+
figDisc.addMain(contourCircle5(posX, posY, R7));
|
|
1894
2507
|
}
|
|
1895
|
-
figDisc.addSecond(
|
|
1896
|
-
figDisc.addSecond(
|
|
2508
|
+
figDisc.addSecond(contourCircle5(0, 0, R1 - param.E1));
|
|
2509
|
+
figDisc.addSecond(contourCircle5(0, 0, R2));
|
|
1897
2510
|
figDisc.addSecond(ctrRect(param.D4, beamL, -R4, -beamL / 2, 0));
|
|
1898
2511
|
figDisc.addSecond(ctrRect(param.D4 - 2 * param.E4, beamL, -R4 + param.E4, -beamL / 2, 0));
|
|
1899
2512
|
for (const posX of handPos) {
|
|
@@ -1912,13 +2525,13 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1912
2525
|
ctrRect(2 * wingHR, wingLx, -wingHR, -R1 + param.L8 * Math.tan(coneAngle) - wingLx, 0)
|
|
1913
2526
|
);
|
|
1914
2527
|
figHand.addMain(ctrHand);
|
|
1915
|
-
figHand.addSecond(
|
|
1916
|
-
figHand.addSecond(
|
|
1917
|
-
figHand.addSecond(
|
|
1918
|
-
figWing.addMain(
|
|
1919
|
-
figWing.addMain(
|
|
1920
|
-
figWingHollow.addSecond(
|
|
1921
|
-
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));
|
|
1922
2535
|
figDoor.addMain(ctrDoor);
|
|
1923
2536
|
figDoor.addSecond(ctrConePlus(1));
|
|
1924
2537
|
figDoor.addSecond(ctrConePlus(-1));
|
|
@@ -1950,7 +2563,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1950
2563
|
const rHand = {
|
|
1951
2564
|
outName: `subpax_${designName}_hand_${idx}`,
|
|
1952
2565
|
face: `${designName}_faceHand`,
|
|
1953
|
-
extrudeMethod:
|
|
2566
|
+
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
1954
2567
|
length: param.L4,
|
|
1955
2568
|
rotate: [Math.PI / 2, 0, 0],
|
|
1956
2569
|
translate: [0, -posX, 0]
|
|
@@ -1962,14 +2575,14 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1962
2575
|
{
|
|
1963
2576
|
outName: `subpax_${designName}_cone`,
|
|
1964
2577
|
face: `${designName}_faceCone`,
|
|
1965
|
-
extrudeMethod:
|
|
2578
|
+
extrudeMethod: EExtrude4.eRotate,
|
|
1966
2579
|
rotate: [0, 0, 0],
|
|
1967
2580
|
translate: [0, 0, 0]
|
|
1968
2581
|
},
|
|
1969
2582
|
{
|
|
1970
2583
|
outName: `subpax_${designName}_beam`,
|
|
1971
2584
|
face: `${designName}_faceBeam`,
|
|
1972
|
-
extrudeMethod:
|
|
2585
|
+
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
1973
2586
|
length: beamL,
|
|
1974
2587
|
rotate: [Math.PI / 2, 0, 0],
|
|
1975
2588
|
translate: [0, beamL / 2, 0]
|
|
@@ -1977,7 +2590,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1977
2590
|
{
|
|
1978
2591
|
outName: `subpax_${designName}_beamHollow`,
|
|
1979
2592
|
face: `${designName}_faceBeamHollow`,
|
|
1980
|
-
extrudeMethod:
|
|
2593
|
+
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
1981
2594
|
length: beamL,
|
|
1982
2595
|
rotate: [Math.PI / 2, 0, 0],
|
|
1983
2596
|
translate: [0, beamL / 2, 0]
|
|
@@ -1985,7 +2598,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1985
2598
|
{
|
|
1986
2599
|
outName: `subpax_${designName}_disc`,
|
|
1987
2600
|
face: `${designName}_faceDisc`,
|
|
1988
|
-
extrudeMethod:
|
|
2601
|
+
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
1989
2602
|
length: param.E3,
|
|
1990
2603
|
rotate: [0, 0, 0],
|
|
1991
2604
|
translate: [0, 0, param.H1 - param.H3 - param.E3]
|
|
@@ -1993,7 +2606,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1993
2606
|
{
|
|
1994
2607
|
outName: `subpax_${designName}_wing_right`,
|
|
1995
2608
|
face: `${designName}_faceWing`,
|
|
1996
|
-
extrudeMethod:
|
|
2609
|
+
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
1997
2610
|
length: wingL2,
|
|
1998
2611
|
rotate: [-wingAngle, 0, 0],
|
|
1999
2612
|
translate: [0, wingCPosX, wingCPosY]
|
|
@@ -2001,7 +2614,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2001
2614
|
{
|
|
2002
2615
|
outName: `subpax_${designName}_wing_left`,
|
|
2003
2616
|
face: `${designName}_faceWing`,
|
|
2004
|
-
extrudeMethod:
|
|
2617
|
+
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
2005
2618
|
length: wingL2,
|
|
2006
2619
|
rotate: [wingAngle, 0, 0],
|
|
2007
2620
|
translate: [0, -wingCPosX, wingCPosY]
|
|
@@ -2009,7 +2622,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2009
2622
|
{
|
|
2010
2623
|
outName: `subpax_${designName}_wing_hollow_right`,
|
|
2011
2624
|
face: `${designName}_faceWingHollow`,
|
|
2012
|
-
extrudeMethod:
|
|
2625
|
+
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
2013
2626
|
length: wingL2,
|
|
2014
2627
|
rotate: [-wingAngle, 0, 0],
|
|
2015
2628
|
translate: [0, wingCPosX, wingCPosY]
|
|
@@ -2017,7 +2630,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2017
2630
|
{
|
|
2018
2631
|
outName: `subpax_${designName}_wing_hollow_left`,
|
|
2019
2632
|
face: `${designName}_faceWingHollow`,
|
|
2020
|
-
extrudeMethod:
|
|
2633
|
+
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
2021
2634
|
length: wingL2,
|
|
2022
2635
|
rotate: [wingAngle, 0, 0],
|
|
2023
2636
|
translate: [0, -wingCPosX, wingCPosY]
|
|
@@ -2025,7 +2638,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2025
2638
|
{
|
|
2026
2639
|
outName: `subpax_${designName}_door`,
|
|
2027
2640
|
face: `${designName}_faceDoor`,
|
|
2028
|
-
extrudeMethod:
|
|
2641
|
+
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
2029
2642
|
length: param.D1,
|
|
2030
2643
|
rotate: [Math.PI / 2, 0, Math.PI / 2],
|
|
2031
2644
|
translate: [0, 0, 0]
|
|
@@ -2035,7 +2648,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2035
2648
|
volumes: [
|
|
2036
2649
|
{
|
|
2037
2650
|
outName: `ipax_${designName}_plus`,
|
|
2038
|
-
boolMethod:
|
|
2651
|
+
boolMethod: EBVolume5.eUnion,
|
|
2039
2652
|
inList: [
|
|
2040
2653
|
`subpax_${designName}_cone`,
|
|
2041
2654
|
`subpax_${designName}_beam`,
|
|
@@ -2050,7 +2663,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2050
2663
|
},
|
|
2051
2664
|
{
|
|
2052
2665
|
outName: `ipax_${designName}_hollow`,
|
|
2053
|
-
boolMethod:
|
|
2666
|
+
boolMethod: EBVolume5.eUnion,
|
|
2054
2667
|
inList: [
|
|
2055
2668
|
`subpax_${designName}_beamHollow`,
|
|
2056
2669
|
`subpax_${designName}_wing_hollow_right`,
|
|
@@ -2060,7 +2673,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2060
2673
|
},
|
|
2061
2674
|
{
|
|
2062
2675
|
outName: `pax_${designName}`,
|
|
2063
|
-
boolMethod:
|
|
2676
|
+
boolMethod: EBVolume5.eSubstraction,
|
|
2064
2677
|
inList: [`ipax_${designName}_plus`, `ipax_${designName}_hollow`]
|
|
2065
2678
|
}
|
|
2066
2679
|
]
|
|
@@ -2076,41 +2689,44 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2076
2689
|
}
|
|
2077
2690
|
var rakeDef = {
|
|
2078
2691
|
pTitle: "Heliostat rake",
|
|
2079
|
-
pDescription: "The rake on top of the
|
|
2080
|
-
pDef:
|
|
2081
|
-
pGeom:
|
|
2692
|
+
pDescription: "The rake on top of the V-Axis of the heliostat",
|
|
2693
|
+
pDef: pDef5,
|
|
2694
|
+
pGeom: pGeom5
|
|
2082
2695
|
};
|
|
2083
2696
|
|
|
2084
2697
|
// src/heliostat/spider.ts
|
|
2085
2698
|
import {
|
|
2086
|
-
contour as
|
|
2087
|
-
contourCircle as
|
|
2088
|
-
figure as
|
|
2089
|
-
radToDeg as
|
|
2090
|
-
ffix as
|
|
2091
|
-
pNumber as
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
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
|
|
2709
|
+
} from "geometrix";
|
|
2710
|
+
var pDef6 = {
|
|
2711
|
+
partName: "spider",
|
|
2712
|
+
params: [
|
|
2713
|
+
//pNumber(name, unit, init, min, max, step)
|
|
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)
|
|
2728
|
+
],
|
|
2729
|
+
paramSvg: {
|
|
2114
2730
|
D1: "spider_profile.svg",
|
|
2115
2731
|
L1: "spider_profile.svg",
|
|
2116
2732
|
L2: "spider_profile.svg",
|
|
@@ -2131,13 +2747,13 @@ var pDef5 = {
|
|
|
2131
2747
|
// every 0.5 second
|
|
2132
2748
|
}
|
|
2133
2749
|
};
|
|
2134
|
-
function
|
|
2135
|
-
const rGeome =
|
|
2750
|
+
function pGeom6(t, param, suffix = "") {
|
|
2751
|
+
const rGeome = initGeom6(pDef6.partName + suffix);
|
|
2136
2752
|
let ctrSquare;
|
|
2137
2753
|
let ctrRect;
|
|
2138
|
-
const figLegs =
|
|
2139
|
-
const figTube =
|
|
2140
|
-
const figBody =
|
|
2754
|
+
const figLegs = figure6();
|
|
2755
|
+
const figTube = figure6();
|
|
2756
|
+
const figBody = figure6();
|
|
2141
2757
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
2142
2758
|
`;
|
|
2143
2759
|
try {
|
|
@@ -2180,27 +2796,27 @@ function pGeom5(t, param, suffix = "") {
|
|
|
2180
2796
|
}
|
|
2181
2797
|
const legPos = [...Array(param.N1).keys()].map((i) => i * legStep);
|
|
2182
2798
|
ctrSquare = function(sx, sy, sl) {
|
|
2183
|
-
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();
|
|
2184
2800
|
return rCtr;
|
|
2185
2801
|
};
|
|
2186
2802
|
ctrRect = function(width, height, xpos, ypos) {
|
|
2187
|
-
const rCtr =
|
|
2803
|
+
const rCtr = contour8(xpos, ypos).addSegStrokeA(xpos + width, ypos).addSegStrokeA(xpos + width, ypos + height).addSegStrokeA(xpos, ypos + height).closeSegStroke();
|
|
2188
2804
|
return rCtr;
|
|
2189
2805
|
};
|
|
2190
|
-
const posAngle = Math.sin(2 * Math.PI * t /
|
|
2806
|
+
const posAngle = Math.sin(2 * Math.PI * t / pDef6.sim.tMax) * Math.PI / 2;
|
|
2191
2807
|
rGeome.logstr += `spide leg number: ${param.N1}
|
|
2192
2808
|
`;
|
|
2193
|
-
rGeome.logstr += `spide position angle: ${
|
|
2809
|
+
rGeome.logstr += `spide position angle: ${ffix8(radToDeg5(posAngle))} degree
|
|
2194
2810
|
`;
|
|
2195
|
-
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);
|
|
2196
2812
|
figLegs.addMain(ctrLeg);
|
|
2197
|
-
figLegs.addMain(
|
|
2813
|
+
figLegs.addMain(contourCircle6(0, 0, R1 - param.E1));
|
|
2198
2814
|
figLegs.addSecond(ctrSquare(squareX, squareY, param.L3));
|
|
2199
2815
|
figLegs.addSecond(ctrSquare(squareX, squareY2, param.L3 - 2 * param.E3));
|
|
2200
2816
|
figLegs.addSecond(ctrSquare(-squareX, squareY, param.L3));
|
|
2201
2817
|
figLegs.addSecond(ctrSquare(-squareX, squareY2, param.L3 - 2 * param.E3));
|
|
2202
|
-
figTube.addMain(
|
|
2203
|
-
figTube.addMain(
|
|
2818
|
+
figTube.addMain(contourCircle6(0, 0, R1));
|
|
2819
|
+
figTube.addMain(contourCircle6(0, 0, R1 - param.E1));
|
|
2204
2820
|
figTube.addMain(ctrSquare(squareX, squareY, param.L3));
|
|
2205
2821
|
figTube.addMain(ctrSquare(squareX, squareY2, param.L3 - 2 * param.E3));
|
|
2206
2822
|
figTube.addMain(ctrSquare(-squareX, squareY, param.L3));
|
|
@@ -2221,7 +2837,7 @@ function pGeom5(t, param, suffix = "") {
|
|
|
2221
2837
|
const rElem = {
|
|
2222
2838
|
outName: `subpax_${designName}_leg_${idx}`,
|
|
2223
2839
|
face: `${designName}_faceLegs`,
|
|
2224
|
-
extrudeMethod:
|
|
2840
|
+
extrudeMethod: EExtrude5.eLinearOrtho,
|
|
2225
2841
|
length: param.L6,
|
|
2226
2842
|
rotate: [0, 0, 0],
|
|
2227
2843
|
translate: [0, 0, posX]
|
|
@@ -2237,7 +2853,7 @@ function pGeom5(t, param, suffix = "") {
|
|
|
2237
2853
|
{
|
|
2238
2854
|
outName: `subpax_${designName}_tube`,
|
|
2239
2855
|
face: `${designName}_faceTube`,
|
|
2240
|
-
extrudeMethod:
|
|
2856
|
+
extrudeMethod: EExtrude5.eLinearOrtho,
|
|
2241
2857
|
length: param.L5,
|
|
2242
2858
|
rotate: [0, 0, 0],
|
|
2243
2859
|
translate: [0, 0, 0]
|
|
@@ -2247,7 +2863,7 @@ function pGeom5(t, param, suffix = "") {
|
|
|
2247
2863
|
volumes: [
|
|
2248
2864
|
{
|
|
2249
2865
|
outName: `pax_${designName}`,
|
|
2250
|
-
boolMethod:
|
|
2866
|
+
boolMethod: EBVolume6.eUnion,
|
|
2251
2867
|
inList: [`subpax_${designName}_tube`, ...legList]
|
|
2252
2868
|
}
|
|
2253
2869
|
]
|
|
@@ -2264,43 +2880,52 @@ function pGeom5(t, param, suffix = "") {
|
|
|
2264
2880
|
var spiderDef = {
|
|
2265
2881
|
pTitle: "Heliostat spider",
|
|
2266
2882
|
pDescription: "The spider part for the control of the inclination of the heliostat",
|
|
2267
|
-
pDef:
|
|
2268
|
-
pGeom:
|
|
2883
|
+
pDef: pDef6,
|
|
2884
|
+
pGeom: pGeom6
|
|
2269
2885
|
};
|
|
2270
2886
|
|
|
2271
2887
|
// src/heliostat/swing.ts
|
|
2272
2888
|
import {
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
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
|
|
2281
2900
|
} from "geometrix";
|
|
2282
|
-
var
|
|
2901
|
+
var pDef7 = {
|
|
2283
2902
|
partName: "swing",
|
|
2284
2903
|
params: [
|
|
2285
2904
|
//pNumber(name, unit, init, min, max, step)
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
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)
|
|
2304
2929
|
],
|
|
2305
2930
|
paramSvg: {
|
|
2306
2931
|
L1: "swing_top.svg",
|
|
@@ -2317,6 +2942,8 @@ var pDef6 = {
|
|
|
2317
2942
|
E1: "swing_side.svg",
|
|
2318
2943
|
E2: "swing_side.svg",
|
|
2319
2944
|
E3: "swing_face.svg",
|
|
2945
|
+
S1: "swing_buttress.svg",
|
|
2946
|
+
R2: "swing_buttress.svg",
|
|
2320
2947
|
rod1: "swing_with_rod.svg",
|
|
2321
2948
|
rod2: "swing_with_rod.svg",
|
|
2322
2949
|
rod3: "swing_with_rod.svg",
|
|
@@ -2329,30 +2956,21 @@ var pDef6 = {
|
|
|
2329
2956
|
// every 0.5 second
|
|
2330
2957
|
}
|
|
2331
2958
|
};
|
|
2332
|
-
function
|
|
2333
|
-
const rGeome =
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
const
|
|
2337
|
-
const
|
|
2338
|
-
const
|
|
2339
|
-
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();
|
|
2340
2966
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
2341
2967
|
`;
|
|
2342
2968
|
try {
|
|
2343
2969
|
const R1 = param.D1 / 2;
|
|
2344
|
-
rGeome.logstr += `swing size: L1 ${
|
|
2970
|
+
rGeome.logstr += `swing size: L1 ${ffix9(param.L1)} x L2 ${ffix9(param.L2)} mm
|
|
2345
2971
|
`;
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
return rRect;
|
|
2349
|
-
};
|
|
2350
|
-
ctrRectRound = function(px, py, lx, ly, round) {
|
|
2351
|
-
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();
|
|
2352
|
-
return rRect;
|
|
2353
|
-
};
|
|
2354
|
-
figSide.addMain(contourCircle6(0, 0, R1));
|
|
2355
|
-
figSide.addMain(contourCircle6(0, 0, R1 - param.E1));
|
|
2972
|
+
figSide.addMain(contourCircle7(0, 0, R1));
|
|
2973
|
+
figSide.addMain(contourCircle7(0, 0, R1 - param.E1));
|
|
2356
2974
|
const sidePx = [-param.L2 / 2, -param.L3 - param.H2, param.L3, param.L2 / 2 - param.H2];
|
|
2357
2975
|
for (const px of sidePx) {
|
|
2358
2976
|
figSide.addMain(ctrRectangle(px, R1 - param.H4, param.H2, param.H4));
|
|
@@ -2399,6 +3017,14 @@ function pGeom6(t, param, suffix = "") {
|
|
|
2399
3017
|
figTop.addSecond(ctrRectangle(-param.L1 / 2, py, param.L1, param.H2));
|
|
2400
3018
|
}
|
|
2401
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));
|
|
2402
3028
|
for (const px of facePx) {
|
|
2403
3029
|
figTopWithRod.addMain(ctrRectangle(px, -param.L2 / 2, param.H1, param.L2));
|
|
2404
3030
|
}
|
|
@@ -2417,7 +3043,7 @@ function pGeom6(t, param, suffix = "") {
|
|
|
2417
3043
|
figTopWithRod.addSecond(ctrRectangle(px + rodOffset, rodPy0, param.rod4, rodLength));
|
|
2418
3044
|
for (let j = 0; j < 4; j++) {
|
|
2419
3045
|
figTopWithRod.addSecond(
|
|
2420
|
-
|
|
3046
|
+
ctrRectangle(px, rodPy0 + j * rodPyStep, param.rod3, rodPlateH, rodPlateH / 4)
|
|
2421
3047
|
);
|
|
2422
3048
|
}
|
|
2423
3049
|
}
|
|
@@ -2425,6 +3051,7 @@ function pGeom6(t, param, suffix = "") {
|
|
|
2425
3051
|
faceSide: figSide,
|
|
2426
3052
|
faceFace: figFace,
|
|
2427
3053
|
faceTop: figTop,
|
|
3054
|
+
faceButtress: figButtress,
|
|
2428
3055
|
faceTopWithRods: figTopWithRod
|
|
2429
3056
|
};
|
|
2430
3057
|
const designName = rGeome.partName;
|
|
@@ -2433,7 +3060,7 @@ function pGeom6(t, param, suffix = "") {
|
|
|
2433
3060
|
{
|
|
2434
3061
|
outName: `subpax_${designName}_side`,
|
|
2435
3062
|
face: `${designName}_faceSide`,
|
|
2436
|
-
extrudeMethod:
|
|
3063
|
+
extrudeMethod: EExtrude6.eLinearOrtho,
|
|
2437
3064
|
length: param.L1,
|
|
2438
3065
|
rotate: [0, 0, 0],
|
|
2439
3066
|
translate: [0, 0, -param.L1 / 2]
|
|
@@ -2441,7 +3068,7 @@ function pGeom6(t, param, suffix = "") {
|
|
|
2441
3068
|
{
|
|
2442
3069
|
outName: `subpax_${designName}_face`,
|
|
2443
3070
|
face: `${designName}_faceFace`,
|
|
2444
|
-
extrudeMethod:
|
|
3071
|
+
extrudeMethod: EExtrude6.eLinearOrtho,
|
|
2445
3072
|
length: param.L2,
|
|
2446
3073
|
rotate: [0, Math.PI / 2, 0],
|
|
2447
3074
|
translate: [-param.L2 / 2, 0, 0]
|
|
@@ -2450,7 +3077,7 @@ function pGeom6(t, param, suffix = "") {
|
|
|
2450
3077
|
volumes: [
|
|
2451
3078
|
{
|
|
2452
3079
|
outName: `pax_${designName}`,
|
|
2453
|
-
boolMethod:
|
|
3080
|
+
boolMethod: EBVolume7.eUnion,
|
|
2454
3081
|
inList: [`subpax_${designName}_side`, `subpax_${designName}_face`]
|
|
2455
3082
|
}
|
|
2456
3083
|
]
|
|
@@ -2467,47 +3094,52 @@ function pGeom6(t, param, suffix = "") {
|
|
|
2467
3094
|
var swingDef = {
|
|
2468
3095
|
pTitle: "Heliostat swing",
|
|
2469
3096
|
pDescription: "The swing for the heliostat inclination",
|
|
2470
|
-
pDef:
|
|
2471
|
-
pGeom:
|
|
3097
|
+
pDef: pDef7,
|
|
3098
|
+
pGeom: pGeom7
|
|
2472
3099
|
};
|
|
2473
3100
|
|
|
2474
3101
|
// src/heliostat/heliostat.ts
|
|
2475
|
-
var
|
|
3102
|
+
var pDef8 = {
|
|
2476
3103
|
partName: "heliostat",
|
|
2477
3104
|
params: [
|
|
2478
3105
|
//pNumber(name, unit, init, min, max, step)
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
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)
|
|
2511
3143
|
],
|
|
2512
3144
|
paramSvg: {
|
|
2513
3145
|
H1: "heliostat_overview.svg",
|
|
@@ -2550,30 +3182,30 @@ var pDef7 = {
|
|
|
2550
3182
|
// every 0.5 second
|
|
2551
3183
|
}
|
|
2552
3184
|
};
|
|
2553
|
-
function
|
|
2554
|
-
const rGeome =
|
|
2555
|
-
const figSide =
|
|
2556
|
-
const figFace =
|
|
3185
|
+
function pGeom8(t, param, suffix = "") {
|
|
3186
|
+
const rGeome = initGeom8(pDef8.partName + suffix);
|
|
3187
|
+
const figSide = figure8();
|
|
3188
|
+
const figFace = figure8();
|
|
2557
3189
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
2558
3190
|
`;
|
|
2559
3191
|
try {
|
|
2560
3192
|
const helioHeight = param.H1 + param.H2 - param.H3 + param.H4 + param.H5 - param.H6 + param.H7;
|
|
2561
|
-
rGeome.logstr += `heliostat-height: ${
|
|
3193
|
+
rGeome.logstr += `heliostat-height: ${ffix10(helioHeight)}, diameter ${ffix10(param.D1)} m
|
|
2562
3194
|
`;
|
|
2563
|
-
rGeome.logstr += `heliostat-swing-length: ${
|
|
3195
|
+
rGeome.logstr += `heliostat-swing-length: ${ffix10(param.L1)}, width ${ffix10(param.L2)} m
|
|
2564
3196
|
`;
|
|
2565
3197
|
const posAngleMid = (param.al - param.ar) / 2;
|
|
2566
|
-
const posAngleDegree = posAngleMid - Math.sin(2 * Math.PI * t /
|
|
2567
|
-
const posAngle =
|
|
2568
|
-
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
|
|
2569
3201
|
`;
|
|
2570
3202
|
const rakePosY = param.H1 + param.H2 - param.H3;
|
|
2571
3203
|
const spiderPosY = rakePosY + param.H4 + param.H5 - param.H6 + param.H7;
|
|
2572
3204
|
const swingPosY = spiderPosY + param.H8;
|
|
2573
|
-
const poleStaticParam =
|
|
2574
|
-
const rakeParam =
|
|
2575
|
-
const spiderParam =
|
|
2576
|
-
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);
|
|
2577
3209
|
poleStaticParam.setVal("H1", param.H1);
|
|
2578
3210
|
poleStaticParam.setVal("H2", param.H2);
|
|
2579
3211
|
poleStaticParam.setVal("D1", param.D1);
|
|
@@ -2591,6 +3223,7 @@ function pGeom7(t, param, suffix = "") {
|
|
|
2591
3223
|
poleStaticParam.setVal("D4", param.H1 / 4);
|
|
2592
3224
|
poleStaticParam.setVal("L2", param.H1 / 80);
|
|
2593
3225
|
poleStaticParam.setVal("E3", param.H1 / 80);
|
|
3226
|
+
poleStaticParam.setVal("holders", 0);
|
|
2594
3227
|
rakeParam.setVal("H1", param.H4);
|
|
2595
3228
|
rakeParam.setVal("H2", param.H5);
|
|
2596
3229
|
rakeParam.setVal("H3", param.H4 - 2 * param.E1);
|
|
@@ -2664,17 +3297,17 @@ function pGeom7(t, param, suffix = "") {
|
|
|
2664
3297
|
poleStaticParam.getParamVal(),
|
|
2665
3298
|
poleStaticParam.getSuffix()
|
|
2666
3299
|
);
|
|
2667
|
-
|
|
2668
|
-
rGeome.logstr +=
|
|
3300
|
+
checkGeom3(poleStaticGeom);
|
|
3301
|
+
rGeome.logstr += prefixLog3(poleStaticGeom.logstr, poleStaticParam.getPartNameSuffix());
|
|
2669
3302
|
const rakeGeom = rakeDef.pGeom(0, rakeParam.getParamVal(), rakeParam.getSuffix());
|
|
2670
|
-
|
|
2671
|
-
rGeome.logstr +=
|
|
3303
|
+
checkGeom3(rakeGeom);
|
|
3304
|
+
rGeome.logstr += prefixLog3(rakeGeom.logstr, rakeParam.getPartNameSuffix());
|
|
2672
3305
|
const spiderGeom = spiderDef.pGeom(0, spiderParam.getParamVal(), spiderParam.getSuffix());
|
|
2673
|
-
|
|
2674
|
-
rGeome.logstr +=
|
|
3306
|
+
checkGeom3(spiderGeom);
|
|
3307
|
+
rGeome.logstr += prefixLog3(spiderGeom.logstr, spiderParam.getPartNameSuffix());
|
|
2675
3308
|
const swingGeom = swingDef.pGeom(0, swingParam.getParamVal(), swingParam.getSuffix());
|
|
2676
|
-
|
|
2677
|
-
rGeome.logstr +=
|
|
3309
|
+
checkGeom3(swingGeom);
|
|
3310
|
+
rGeome.logstr += prefixLog3(swingGeom.logstr, swingParam.getPartNameSuffix());
|
|
2678
3311
|
figSide.mergeFigure(poleStaticGeom.fig.poleCut);
|
|
2679
3312
|
figSide.mergeFigure(rakeGeom.fig.faceBeam.translate(0, rakePosY));
|
|
2680
3313
|
figSide.mergeFigure(
|
|
@@ -2727,7 +3360,7 @@ function pGeom7(t, param, suffix = "") {
|
|
|
2727
3360
|
volumes: [
|
|
2728
3361
|
{
|
|
2729
3362
|
outName: `pax_${designName}`,
|
|
2730
|
-
boolMethod:
|
|
3363
|
+
boolMethod: EBVolume8.eUnion,
|
|
2731
3364
|
inList: [
|
|
2732
3365
|
`inpax_${designName}_poleStatic`,
|
|
2733
3366
|
`inpax_${designName}_rake`,
|
|
@@ -2778,74 +3411,81 @@ function pGeom7(t, param, suffix = "") {
|
|
|
2778
3411
|
var heliostatDef = {
|
|
2779
3412
|
pTitle: "Heliostat overview",
|
|
2780
3413
|
pDescription: "The heliostat inclination mechanism",
|
|
2781
|
-
pDef:
|
|
2782
|
-
pGeom:
|
|
3414
|
+
pDef: pDef8,
|
|
3415
|
+
pGeom: pGeom8
|
|
2783
3416
|
};
|
|
2784
3417
|
|
|
2785
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
|
|
2786
3434
|
import {
|
|
2787
3435
|
designParam as designParam4,
|
|
2788
3436
|
checkGeom as checkGeom4,
|
|
2789
3437
|
prefixLog as prefixLog4,
|
|
3438
|
+
contour as contour10,
|
|
3439
|
+
contourCircle as contourCircle8,
|
|
2790
3440
|
figure as figure9,
|
|
2791
|
-
degToRad as degToRad3,
|
|
2792
3441
|
radToDeg as radToDeg7,
|
|
2793
|
-
ffix as
|
|
3442
|
+
ffix as ffix11,
|
|
2794
3443
|
pNumber as pNumber9,
|
|
3444
|
+
pSectionSeparator as pSectionSeparator8,
|
|
2795
3445
|
initGeom as initGeom9,
|
|
3446
|
+
EExtrude as EExtrude7,
|
|
2796
3447
|
EBVolume as EBVolume9
|
|
2797
3448
|
} from "geometrix";
|
|
2798
|
-
|
|
2799
|
-
// src/heliostat/rake_stopper.ts
|
|
2800
|
-
import {
|
|
2801
|
-
designParam as designParam3,
|
|
2802
|
-
checkGeom as checkGeom3,
|
|
2803
|
-
prefixLog as prefixLog3,
|
|
2804
|
-
contour as contour8,
|
|
2805
|
-
contourCircle as contourCircle7,
|
|
2806
|
-
figure as figure8,
|
|
2807
|
-
radToDeg as radToDeg6,
|
|
2808
|
-
ffix as ffix9,
|
|
2809
|
-
pNumber as pNumber8,
|
|
2810
|
-
initGeom as initGeom8,
|
|
2811
|
-
EExtrude as EExtrude6,
|
|
2812
|
-
EBVolume as EBVolume8
|
|
2813
|
-
} from "geometrix";
|
|
2814
|
-
var pDef8 = {
|
|
3449
|
+
var pDef9 = {
|
|
2815
3450
|
partName: "rake_stopper",
|
|
2816
3451
|
params: [
|
|
2817
3452
|
//pNumber(name, unit, init, min, max, step)
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
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)
|
|
2849
3489
|
],
|
|
2850
3490
|
paramSvg: {
|
|
2851
3491
|
D1: "rake_face.svg",
|
|
@@ -2887,33 +3527,33 @@ var pDef8 = {
|
|
|
2887
3527
|
// every 0.5 second
|
|
2888
3528
|
}
|
|
2889
3529
|
};
|
|
2890
|
-
function
|
|
2891
|
-
const rGeome =
|
|
3530
|
+
function pGeom9(t, param, suffix = "") {
|
|
3531
|
+
const rGeome = initGeom9(pDef9.partName + suffix);
|
|
2892
3532
|
let ctrRect;
|
|
2893
|
-
const figCone =
|
|
2894
|
-
const figBeam =
|
|
2895
|
-
const figBeamHollow =
|
|
2896
|
-
const figDisc =
|
|
2897
|
-
const figHand =
|
|
2898
|
-
const figWing =
|
|
2899
|
-
const figWingHollow =
|
|
2900
|
-
const figDoor =
|
|
2901
|
-
const figStopperTop =
|
|
2902
|
-
const figStopperSide =
|
|
2903
|
-
const figStopperSideH =
|
|
2904
|
-
const figStopperFaceT =
|
|
2905
|
-
const figStopperFaceTH =
|
|
2906
|
-
const figStopperFaceB =
|
|
2907
|
-
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();
|
|
2908
3548
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
2909
3549
|
`;
|
|
2910
3550
|
try {
|
|
2911
3551
|
const R1 = param.D1 / 2;
|
|
2912
3552
|
const H1H2 = param.H1 + param.H2;
|
|
2913
3553
|
const H1H5 = H1H2 - param.H4 + param.H5;
|
|
2914
|
-
rGeome.logstr += `cone-height: ${
|
|
3554
|
+
rGeome.logstr += `cone-height: ${ffix11(H1H2)} mm
|
|
2915
3555
|
`;
|
|
2916
|
-
rGeome.logstr += `cone-height total: ${
|
|
3556
|
+
rGeome.logstr += `cone-height total: ${ffix11(H1H5)} mm
|
|
2917
3557
|
`;
|
|
2918
3558
|
if (2 * param.E7 >= param.S1) {
|
|
2919
3559
|
throw `err135: E7 ${param.E7} too large compare to S1 ${param.S1}`;
|
|
@@ -2923,7 +3563,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
2923
3563
|
}
|
|
2924
3564
|
const stopper1H = H1H5 - param.S2;
|
|
2925
3565
|
if (stopper1H < 0) {
|
|
2926
|
-
throw `err143: S2 ${param.S2} too large compare to H1H5 ${
|
|
3566
|
+
throw `err143: S2 ${param.S2} too large compare to H1H5 ${ffix11(H1H5)}`;
|
|
2927
3567
|
}
|
|
2928
3568
|
const stopper2H = param.H1 + param.H2 - param.H4 + param.D4 / 2;
|
|
2929
3569
|
const stopper3H = param.H1 + param.L8 - param.S1;
|
|
@@ -2932,10 +3572,10 @@ function pGeom8(t, param, suffix = "") {
|
|
|
2932
3572
|
const yWidth = width * Math.sin(angle);
|
|
2933
3573
|
const xHeight = -height * Math.sin(angle);
|
|
2934
3574
|
const yHeight = height * Math.cos(angle);
|
|
2935
|
-
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();
|
|
2936
3576
|
return rCtr;
|
|
2937
3577
|
};
|
|
2938
|
-
const rakeParam =
|
|
3578
|
+
const rakeParam = designParam4(rakeDef.pDef);
|
|
2939
3579
|
rakeParam.setVal("D1", param.D1);
|
|
2940
3580
|
rakeParam.setVal("D2", param.D2);
|
|
2941
3581
|
rakeParam.setVal("D3", param.D3);
|
|
@@ -2965,8 +3605,8 @@ function pGeom8(t, param, suffix = "") {
|
|
|
2965
3605
|
rakeParam.setVal("L9", param.L9);
|
|
2966
3606
|
rakeParam.setVal("R9", param.R9);
|
|
2967
3607
|
const rakeGeom = rakeDef.pGeom(0, rakeParam.getParamVal(), rakeParam.getSuffix());
|
|
2968
|
-
|
|
2969
|
-
rGeome.logstr +=
|
|
3608
|
+
checkGeom4(rakeGeom);
|
|
3609
|
+
rGeome.logstr += prefixLog4(rakeGeom.logstr, rakeParam.getPartNameSuffix());
|
|
2970
3610
|
figCone.mergeFigure(rakeGeom.fig.faceCone);
|
|
2971
3611
|
figBeam.mergeFigure(rakeGeom.fig.faceBeam);
|
|
2972
3612
|
figBeamHollow.mergeFigure(rakeGeom.fig.faceBeamHollow);
|
|
@@ -2994,17 +3634,17 @@ function pGeom8(t, param, suffix = "") {
|
|
|
2994
3634
|
figStopperTop.addMain(ctrRect(S2s, param.S1, 0, R1, 0));
|
|
2995
3635
|
figStopperTop.addMain(ctrRect(S2s, S1h, 0, R1 + param.E7, 0));
|
|
2996
3636
|
figStopperSide.mergeFigure(rakeGeom.fig.faceBeam, true);
|
|
2997
|
-
figStopperSide.addMain(
|
|
2998
|
-
figStopperSide.addMain(
|
|
2999
|
-
figStopperSide.addMain(
|
|
3000
|
-
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));
|
|
3001
3641
|
figStopperSide.addSecond(ctrRect(S2s, param.S1, 0, stopper2H, 0));
|
|
3002
3642
|
figStopperSide.addSecond(ctrRect(S2s, S1h, 0, stopper2H + param.E7, 0));
|
|
3003
3643
|
const stopper3Ly = stopper2H + param.S1 / 2 - stopper3H;
|
|
3004
3644
|
const stopper3L = Math.sqrt(S2s ** 2 + stopper3Ly ** 2);
|
|
3005
3645
|
const stopper3A = Math.atan2(stopper3Ly, S2s);
|
|
3006
|
-
rGeome.logstr += `stopper-rod: L ${
|
|
3007
|
-
|
|
3646
|
+
rGeome.logstr += `stopper-rod: L ${ffix11(stopper3L)} mm, A ${ffix11(
|
|
3647
|
+
radToDeg7(stopper3A)
|
|
3008
3648
|
)} degree
|
|
3009
3649
|
`;
|
|
3010
3650
|
const stp3posdX = S1r * Math.sin(stopper3A);
|
|
@@ -3016,30 +3656,30 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3016
3656
|
const stp3posY2 = stopper3H - stp3posdY2;
|
|
3017
3657
|
figStopperSide.addSecond(ctrRect(stopper3L, S1h, stp3posdX2, stp3posY2, stopper3A));
|
|
3018
3658
|
figStopperSideH.mergeFigure(rakeGeom.fig.faceBeam, true);
|
|
3019
|
-
figStopperSideH.addSecond(
|
|
3020
|
-
figStopperSideH.addMain(
|
|
3021
|
-
figStopperSideH.addSecond(
|
|
3022
|
-
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));
|
|
3023
3663
|
figStopperFaceT.mergeFigure(rakeGeom.fig.faceCone, true);
|
|
3024
|
-
figStopperFaceT.addMain(
|
|
3025
|
-
figStopperFaceT.addMain(
|
|
3026
|
-
figStopperFaceT.addMain(
|
|
3027
|
-
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));
|
|
3028
3668
|
figStopperFaceTH.mergeFigure(rakeGeom.fig.faceCone, true);
|
|
3029
|
-
figStopperFaceTH.addSecond(
|
|
3030
|
-
figStopperFaceTH.addMain(
|
|
3031
|
-
figStopperFaceTH.addSecond(
|
|
3032
|
-
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));
|
|
3033
3673
|
figStopperFaceB.mergeFigure(rakeGeom.fig.faceCone, true);
|
|
3034
|
-
figStopperFaceB.addMain(
|
|
3035
|
-
figStopperFaceB.addMain(
|
|
3036
|
-
figStopperFaceB.addMain(
|
|
3037
|
-
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));
|
|
3038
3678
|
figStopperFaceBH.mergeFigure(rakeGeom.fig.faceCone, true);
|
|
3039
|
-
figStopperFaceBH.addSecond(
|
|
3040
|
-
figStopperFaceBH.addMain(
|
|
3041
|
-
figStopperFaceBH.addSecond(
|
|
3042
|
-
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));
|
|
3043
3683
|
rGeome.fig = {
|
|
3044
3684
|
faceCone: figCone,
|
|
3045
3685
|
faceBeam: figBeam,
|
|
@@ -3072,7 +3712,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3072
3712
|
{
|
|
3073
3713
|
outName: `subpax_${designName}_stpSide`,
|
|
3074
3714
|
face: `${designName}_faceStopperSide`,
|
|
3075
|
-
extrudeMethod:
|
|
3715
|
+
extrudeMethod: EExtrude7.eLinearOrtho,
|
|
3076
3716
|
length: param.L5,
|
|
3077
3717
|
rotate: [Math.PI / 2, 0, 0],
|
|
3078
3718
|
translate: [0, param.L5 / 2, 0]
|
|
@@ -3080,7 +3720,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3080
3720
|
{
|
|
3081
3721
|
outName: `subpax_${designName}_stpSideH`,
|
|
3082
3722
|
face: `${designName}_faceStopperSideH`,
|
|
3083
|
-
extrudeMethod:
|
|
3723
|
+
extrudeMethod: EExtrude7.eLinearOrtho,
|
|
3084
3724
|
length: param.L5,
|
|
3085
3725
|
rotate: [Math.PI / 2, 0, 0],
|
|
3086
3726
|
translate: [0, param.L5 / 2, 0]
|
|
@@ -3088,7 +3728,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3088
3728
|
{
|
|
3089
3729
|
outName: `subpax_${designName}_stpFaceT`,
|
|
3090
3730
|
face: `${designName}_faceStopperFaceT`,
|
|
3091
|
-
extrudeMethod:
|
|
3731
|
+
extrudeMethod: EExtrude7.eLinearOrtho,
|
|
3092
3732
|
length: S2s,
|
|
3093
3733
|
rotate: [Math.PI / 2, 0, Math.PI / 2],
|
|
3094
3734
|
translate: [0, 0, 0]
|
|
@@ -3096,7 +3736,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3096
3736
|
{
|
|
3097
3737
|
outName: `subpax_${designName}_stpFaceTH`,
|
|
3098
3738
|
face: `${designName}_faceStopperFaceTH`,
|
|
3099
|
-
extrudeMethod:
|
|
3739
|
+
extrudeMethod: EExtrude7.eLinearOrtho,
|
|
3100
3740
|
length: S2s,
|
|
3101
3741
|
rotate: [Math.PI / 2, 0, Math.PI / 2],
|
|
3102
3742
|
translate: [0, 0, 0]
|
|
@@ -3104,7 +3744,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3104
3744
|
{
|
|
3105
3745
|
outName: `subpax_${designName}_stpFaceB`,
|
|
3106
3746
|
face: `${designName}_faceStopperFaceB`,
|
|
3107
|
-
extrudeMethod:
|
|
3747
|
+
extrudeMethod: EExtrude7.eLinearOrtho,
|
|
3108
3748
|
length: stopper3L,
|
|
3109
3749
|
rotate: [Math.PI / 2 - stopper3A, 0, Math.PI / 2],
|
|
3110
3750
|
translate: [0, 0, stopper3H]
|
|
@@ -3112,7 +3752,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3112
3752
|
{
|
|
3113
3753
|
outName: `subpax_${designName}_stpFaceBH`,
|
|
3114
3754
|
face: `${designName}_faceStopperFaceBH`,
|
|
3115
|
-
extrudeMethod:
|
|
3755
|
+
extrudeMethod: EExtrude7.eLinearOrtho,
|
|
3116
3756
|
length: stopper3L,
|
|
3117
3757
|
rotate: [Math.PI / 2 - stopper3A, 0, Math.PI / 2],
|
|
3118
3758
|
translate: [0, 0, stopper3H]
|
|
@@ -3121,7 +3761,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3121
3761
|
volumes: [
|
|
3122
3762
|
{
|
|
3123
3763
|
outName: `ipax_${designName}_plus`,
|
|
3124
|
-
boolMethod:
|
|
3764
|
+
boolMethod: EBVolume9.eUnion,
|
|
3125
3765
|
inList: [
|
|
3126
3766
|
`subpax_${designName}_stpSide`,
|
|
3127
3767
|
`subpax_${designName}_stpFaceT`,
|
|
@@ -3130,7 +3770,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3130
3770
|
},
|
|
3131
3771
|
{
|
|
3132
3772
|
outName: `ipax_${designName}_hollow`,
|
|
3133
|
-
boolMethod:
|
|
3773
|
+
boolMethod: EBVolume9.eUnion,
|
|
3134
3774
|
inList: [
|
|
3135
3775
|
`subpax_${designName}_stpSideH`,
|
|
3136
3776
|
`subpax_${designName}_stpFaceTH`,
|
|
@@ -3139,12 +3779,12 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3139
3779
|
},
|
|
3140
3780
|
{
|
|
3141
3781
|
outName: `ipax_${designName}_stopper`,
|
|
3142
|
-
boolMethod:
|
|
3782
|
+
boolMethod: EBVolume9.eSubstraction,
|
|
3143
3783
|
inList: [`ipax_${designName}_plus`, `ipax_${designName}_hollow`]
|
|
3144
3784
|
},
|
|
3145
3785
|
{
|
|
3146
3786
|
outName: `pax_${designName}`,
|
|
3147
|
-
boolMethod:
|
|
3787
|
+
boolMethod: EBVolume9.eUnion,
|
|
3148
3788
|
inList: [`inpax_${designName}_rake`, `ipax_${designName}_stopper`]
|
|
3149
3789
|
}
|
|
3150
3790
|
]
|
|
@@ -3160,43 +3800,48 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3160
3800
|
}
|
|
3161
3801
|
var rakeStopperDef = {
|
|
3162
3802
|
pTitle: "Heliostat rake with stopper",
|
|
3163
|
-
pDescription: "The rake-stopper on top of the
|
|
3164
|
-
pDef:
|
|
3165
|
-
pGeom:
|
|
3803
|
+
pDescription: "The rake-stopper on top of the V-Axis of the heliostat",
|
|
3804
|
+
pDef: pDef9,
|
|
3805
|
+
pGeom: pGeom9
|
|
3166
3806
|
};
|
|
3167
3807
|
|
|
3168
3808
|
// src/heliostat/heliostat_2.ts
|
|
3169
|
-
var
|
|
3809
|
+
var pDef10 = {
|
|
3170
3810
|
partName: "heliostat_2",
|
|
3171
3811
|
params: [
|
|
3172
3812
|
//pNumber(name, unit, init, min, max, step)
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
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)
|
|
3200
3845
|
],
|
|
3201
3846
|
paramSvg: {
|
|
3202
3847
|
H1: "heliostat_overview.svg",
|
|
@@ -3234,28 +3879,28 @@ var pDef9 = {
|
|
|
3234
3879
|
// every 0.5 second
|
|
3235
3880
|
}
|
|
3236
3881
|
};
|
|
3237
|
-
function
|
|
3238
|
-
const rGeome =
|
|
3239
|
-
const figSide =
|
|
3240
|
-
const figFace =
|
|
3241
|
-
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();
|
|
3242
3887
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
3243
3888
|
`;
|
|
3244
3889
|
try {
|
|
3245
3890
|
const helioHeight = param.H1 + param.H2 - param.H3 + param.H4 + param.H5 - param.H6 + param.H7;
|
|
3246
|
-
rGeome.logstr += `heliostat-height: ${
|
|
3891
|
+
rGeome.logstr += `heliostat-height: ${ffix12(helioHeight)}, diameter ${ffix12(param.D1)} m
|
|
3247
3892
|
`;
|
|
3248
|
-
rGeome.logstr += `heliostat-swing-length: ${
|
|
3893
|
+
rGeome.logstr += `heliostat-swing-length: ${ffix12(param.L1)}, width ${ffix12(param.L2)} m
|
|
3249
3894
|
`;
|
|
3250
|
-
const posAngleDegree = param.al * t /
|
|
3251
|
-
const posAngle =
|
|
3252
|
-
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
|
|
3253
3898
|
`;
|
|
3254
3899
|
const rakePosY = param.H1 + param.H2 - param.H3;
|
|
3255
3900
|
const swingPosY = rakePosY + param.H4 + param.H5 - param.H6 + param.H7;
|
|
3256
|
-
const poleStaticParam =
|
|
3257
|
-
const rakeParam =
|
|
3258
|
-
const swingParam =
|
|
3901
|
+
const poleStaticParam = designParam5(poleStaticDef.pDef);
|
|
3902
|
+
const rakeParam = designParam5(rakeStopperDef.pDef);
|
|
3903
|
+
const swingParam = designParam5(swingDef.pDef);
|
|
3259
3904
|
poleStaticParam.setVal("H1", param.H1);
|
|
3260
3905
|
poleStaticParam.setVal("H2", param.H2);
|
|
3261
3906
|
poleStaticParam.setVal("D1", param.D1);
|
|
@@ -3273,6 +3918,7 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3273
3918
|
poleStaticParam.setVal("D4", param.H1 / 4);
|
|
3274
3919
|
poleStaticParam.setVal("L2", param.H1 / 80);
|
|
3275
3920
|
poleStaticParam.setVal("E3", param.H1 / 80);
|
|
3921
|
+
poleStaticParam.setVal("holders", 0);
|
|
3276
3922
|
rakeParam.setVal("H1", param.H4);
|
|
3277
3923
|
rakeParam.setVal("H2", param.H5);
|
|
3278
3924
|
rakeParam.setVal("H3", param.H4 - 2 * param.E1);
|
|
@@ -3336,14 +3982,14 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3336
3982
|
poleStaticParam.getParamVal(),
|
|
3337
3983
|
poleStaticParam.getSuffix()
|
|
3338
3984
|
);
|
|
3339
|
-
|
|
3340
|
-
rGeome.logstr +=
|
|
3985
|
+
checkGeom5(poleStaticGeom);
|
|
3986
|
+
rGeome.logstr += prefixLog5(poleStaticGeom.logstr, poleStaticParam.getPartNameSuffix());
|
|
3341
3987
|
const rakeGeom = rakeStopperDef.pGeom(0, rakeParam.getParamVal(), rakeParam.getSuffix());
|
|
3342
|
-
|
|
3343
|
-
rGeome.logstr +=
|
|
3988
|
+
checkGeom5(rakeGeom);
|
|
3989
|
+
rGeome.logstr += prefixLog5(rakeGeom.logstr, rakeParam.getPartNameSuffix());
|
|
3344
3990
|
const swingGeom = swingDef.pGeom(0, swingParam.getParamVal(), swingParam.getSuffix());
|
|
3345
|
-
|
|
3346
|
-
rGeome.logstr +=
|
|
3991
|
+
checkGeom5(swingGeom);
|
|
3992
|
+
rGeome.logstr += prefixLog5(swingGeom.logstr, swingParam.getPartNameSuffix());
|
|
3347
3993
|
figSide.mergeFigure(poleStaticGeom.fig.poleCut);
|
|
3348
3994
|
figSide.mergeFigure(rakeGeom.fig.faceStopperSide.translate(0, rakePosY));
|
|
3349
3995
|
figSide.mergeFigure(
|
|
@@ -3389,7 +4035,7 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3389
4035
|
volumes: [
|
|
3390
4036
|
{
|
|
3391
4037
|
outName: `pax_${designName}`,
|
|
3392
|
-
boolMethod:
|
|
4038
|
+
boolMethod: EBVolume10.eUnion,
|
|
3393
4039
|
inList: [
|
|
3394
4040
|
`inpax_${designName}_poleStatic`,
|
|
3395
4041
|
`inpax_${designName}_rake`,
|
|
@@ -3433,40 +4079,43 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3433
4079
|
var heliostat_2Def = {
|
|
3434
4080
|
pTitle: "Heliostat-2 overview",
|
|
3435
4081
|
pDescription: "The heliostat-2 inclination mechanism",
|
|
3436
|
-
pDef:
|
|
3437
|
-
pGeom:
|
|
4082
|
+
pDef: pDef10,
|
|
4083
|
+
pGeom: pGeom10
|
|
3438
4084
|
};
|
|
3439
4085
|
|
|
3440
4086
|
// src/heliostat/base.ts
|
|
3441
4087
|
import {
|
|
3442
|
-
contour as
|
|
3443
|
-
contourCircle as
|
|
3444
|
-
figure as
|
|
3445
|
-
ffix as
|
|
3446
|
-
pNumber as
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
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
|
|
3450
4097
|
} from "geometrix";
|
|
3451
|
-
var
|
|
4098
|
+
var pDef11 = {
|
|
3452
4099
|
partName: "base",
|
|
3453
4100
|
params: [
|
|
3454
4101
|
//pNumber(name, unit, init, min, max, step)
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
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)
|
|
3470
4119
|
],
|
|
3471
4120
|
paramSvg: {
|
|
3472
4121
|
D1: "base_cut.svg",
|
|
@@ -3492,14 +4141,14 @@ var pDef10 = {
|
|
|
3492
4141
|
// every 0.5 second
|
|
3493
4142
|
}
|
|
3494
4143
|
};
|
|
3495
|
-
function
|
|
3496
|
-
const rGeome =
|
|
4144
|
+
function pGeom11(t, param, suffix = "") {
|
|
4145
|
+
const rGeome = initGeom11(pDef11.partName + suffix);
|
|
3497
4146
|
let ctrBaseCut1;
|
|
3498
4147
|
let ctrBaseCut2;
|
|
3499
4148
|
let ctrHollow;
|
|
3500
|
-
const figCut =
|
|
3501
|
-
const figTop =
|
|
3502
|
-
const figHollow =
|
|
4149
|
+
const figCut = figure11();
|
|
4150
|
+
const figTop = figure11();
|
|
4151
|
+
const figHollow = figure11();
|
|
3503
4152
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
3504
4153
|
`;
|
|
3505
4154
|
try {
|
|
@@ -3515,19 +4164,19 @@ function pGeom10(t, param, suffix = "") {
|
|
|
3515
4164
|
if (R4 > R1 - param.E2) {
|
|
3516
4165
|
throw `err189: D4 ${param.D4} too large compare to D1 ${param.D1} and E2 ${param.E2}`;
|
|
3517
4166
|
}
|
|
3518
|
-
rGeome.logstr += `base-height: ${
|
|
4167
|
+
rGeome.logstr += `base-height: ${ffix13(param.H1)} mm
|
|
3519
4168
|
`;
|
|
3520
|
-
rGeome.logstr += `base-external-diameter: ${
|
|
4169
|
+
rGeome.logstr += `base-external-diameter: ${ffix13(param.D2)} mm
|
|
3521
4170
|
`;
|
|
3522
4171
|
const interHollow = param.D1 * Math.PI / param.N2 - param.L2;
|
|
3523
|
-
rGeome.logstr += `inter-hollow: ${
|
|
4172
|
+
rGeome.logstr += `inter-hollow: ${ffix13(interHollow)} mm
|
|
3524
4173
|
`;
|
|
3525
4174
|
ctrBaseCut1 = function(orient) {
|
|
3526
|
-
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();
|
|
3527
4176
|
return rBaseCut1;
|
|
3528
4177
|
};
|
|
3529
4178
|
ctrBaseCut2 = function(orient) {
|
|
3530
|
-
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();
|
|
3531
4180
|
return rBaseCut2;
|
|
3532
4181
|
};
|
|
3533
4182
|
if (param.H1 < param.E3 + param.H2 + param.H3 + param.E1) {
|
|
@@ -3542,7 +4191,7 @@ function pGeom10(t, param, suffix = "") {
|
|
|
3542
4191
|
}
|
|
3543
4192
|
const hollowH = param.E3 + param.H2 + RL2;
|
|
3544
4193
|
ctrHollow = function(orient) {
|
|
3545
|
-
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);
|
|
3546
4195
|
return rHollow;
|
|
3547
4196
|
};
|
|
3548
4197
|
figCut.addMain(ctrBaseCut1(1));
|
|
@@ -3559,18 +4208,18 @@ function pGeom10(t, param, suffix = "") {
|
|
|
3559
4208
|
if (param.N1 * holeAngle > 2 * Math.PI) {
|
|
3560
4209
|
throw `err134: N1 ${param.N1} too large compare to D5 ${param.D5}, L1 ${param.L1}, D2 ${param.D2}`;
|
|
3561
4210
|
}
|
|
3562
|
-
figTop.addMain(
|
|
3563
|
-
figTop.addMain(
|
|
4211
|
+
figTop.addMain(contourCircle9(0, 0, R1));
|
|
4212
|
+
figTop.addMain(contourCircle9(0, 0, R3));
|
|
3564
4213
|
const posR = R3 + param.L1;
|
|
3565
4214
|
const posA = 2 * Math.PI / param.N1;
|
|
3566
4215
|
for (let i = 0; i < param.N1; i++) {
|
|
3567
4216
|
const posX = posR * Math.cos(i * posA);
|
|
3568
4217
|
const posY = posR * Math.sin(i * posA);
|
|
3569
|
-
figTop.addMain(
|
|
4218
|
+
figTop.addMain(contourCircle9(posX, posY, R5));
|
|
3570
4219
|
}
|
|
3571
|
-
figTop.addSecond(
|
|
3572
|
-
figTop.addSecond(
|
|
3573
|
-
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));
|
|
3574
4223
|
figHollow.addMain(ctrHollow(1));
|
|
3575
4224
|
figHollow.addSecond(ctrBaseCut2(1));
|
|
3576
4225
|
figHollow.addSecond(ctrBaseCut2(-1));
|
|
@@ -3586,7 +4235,7 @@ function pGeom10(t, param, suffix = "") {
|
|
|
3586
4235
|
const rHollow = {
|
|
3587
4236
|
outName: `subpax_${designName}_hollow_${idx}`,
|
|
3588
4237
|
face: `${designName}_faceHollow`,
|
|
3589
|
-
extrudeMethod:
|
|
4238
|
+
extrudeMethod: EExtrude8.eLinearOrtho,
|
|
3590
4239
|
length: R2 + param.E2,
|
|
3591
4240
|
rotate: [Math.PI / 2, 0, idx * hollowStep],
|
|
3592
4241
|
translate: [0, 0, 0]
|
|
@@ -3599,14 +4248,14 @@ function pGeom10(t, param, suffix = "") {
|
|
|
3599
4248
|
{
|
|
3600
4249
|
outName: `subpax_${designName}_cut`,
|
|
3601
4250
|
face: `${designName}_faceCut`,
|
|
3602
|
-
extrudeMethod:
|
|
4251
|
+
extrudeMethod: EExtrude8.eRotate,
|
|
3603
4252
|
rotate: [0, 0, 0],
|
|
3604
4253
|
translate: [Math.PI / 2, 0, 0]
|
|
3605
4254
|
},
|
|
3606
4255
|
{
|
|
3607
4256
|
outName: `subpax_${designName}_top`,
|
|
3608
4257
|
face: `${designName}_faceTop`,
|
|
3609
|
-
extrudeMethod:
|
|
4258
|
+
extrudeMethod: EExtrude8.eLinearOrtho,
|
|
3610
4259
|
length: param.E1,
|
|
3611
4260
|
rotate: [0, 0, 0],
|
|
3612
4261
|
translate: [0, 0, param.H1 - param.E1]
|
|
@@ -3616,17 +4265,17 @@ function pGeom10(t, param, suffix = "") {
|
|
|
3616
4265
|
volumes: [
|
|
3617
4266
|
{
|
|
3618
4267
|
outName: `ipax_${designName}_hollows`,
|
|
3619
|
-
boolMethod:
|
|
4268
|
+
boolMethod: EBVolume11.eUnion,
|
|
3620
4269
|
inList: [...lVolHollow]
|
|
3621
4270
|
},
|
|
3622
4271
|
{
|
|
3623
4272
|
outName: `ipax_${designName}_cylinder`,
|
|
3624
|
-
boolMethod:
|
|
4273
|
+
boolMethod: EBVolume11.eSubstraction,
|
|
3625
4274
|
inList: [`subpax_${designName}_cut`, `ipax_${designName}_hollows`]
|
|
3626
4275
|
},
|
|
3627
4276
|
{
|
|
3628
4277
|
outName: `pax_${designName}`,
|
|
3629
|
-
boolMethod:
|
|
4278
|
+
boolMethod: EBVolume11.eUnion,
|
|
3630
4279
|
inList: [`ipax_${designName}_cylinder`, `subpax_${designName}_top`]
|
|
3631
4280
|
}
|
|
3632
4281
|
]
|
|
@@ -3643,43 +4292,45 @@ function pGeom10(t, param, suffix = "") {
|
|
|
3643
4292
|
var baseDef = {
|
|
3644
4293
|
pTitle: "Heliostat base",
|
|
3645
4294
|
pDescription: "The base for the static-pole of the heliostat",
|
|
3646
|
-
pDef:
|
|
3647
|
-
pGeom:
|
|
4295
|
+
pDef: pDef11,
|
|
4296
|
+
pGeom: pGeom11
|
|
3648
4297
|
};
|
|
3649
4298
|
|
|
3650
|
-
// src/heliostat/
|
|
4299
|
+
// src/heliostat/vaxis.ts
|
|
3651
4300
|
import {
|
|
3652
|
-
contour as
|
|
3653
|
-
contourCircle as
|
|
3654
|
-
figure as
|
|
3655
|
-
ffix as
|
|
3656
|
-
pNumber as
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
4301
|
+
contour as contour12,
|
|
4302
|
+
contourCircle as contourCircle10,
|
|
4303
|
+
figure as figure12,
|
|
4304
|
+
ffix as ffix14,
|
|
4305
|
+
pNumber as pNumber12,
|
|
4306
|
+
pSectionSeparator as pSectionSeparator11,
|
|
4307
|
+
initGeom as initGeom12,
|
|
4308
|
+
EExtrude as EExtrude9,
|
|
4309
|
+
EBVolume as EBVolume12
|
|
3660
4310
|
} from "geometrix";
|
|
3661
|
-
var
|
|
3662
|
-
partName: "
|
|
4311
|
+
var pDef12 = {
|
|
4312
|
+
partName: "vaxis",
|
|
3663
4313
|
params: [
|
|
3664
4314
|
//pNumber(name, unit, init, min, max, step)
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
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)
|
|
3673
4324
|
],
|
|
3674
4325
|
paramSvg: {
|
|
3675
|
-
D1: "
|
|
3676
|
-
D2: "
|
|
3677
|
-
H1: "
|
|
3678
|
-
E1: "
|
|
3679
|
-
E2: "
|
|
3680
|
-
N1: "
|
|
3681
|
-
D3: "
|
|
3682
|
-
L1: "
|
|
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"
|
|
3683
4334
|
},
|
|
3684
4335
|
sim: {
|
|
3685
4336
|
tMax: 180,
|
|
@@ -3688,37 +4339,37 @@ var pDef11 = {
|
|
|
3688
4339
|
// every 0.5 second
|
|
3689
4340
|
}
|
|
3690
4341
|
};
|
|
3691
|
-
function
|
|
3692
|
-
const rGeome =
|
|
4342
|
+
function pGeom12(t, param, suffix = "") {
|
|
4343
|
+
const rGeome = initGeom12(pDef12.partName + suffix);
|
|
3693
4344
|
let ctrPoleProfile;
|
|
3694
|
-
const figCut =
|
|
3695
|
-
const figBottom =
|
|
4345
|
+
const figCut = figure12();
|
|
4346
|
+
const figBottom = figure12();
|
|
3696
4347
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
3697
4348
|
`;
|
|
3698
4349
|
try {
|
|
3699
4350
|
const R1 = param.D1 / 2;
|
|
3700
4351
|
const R2 = param.D2 / 2;
|
|
3701
4352
|
const R3 = param.D3 / 2;
|
|
3702
|
-
rGeome.logstr += `
|
|
4353
|
+
rGeome.logstr += `vaxis-height: ${ffix14(param.H1)} mm
|
|
3703
4354
|
`;
|
|
3704
|
-
const ctrCylinder =
|
|
4355
|
+
const ctrCylinder = contour12(R1, 0).addSegStrokeA(R1, param.H1).addSegStrokeA(R1 - param.E1, param.H1).addSegStrokeA(R1 - param.E1, 0).closeSegStroke();
|
|
3705
4356
|
figCut.addMain(ctrCylinder);
|
|
3706
4357
|
ctrPoleProfile = function(orient) {
|
|
3707
|
-
const rPoleProfile =
|
|
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();
|
|
3708
4359
|
return rPoleProfile;
|
|
3709
4360
|
};
|
|
3710
4361
|
figCut.addSecond(ctrPoleProfile(1));
|
|
3711
4362
|
figCut.addSecond(ctrPoleProfile(-1));
|
|
3712
|
-
figBottom.addMain(
|
|
3713
|
-
figBottom.addMain(
|
|
4363
|
+
figBottom.addMain(contourCircle10(0, 0, R1));
|
|
4364
|
+
figBottom.addMain(contourCircle10(0, 0, R2));
|
|
3714
4365
|
const posR = R2 + param.L1;
|
|
3715
4366
|
const posA = 2 * Math.PI / param.N1;
|
|
3716
4367
|
for (let i = 0; i < param.N1; i++) {
|
|
3717
4368
|
const posX = posR * Math.cos(i * posA);
|
|
3718
4369
|
const posY = posR * Math.sin(i * posA);
|
|
3719
|
-
figBottom.addMain(
|
|
4370
|
+
figBottom.addMain(contourCircle10(posX, posY, R3));
|
|
3720
4371
|
}
|
|
3721
|
-
figBottom.addSecond(
|
|
4372
|
+
figBottom.addSecond(contourCircle10(0, 0, R1 - param.E1));
|
|
3722
4373
|
rGeome.fig = {
|
|
3723
4374
|
faceCut: figCut,
|
|
3724
4375
|
faceBottom: figBottom
|
|
@@ -3729,14 +4380,14 @@ function pGeom11(t, param, suffix = "") {
|
|
|
3729
4380
|
{
|
|
3730
4381
|
outName: `subpax_${designName}_pole`,
|
|
3731
4382
|
face: `${designName}_faceCut`,
|
|
3732
|
-
extrudeMethod:
|
|
4383
|
+
extrudeMethod: EExtrude9.eRotate,
|
|
3733
4384
|
rotate: [0, 0, 0],
|
|
3734
4385
|
translate: [0, 0, 0]
|
|
3735
4386
|
},
|
|
3736
4387
|
{
|
|
3737
4388
|
outName: `subpax_${designName}_bottom`,
|
|
3738
4389
|
face: `${designName}_faceBottom`,
|
|
3739
|
-
extrudeMethod:
|
|
4390
|
+
extrudeMethod: EExtrude9.eLinearOrtho,
|
|
3740
4391
|
length: param.E2,
|
|
3741
4392
|
rotate: [0, 0, 0],
|
|
3742
4393
|
translate: [0, 0, 0]
|
|
@@ -3744,7 +4395,7 @@ function pGeom11(t, param, suffix = "") {
|
|
|
3744
4395
|
{
|
|
3745
4396
|
outName: `subpax_${designName}_top`,
|
|
3746
4397
|
face: `${designName}_faceBottom`,
|
|
3747
|
-
extrudeMethod:
|
|
4398
|
+
extrudeMethod: EExtrude9.eLinearOrtho,
|
|
3748
4399
|
length: param.E2,
|
|
3749
4400
|
rotate: [0, 0, 0],
|
|
3750
4401
|
translate: [0, 0, param.H1 - param.E2]
|
|
@@ -3753,7 +4404,7 @@ function pGeom11(t, param, suffix = "") {
|
|
|
3753
4404
|
volumes: [
|
|
3754
4405
|
{
|
|
3755
4406
|
outName: `pax_${designName}`,
|
|
3756
|
-
boolMethod:
|
|
4407
|
+
boolMethod: EBVolume12.eUnion,
|
|
3757
4408
|
inList: [
|
|
3758
4409
|
`subpax_${designName}_pole`,
|
|
3759
4410
|
`subpax_${designName}_bottom`,
|
|
@@ -3763,7 +4414,454 @@ function pGeom11(t, param, suffix = "") {
|
|
|
3763
4414
|
]
|
|
3764
4415
|
};
|
|
3765
4416
|
rGeome.sub = {};
|
|
3766
|
-
rGeome.logstr += "
|
|
4417
|
+
rGeome.logstr += "V-Axis drawn successfully!\n";
|
|
4418
|
+
rGeome.calcErr = false;
|
|
4419
|
+
} catch (emsg) {
|
|
4420
|
+
rGeome.logstr += emsg;
|
|
4421
|
+
console.log(emsg);
|
|
4422
|
+
}
|
|
4423
|
+
return rGeome;
|
|
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
|
+
};
|
|
4431
|
+
|
|
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";
|
|
4444
|
+
var pDef13 = {
|
|
4445
|
+
partName: "ring",
|
|
4446
|
+
params: [
|
|
4447
|
+
//pNumber(name, unit, init, min, max, step)
|
|
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)
|
|
4460
|
+
],
|
|
4461
|
+
paramSvg: {
|
|
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"
|
|
4472
|
+
},
|
|
4473
|
+
sim: {
|
|
4474
|
+
tMax: 180,
|
|
4475
|
+
tStep: 0.5,
|
|
4476
|
+
tUpdate: 500
|
|
4477
|
+
// every 0.5 second
|
|
4478
|
+
}
|
|
4479
|
+
};
|
|
4480
|
+
function pGeom13(t, param, suffix = "") {
|
|
4481
|
+
const rGeome = initGeom13(pDef13.partName + suffix);
|
|
4482
|
+
const figRingBase = figure13();
|
|
4483
|
+
const figRingTeeth = figure13();
|
|
4484
|
+
const figSection = figure13();
|
|
4485
|
+
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4486
|
+
`;
|
|
4487
|
+
try {
|
|
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}`;
|
|
4494
|
+
}
|
|
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
|
|
4502
|
+
`;
|
|
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();
|
|
4533
|
+
return rCtr;
|
|
4534
|
+
};
|
|
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();
|
|
4537
|
+
return rCtr;
|
|
4538
|
+
};
|
|
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();
|
|
4541
|
+
return rCtr;
|
|
4542
|
+
};
|
|
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));
|
|
4550
|
+
rGeome.fig = {
|
|
4551
|
+
faceRingBase: figRingBase,
|
|
4552
|
+
faceRingTeeth: figRingTeeth,
|
|
4553
|
+
faceSection: figSection
|
|
4554
|
+
};
|
|
4555
|
+
const designName = rGeome.partName;
|
|
4556
|
+
rGeome.vol = {
|
|
4557
|
+
extrudes: [
|
|
4558
|
+
{
|
|
4559
|
+
outName: `subpax_${designName}_base`,
|
|
4560
|
+
face: `${designName}_faceRingBase`,
|
|
4561
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4562
|
+
length: param.H1,
|
|
4563
|
+
rotate: [0, 0, 0],
|
|
4564
|
+
translate: [0, 0, 0]
|
|
4565
|
+
},
|
|
4566
|
+
{
|
|
4567
|
+
outName: `subpax_${designName}_teeth`,
|
|
4568
|
+
face: `${designName}_faceRingTeeth`,
|
|
4569
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4570
|
+
length: ringHeight,
|
|
4571
|
+
rotate: [0, 0, 0],
|
|
4572
|
+
translate: [0, 0, 0]
|
|
4573
|
+
}
|
|
4574
|
+
],
|
|
4575
|
+
volumes: [
|
|
4576
|
+
{
|
|
4577
|
+
outName: `pax_${designName}`,
|
|
4578
|
+
boolMethod: EBVolume13.eUnion,
|
|
4579
|
+
inList: [`subpax_${designName}_base`, `subpax_${designName}_teeth`]
|
|
4580
|
+
}
|
|
4581
|
+
]
|
|
4582
|
+
};
|
|
4583
|
+
rGeome.sub = {};
|
|
4584
|
+
rGeome.logstr += "ring drawn successfully!\n";
|
|
4585
|
+
rGeome.calcErr = false;
|
|
4586
|
+
} catch (emsg) {
|
|
4587
|
+
rGeome.logstr += emsg;
|
|
4588
|
+
console.log(emsg);
|
|
4589
|
+
}
|
|
4590
|
+
return rGeome;
|
|
4591
|
+
}
|
|
4592
|
+
var ringDef = {
|
|
4593
|
+
pTitle: "Heliostat ring",
|
|
4594
|
+
pDescription: "The gear ring for adjusting the azimuth of the heliostat",
|
|
4595
|
+
pDef: pDef13,
|
|
4596
|
+
pGeom: pGeom13
|
|
4597
|
+
};
|
|
4598
|
+
|
|
4599
|
+
// src/heliostat/ring_guidance.ts
|
|
4600
|
+
import {
|
|
4601
|
+
contour as contour14,
|
|
4602
|
+
contourCircle as contourCircle12,
|
|
4603
|
+
figure as figure14,
|
|
4604
|
+
ffix as ffix16,
|
|
4605
|
+
pNumber as pNumber14,
|
|
4606
|
+
pSectionSeparator as pSectionSeparator13,
|
|
4607
|
+
initGeom as initGeom14,
|
|
4608
|
+
EExtrude as EExtrude11,
|
|
4609
|
+
EBVolume as EBVolume14
|
|
4610
|
+
} from "geometrix";
|
|
4611
|
+
var pDef14 = {
|
|
4612
|
+
partName: "ring_guidance",
|
|
4613
|
+
params: [
|
|
4614
|
+
//pNumber(name, unit, init, min, max, step)
|
|
4615
|
+
pNumber14("D1", "mm", 700, 100, 2500, 1),
|
|
4616
|
+
pNumber14("N1", "legs", 6, 1, 24, 1),
|
|
4617
|
+
pNumber14("D2", "mm", 600, 100, 2e3, 1),
|
|
4618
|
+
pSectionSeparator13("leg details"),
|
|
4619
|
+
pNumber14("D3", "mm", 30, 1, 200, 1),
|
|
4620
|
+
pNumber14("D4", "mm", 50, 1, 200, 1),
|
|
4621
|
+
pNumber14("L1", "mm", 90, 1, 900, 1),
|
|
4622
|
+
pNumber14("R5", "mm", 20, 0, 500, 1),
|
|
4623
|
+
pSectionSeparator13("inner"),
|
|
4624
|
+
pNumber14("D6", "mm", 300, 1, 1e3, 1),
|
|
4625
|
+
pNumber14("N2", "motors", 8, 1, 200, 1),
|
|
4626
|
+
pNumber14("L2", "mm", 50, 1, 200, 1),
|
|
4627
|
+
pNumber14("D7", "mm", 80, 1, 200, 1),
|
|
4628
|
+
pSectionSeparator13("thickness"),
|
|
4629
|
+
pNumber14("T1", "mm", 10, 1, 200, 1)
|
|
4630
|
+
],
|
|
4631
|
+
paramSvg: {
|
|
4632
|
+
D1: "ring_guidance_top.svg",
|
|
4633
|
+
D2: "ring_guidance_top.svg",
|
|
4634
|
+
D3: "ring_guidance_top.svg",
|
|
4635
|
+
D4: "ring_guidance_top.svg",
|
|
4636
|
+
R5: "ring_guidance_top.svg",
|
|
4637
|
+
D6: "ring_guidance_top.svg",
|
|
4638
|
+
D7: "ring_guidance_top.svg",
|
|
4639
|
+
N1: "ring_guidance_top.svg",
|
|
4640
|
+
N2: "ring_guidance_top.svg",
|
|
4641
|
+
L1: "ring_guidance_top.svg",
|
|
4642
|
+
L2: "ring_guidance_top.svg",
|
|
4643
|
+
T1: "ring_guidance_top.svg"
|
|
4644
|
+
},
|
|
4645
|
+
sim: {
|
|
4646
|
+
tMax: 100,
|
|
4647
|
+
tStep: 0.5,
|
|
4648
|
+
tUpdate: 500
|
|
4649
|
+
// every 0.5 second
|
|
4650
|
+
}
|
|
4651
|
+
};
|
|
4652
|
+
function pGeom14(t, param, suffix = "") {
|
|
4653
|
+
const rGeome = initGeom14(pDef14.partName + suffix);
|
|
4654
|
+
const figTop = figure14();
|
|
4655
|
+
const figSection = figure14();
|
|
4656
|
+
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4657
|
+
`;
|
|
4658
|
+
try {
|
|
4659
|
+
const R1 = param.D1 / 2;
|
|
4660
|
+
const R3 = param.D3 / 2;
|
|
4661
|
+
const R4 = param.D4 / 2;
|
|
4662
|
+
const R6 = param.D6 / 2;
|
|
4663
|
+
const R7 = param.D7 / 2;
|
|
4664
|
+
const stepA2 = 2 * Math.PI / param.N2;
|
|
4665
|
+
if (R7 > param.L2) {
|
|
4666
|
+
throw `err461: D7 ${param.D7} is too large compare to L2 ${param.L2}`;
|
|
4667
|
+
}
|
|
4668
|
+
if (param.N2 * param.D7 > (param.D6 + 2 * param.L2) * Math.PI) {
|
|
4669
|
+
throw `err462: N2 ${param.N2} is too large compare to D6 ${param.D6}, D7 ${param.D7} and L2 ${param.L2}`;
|
|
4670
|
+
}
|
|
4671
|
+
if (param.D2 < param.D6 + 2 * param.L2 + 2 * R7) {
|
|
4672
|
+
throw `err463: D2 ${param.D2} is too small compare to D6 ${param.D6}, L2 ${param.L2} and D7 ${param.D7}`;
|
|
4673
|
+
}
|
|
4674
|
+
rGeome.logstr += `ring_guidance: Dmax ${ffix16(param.D1 + 2 * R4)} mm
|
|
4675
|
+
`;
|
|
4676
|
+
const [outerLog, outerCtr, stepA1] = ctrGuidanceOuter(param);
|
|
4677
|
+
rGeome.logstr += outerLog;
|
|
4678
|
+
figTop.addMain(outerCtr);
|
|
4679
|
+
figTop.addMain(contourCircle12(0, 0, R6));
|
|
4680
|
+
for (let i = 0; i < param.N2; i++) {
|
|
4681
|
+
figTop.addMain(contourCircle12(R6 + param.L2, 0, R7).rotate(0, 0, i * stepA2));
|
|
4682
|
+
}
|
|
4683
|
+
for (let i = 0; i < param.N1; i++) {
|
|
4684
|
+
figTop.addMain(contourCircle12(R1, 0, R3).rotate(0, 0, i * stepA1));
|
|
4685
|
+
}
|
|
4686
|
+
const rect = function(xbl, ybl, width, height) {
|
|
4687
|
+
const rCtr = contour14(xbl, ybl).addSegStrokeR(width, 0).addSegStrokeR(0, height).addSegStrokeR(-width, 0).closeSegStroke();
|
|
4688
|
+
return rCtr;
|
|
4689
|
+
};
|
|
4690
|
+
const w1 = R1 - R6 + R4;
|
|
4691
|
+
figSection.addMain(rect(R6, 0, w1, param.T1));
|
|
4692
|
+
figSection.addMain(rect(-R6 - w1, 0, w1, param.T1));
|
|
4693
|
+
figSection.addSecond(rect(R1 - R3, 0, 2 * R3, param.T1));
|
|
4694
|
+
figSection.addSecond(rect(-R1 - R3, 0, 2 * R3, param.T1));
|
|
4695
|
+
const px2 = R6 + param.L2;
|
|
4696
|
+
figSection.addSecond(rect(px2 - R7, 0, 2 * R7, param.T1));
|
|
4697
|
+
figSection.addSecond(rect(-px2 - R7, 0, 2 * R7, param.T1));
|
|
4698
|
+
rGeome.fig = {
|
|
4699
|
+
faceTop: figTop,
|
|
4700
|
+
faceSection: figSection
|
|
4701
|
+
};
|
|
4702
|
+
const designName = rGeome.partName;
|
|
4703
|
+
rGeome.vol = {
|
|
4704
|
+
extrudes: [
|
|
4705
|
+
{
|
|
4706
|
+
outName: `subpax_${designName}_top`,
|
|
4707
|
+
face: `${designName}_faceTop`,
|
|
4708
|
+
extrudeMethod: EExtrude11.eLinearOrtho,
|
|
4709
|
+
length: param.T1,
|
|
4710
|
+
rotate: [0, 0, 0],
|
|
4711
|
+
translate: [0, 0, 0]
|
|
4712
|
+
}
|
|
4713
|
+
],
|
|
4714
|
+
volumes: [
|
|
4715
|
+
{
|
|
4716
|
+
outName: `pax_${designName}`,
|
|
4717
|
+
boolMethod: EBVolume14.eIdentity,
|
|
4718
|
+
inList: [`subpax_${designName}_top`]
|
|
4719
|
+
}
|
|
4720
|
+
]
|
|
4721
|
+
};
|
|
4722
|
+
rGeome.sub = {};
|
|
4723
|
+
rGeome.logstr += "ring_guidance drawn successfully!\n";
|
|
4724
|
+
rGeome.calcErr = false;
|
|
4725
|
+
} catch (emsg) {
|
|
4726
|
+
rGeome.logstr += emsg;
|
|
4727
|
+
console.log(emsg);
|
|
4728
|
+
}
|
|
4729
|
+
return rGeome;
|
|
4730
|
+
}
|
|
4731
|
+
var ringGuidanceDef = {
|
|
4732
|
+
pTitle: "Ring-guidance",
|
|
4733
|
+
pDescription: "The guidance of the gear-ring for the heliostat azimuth",
|
|
4734
|
+
pDef: pDef14,
|
|
4735
|
+
pGeom: pGeom14
|
|
4736
|
+
};
|
|
4737
|
+
|
|
4738
|
+
// src/heliostat/vaxis_guidance.ts
|
|
4739
|
+
import {
|
|
4740
|
+
contourCircle as contourCircle13,
|
|
4741
|
+
ctrRectangle as ctrRectangle2,
|
|
4742
|
+
figure as figure15,
|
|
4743
|
+
ffix as ffix17,
|
|
4744
|
+
pNumber as pNumber15,
|
|
4745
|
+
pSectionSeparator as pSectionSeparator14,
|
|
4746
|
+
initGeom as initGeom15,
|
|
4747
|
+
EExtrude as EExtrude12,
|
|
4748
|
+
EBVolume as EBVolume15
|
|
4749
|
+
} from "geometrix";
|
|
4750
|
+
var pDef15 = {
|
|
4751
|
+
partName: "vaxis_guidance",
|
|
4752
|
+
params: [
|
|
4753
|
+
//pNumber(name, unit, init, min, max, step)
|
|
4754
|
+
pNumber15("D1", "mm", 700, 100, 2500, 1),
|
|
4755
|
+
pNumber15("N1", "legs", 6, 1, 24, 1),
|
|
4756
|
+
pNumber15("D2", "mm", 600, 100, 2e3, 1),
|
|
4757
|
+
pSectionSeparator14("leg details"),
|
|
4758
|
+
pNumber15("D3", "mm", 30, 1, 200, 1),
|
|
4759
|
+
pNumber15("D4", "mm", 50, 1, 200, 1),
|
|
4760
|
+
pNumber15("L1", "mm", 90, 1, 900, 1),
|
|
4761
|
+
pNumber15("R5", "mm", 20, 0, 500, 1),
|
|
4762
|
+
pSectionSeparator14("inner spring"),
|
|
4763
|
+
pNumber15("D6", "mm", 540, 1, 1e3, 1),
|
|
4764
|
+
pNumber15("N2", "springs", 6, 1, 24, 1),
|
|
4765
|
+
pNumber15("R7", "mm", 10, 0, 100, 1),
|
|
4766
|
+
pNumber15("a1", "degree", 0, -45, 45, 1),
|
|
4767
|
+
pNumber15("E2", "mm", 50, 1, 200, 1),
|
|
4768
|
+
pNumber15("E1", "mm", 10, 1, 200, 1),
|
|
4769
|
+
pNumber15("W1", "mm", 20, 1, 200, 1),
|
|
4770
|
+
pNumber15("L2", "mm", 100, 1, 900, 1),
|
|
4771
|
+
pNumber15("L3", "mm", 40, 1, 900, 1),
|
|
4772
|
+
pNumber15("N3", "loops", 2, 0, 8, 1),
|
|
4773
|
+
pNumber15("L4", "mm", 40, 0, 900, 1),
|
|
4774
|
+
pSectionSeparator14("thickness"),
|
|
4775
|
+
pNumber15("T1", "mm", 10, 1, 200, 1),
|
|
4776
|
+
pNumber15("Dvaxis", "mm", 260, 5, 1e3, 1)
|
|
4777
|
+
],
|
|
4778
|
+
paramSvg: {
|
|
4779
|
+
D1: "vaxis_guidance_top.svg",
|
|
4780
|
+
N1: "vaxis_guidance_top.svg",
|
|
4781
|
+
D2: "vaxis_guidance_top.svg",
|
|
4782
|
+
D3: "vaxis_guidance_top.svg",
|
|
4783
|
+
D4: "vaxis_guidance_top.svg",
|
|
4784
|
+
L1: "vaxis_guidance_top.svg",
|
|
4785
|
+
R5: "vaxis_guidance_top.svg",
|
|
4786
|
+
D6: "vaxis_guidance_top.svg",
|
|
4787
|
+
N2: "vaxis_guidance_top.svg",
|
|
4788
|
+
R7: "vaxis_guidance_top.svg",
|
|
4789
|
+
a1: "vaxis_guidance_spring.svg",
|
|
4790
|
+
E2: "vaxis_guidance_top.svg",
|
|
4791
|
+
E1: "vaxis_guidance_spring.svg",
|
|
4792
|
+
W1: "vaxis_guidance_spring.svg",
|
|
4793
|
+
L2: "vaxis_guidance_spring.svg",
|
|
4794
|
+
L3: "vaxis_guidance_spring.svg",
|
|
4795
|
+
N3: "vaxis_guidance_spring.svg",
|
|
4796
|
+
L4: "vaxis_guidance_spring.svg",
|
|
4797
|
+
T1: "vaxis_guidance_top.svg",
|
|
4798
|
+
Dvaxis: "vaxis_guidance_top.svg"
|
|
4799
|
+
},
|
|
4800
|
+
sim: {
|
|
4801
|
+
tMax: 100,
|
|
4802
|
+
tStep: 0.5,
|
|
4803
|
+
tUpdate: 500
|
|
4804
|
+
// every 0.5 second
|
|
4805
|
+
}
|
|
4806
|
+
};
|
|
4807
|
+
function pGeom15(t, param, suffix = "") {
|
|
4808
|
+
const rGeome = initGeom15(pDef15.partName + suffix);
|
|
4809
|
+
const figTop = figure15();
|
|
4810
|
+
const figSection = figure15();
|
|
4811
|
+
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4812
|
+
`;
|
|
4813
|
+
try {
|
|
4814
|
+
const R1 = param.D1 / 2;
|
|
4815
|
+
const R2 = param.D2 / 2;
|
|
4816
|
+
const R3 = param.D3 / 2;
|
|
4817
|
+
const R4 = param.D4 / 2;
|
|
4818
|
+
const R6 = param.D6 / 2;
|
|
4819
|
+
if (R2 < R6) {
|
|
4820
|
+
throw `err466: D6 ${param.D6} is too large compare to D2 ${param.D2}`;
|
|
4821
|
+
}
|
|
4822
|
+
rGeome.logstr += `vaxis_guidance: Dmax ${ffix17(param.D1 + 2 * R4)} mm
|
|
4823
|
+
`;
|
|
4824
|
+
const [outerLog, outerCtr, stepA1] = ctrGuidanceOuter(param);
|
|
4825
|
+
rGeome.logstr += outerLog;
|
|
4826
|
+
figTop.addMain(outerCtr);
|
|
4827
|
+
for (let i = 0; i < param.N1; i++) {
|
|
4828
|
+
figTop.addMain(contourCircle13(R1, 0, R3).rotate(0, 0, i * stepA1));
|
|
4829
|
+
}
|
|
4830
|
+
const [innerLog, innerCtr] = ctrGuidanceInner(param);
|
|
4831
|
+
rGeome.logstr += innerLog;
|
|
4832
|
+
figTop.addMain(innerCtr);
|
|
4833
|
+
figTop.addSecond(contourCircle13(0, 0, param.Dvaxis / 2));
|
|
4834
|
+
const w1 = R1 - R6 + R4;
|
|
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));
|
|
4839
|
+
rGeome.fig = {
|
|
4840
|
+
faceTop: figTop,
|
|
4841
|
+
faceSection: figSection
|
|
4842
|
+
};
|
|
4843
|
+
const designName = rGeome.partName;
|
|
4844
|
+
rGeome.vol = {
|
|
4845
|
+
extrudes: [
|
|
4846
|
+
{
|
|
4847
|
+
outName: `subpax_${designName}_top`,
|
|
4848
|
+
face: `${designName}_faceTop`,
|
|
4849
|
+
extrudeMethod: EExtrude12.eLinearOrtho,
|
|
4850
|
+
length: param.T1,
|
|
4851
|
+
rotate: [0, 0, 0],
|
|
4852
|
+
translate: [0, 0, 0]
|
|
4853
|
+
}
|
|
4854
|
+
],
|
|
4855
|
+
volumes: [
|
|
4856
|
+
{
|
|
4857
|
+
outName: `pax_${designName}`,
|
|
4858
|
+
boolMethod: EBVolume15.eIdentity,
|
|
4859
|
+
inList: [`subpax_${designName}_top`]
|
|
4860
|
+
}
|
|
4861
|
+
]
|
|
4862
|
+
};
|
|
4863
|
+
rGeome.sub = {};
|
|
4864
|
+
rGeome.logstr += "vaxis_guidance drawn successfully!\n";
|
|
3767
4865
|
rGeome.calcErr = false;
|
|
3768
4866
|
} catch (emsg) {
|
|
3769
4867
|
rGeome.logstr += emsg;
|
|
@@ -3771,41 +4869,44 @@ function pGeom11(t, param, suffix = "") {
|
|
|
3771
4869
|
}
|
|
3772
4870
|
return rGeome;
|
|
3773
4871
|
}
|
|
3774
|
-
var
|
|
3775
|
-
pTitle: "
|
|
3776
|
-
pDescription: "The
|
|
3777
|
-
pDef:
|
|
3778
|
-
pGeom:
|
|
4872
|
+
var vaxisGuidanceDef = {
|
|
4873
|
+
pTitle: "Vaxis-guidance",
|
|
4874
|
+
pDescription: "The guidance of the V-Axis for the heliostat azimuth",
|
|
4875
|
+
pDef: pDef15,
|
|
4876
|
+
pGeom: pGeom15
|
|
3779
4877
|
};
|
|
3780
4878
|
|
|
3781
4879
|
// src/heliostat/rod.ts
|
|
3782
4880
|
import {
|
|
3783
|
-
contour as
|
|
3784
|
-
contourCircle as
|
|
3785
|
-
figure as
|
|
3786
|
-
ffix as
|
|
3787
|
-
pNumber as
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
4881
|
+
contour as contour15,
|
|
4882
|
+
contourCircle as contourCircle14,
|
|
4883
|
+
figure as figure16,
|
|
4884
|
+
ffix as ffix18,
|
|
4885
|
+
pNumber as pNumber16,
|
|
4886
|
+
pSectionSeparator as pSectionSeparator15,
|
|
4887
|
+
initGeom as initGeom16,
|
|
4888
|
+
EExtrude as EExtrude13,
|
|
4889
|
+
EBVolume as EBVolume16
|
|
3791
4890
|
} from "geometrix";
|
|
3792
|
-
var
|
|
4891
|
+
var pDef16 = {
|
|
3793
4892
|
partName: "rod",
|
|
3794
4893
|
params: [
|
|
3795
4894
|
//pNumber(name, unit, init, min, max, step)
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
4895
|
+
pNumber16("L1", "mm", 1e4, 100, 4e4, 10),
|
|
4896
|
+
pNumber16("L2", "mm", 100, 2, 400, 1),
|
|
4897
|
+
pNumber16("L3", "mm", 400, 10, 1e3, 1),
|
|
4898
|
+
pNumber16("L4", "mm", 600, 10, 1e3, 1),
|
|
4899
|
+
pNumber16("N1", "", 10, 2, 50, 1),
|
|
4900
|
+
pSectionSeparator15("section"),
|
|
4901
|
+
pNumber16("H1", "mm", 200, 5, 4e3, 1),
|
|
4902
|
+
pNumber16("E1", "mm", 2, 1, 80, 1),
|
|
4903
|
+
pNumber16("E2", "mm", 10, 1, 80, 1),
|
|
4904
|
+
pSectionSeparator15("pad"),
|
|
4905
|
+
pNumber16("N3", "", 2, 1, 20, 1),
|
|
4906
|
+
pNumber16("N4", "", 4, 1, 20, 1),
|
|
4907
|
+
pNumber16("R3", "mm", 100, 1, 500, 1),
|
|
4908
|
+
pNumber16("D2", "mm", 10, 1, 100, 1),
|
|
4909
|
+
pNumber16("L7", "mm", 10, 1, 300, 1)
|
|
3809
4910
|
],
|
|
3810
4911
|
paramSvg: {
|
|
3811
4912
|
L1: "rod_top.svg",
|
|
@@ -3829,51 +4930,51 @@ var pDef12 = {
|
|
|
3829
4930
|
// every 0.5 second
|
|
3830
4931
|
}
|
|
3831
4932
|
};
|
|
3832
|
-
function
|
|
3833
|
-
const rGeome =
|
|
4933
|
+
function pGeom16(t, param, suffix = "") {
|
|
4934
|
+
const rGeome = initGeom16(pDef16.partName + suffix);
|
|
3834
4935
|
let ctrPlate;
|
|
3835
4936
|
let ctrRod;
|
|
3836
|
-
const figCut =
|
|
3837
|
-
const figPlate =
|
|
3838
|
-
const figTop =
|
|
4937
|
+
const figCut = figure16();
|
|
4938
|
+
const figPlate = figure16();
|
|
4939
|
+
const figTop = figure16();
|
|
3839
4940
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
3840
4941
|
`;
|
|
3841
4942
|
try {
|
|
3842
4943
|
const R2 = param.D2 / 2;
|
|
3843
4944
|
const n3step = param.L3 / (param.N3 + 1);
|
|
3844
4945
|
const n4step = param.L4 / (param.N4 + 1);
|
|
3845
|
-
rGeome.logstr += `rod-length: ${
|
|
4946
|
+
rGeome.logstr += `rod-length: ${ffix18(param.L1)} mm
|
|
3846
4947
|
`;
|
|
3847
4948
|
const space_length = (param.L1 - param.L3) / (param.N1 - 1);
|
|
3848
|
-
rGeome.logstr += `space-length: ${
|
|
4949
|
+
rGeome.logstr += `space-length: ${ffix18(space_length)} mm
|
|
3849
4950
|
`;
|
|
3850
4951
|
ctrPlate = function(py) {
|
|
3851
4952
|
const rPlate = [];
|
|
3852
|
-
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();
|
|
3853
4954
|
rPlate.push(plateExt);
|
|
3854
4955
|
for (let i = 1; i < param.N3 + 1; i++) {
|
|
3855
|
-
rPlate.push(
|
|
3856
|
-
rPlate.push(
|
|
4956
|
+
rPlate.push(contourCircle14(param.L4 / 2 - param.L7, py + i * n3step, R2));
|
|
4957
|
+
rPlate.push(contourCircle14(-param.L4 / 2 + param.L7, py + i * n3step, R2));
|
|
3857
4958
|
}
|
|
3858
4959
|
for (let i = 1; i < param.N4 + 1; i++) {
|
|
3859
|
-
rPlate.push(
|
|
4960
|
+
rPlate.push(contourCircle14(-param.L4 / 2 + i * n4step, py + param.L7, R2));
|
|
3860
4961
|
rPlate.push(
|
|
3861
|
-
|
|
4962
|
+
contourCircle14(-param.L4 / 2 + i * n4step, py + param.L3 - param.L7, R2)
|
|
3862
4963
|
);
|
|
3863
4964
|
}
|
|
3864
4965
|
return rPlate;
|
|
3865
4966
|
};
|
|
3866
4967
|
ctrRod = function(py, ly) {
|
|
3867
|
-
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();
|
|
3868
4969
|
return rRod;
|
|
3869
4970
|
};
|
|
3870
4971
|
const L2h = param.L2 / 2;
|
|
3871
4972
|
const L4h = param.L4 / 2;
|
|
3872
4973
|
const L2hi = (param.L2 - 2 * param.E1) / 2;
|
|
3873
4974
|
const H1i = param.H1 - param.E1;
|
|
3874
|
-
const ctrRodExt =
|
|
3875
|
-
const ctrRodInt =
|
|
3876
|
-
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();
|
|
3877
4978
|
figCut.addMain(ctrRodExt);
|
|
3878
4979
|
figCut.addMain(ctrRodInt);
|
|
3879
4980
|
figCut.addSecond(ctrPlateSide);
|
|
@@ -3895,7 +4996,7 @@ function pGeom12(t, param, suffix = "") {
|
|
|
3895
4996
|
{
|
|
3896
4997
|
outName: `subpax_${designName}_rod`,
|
|
3897
4998
|
face: `${designName}_faceCut`,
|
|
3898
|
-
extrudeMethod:
|
|
4999
|
+
extrudeMethod: EExtrude13.eLinearOrtho,
|
|
3899
5000
|
length: param.L1,
|
|
3900
5001
|
rotate: [0, 0, 0],
|
|
3901
5002
|
translate: [0, 0, 0]
|
|
@@ -3903,7 +5004,7 @@ function pGeom12(t, param, suffix = "") {
|
|
|
3903
5004
|
{
|
|
3904
5005
|
outName: `subpax_${designName}_plates`,
|
|
3905
5006
|
face: `${designName}_faceTop`,
|
|
3906
|
-
extrudeMethod:
|
|
5007
|
+
extrudeMethod: EExtrude13.eLinearOrtho,
|
|
3907
5008
|
length: param.E2,
|
|
3908
5009
|
rotate: [Math.PI / 2, 0, 0],
|
|
3909
5010
|
translate: [0, param.E2 + param.H1, 0]
|
|
@@ -3912,7 +5013,7 @@ function pGeom12(t, param, suffix = "") {
|
|
|
3912
5013
|
volumes: [
|
|
3913
5014
|
{
|
|
3914
5015
|
outName: `pax_${designName}`,
|
|
3915
|
-
boolMethod:
|
|
5016
|
+
boolMethod: EBVolume16.eUnion,
|
|
3916
5017
|
inList: [`subpax_${designName}_rod`, `subpax_${designName}_plates`]
|
|
3917
5018
|
}
|
|
3918
5019
|
]
|
|
@@ -3929,47 +5030,51 @@ function pGeom12(t, param, suffix = "") {
|
|
|
3929
5030
|
var rodDef = {
|
|
3930
5031
|
pTitle: "Heliostat rod",
|
|
3931
5032
|
pDescription: "The rod of an heliostat-surface",
|
|
3932
|
-
pDef:
|
|
3933
|
-
pGeom:
|
|
5033
|
+
pDef: pDef16,
|
|
5034
|
+
pGeom: pGeom16
|
|
3934
5035
|
};
|
|
3935
5036
|
|
|
3936
5037
|
// src/heliostat/trapeze.ts
|
|
3937
5038
|
import {
|
|
3938
|
-
contour as
|
|
3939
|
-
contourCircle as
|
|
3940
|
-
figure as
|
|
3941
|
-
radToDeg as
|
|
3942
|
-
ffix as
|
|
3943
|
-
pNumber as
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
5039
|
+
contour as contour16,
|
|
5040
|
+
contourCircle as contourCircle15,
|
|
5041
|
+
figure as figure17,
|
|
5042
|
+
radToDeg as radToDeg9,
|
|
5043
|
+
ffix as ffix19,
|
|
5044
|
+
pNumber as pNumber17,
|
|
5045
|
+
pSectionSeparator as pSectionSeparator16,
|
|
5046
|
+
initGeom as initGeom17,
|
|
5047
|
+
EExtrude as EExtrude14,
|
|
5048
|
+
EBVolume as EBVolume17
|
|
3947
5049
|
} from "geometrix";
|
|
3948
|
-
var
|
|
5050
|
+
var pDef17 = {
|
|
3949
5051
|
partName: "trapeze",
|
|
3950
5052
|
params: [
|
|
3951
5053
|
//pNumber(name, unit, init, min, max, step)
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
5054
|
+
pNumber17("L1", "mm", 1600, 10, 4e3, 1),
|
|
5055
|
+
pNumber17("L2", "mm", 1e3, 10, 4e3, 1),
|
|
5056
|
+
pNumber17("L3", "mm", 400, 5, 800, 1),
|
|
5057
|
+
pNumber17("L4", "mm", 300, 5, 800, 1),
|
|
5058
|
+
pSectionSeparator16("outer frame"),
|
|
5059
|
+
pNumber17("N1", "", 7, 1, 20, 1),
|
|
5060
|
+
pNumber17("N2", "", 4, 1, 20, 1),
|
|
5061
|
+
pNumber17("D1", "mm", 10, 1, 40, 1),
|
|
5062
|
+
pNumber17("L5", "mm", 100, 1, 400, 1),
|
|
5063
|
+
pNumber17("L6", "mm", 20, 1, 400, 1),
|
|
5064
|
+
pNumber17("R1", "mm", 60, 1, 400, 1),
|
|
5065
|
+
pNumber17("R2", "mm", 20, 1, 400, 1),
|
|
5066
|
+
pSectionSeparator16("inner pad"),
|
|
5067
|
+
pNumber17("N3", "", 2, 1, 20, 1),
|
|
5068
|
+
pNumber17("N4", "", 2, 1, 20, 1),
|
|
5069
|
+
pNumber17("D2", "mm", 10, 1, 40, 1),
|
|
5070
|
+
pNumber17("L7", "mm", 20, 1, 400, 1),
|
|
5071
|
+
pNumber17("R3", "mm", 20, 1, 400, 1),
|
|
5072
|
+
pSectionSeparator16("diagonal shaft"),
|
|
5073
|
+
pNumber17("D3", "mm", 30, 1, 100, 1),
|
|
5074
|
+
pNumber17("D4", "mm", 26, 1, 100, 1),
|
|
5075
|
+
pNumber17("H1", "mm", 300, 0.5, 800, 0.5),
|
|
5076
|
+
pNumber17("H2", "mm", 2, 0.5, 800, 0.5),
|
|
5077
|
+
pNumber17("H3", "mm", 5, 0.5, 800, 0.5)
|
|
3973
5078
|
],
|
|
3974
5079
|
paramSvg: {
|
|
3975
5080
|
L1: "trapeze_top.svg",
|
|
@@ -4001,15 +5106,15 @@ var pDef13 = {
|
|
|
4001
5106
|
// every 0.5 second
|
|
4002
5107
|
}
|
|
4003
5108
|
};
|
|
4004
|
-
function
|
|
4005
|
-
const rGeome =
|
|
5109
|
+
function pGeom17(t, param, suffix = "") {
|
|
5110
|
+
const rGeome = initGeom17(pDef17.partName + suffix);
|
|
4006
5111
|
let ctrRodFootprint;
|
|
4007
5112
|
let ctrRod;
|
|
4008
|
-
const figFrame =
|
|
4009
|
-
const figPlate =
|
|
4010
|
-
const figRod =
|
|
4011
|
-
const figRodHollow =
|
|
4012
|
-
const figCutRod =
|
|
5113
|
+
const figFrame = figure17();
|
|
5114
|
+
const figPlate = figure17();
|
|
5115
|
+
const figRod = figure17();
|
|
5116
|
+
const figRodHollow = figure17();
|
|
5117
|
+
const figCutRod = figure17();
|
|
4013
5118
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4014
5119
|
`;
|
|
4015
5120
|
try {
|
|
@@ -4031,39 +5136,39 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4031
5136
|
const rod_slope_length = Math.sqrt(rod_xy ** 2 + rod_z ** 2);
|
|
4032
5137
|
const rod_slope_angle = Math.atan2(rod_z, rod_xy);
|
|
4033
5138
|
const rod_xy_angle = Math.atan2(rod_y, rod_x);
|
|
4034
|
-
rGeome.logstr += `rod-slope: length: ${
|
|
4035
|
-
|
|
5139
|
+
rGeome.logstr += `rod-slope: length: ${ffix19(rod_slope_length)} mm, angle: ${ffix19(
|
|
5140
|
+
radToDeg9(rod_slope_angle)
|
|
4036
5141
|
)} degree
|
|
4037
5142
|
`;
|
|
4038
|
-
rGeome.logstr += `rod-xy-angle: ${
|
|
5143
|
+
rGeome.logstr += `rod-xy-angle: ${ffix19(radToDeg9(rod_xy_angle))} degree
|
|
4039
5144
|
`;
|
|
4040
5145
|
const rodFootprintLength = param.D3 / Math.cos(Math.PI / 2 - rod_slope_angle);
|
|
4041
|
-
rGeome.logstr += `rod-footprint-length: ${
|
|
5146
|
+
rGeome.logstr += `rod-footprint-length: ${ffix19(rodFootprintLength)} mm
|
|
4042
5147
|
`;
|
|
4043
5148
|
const rodFPl = Math.sqrt((rodFootprintLength / 2) ** 2 + (param.D3 / 2) ** 2);
|
|
4044
5149
|
const rodFPa = Math.atan2(param.D3, rodFootprintLength);
|
|
4045
5150
|
ctrRodFootprint = function(px, py, angle) {
|
|
4046
|
-
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);
|
|
4047
5152
|
return rCtr;
|
|
4048
5153
|
};
|
|
4049
5154
|
ctrRod = function(px, py, angle) {
|
|
4050
5155
|
const px0 = px + rodFPl * Math.cos(angle + Math.PI - rodFPa);
|
|
4051
5156
|
const py0 = py + rodFPl * Math.sin(angle + Math.PI - rodFPa);
|
|
4052
|
-
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();
|
|
4053
5158
|
return rCtr;
|
|
4054
5159
|
};
|
|
4055
5160
|
if (param.R1 > param.L1 / 4 || param.R1 > param.L2 / 4) {
|
|
4056
5161
|
throw `err614: R1 ${param.R1} too large compare to L1 ${param.L1} or L2 ${param.L2}`;
|
|
4057
5162
|
}
|
|
4058
|
-
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);
|
|
4059
5164
|
if (param.R2 > (param.L1 - 2 * param.L5) / 4 || param.R2 > (param.L2 - 2 * param.L5) / 4) {
|
|
4060
5165
|
throw `err627: R2 ${param.R2} too large compare to L1 ${param.L1}, L2 ${param.L2} and L5 ${param.L5}`;
|
|
4061
5166
|
}
|
|
4062
|
-
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);
|
|
4063
5168
|
if (param.R3 > param.L3 / 4 || param.R3 > param.L4 / 4) {
|
|
4064
5169
|
throw `err639: R3 ${param.R3} too large compare to L3 ${param.L3} or L4 ${param.L4}`;
|
|
4065
5170
|
}
|
|
4066
|
-
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);
|
|
4067
5172
|
figFrame.addMain(ctrFrameExt);
|
|
4068
5173
|
figFrame.addMain(ctrFrameInt);
|
|
4069
5174
|
figFrame.addSecond(ctrPlate);
|
|
@@ -4083,35 +5188,35 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4083
5188
|
const lFrameHole = [];
|
|
4084
5189
|
for (let i = 1; i < param.N1 + 1; i++) {
|
|
4085
5190
|
lFrameHole.push(
|
|
4086
|
-
|
|
5191
|
+
contourCircle15(param.L2 / 2 - param.L6, -param.L1 / 2 + i * step1, param.D1 / 2)
|
|
4087
5192
|
);
|
|
4088
5193
|
lFrameHole.push(
|
|
4089
|
-
|
|
5194
|
+
contourCircle15(-param.L2 / 2 + param.L6, -param.L1 / 2 + i * step1, param.D1 / 2)
|
|
4090
5195
|
);
|
|
4091
5196
|
}
|
|
4092
5197
|
for (let i = 1; i < param.N2 + 1; i++) {
|
|
4093
5198
|
lFrameHole.push(
|
|
4094
|
-
|
|
5199
|
+
contourCircle15(-param.L2 / 2 + i * step2, param.L1 / 2 - param.L6, param.D1 / 2)
|
|
4095
5200
|
);
|
|
4096
5201
|
lFrameHole.push(
|
|
4097
|
-
|
|
5202
|
+
contourCircle15(-param.L2 / 2 + i * step2, -param.L1 / 2 + param.L6, param.D1 / 2)
|
|
4098
5203
|
);
|
|
4099
5204
|
}
|
|
4100
5205
|
const lPlateHole = [];
|
|
4101
5206
|
for (let i = 1; i < param.N3 + 1; i++) {
|
|
4102
5207
|
lPlateHole.push(
|
|
4103
|
-
|
|
5208
|
+
contourCircle15(param.L4 / 2 - param.L7, -param.L3 / 2 + i * step3, param.D2 / 2)
|
|
4104
5209
|
);
|
|
4105
5210
|
lPlateHole.push(
|
|
4106
|
-
|
|
5211
|
+
contourCircle15(-param.L4 / 2 + param.L7, -param.L3 / 2 + i * step3, param.D2 / 2)
|
|
4107
5212
|
);
|
|
4108
5213
|
}
|
|
4109
5214
|
for (let i = 1; i < param.N4 + 1; i++) {
|
|
4110
5215
|
lPlateHole.push(
|
|
4111
|
-
|
|
5216
|
+
contourCircle15(-param.L4 / 2 + i * step4, param.L3 / 2 - param.L7, param.D2 / 2)
|
|
4112
5217
|
);
|
|
4113
5218
|
lPlateHole.push(
|
|
4114
|
-
|
|
5219
|
+
contourCircle15(-param.L4 / 2 + i * step4, -param.L3 / 2 + param.L7, param.D2 / 2)
|
|
4115
5220
|
);
|
|
4116
5221
|
}
|
|
4117
5222
|
lFrameHole.forEach((ctr) => {
|
|
@@ -4166,17 +5271,17 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4166
5271
|
if (param.D4 >= param.D3) {
|
|
4167
5272
|
throw `err218: D4 ${param.D4} larger than D3 ${param.D3}`;
|
|
4168
5273
|
}
|
|
4169
|
-
figRod.addMain(
|
|
4170
|
-
figRod.addSecond(
|
|
4171
|
-
figRodHollow.addMain(
|
|
4172
|
-
figRodHollow.addSecond(
|
|
5274
|
+
figRod.addMain(contourCircle15(0, 0, param.D3 / 2));
|
|
5275
|
+
figRod.addSecond(contourCircle15(0, 0, param.D4 / 2));
|
|
5276
|
+
figRodHollow.addMain(contourCircle15(0, 0, param.D4 / 2));
|
|
5277
|
+
figRodHollow.addSecond(contourCircle15(0, 0, param.D3 / 2));
|
|
4173
5278
|
const rodFootprintHeight = param.D3 * Math.cos(rod_slope_angle);
|
|
4174
5279
|
const rodFootprintBack = rodFootprintHeight / Math.tan(rod_slope_angle);
|
|
4175
5280
|
const pad3x = pad3 + (rodFootprintLength / 2 + rodFootprintBack) * Math.cos(rod_xy_angle);
|
|
4176
5281
|
const pad3y = pad3 + (rodFootprintLength / 2 + rodFootprintBack) * Math.sin(rod_xy_angle);
|
|
4177
5282
|
const rodExtrudeLength = rod_slope_length + 2 * (rodFootprintLength + rodFootprintBack + rodFootprintHeight);
|
|
4178
5283
|
const cutL = rodExtrudeLength + param.L3 + param.L4 + rodFootprintHeight;
|
|
4179
|
-
const ctrCutRod =
|
|
5284
|
+
const ctrCutRod = contour16(cutL, cutL).addSegStrokeA(-cutL, cutL).addSegStrokeA(-cutL, -cutL).addSegStrokeA(cutL, -cutL).closeSegStroke();
|
|
4180
5285
|
figCutRod.addMain(ctrCutRod);
|
|
4181
5286
|
rGeome.fig = {
|
|
4182
5287
|
faceFrame: figFrame,
|
|
@@ -4191,7 +5296,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4191
5296
|
{
|
|
4192
5297
|
outName: `subpax_${designName}_frame`,
|
|
4193
5298
|
face: `${designName}_faceFrame`,
|
|
4194
|
-
extrudeMethod:
|
|
5299
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4195
5300
|
length: param.H2,
|
|
4196
5301
|
rotate: [0, 0, 0],
|
|
4197
5302
|
translate: [0, 0, param.H1 - param.H2]
|
|
@@ -4199,7 +5304,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4199
5304
|
{
|
|
4200
5305
|
outName: `subpax_${designName}_plate`,
|
|
4201
5306
|
face: `${designName}_facePlate`,
|
|
4202
|
-
extrudeMethod:
|
|
5307
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4203
5308
|
length: param.H3,
|
|
4204
5309
|
rotate: [0, 0, 0],
|
|
4205
5310
|
translate: [0, 0, 0]
|
|
@@ -4207,7 +5312,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4207
5312
|
{
|
|
4208
5313
|
outName: `subpax_${designName}_rod1`,
|
|
4209
5314
|
face: `${designName}_faceRod`,
|
|
4210
|
-
extrudeMethod:
|
|
5315
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4211
5316
|
length: rodExtrudeLength,
|
|
4212
5317
|
rotate: [0, Math.PI / 2 - rod_slope_angle, rod_xy_angle],
|
|
4213
5318
|
translate: [
|
|
@@ -4219,7 +5324,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4219
5324
|
{
|
|
4220
5325
|
outName: `subpax_${designName}_rod2`,
|
|
4221
5326
|
face: `${designName}_faceRod`,
|
|
4222
|
-
extrudeMethod:
|
|
5327
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4223
5328
|
length: rodExtrudeLength,
|
|
4224
5329
|
rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI - rod_xy_angle],
|
|
4225
5330
|
translate: [
|
|
@@ -4231,7 +5336,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4231
5336
|
{
|
|
4232
5337
|
outName: `subpax_${designName}_rod3`,
|
|
4233
5338
|
face: `${designName}_faceRod`,
|
|
4234
|
-
extrudeMethod:
|
|
5339
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4235
5340
|
length: rodExtrudeLength,
|
|
4236
5341
|
rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI + rod_xy_angle],
|
|
4237
5342
|
translate: [
|
|
@@ -4243,7 +5348,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4243
5348
|
{
|
|
4244
5349
|
outName: `subpax_${designName}_rod4`,
|
|
4245
5350
|
face: `${designName}_faceRod`,
|
|
4246
|
-
extrudeMethod:
|
|
5351
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4247
5352
|
length: rodExtrudeLength,
|
|
4248
5353
|
rotate: [0, Math.PI / 2 - rod_slope_angle, -rod_xy_angle],
|
|
4249
5354
|
translate: [
|
|
@@ -4255,7 +5360,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4255
5360
|
{
|
|
4256
5361
|
outName: `subpax_${designName}_rodH1`,
|
|
4257
5362
|
face: `${designName}_faceRodHollow`,
|
|
4258
|
-
extrudeMethod:
|
|
5363
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4259
5364
|
length: rodExtrudeLength,
|
|
4260
5365
|
rotate: [0, Math.PI / 2 - rod_slope_angle, rod_xy_angle],
|
|
4261
5366
|
translate: [
|
|
@@ -4267,7 +5372,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4267
5372
|
{
|
|
4268
5373
|
outName: `subpax_${designName}_rodH2`,
|
|
4269
5374
|
face: `${designName}_faceRodHollow`,
|
|
4270
|
-
extrudeMethod:
|
|
5375
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4271
5376
|
length: rodExtrudeLength,
|
|
4272
5377
|
rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI - rod_xy_angle],
|
|
4273
5378
|
translate: [
|
|
@@ -4279,7 +5384,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4279
5384
|
{
|
|
4280
5385
|
outName: `subpax_${designName}_rodH3`,
|
|
4281
5386
|
face: `${designName}_faceRodHollow`,
|
|
4282
|
-
extrudeMethod:
|
|
5387
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4283
5388
|
length: rodExtrudeLength,
|
|
4284
5389
|
rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI + rod_xy_angle],
|
|
4285
5390
|
translate: [
|
|
@@ -4291,7 +5396,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4291
5396
|
{
|
|
4292
5397
|
outName: `subpax_${designName}_rodH4`,
|
|
4293
5398
|
face: `${designName}_faceRodHollow`,
|
|
4294
|
-
extrudeMethod:
|
|
5399
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4295
5400
|
length: rodExtrudeLength,
|
|
4296
5401
|
rotate: [0, Math.PI / 2 - rod_slope_angle, -rod_xy_angle],
|
|
4297
5402
|
translate: [
|
|
@@ -4303,7 +5408,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4303
5408
|
{
|
|
4304
5409
|
outName: `subpax_${designName}_cut1`,
|
|
4305
5410
|
face: `${designName}_faceCutRod`,
|
|
4306
|
-
extrudeMethod:
|
|
5411
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4307
5412
|
length: cutL,
|
|
4308
5413
|
rotate: [0, 0, 0],
|
|
4309
5414
|
translate: [0, 0, -cutL]
|
|
@@ -4311,7 +5416,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4311
5416
|
{
|
|
4312
5417
|
outName: `subpax_${designName}_cut2`,
|
|
4313
5418
|
face: `${designName}_faceCutRod`,
|
|
4314
|
-
extrudeMethod:
|
|
5419
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
4315
5420
|
length: cutL,
|
|
4316
5421
|
rotate: [0, 0, 0],
|
|
4317
5422
|
translate: [0, 0, param.H1]
|
|
@@ -4320,7 +5425,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4320
5425
|
volumes: [
|
|
4321
5426
|
{
|
|
4322
5427
|
outName: `ipax_${designName}_rawRod`,
|
|
4323
|
-
boolMethod:
|
|
5428
|
+
boolMethod: EBVolume17.eUnion,
|
|
4324
5429
|
inList: [
|
|
4325
5430
|
`subpax_${designName}_rod1`,
|
|
4326
5431
|
`subpax_${designName}_rod2`,
|
|
@@ -4330,7 +5435,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4330
5435
|
},
|
|
4331
5436
|
{
|
|
4332
5437
|
outName: `ipax_${designName}_rodHollow`,
|
|
4333
|
-
boolMethod:
|
|
5438
|
+
boolMethod: EBVolume17.eUnion,
|
|
4334
5439
|
inList: [
|
|
4335
5440
|
`subpax_${designName}_rodH1`,
|
|
4336
5441
|
`subpax_${designName}_rodH2`,
|
|
@@ -4340,17 +5445,17 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4340
5445
|
},
|
|
4341
5446
|
{
|
|
4342
5447
|
outName: `ipax_${designName}_halfRods`,
|
|
4343
|
-
boolMethod:
|
|
5448
|
+
boolMethod: EBVolume17.eSubstraction,
|
|
4344
5449
|
inList: [`ipax_${designName}_rawRod`, `subpax_${designName}_cut1`]
|
|
4345
5450
|
},
|
|
4346
5451
|
{
|
|
4347
5452
|
outName: `ipax_${designName}_rods`,
|
|
4348
|
-
boolMethod:
|
|
5453
|
+
boolMethod: EBVolume17.eSubstraction,
|
|
4349
5454
|
inList: [`ipax_${designName}_halfRods`, `subpax_${designName}_cut2`]
|
|
4350
5455
|
},
|
|
4351
5456
|
{
|
|
4352
5457
|
outName: `ipax_${designName}_plus`,
|
|
4353
|
-
boolMethod:
|
|
5458
|
+
boolMethod: EBVolume17.eUnion,
|
|
4354
5459
|
inList: [
|
|
4355
5460
|
`subpax_${designName}_frame`,
|
|
4356
5461
|
`subpax_${designName}_plate`,
|
|
@@ -4359,7 +5464,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4359
5464
|
},
|
|
4360
5465
|
{
|
|
4361
5466
|
outName: `pax_${designName}`,
|
|
4362
|
-
boolMethod:
|
|
5467
|
+
boolMethod: EBVolume17.eSubstraction,
|
|
4363
5468
|
inList: [`ipax_${designName}_plus`, `ipax_${designName}_rodHollow`]
|
|
4364
5469
|
}
|
|
4365
5470
|
]
|
|
@@ -4376,49 +5481,54 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4376
5481
|
var trapezeDef = {
|
|
4377
5482
|
pTitle: "Heliostat trapeze",
|
|
4378
5483
|
pDescription: "The support of one solar panel. Made out of aluminium for lightness and cooling",
|
|
4379
|
-
pDef:
|
|
4380
|
-
pGeom:
|
|
5484
|
+
pDef: pDef17,
|
|
5485
|
+
pGeom: pGeom17
|
|
4381
5486
|
};
|
|
4382
5487
|
|
|
4383
5488
|
// src/heliostat/surface.ts
|
|
4384
5489
|
import {
|
|
4385
|
-
contour as
|
|
4386
|
-
figure as
|
|
4387
|
-
ffix as
|
|
4388
|
-
pNumber as
|
|
4389
|
-
pCheckbox as
|
|
5490
|
+
contour as contour17,
|
|
5491
|
+
figure as figure18,
|
|
5492
|
+
ffix as ffix20,
|
|
5493
|
+
pNumber as pNumber18,
|
|
5494
|
+
pCheckbox as pCheckbox4,
|
|
4390
5495
|
pDropdown as pDropdown2,
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
5496
|
+
pSectionSeparator as pSectionSeparator17,
|
|
5497
|
+
initGeom as initGeom18,
|
|
5498
|
+
EExtrude as EExtrude15,
|
|
5499
|
+
EBVolume as EBVolume18
|
|
4394
5500
|
} from "geometrix";
|
|
4395
|
-
var
|
|
5501
|
+
var pDef18 = {
|
|
4396
5502
|
partName: "surface",
|
|
4397
5503
|
params: [
|
|
4398
5504
|
//pNumber(name, unit, init, min, max, step)
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
5505
|
+
pNumber18("LH", "mm", 1600, 10, 4e3, 1),
|
|
5506
|
+
pNumber18("LV", "mm", 1e3, 10, 4e3, 1),
|
|
5507
|
+
pNumber18("LZ", "mm", 40, 0, 100, 1),
|
|
5508
|
+
pNumber18("nx", "", 9, 1, 40, 1),
|
|
5509
|
+
pNumber18("ny", "", 9, 1, 40, 1),
|
|
5510
|
+
pSectionSeparator17("main fantasia"),
|
|
4404
5511
|
pDropdown2("main_direction", ["horizontal", "vertical"]),
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
5512
|
+
pCheckbox4("crenel", false),
|
|
5513
|
+
pNumber18("first_row", "", 9, 1, 40, 1),
|
|
5514
|
+
pNumber18("second_row", "", 9, 1, 40, 1),
|
|
5515
|
+
pSectionSeparator17("horizontal spacing"),
|
|
5516
|
+
pNumber18("EH", "mm", 10, 0, 1e3, 1),
|
|
5517
|
+
pCheckbox4("EH_gradient", false),
|
|
5518
|
+
pNumber18("EH_sup", "mm", 500, 0, 1e3, 1),
|
|
5519
|
+
pNumber18("EH_cycle", "", 1, 0, 3, 0.05),
|
|
5520
|
+
pNumber18("EH_start", "", 0, 0, 1, 0.05),
|
|
4413
5521
|
pDropdown2("EH_shape", ["sinusoid", "triangle", "sawUp", "sawDown"]),
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
5522
|
+
pSectionSeparator17("vertical spacing"),
|
|
5523
|
+
pNumber18("EV", "mm", 10, 0, 1e3, 1),
|
|
5524
|
+
pCheckbox4("EV_gradient", false),
|
|
5525
|
+
pNumber18("EV_sup", "mm", 500, 0, 1e3, 1),
|
|
5526
|
+
pNumber18("EV_cycle", "", 1, 0, 3, 0.05),
|
|
5527
|
+
pNumber18("EV_start", "", 0, 0, 1, 0.05),
|
|
4419
5528
|
pDropdown2("EV_shape", ["sinusoid", "triangle", "sawUp", "sawDown"]),
|
|
4420
|
-
|
|
4421
|
-
|
|
5529
|
+
pSectionSeparator17("solar power"),
|
|
5530
|
+
pNumber18("power_efficiency", "%", 16, 0, 100, 0.1),
|
|
5531
|
+
pNumber18("solar_power", "W/m2", 816, 100, 2e3, 1)
|
|
4422
5532
|
// 1361*0.6=816 W/m2
|
|
4423
5533
|
],
|
|
4424
5534
|
paramSvg: {
|
|
@@ -4453,26 +5563,26 @@ var pDef14 = {
|
|
|
4453
5563
|
// every 0.5 second
|
|
4454
5564
|
}
|
|
4455
5565
|
};
|
|
4456
|
-
function
|
|
4457
|
-
const rGeome =
|
|
5566
|
+
function pGeom18(t, param, suffix = "") {
|
|
5567
|
+
const rGeome = initGeom18(pDef18.partName + suffix);
|
|
4458
5568
|
let ctrPanelProfile;
|
|
4459
|
-
const figSurface =
|
|
4460
|
-
const figOnePanel =
|
|
5569
|
+
const figSurface = figure18();
|
|
5570
|
+
const figOnePanel = figure18();
|
|
4461
5571
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4462
5572
|
`;
|
|
4463
5573
|
try {
|
|
4464
5574
|
const panel_surface = param.LH * param.LV / 10 ** 6;
|
|
4465
5575
|
const panel_power = param.solar_power * panel_surface * param.power_efficiency / 100;
|
|
4466
|
-
rGeome.logstr += `panel surface: ${
|
|
5576
|
+
rGeome.logstr += `panel surface: ${ffix20(panel_surface)} m2
|
|
4467
5577
|
`;
|
|
4468
|
-
rGeome.logstr += `panel power: ${
|
|
5578
|
+
rGeome.logstr += `panel power: ${ffix20(panel_power)} W
|
|
4469
5579
|
`;
|
|
4470
5580
|
const max_panel_nb = param.nx * param.ny;
|
|
4471
5581
|
rGeome.logstr += `max panel number: ${max_panel_nb}
|
|
4472
5582
|
`;
|
|
4473
|
-
rGeome.logstr += `max panel surface: ${
|
|
5583
|
+
rGeome.logstr += `max panel surface: ${ffix20(max_panel_nb * panel_surface)} m2
|
|
4474
5584
|
`;
|
|
4475
|
-
rGeome.logstr += `max panel power: ${
|
|
5585
|
+
rGeome.logstr += `max panel power: ${ffix20(max_panel_nb * panel_power)} W
|
|
4476
5586
|
`;
|
|
4477
5587
|
const lenMain = param.main_direction === 1 ? param.ny : param.nx;
|
|
4478
5588
|
const lenLateral = param.main_direction === 1 ? param.nx : param.ny;
|
|
@@ -4505,13 +5615,13 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4505
5615
|
lenRow.forEach((oneRow) => {
|
|
4506
5616
|
panelNb += oneRow;
|
|
4507
5617
|
});
|
|
4508
|
-
rGeome.logstr += `actual panel number: ${panelNb} (${
|
|
5618
|
+
rGeome.logstr += `actual panel number: ${panelNb} (${ffix20(
|
|
4509
5619
|
100 * panelNb / max_panel_nb
|
|
4510
5620
|
)} %)
|
|
4511
5621
|
`;
|
|
4512
|
-
rGeome.logstr += `actual panel surface: ${
|
|
5622
|
+
rGeome.logstr += `actual panel surface: ${ffix20(panelNb * panel_surface)} m2
|
|
4513
5623
|
`;
|
|
4514
|
-
rGeome.logstr += `actual panel power: ${
|
|
5624
|
+
rGeome.logstr += `actual panel power: ${ffix20(panelNb * panel_power)} W
|
|
4515
5625
|
`;
|
|
4516
5626
|
const eMain = [];
|
|
4517
5627
|
for (let i = 0; i < lenMain - 1; i++) {
|
|
@@ -4587,18 +5697,18 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4587
5697
|
gLenVertical = lenMain * param.LV + eMainTotal;
|
|
4588
5698
|
}
|
|
4589
5699
|
const gArea = gLenHorizontal * gLenVertical / 10 ** 6;
|
|
4590
|
-
rGeome.logstr += `global horizontal width: ${
|
|
5700
|
+
rGeome.logstr += `global horizontal width: ${ffix20(gLenHorizontal / 1e3)} m
|
|
4591
5701
|
`;
|
|
4592
|
-
rGeome.logstr += `global vertical height: ${
|
|
5702
|
+
rGeome.logstr += `global vertical height: ${ffix20(gLenVertical / 1e3)} m
|
|
4593
5703
|
`;
|
|
4594
|
-
rGeome.logstr += `global area: ${
|
|
5704
|
+
rGeome.logstr += `global area: ${ffix20(gArea)} m2
|
|
4595
5705
|
`;
|
|
4596
|
-
rGeome.logstr += `area efficiency: ${
|
|
5706
|
+
rGeome.logstr += `area efficiency: ${ffix20(100 * panelNb * panel_surface / gArea)} %
|
|
4597
5707
|
`;
|
|
4598
5708
|
const ox = -gLenHorizontal / 2;
|
|
4599
5709
|
const oy = -gLenVertical / 2;
|
|
4600
5710
|
ctrPanelProfile = function(px, py) {
|
|
4601
|
-
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();
|
|
4602
5712
|
return rPanelProfile;
|
|
4603
5713
|
};
|
|
4604
5714
|
const panelPositions = [];
|
|
@@ -4638,7 +5748,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4638
5748
|
const rElem = {
|
|
4639
5749
|
outName: `subpax_${designName}_panel_${idx}`,
|
|
4640
5750
|
face: `${designName}_faceOnePanel`,
|
|
4641
|
-
extrudeMethod:
|
|
5751
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
4642
5752
|
length: param.LZ,
|
|
4643
5753
|
rotate: [0, 0, 0],
|
|
4644
5754
|
translate: [elem[0], elem[1], 0]
|
|
@@ -4649,7 +5759,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4649
5759
|
{
|
|
4650
5760
|
outName: `pax_${designName}`,
|
|
4651
5761
|
//boolMethod: EBVolume.eIdentity,
|
|
4652
|
-
boolMethod:
|
|
5762
|
+
boolMethod: EBVolume18.eUnion,
|
|
4653
5763
|
inList: panelPositions.map((elem, idx) => {
|
|
4654
5764
|
const subElem = `subpax_${designName}_panel_${idx}`;
|
|
4655
5765
|
return subElem;
|
|
@@ -4669,19 +5779,19 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4669
5779
|
var surfaceDef = {
|
|
4670
5780
|
pTitle: "Heliostat panel-surface",
|
|
4671
5781
|
pDescription: "The surface collecting the solar power",
|
|
4672
|
-
pDef:
|
|
4673
|
-
pGeom:
|
|
5782
|
+
pDef: pDef18,
|
|
5783
|
+
pGeom: pGeom18
|
|
4674
5784
|
};
|
|
4675
5785
|
|
|
4676
5786
|
// src/dummy/circles.ts
|
|
4677
|
-
import { degToRad as
|
|
4678
|
-
var
|
|
5787
|
+
import { degToRad as degToRad6, point as point6, figure as figure19, pNumber as pNumber19, initGeom as initGeom19 } from "geometrix";
|
|
5788
|
+
var pDef19 = {
|
|
4679
5789
|
partName: "circles",
|
|
4680
5790
|
params: [
|
|
4681
5791
|
//pNumber(name, unit, init, min, max, step)
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
5792
|
+
pNumber19("angle", "degree", 15, 5, 45, 1),
|
|
5793
|
+
pNumber19("amplitude-offset", "mm", 1, 0.5, 4, 0.1),
|
|
5794
|
+
pNumber19("amplitude-scale", "scalar", 0.2, 0.1, 0.5, 0.01)
|
|
4685
5795
|
],
|
|
4686
5796
|
paramSvg: {
|
|
4687
5797
|
angle: "circles_angle.svg",
|
|
@@ -4694,18 +5804,18 @@ var pDef15 = {
|
|
|
4694
5804
|
tUpdate: 500
|
|
4695
5805
|
}
|
|
4696
5806
|
};
|
|
4697
|
-
function
|
|
4698
|
-
const rGeome =
|
|
5807
|
+
function pGeom19(t, param, suffix = "") {
|
|
5808
|
+
const rGeome = initGeom19(pDef19.partName + suffix);
|
|
4699
5809
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4700
5810
|
`;
|
|
4701
5811
|
try {
|
|
4702
|
-
const figOne =
|
|
4703
|
-
const p1 =
|
|
4704
|
-
const p2 =
|
|
5812
|
+
const figOne = figure19();
|
|
5813
|
+
const p1 = point6(10, 10);
|
|
5814
|
+
const p2 = point6(10, 30);
|
|
4705
5815
|
figOne.addPoint(p2);
|
|
4706
5816
|
for (let i = 0; i < 20; i++) {
|
|
4707
5817
|
figOne.addPoint(
|
|
4708
|
-
p1.scale(p2, param["amplitude-offset"] + param["amplitude-scale"] * i).rotate(p2, i *
|
|
5818
|
+
p1.scale(p2, param["amplitude-offset"] + param["amplitude-scale"] * i).rotate(p2, i * degToRad6(param.angle) + t * Math.PI / 2 / pDef19.sim.tMax)
|
|
4709
5819
|
);
|
|
4710
5820
|
}
|
|
4711
5821
|
rGeome.fig = { one: figOne };
|
|
@@ -4720,18 +5830,18 @@ function pGeom15(t, param, suffix = "") {
|
|
|
4720
5830
|
var circlesDef = {
|
|
4721
5831
|
pTitle: "Circles",
|
|
4722
5832
|
pDescription: "A spiral made by points.",
|
|
4723
|
-
pDef:
|
|
4724
|
-
pGeom:
|
|
5833
|
+
pDef: pDef19,
|
|
5834
|
+
pGeom: pGeom19
|
|
4725
5835
|
};
|
|
4726
5836
|
|
|
4727
5837
|
// src/dummy/rectangle.ts
|
|
4728
|
-
import { point as
|
|
4729
|
-
var
|
|
5838
|
+
import { point as point7, figure as figure20, pNumber as pNumber20, initGeom as initGeom20 } from "geometrix";
|
|
5839
|
+
var pDef20 = {
|
|
4730
5840
|
partName: "rectangle",
|
|
4731
5841
|
params: [
|
|
4732
5842
|
//pNumber(name, unit, init, min, max, step)
|
|
4733
|
-
|
|
4734
|
-
|
|
5843
|
+
pNumber20("width", "mm", 15, 3, 40, 0.5),
|
|
5844
|
+
pNumber20("height", "mm", 10, 3, 40, 0.5)
|
|
4735
5845
|
],
|
|
4736
5846
|
paramSvg: {
|
|
4737
5847
|
width: "rectangle_width.svg",
|
|
@@ -4743,16 +5853,16 @@ var pDef16 = {
|
|
|
4743
5853
|
tUpdate: 500
|
|
4744
5854
|
}
|
|
4745
5855
|
};
|
|
4746
|
-
function
|
|
4747
|
-
const rGeome =
|
|
5856
|
+
function pGeom20(t, param, suffix = "") {
|
|
5857
|
+
const rGeome = initGeom20(pDef20.partName + suffix);
|
|
4748
5858
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4749
5859
|
`;
|
|
4750
5860
|
try {
|
|
4751
|
-
const figOne =
|
|
4752
|
-
const p1 =
|
|
4753
|
-
const p2 =
|
|
4754
|
-
const p3 =
|
|
4755
|
-
const p4 =
|
|
5861
|
+
const figOne = figure20();
|
|
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);
|
|
4756
5866
|
const angle = t * Math.PI / 180;
|
|
4757
5867
|
figOne.addPoint(p1);
|
|
4758
5868
|
figOne.addPoint(p2.rotate(p1, angle));
|
|
@@ -4770,25 +5880,25 @@ function pGeom16(t, param, suffix = "") {
|
|
|
4770
5880
|
var rectangleDef = {
|
|
4771
5881
|
pTitle: "Rectangle",
|
|
4772
5882
|
pDescription: "Just a rectangle.",
|
|
4773
|
-
pDef:
|
|
4774
|
-
pGeom:
|
|
5883
|
+
pDef: pDef20,
|
|
5884
|
+
pGeom: pGeom20
|
|
4775
5885
|
};
|
|
4776
5886
|
|
|
4777
5887
|
// src/dummy/pole_static.ts
|
|
4778
5888
|
import {
|
|
4779
|
-
contour as
|
|
4780
|
-
contourCircle as
|
|
4781
|
-
figure as
|
|
4782
|
-
pNumber as
|
|
4783
|
-
initGeom as
|
|
5889
|
+
contour as contour18,
|
|
5890
|
+
contourCircle as contourCircle16,
|
|
5891
|
+
figure as figure21,
|
|
5892
|
+
pNumber as pNumber21,
|
|
5893
|
+
initGeom as initGeom21
|
|
4784
5894
|
} from "geometrix";
|
|
4785
|
-
var
|
|
5895
|
+
var pDef21 = {
|
|
4786
5896
|
partName: "pole_static",
|
|
4787
5897
|
params: [
|
|
4788
5898
|
//pNumber(name, unit, init, min, max, step)
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
5899
|
+
pNumber21("H1", "mm", 4e3, 100, 4e4, 10),
|
|
5900
|
+
pNumber21("H2", "mm", 5e3, 100, 4e4, 10),
|
|
5901
|
+
pNumber21("radius", "mm", 1e3, 100, 4e4, 10)
|
|
4792
5902
|
],
|
|
4793
5903
|
paramSvg: {
|
|
4794
5904
|
H1: "dummy_pole_static_face.svg",
|
|
@@ -4802,15 +5912,15 @@ var pDef17 = {
|
|
|
4802
5912
|
// every 0.5 second
|
|
4803
5913
|
}
|
|
4804
5914
|
};
|
|
4805
|
-
function
|
|
4806
|
-
const rGeome =
|
|
4807
|
-
const figFace =
|
|
5915
|
+
function pGeom21(t, param, suffix = "") {
|
|
5916
|
+
const rGeome = initGeom21(pDef21.partName + suffix);
|
|
5917
|
+
const figFace = figure21();
|
|
4808
5918
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4809
5919
|
`;
|
|
4810
5920
|
try {
|
|
4811
|
-
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();
|
|
4812
5922
|
figFace.addMain(ctrPoleFace);
|
|
4813
|
-
figFace.addMain(
|
|
5923
|
+
figFace.addMain(contourCircle16(0, 0, param.radius));
|
|
4814
5924
|
rGeome.fig = {
|
|
4815
5925
|
poleFace: figFace
|
|
4816
5926
|
};
|
|
@@ -4826,22 +5936,22 @@ function pGeom17(t, param, suffix = "") {
|
|
|
4826
5936
|
var dummyPoleStaticDef = {
|
|
4827
5937
|
pTitle: "Dummy pole static",
|
|
4828
5938
|
pDescription: "Testing two design with identical name",
|
|
4829
|
-
pDef:
|
|
4830
|
-
pGeom:
|
|
5939
|
+
pDef: pDef21,
|
|
5940
|
+
pGeom: pGeom21
|
|
4831
5941
|
};
|
|
4832
5942
|
|
|
4833
5943
|
// src/geometrix_verification/verify_point.ts
|
|
4834
|
-
import { degToRad as
|
|
4835
|
-
var
|
|
5944
|
+
import { degToRad as degToRad7, point as point8, figure as figure22, pNumber as pNumber22, initGeom as initGeom22 } from "geometrix";
|
|
5945
|
+
var pDef22 = {
|
|
4836
5946
|
partName: "verify_point",
|
|
4837
5947
|
params: [
|
|
4838
5948
|
//pNumber(name, unit, init, min, max, step)
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
5949
|
+
pNumber22("p1x", "mm", 30, -200, 200, 1),
|
|
5950
|
+
pNumber22("p1y", "mm", 50, -200, 200, 1),
|
|
5951
|
+
pNumber22("p2a", "degree", 30, -200, 200, 1),
|
|
5952
|
+
pNumber22("p2l", "mm", 60, 0, 200, 1),
|
|
5953
|
+
pNumber22("rotateOrig", "degree", 45, -200, 200, 1),
|
|
5954
|
+
pNumber22("scaleOrig", "scalar", 1.5, 0.1, 2, 0.1)
|
|
4845
5955
|
],
|
|
4846
5956
|
paramSvg: {
|
|
4847
5957
|
p1x: "verify_point_p1x.svg",
|
|
@@ -4858,15 +5968,15 @@ var pDef18 = {
|
|
|
4858
5968
|
// every 0.5 second
|
|
4859
5969
|
}
|
|
4860
5970
|
};
|
|
4861
|
-
function
|
|
4862
|
-
const rGeome =
|
|
5971
|
+
function pGeom22(t, param, suffix = "") {
|
|
5972
|
+
const rGeome = initGeom22(pDef22.partName + suffix);
|
|
4863
5973
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4864
5974
|
`;
|
|
4865
5975
|
try {
|
|
4866
|
-
const figOne =
|
|
4867
|
-
const p1 =
|
|
4868
|
-
const p2 =
|
|
4869
|
-
const p3 = p1.rotateOrig(
|
|
5976
|
+
const figOne = figure22();
|
|
5977
|
+
const p1 = point8(param.p1x, param.p1y + t);
|
|
5978
|
+
const p2 = point8(0, 0).setPolar(degToRad7(param.p2a), param.p2l);
|
|
5979
|
+
const p3 = p1.rotateOrig(degToRad7(param.rotateOrig));
|
|
4870
5980
|
const p4 = p1.scaleOrig(param.scaleOrig);
|
|
4871
5981
|
figOne.addPoint(p1);
|
|
4872
5982
|
figOne.addPoint(p2);
|
|
@@ -4884,23 +5994,23 @@ function pGeom18(t, param, suffix = "") {
|
|
|
4884
5994
|
var verifyPoint1Def = {
|
|
4885
5995
|
pTitle: "Verify point",
|
|
4886
5996
|
pDescription: "Debugging point.ts",
|
|
4887
|
-
pDef:
|
|
4888
|
-
pGeom:
|
|
5997
|
+
pDef: pDef22,
|
|
5998
|
+
pGeom: pGeom22
|
|
4889
5999
|
};
|
|
4890
6000
|
|
|
4891
6001
|
// src/geometrix_verification/verify_point_2.ts
|
|
4892
|
-
import { point as
|
|
4893
|
-
var
|
|
6002
|
+
import { point as point9, figure as figure23, pNumber as pNumber23, initGeom as initGeom23 } from "geometrix";
|
|
6003
|
+
var pDef23 = {
|
|
4894
6004
|
partName: "verify_point_2",
|
|
4895
6005
|
params: [
|
|
4896
6006
|
//pNumber(name, unit, init, min, max, step)
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
6007
|
+
pNumber23("p1x", "mm", 30, -200, 200, 1),
|
|
6008
|
+
pNumber23("p1y", "mm", 50, -200, 200, 1),
|
|
6009
|
+
pNumber23("p2x", "mm", -10, -200, 200, 1),
|
|
6010
|
+
pNumber23("p2y", "mm", 60, -200, 200, 1),
|
|
6011
|
+
pNumber23("p3x", "mm", 70, -200, 200, 1),
|
|
6012
|
+
pNumber23("p3y", "mm", -20, -200, 200, 1),
|
|
6013
|
+
pNumber23("dist", "mm", 50, 0, 200, 1)
|
|
4904
6014
|
],
|
|
4905
6015
|
paramSvg: {
|
|
4906
6016
|
p1x: "verify_line_p1x.svg",
|
|
@@ -4918,15 +6028,15 @@ var pDef19 = {
|
|
|
4918
6028
|
// every 0.5 second
|
|
4919
6029
|
}
|
|
4920
6030
|
};
|
|
4921
|
-
function
|
|
4922
|
-
const rGeome =
|
|
6031
|
+
function pGeom23(t, param, suffix = "") {
|
|
6032
|
+
const rGeome = initGeom23(pDef23.partName + suffix);
|
|
4923
6033
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4924
6034
|
`;
|
|
4925
6035
|
try {
|
|
4926
|
-
const figOne =
|
|
4927
|
-
const p1 =
|
|
4928
|
-
const p2 =
|
|
4929
|
-
const p3 =
|
|
6036
|
+
const figOne = figure23();
|
|
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);
|
|
4930
6040
|
const mp1p2 = p1.middlePoint(p2);
|
|
4931
6041
|
const ep1p2 = p1.equidistantPoint(p2, param.dist, p3);
|
|
4932
6042
|
figOne.addPoint(p1);
|
|
@@ -4946,22 +6056,22 @@ function pGeom19(t, param, suffix = "") {
|
|
|
4946
6056
|
var verifyPoint2Def = {
|
|
4947
6057
|
pTitle: "Verify point 2",
|
|
4948
6058
|
pDescription: "Debugging more point.ts",
|
|
4949
|
-
pDef:
|
|
4950
|
-
pGeom:
|
|
6059
|
+
pDef: pDef23,
|
|
6060
|
+
pGeom: pGeom23
|
|
4951
6061
|
};
|
|
4952
6062
|
|
|
4953
6063
|
// src/geometrix_verification/verify_line.ts
|
|
4954
|
-
import { point as
|
|
4955
|
-
var
|
|
6064
|
+
import { point as point10, line, linePP, figure as figure24, pNumber as pNumber24, initGeom as initGeom24 } from "geometrix";
|
|
6065
|
+
var pDef24 = {
|
|
4956
6066
|
partName: "verify_line",
|
|
4957
6067
|
params: [
|
|
4958
6068
|
//pNumber(name, unit, init, min, max, step)
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
6069
|
+
pNumber24("p1x", "mm", 30, -200, 200, 1),
|
|
6070
|
+
pNumber24("p1y", "mm", 50, -200, 200, 1),
|
|
6071
|
+
pNumber24("p2x", "mm", 40, -200, 200, 1),
|
|
6072
|
+
pNumber24("p2y", "mm", -20, -200, 200, 1),
|
|
6073
|
+
pNumber24("p3x", "mm", -30, -200, 200, 1),
|
|
6074
|
+
pNumber24("p3y", "mm", 30, -200, 200, 1)
|
|
4965
6075
|
],
|
|
4966
6076
|
paramSvg: {
|
|
4967
6077
|
p1x: "verify_line_p1x.svg",
|
|
@@ -4978,25 +6088,25 @@ var pDef20 = {
|
|
|
4978
6088
|
// every 0.5 second
|
|
4979
6089
|
}
|
|
4980
6090
|
};
|
|
4981
|
-
function
|
|
4982
|
-
const rGeome =
|
|
6091
|
+
function pGeom24(t, param, suffix = "") {
|
|
6092
|
+
const rGeome = initGeom24(pDef24.partName + suffix);
|
|
4983
6093
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4984
6094
|
`;
|
|
4985
6095
|
try {
|
|
4986
|
-
const figOne =
|
|
4987
|
-
const p1 =
|
|
4988
|
-
const p2 =
|
|
4989
|
-
const p3 =
|
|
6096
|
+
const figOne = figure24();
|
|
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);
|
|
4990
6100
|
figOne.addPoint(p1);
|
|
4991
6101
|
figOne.addPoint(p2);
|
|
4992
6102
|
figOne.addPoint(p3);
|
|
4993
6103
|
const l1 = line(0, 0, 0).setFromPoints(p1, p2);
|
|
4994
6104
|
figOne.addLine(l1);
|
|
4995
|
-
figOne.addPoint(
|
|
4996
|
-
figOne.addPoint(
|
|
6105
|
+
figOne.addPoint(point10(l1.getAxisXIntersection(), 0));
|
|
6106
|
+
figOne.addPoint(point10(0, l1.getAxisYIntersection()));
|
|
4997
6107
|
const p4 = l1.projectOrig();
|
|
4998
6108
|
figOne.addPoint(p4);
|
|
4999
|
-
const p0 =
|
|
6109
|
+
const p0 = point10(0, 0);
|
|
5000
6110
|
if (!p0.isEqual(p4)) {
|
|
5001
6111
|
const l2 = linePP(p0, p4);
|
|
5002
6112
|
figOne.addLine(l2);
|
|
@@ -5018,24 +6128,24 @@ function pGeom20(t, param, suffix = "") {
|
|
|
5018
6128
|
var verifyLine1Def = {
|
|
5019
6129
|
pTitle: "Verify line",
|
|
5020
6130
|
pDescription: "Debugging line.ts",
|
|
5021
|
-
pDef:
|
|
5022
|
-
pGeom:
|
|
6131
|
+
pDef: pDef24,
|
|
6132
|
+
pGeom: pGeom24
|
|
5023
6133
|
};
|
|
5024
6134
|
|
|
5025
6135
|
// src/geometrix_verification/verify_line_2.ts
|
|
5026
|
-
import { degToRad as
|
|
5027
|
-
var
|
|
6136
|
+
import { degToRad as degToRad8, point as point11, line as line2, figure as figure25, pNumber as pNumber25, initGeom as initGeom25 } from "geometrix";
|
|
6137
|
+
var pDef25 = {
|
|
5028
6138
|
partName: "verify_line_2",
|
|
5029
6139
|
params: [
|
|
5030
6140
|
//pNumber(name, unit, init, min, max, step)
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
6141
|
+
pNumber25("l1cx", "mm", 10, -200, 200, 1),
|
|
6142
|
+
pNumber25("l1cy", "mm", 20, -200, 200, 1),
|
|
6143
|
+
pNumber25("l1ca", "degree", 15, -200, 200, 1),
|
|
6144
|
+
pNumber25("l2cx", "mm", 30, -200, 200, 1),
|
|
6145
|
+
pNumber25("l2cy", "mm", 50, -200, 200, 1),
|
|
6146
|
+
pNumber25("l2ca", "degree", 35, -200, 200, 1),
|
|
6147
|
+
pNumber25("p3x", "mm", -30, -200, 200, 1),
|
|
6148
|
+
pNumber25("p3y", "mm", 30, -200, 200, 1)
|
|
5039
6149
|
],
|
|
5040
6150
|
paramSvg: {
|
|
5041
6151
|
l1cx: "verify_line_2_l1cx.svg",
|
|
@@ -5054,20 +6164,20 @@ var pDef21 = {
|
|
|
5054
6164
|
// every 0.5 second
|
|
5055
6165
|
}
|
|
5056
6166
|
};
|
|
5057
|
-
function
|
|
5058
|
-
const rGeome =
|
|
6167
|
+
function pGeom25(t, param, suffix = "") {
|
|
6168
|
+
const rGeome = initGeom25(pDef25.partName + suffix);
|
|
5059
6169
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5060
6170
|
`;
|
|
5061
6171
|
try {
|
|
5062
|
-
const figOne =
|
|
5063
|
-
const p1 =
|
|
5064
|
-
const p2 =
|
|
5065
|
-
const p3 =
|
|
6172
|
+
const figOne = figure25();
|
|
6173
|
+
const p1 = point11(param.l1cx, param.l1cy);
|
|
6174
|
+
const p2 = point11(param.l2cx, param.l2cy);
|
|
6175
|
+
const p3 = point11(param.p3x, param.p3y);
|
|
5066
6176
|
figOne.addPoint(p1);
|
|
5067
6177
|
figOne.addPoint(p2);
|
|
5068
6178
|
figOne.addPoint(p3);
|
|
5069
|
-
const l1 = line2(param.l1cx, param.l1cy,
|
|
5070
|
-
const l2 = line2(param.l2cx, param.l2cy,
|
|
6179
|
+
const l1 = line2(param.l1cx, param.l1cy, degToRad8(param.l1ca + t));
|
|
6180
|
+
const l2 = line2(param.l2cx, param.l2cy, degToRad8(param.l2ca));
|
|
5071
6181
|
figOne.addLine(l1);
|
|
5072
6182
|
figOne.addLine(l2);
|
|
5073
6183
|
figOne.addPoint(l1.intersection(l2));
|
|
@@ -5078,7 +6188,7 @@ function pGeom21(t, param, suffix = "") {
|
|
|
5078
6188
|
rGeome.logstr += `dist(l2, p3) = ${l2.distanceToPoint(p3)}
|
|
5079
6189
|
`;
|
|
5080
6190
|
const bisector2 = l1.bisector(l2, p3);
|
|
5081
|
-
const pBisec =
|
|
6191
|
+
const pBisec = point11(bisector2.cx, bisector2.cy).translatePolar(bisector2.ca, 30);
|
|
5082
6192
|
figOne.addPoint(pBisec);
|
|
5083
6193
|
rGeome.fig = { one: figOne };
|
|
5084
6194
|
rGeome.logstr += "verify_line_2 drawn successfully!\n";
|
|
@@ -5092,22 +6202,22 @@ function pGeom21(t, param, suffix = "") {
|
|
|
5092
6202
|
var verifyLine2Def = {
|
|
5093
6203
|
pTitle: "Verify line 2",
|
|
5094
6204
|
pDescription: "Debugging more line.ts",
|
|
5095
|
-
pDef:
|
|
5096
|
-
pGeom:
|
|
6205
|
+
pDef: pDef25,
|
|
6206
|
+
pGeom: pGeom25
|
|
5097
6207
|
};
|
|
5098
6208
|
|
|
5099
6209
|
// src/geometrix_verification/verify_line_3.ts
|
|
5100
|
-
import { point as
|
|
5101
|
-
var
|
|
6210
|
+
import { point as point12, bisector, circleCenter, figure as figure26, pNumber as pNumber26, initGeom as initGeom26 } from "geometrix";
|
|
6211
|
+
var pDef26 = {
|
|
5102
6212
|
partName: "verify_line_3",
|
|
5103
6213
|
params: [
|
|
5104
6214
|
//pNumber(name, unit, init, min, max, step)
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
6215
|
+
pNumber26("p1x", "mm", 30, -200, 200, 1),
|
|
6216
|
+
pNumber26("p1y", "mm", 50, -200, 200, 1),
|
|
6217
|
+
pNumber26("p2x", "mm", 40, -200, 200, 1),
|
|
6218
|
+
pNumber26("p2y", "mm", -20, -200, 200, 1),
|
|
6219
|
+
pNumber26("p3x", "mm", -30, -200, 200, 1),
|
|
6220
|
+
pNumber26("p3y", "mm", 30, -200, 200, 1)
|
|
5111
6221
|
],
|
|
5112
6222
|
paramSvg: {
|
|
5113
6223
|
p1x: "verify_line_p1x.svg",
|
|
@@ -5124,15 +6234,15 @@ var pDef22 = {
|
|
|
5124
6234
|
// every 0.5 second
|
|
5125
6235
|
}
|
|
5126
6236
|
};
|
|
5127
|
-
function
|
|
5128
|
-
const rGeome =
|
|
6237
|
+
function pGeom26(t, param, suffix = "") {
|
|
6238
|
+
const rGeome = initGeom26(pDef26.partName + suffix);
|
|
5129
6239
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5130
6240
|
`;
|
|
5131
6241
|
try {
|
|
5132
|
-
const figOne =
|
|
5133
|
-
const p1 =
|
|
5134
|
-
const p2 =
|
|
5135
|
-
const p3 =
|
|
6242
|
+
const figOne = figure26();
|
|
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);
|
|
5136
6246
|
figOne.addPoint(p1);
|
|
5137
6247
|
figOne.addPoint(p2);
|
|
5138
6248
|
figOne.addPoint(p3);
|
|
@@ -5152,24 +6262,24 @@ function pGeom22(t, param, suffix = "") {
|
|
|
5152
6262
|
var verifyLine3Def = {
|
|
5153
6263
|
pTitle: "Verify line 3",
|
|
5154
6264
|
pDescription: "Debugging more more line.ts",
|
|
5155
|
-
pDef:
|
|
5156
|
-
pGeom:
|
|
6265
|
+
pDef: pDef26,
|
|
6266
|
+
pGeom: pGeom26
|
|
5157
6267
|
};
|
|
5158
6268
|
|
|
5159
6269
|
// src/geometrix_verification/verify_vector.ts
|
|
5160
|
-
import { degToRad as
|
|
5161
|
-
var
|
|
6270
|
+
import { degToRad as degToRad9, point as point13, vector, figure as figure27, pNumber as pNumber27, initGeom as initGeom27 } from "geometrix";
|
|
6271
|
+
var pDef27 = {
|
|
5162
6272
|
partName: "verify_vector",
|
|
5163
6273
|
params: [
|
|
5164
6274
|
//pNumber(name, unit, init, min, max, step)
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
6275
|
+
pNumber27("p1x", "mm", 30, -200, 200, 1),
|
|
6276
|
+
pNumber27("p1y", "mm", 50, -200, 200, 1),
|
|
6277
|
+
pNumber27("p2x", "mm", 80, -200, 200, 1),
|
|
6278
|
+
pNumber27("p2y", "mm", -30, -200, 200, 1),
|
|
6279
|
+
pNumber27("v1a", "degree", 30, -200, 200, 1),
|
|
6280
|
+
pNumber27("v1l", "mm", 60, 0, 200, 1),
|
|
6281
|
+
pNumber27("v2a", "degree", 30, -200, 200, 1),
|
|
6282
|
+
pNumber27("v2l", "mm", 60, 0, 200, 1)
|
|
5173
6283
|
],
|
|
5174
6284
|
paramSvg: {
|
|
5175
6285
|
p1x: "verify_vector_p1x.svg",
|
|
@@ -5188,16 +6298,16 @@ var pDef23 = {
|
|
|
5188
6298
|
// every 0.5 second
|
|
5189
6299
|
}
|
|
5190
6300
|
};
|
|
5191
|
-
function
|
|
5192
|
-
const rGeome =
|
|
6301
|
+
function pGeom27(t, param, suffix = "") {
|
|
6302
|
+
const rGeome = initGeom27(pDef27.partName + suffix);
|
|
5193
6303
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5194
6304
|
`;
|
|
5195
6305
|
try {
|
|
5196
|
-
const figOne =
|
|
5197
|
-
const p1 =
|
|
5198
|
-
const p2 =
|
|
5199
|
-
const v1 = vector(
|
|
5200
|
-
const v2 = vector(
|
|
6306
|
+
const figOne = figure27();
|
|
6307
|
+
const p1 = point13(param.p1x, param.p1y + t);
|
|
6308
|
+
const p2 = point13(param.p2x, param.p2y);
|
|
6309
|
+
const v1 = vector(degToRad9(param.v1a), param.v1l, p1);
|
|
6310
|
+
const v2 = vector(degToRad9(param.v2a), param.v2l, p1);
|
|
5201
6311
|
figOne.addPoint(p1);
|
|
5202
6312
|
figOne.addPoint(p2);
|
|
5203
6313
|
figOne.addVector(v1);
|
|
@@ -5218,22 +6328,22 @@ function pGeom23(t, param, suffix = "") {
|
|
|
5218
6328
|
var verifyVector1Def = {
|
|
5219
6329
|
pTitle: "Verify vector",
|
|
5220
6330
|
pDescription: "Debugging vector.ts",
|
|
5221
|
-
pDef:
|
|
5222
|
-
pGeom:
|
|
6331
|
+
pDef: pDef27,
|
|
6332
|
+
pGeom: pGeom27
|
|
5223
6333
|
};
|
|
5224
6334
|
|
|
5225
6335
|
// src/geometrix_verification/verify_contour_1.ts
|
|
5226
|
-
import { contour as
|
|
5227
|
-
var
|
|
6336
|
+
import { contour as contour19, contourCircle as contourCircle17, figure as figure28, pNumber as pNumber28, initGeom as initGeom28 } from "geometrix";
|
|
6337
|
+
var pDef28 = {
|
|
5228
6338
|
partName: "verify_contour_1",
|
|
5229
6339
|
params: [
|
|
5230
6340
|
//pNumber(name, unit, init, min, max, step)
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
6341
|
+
pNumber28("r1", "mm", 30, 10, 200, 1),
|
|
6342
|
+
pNumber28("d1", "mm", 20, 10, 200, 1),
|
|
6343
|
+
pNumber28("w1", "mm", 100, 10, 200, 1),
|
|
6344
|
+
pNumber28("r2", "mm", 60, 10, 200, 1),
|
|
6345
|
+
pNumber28("l1", "mm", 10, 5, 200, 1),
|
|
6346
|
+
pNumber28("l2", "mm", 30, 5, 200, 1)
|
|
5237
6347
|
],
|
|
5238
6348
|
paramSvg: {
|
|
5239
6349
|
r1: "verify_contour_1_r1.svg",
|
|
@@ -5250,12 +6360,12 @@ var pDef24 = {
|
|
|
5250
6360
|
// every 0.5 second
|
|
5251
6361
|
}
|
|
5252
6362
|
};
|
|
5253
|
-
function
|
|
5254
|
-
const rGeome =
|
|
6363
|
+
function pGeom28(t, param, suffix = "") {
|
|
6364
|
+
const rGeome = initGeom28(pDef28.partName + suffix);
|
|
5255
6365
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5256
6366
|
`;
|
|
5257
6367
|
try {
|
|
5258
|
-
const figOne =
|
|
6368
|
+
const figOne = figure28();
|
|
5259
6369
|
const r1 = param.r1;
|
|
5260
6370
|
const d1 = param.d1;
|
|
5261
6371
|
const w1 = param.w1;
|
|
@@ -5268,20 +6378,20 @@ function pGeom24(t, param, suffix = "") {
|
|
|
5268
6378
|
const c12 = 2 * r1 + d1;
|
|
5269
6379
|
const c2 = c1 + c12;
|
|
5270
6380
|
const c3 = c1 + 2 * c12;
|
|
5271
|
-
const ctr1 =
|
|
6381
|
+
const ctr1 = contour19(0, 0);
|
|
5272
6382
|
ctr1.addSegStrokeA(w1, 0);
|
|
5273
6383
|
ctr1.addSegStrokeA(w1, h1);
|
|
5274
6384
|
ctr1.addSegStrokeA(0, h1);
|
|
5275
6385
|
ctr1.closeSegStroke();
|
|
5276
6386
|
ctr1.check();
|
|
5277
6387
|
figOne.addMain(ctr1);
|
|
5278
|
-
figOne.addMain(
|
|
5279
|
-
figOne.addMain(
|
|
5280
|
-
figOne.addMain(
|
|
5281
|
-
const ctr2 =
|
|
6388
|
+
figOne.addMain(contourCircle17(w12, c1, r1));
|
|
6389
|
+
figOne.addMain(contourCircle17(w12, c2, r1 + t));
|
|
6390
|
+
figOne.addMain(contourCircle17(w12, c3, r1));
|
|
6391
|
+
const ctr2 = contourCircle17(w1 + r2, 3 * c1, r2);
|
|
5282
6392
|
ctr2.check();
|
|
5283
6393
|
figOne.addSecond(ctr2);
|
|
5284
|
-
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();
|
|
5285
6395
|
ctr3.check();
|
|
5286
6396
|
figOne.addSecond(ctr3);
|
|
5287
6397
|
rGeome.fig = { one: figOne };
|
|
@@ -5296,20 +6406,20 @@ function pGeom24(t, param, suffix = "") {
|
|
|
5296
6406
|
var verifyContour1Def = {
|
|
5297
6407
|
pTitle: "Verify contour 1",
|
|
5298
6408
|
pDescription: "Debugging contour.ts",
|
|
5299
|
-
pDef:
|
|
5300
|
-
pGeom:
|
|
6409
|
+
pDef: pDef28,
|
|
6410
|
+
pGeom: pGeom28
|
|
5301
6411
|
};
|
|
5302
6412
|
|
|
5303
6413
|
// src/geometrix_verification/verify_contour_2.ts
|
|
5304
|
-
import { degToRad as
|
|
5305
|
-
var
|
|
6414
|
+
import { degToRad as degToRad10, contour as contour20, figure as figure29, pNumber as pNumber29, initGeom as initGeom29 } from "geometrix";
|
|
6415
|
+
var pDef29 = {
|
|
5306
6416
|
partName: "verify_contour_2",
|
|
5307
6417
|
params: [
|
|
5308
6418
|
//pNumber(name, unit, init, min, max, step)
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
6419
|
+
pNumber29("r1", "mm", 20, 5, 200, 1),
|
|
6420
|
+
pNumber29("a1", "deg", 30, -200, 200, 1),
|
|
6421
|
+
pNumber29("at1", "deg", 30, -200, 200, 1),
|
|
6422
|
+
pNumber29("at2", "deg", 50, -200, 200, 1)
|
|
5313
6423
|
],
|
|
5314
6424
|
paramSvg: {
|
|
5315
6425
|
r1: "verify_contour_1_r1.svg",
|
|
@@ -5324,17 +6434,17 @@ var pDef25 = {
|
|
|
5324
6434
|
// every 0.5 second
|
|
5325
6435
|
}
|
|
5326
6436
|
};
|
|
5327
|
-
function
|
|
5328
|
-
const rGeome =
|
|
6437
|
+
function pGeom29(t, param, suffix = "") {
|
|
6438
|
+
const rGeome = initGeom29(pDef29.partName + suffix);
|
|
5329
6439
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5330
6440
|
`;
|
|
5331
6441
|
try {
|
|
5332
|
-
const figOne =
|
|
6442
|
+
const figOne = figure29();
|
|
5333
6443
|
const r1 = param.r1 + t;
|
|
5334
6444
|
const ata = param.a1 + t;
|
|
5335
6445
|
const at1 = param.at1 + t;
|
|
5336
6446
|
const at2 = param.at2 + t;
|
|
5337
|
-
const ctr1 =
|
|
6447
|
+
const ctr1 = contour20(20, 20);
|
|
5338
6448
|
ctr1.addSegStrokeA(40, 20);
|
|
5339
6449
|
ctr1.addPointA(60, 20).addSegArc(r1, true, true);
|
|
5340
6450
|
ctr1.addPointA(80, 20).addSegArc(r1, true, false);
|
|
@@ -5361,7 +6471,7 @@ function pGeom25(t, param, suffix = "") {
|
|
|
5361
6471
|
ctr1.closeSegStroke();
|
|
5362
6472
|
ctr1.check();
|
|
5363
6473
|
figOne.addMain(ctr1);
|
|
5364
|
-
const ctr2 =
|
|
6474
|
+
const ctr2 = contour20(20, -20);
|
|
5365
6475
|
ctr2.addSegStrokeA(40, -40);
|
|
5366
6476
|
ctr2.addPointA(60, -60).addSegArc(r1, true, true);
|
|
5367
6477
|
ctr2.addPointA(80, -80).addSegArc(r1, true, false);
|
|
@@ -5371,17 +6481,17 @@ function pGeom25(t, param, suffix = "") {
|
|
|
5371
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();
|
|
5372
6482
|
ctr2.check();
|
|
5373
6483
|
figOne.addMain(ctr2);
|
|
5374
|
-
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);
|
|
5375
6485
|
ctr3.check();
|
|
5376
6486
|
figOne.addMain(ctr3);
|
|
5377
|
-
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);
|
|
5378
6488
|
ctr4.check();
|
|
5379
6489
|
figOne.addMain(ctr4);
|
|
5380
|
-
const ctr5 =
|
|
6490
|
+
const ctr5 = contour20(100, 500);
|
|
5381
6491
|
for (let i = 0; i < 8; i++) {
|
|
5382
6492
|
const adir = i * 45;
|
|
5383
|
-
const adirRad =
|
|
5384
|
-
ctr5.addSegStrokeRP(adirRad, 20).addPointRP(adirRad, 20).addSeg2Arcs(
|
|
6493
|
+
const adirRad = degToRad10(adir);
|
|
6494
|
+
ctr5.addSegStrokeRP(adirRad, 20).addPointRP(adirRad, 20).addSeg2Arcs(degToRad10(adir + at1), degToRad10(180 + adir - at2)).addSegStrokeRP(adirRad, 20).addPointRP(adirRad, 20).addSeg2Arcs(degToRad10(adir - at1), degToRad10(180 + adir + at2)).addSegStrokeRP(adirRad, 20);
|
|
5385
6495
|
}
|
|
5386
6496
|
ctr5.check();
|
|
5387
6497
|
figOne.addMain(ctr5);
|
|
@@ -5397,22 +6507,22 @@ function pGeom25(t, param, suffix = "") {
|
|
|
5397
6507
|
var verifyContour2Def = {
|
|
5398
6508
|
pTitle: "Verify contour 2",
|
|
5399
6509
|
pDescription: "Debugging more contour.ts",
|
|
5400
|
-
pDef:
|
|
5401
|
-
pGeom:
|
|
6510
|
+
pDef: pDef29,
|
|
6511
|
+
pGeom: pGeom29
|
|
5402
6512
|
};
|
|
5403
6513
|
|
|
5404
6514
|
// src/geometrix_verification/verify_contour_3.ts
|
|
5405
|
-
import { degToRad as
|
|
5406
|
-
var
|
|
6515
|
+
import { degToRad as degToRad11, contour as contour21, figure as figure30, pNumber as pNumber30, initGeom as initGeom30 } from "geometrix";
|
|
6516
|
+
var pDef30 = {
|
|
5407
6517
|
partName: "verify_contour_3",
|
|
5408
6518
|
params: [
|
|
5409
6519
|
//pNumber(name, unit, init, min, max, step)
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
6520
|
+
pNumber30("r1", "mm", 10, 0, 200, 1),
|
|
6521
|
+
pNumber30("r2", "mm", 10, 0, 200, 1),
|
|
6522
|
+
pNumber30("r3", "mm", 10, 0, 200, 1),
|
|
6523
|
+
pNumber30("r4", "mm", 10, 0, 200, 1),
|
|
6524
|
+
pNumber30("r5", "mm", 10, 0, 200, 1),
|
|
6525
|
+
pNumber30("r6", "mm", 5, 0, 200, 1)
|
|
5416
6526
|
],
|
|
5417
6527
|
paramSvg: {
|
|
5418
6528
|
r1: "verify_contour_1_r1.svg",
|
|
@@ -5429,32 +6539,32 @@ var pDef26 = {
|
|
|
5429
6539
|
// every 0.5 second
|
|
5430
6540
|
}
|
|
5431
6541
|
};
|
|
5432
|
-
function
|
|
5433
|
-
const rGeome =
|
|
6542
|
+
function pGeom30(t, param, suffix = "") {
|
|
6543
|
+
const rGeome = initGeom30(pDef30.partName + suffix);
|
|
5434
6544
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5435
6545
|
`;
|
|
5436
6546
|
try {
|
|
5437
|
-
const figOne =
|
|
6547
|
+
const figOne = figure30();
|
|
5438
6548
|
const r1 = param.r1 + t;
|
|
5439
6549
|
const r2 = param.r2 + t;
|
|
5440
6550
|
const r3 = param.r3 + t;
|
|
5441
6551
|
const r4 = param.r4 + t;
|
|
5442
6552
|
const r5 = param.r5 + t;
|
|
5443
6553
|
const r6 = param.r6 + t;
|
|
5444
|
-
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);
|
|
5445
6555
|
rGeome.logstr += ctr1.check();
|
|
5446
6556
|
figOne.addMain(ctr1);
|
|
5447
6557
|
const l2 = 100;
|
|
5448
|
-
const ctr2 =
|
|
6558
|
+
const ctr2 = contour21(300, 0);
|
|
5449
6559
|
for (let i = 0; i < 4; i++) {
|
|
5450
6560
|
const angle = 90 * (1 - i);
|
|
5451
|
-
ctr2.addSegStrokeRP(
|
|
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);
|
|
5452
6562
|
}
|
|
5453
6563
|
rGeome.logstr += ctr2.check();
|
|
5454
6564
|
figOne.addMain(ctr2);
|
|
5455
6565
|
const l3 = 100;
|
|
5456
6566
|
const ra3 = 70;
|
|
5457
|
-
const ctr3 =
|
|
6567
|
+
const ctr3 = contour21(0, 600).addSegStrokeR(l3, l3);
|
|
5458
6568
|
for (let i = 0; i < 3; i++) {
|
|
5459
6569
|
const large = (i & 1) === 0 ? false : true;
|
|
5460
6570
|
const ccw = (i & 2) === 0 ? false : true;
|
|
@@ -5470,70 +6580,70 @@ function pGeom26(t, param, suffix = "") {
|
|
|
5470
6580
|
ctr3.addSegStrokeR(l3, 0).addSegStrokeR(l3, -l3).closeSegStroke();
|
|
5471
6581
|
rGeome.logstr += ctr3.check();
|
|
5472
6582
|
figOne.addMain(ctr3);
|
|
5473
|
-
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();
|
|
5474
6584
|
rGeome.logstr += ctr3b.check();
|
|
5475
6585
|
figOne.addMain(ctr3b);
|
|
5476
6586
|
const l4 = 200;
|
|
5477
6587
|
const ra4 = 180;
|
|
5478
|
-
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);
|
|
5479
6589
|
rGeome.logstr += ctr4.check();
|
|
5480
6590
|
figOne.addMain(ctr4);
|
|
5481
|
-
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);
|
|
5482
6592
|
rGeome.logstr += ctr4b.check();
|
|
5483
6593
|
figOne.addMain(ctr4b);
|
|
5484
|
-
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);
|
|
5485
6595
|
rGeome.logstr += ctr4c.check();
|
|
5486
6596
|
figOne.addMain(ctr4c);
|
|
5487
|
-
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);
|
|
5488
6598
|
rGeome.logstr += ctr4d.check();
|
|
5489
6599
|
figOne.addMain(ctr4d);
|
|
5490
6600
|
const l4b = 3 * l4;
|
|
5491
6601
|
const ra4b = 3 * ra4;
|
|
5492
|
-
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);
|
|
5493
6603
|
rGeome.logstr += ctr4e.check();
|
|
5494
6604
|
figOne.addMain(ctr4e);
|
|
5495
|
-
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);
|
|
5496
6606
|
rGeome.logstr += ctr4f.check();
|
|
5497
6607
|
figOne.addMain(ctr4f);
|
|
5498
|
-
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);
|
|
5499
6609
|
rGeome.logstr += ctr4g.check();
|
|
5500
6610
|
figOne.addMain(ctr4g);
|
|
5501
6611
|
const c099 = 0.999;
|
|
5502
|
-
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);
|
|
5503
6613
|
rGeome.logstr += ctr4h.check();
|
|
5504
6614
|
figOne.addMain(ctr4h);
|
|
5505
6615
|
const l5 = 200;
|
|
5506
6616
|
const ra5 = 180;
|
|
5507
|
-
const ctr5 =
|
|
6617
|
+
const ctr5 = contour21(0, 3e3).addSegStrokeR(l5, 0).addCornerWidened(r5).addSegStrokeR(0, l5).addCornerWidened(r5).closeSegStroke().addCornerWidened(r5);
|
|
5508
6618
|
rGeome.logstr += ctr5.check();
|
|
5509
6619
|
figOne.addMain(ctr5);
|
|
5510
|
-
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);
|
|
5511
6621
|
rGeome.logstr += ctr5b.check();
|
|
5512
6622
|
figOne.addMain(ctr5b);
|
|
5513
|
-
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);
|
|
5514
6624
|
rGeome.logstr += ctr5d.check();
|
|
5515
6625
|
figOne.addMain(ctr5d);
|
|
5516
|
-
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);
|
|
5517
6627
|
rGeome.logstr += ctr5e.check();
|
|
5518
6628
|
figOne.addMain(ctr5e);
|
|
5519
|
-
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);
|
|
5520
6630
|
rGeome.logstr += ctr5f.check();
|
|
5521
6631
|
figOne.addMain(ctr5f);
|
|
5522
6632
|
const l6 = 200;
|
|
5523
6633
|
const ra6 = 180;
|
|
5524
|
-
const ctr6 =
|
|
6634
|
+
const ctr6 = contour21(0, 4e3).addSegStrokeR(l6, 0).addCornerWideAcc(r6).addSegStrokeR(0, l6).addCornerWideAcc(r6).closeSegStroke().addCornerWideAcc(r6);
|
|
5525
6635
|
rGeome.logstr += ctr6.check();
|
|
5526
6636
|
figOne.addMain(ctr6);
|
|
5527
|
-
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);
|
|
5528
6638
|
rGeome.logstr += ctr6b.check();
|
|
5529
6639
|
figOne.addMain(ctr6b);
|
|
5530
|
-
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);
|
|
5531
6641
|
rGeome.logstr += ctr6d.check();
|
|
5532
6642
|
figOne.addMain(ctr6d);
|
|
5533
|
-
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);
|
|
5534
6644
|
rGeome.logstr += ctr6e.check();
|
|
5535
6645
|
figOne.addMain(ctr6e);
|
|
5536
|
-
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);
|
|
5537
6647
|
rGeome.logstr += ctr6f.check();
|
|
5538
6648
|
figOne.addMain(ctr6f);
|
|
5539
6649
|
rGeome.fig = { one: figOne };
|
|
@@ -5548,19 +6658,19 @@ function pGeom26(t, param, suffix = "") {
|
|
|
5548
6658
|
var verifyContour3Def = {
|
|
5549
6659
|
pTitle: "Verify contour 3",
|
|
5550
6660
|
pDescription: "Debugging contour.ts for rounded corners and widened corners",
|
|
5551
|
-
pDef:
|
|
5552
|
-
pGeom:
|
|
6661
|
+
pDef: pDef30,
|
|
6662
|
+
pGeom: pGeom30
|
|
5553
6663
|
};
|
|
5554
6664
|
|
|
5555
6665
|
// src/geometrix_verification/verify_contour_4.ts
|
|
5556
|
-
import { contour as
|
|
5557
|
-
var
|
|
6666
|
+
import { contour as contour22, figure as figure31, pNumber as pNumber31, initGeom as initGeom31 } from "geometrix";
|
|
6667
|
+
var pDef31 = {
|
|
5558
6668
|
partName: "verify_contour_4",
|
|
5559
6669
|
params: [
|
|
5560
6670
|
//pNumber(name, unit, init, min, max, step)
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
6671
|
+
pNumber31("n1", "scalar", 16, 1, 50, 1),
|
|
6672
|
+
pNumber31("n2", "scalar", 6, 3, 50, 1),
|
|
6673
|
+
pNumber31("r1", "mm", 5, 0, 20, 1)
|
|
5564
6674
|
],
|
|
5565
6675
|
paramSvg: {
|
|
5566
6676
|
n1: "verify_contour_1_r1.svg",
|
|
@@ -5574,19 +6684,19 @@ var pDef27 = {
|
|
|
5574
6684
|
// every 0.5 second
|
|
5575
6685
|
}
|
|
5576
6686
|
};
|
|
5577
|
-
function
|
|
5578
|
-
const rGeome =
|
|
6687
|
+
function pGeom31(t, param, suffix = "") {
|
|
6688
|
+
const rGeome = initGeom31(pDef31.partName + suffix);
|
|
5579
6689
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5580
6690
|
`;
|
|
5581
6691
|
try {
|
|
5582
|
-
const figOne =
|
|
6692
|
+
const figOne = figure31();
|
|
5583
6693
|
const n1 = param.n1;
|
|
5584
6694
|
const n2 = param.n2;
|
|
5585
6695
|
const r1 = param.r1;
|
|
5586
6696
|
const l1 = 50 + t;
|
|
5587
6697
|
const as = 2 * Math.PI / (n2 * 3);
|
|
5588
|
-
const ctr2b =
|
|
5589
|
-
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);
|
|
5590
6700
|
const ctr1b = ctr2b.clone().addCornerRounded(r1);
|
|
5591
6701
|
for (let i = 0; i < n1; i++) {
|
|
5592
6702
|
const ctr1c = ctr1b.rotate(0, 0, i * 3 * as).scale(0, 0, 1 + i * 0.2, true);
|
|
@@ -5595,7 +6705,7 @@ function pGeom27(t, param, suffix = "") {
|
|
|
5595
6705
|
ctr1.closeSegStroke();
|
|
5596
6706
|
rGeome.logstr += ctr1.check();
|
|
5597
6707
|
figOne.addMain(ctr1);
|
|
5598
|
-
const ctr5 =
|
|
6708
|
+
const ctr5 = contour22(l1, 0);
|
|
5599
6709
|
for (let i = 0; i < n1; i++) {
|
|
5600
6710
|
ctr5.addPartial(ctr1b.rotate(0, 0, i * 3 * as).scale(0, 0, 1 + i * 0.2, false));
|
|
5601
6711
|
}
|
|
@@ -5626,30 +6736,30 @@ function pGeom27(t, param, suffix = "") {
|
|
|
5626
6736
|
var verifyContour4Def = {
|
|
5627
6737
|
pTitle: "Verify contour 4",
|
|
5628
6738
|
pDescription: "Debugging contour.ts for addPartial",
|
|
5629
|
-
pDef:
|
|
5630
|
-
pGeom:
|
|
6739
|
+
pDef: pDef31,
|
|
6740
|
+
pGeom: pGeom31
|
|
5631
6741
|
};
|
|
5632
6742
|
|
|
5633
6743
|
// src/geometrix_verification/verify_exports_1.ts
|
|
5634
6744
|
import {
|
|
5635
|
-
contour as
|
|
5636
|
-
contourCircle as
|
|
5637
|
-
figure as
|
|
5638
|
-
pNumber as
|
|
5639
|
-
pCheckbox as
|
|
5640
|
-
initGeom as
|
|
5641
|
-
EExtrude as
|
|
5642
|
-
EBVolume as
|
|
6745
|
+
contour as contour23,
|
|
6746
|
+
contourCircle as contourCircle18,
|
|
6747
|
+
figure as figure32,
|
|
6748
|
+
pNumber as pNumber32,
|
|
6749
|
+
pCheckbox as pCheckbox5,
|
|
6750
|
+
initGeom as initGeom32,
|
|
6751
|
+
EExtrude as EExtrude16,
|
|
6752
|
+
EBVolume as EBVolume19
|
|
5643
6753
|
} from "geometrix";
|
|
5644
|
-
var
|
|
6754
|
+
var pDef32 = {
|
|
5645
6755
|
partName: "verify_exports_1",
|
|
5646
6756
|
params: [
|
|
5647
6757
|
//pNumber(name, unit, init, min, max, step)
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
6758
|
+
pCheckbox5("circle", true),
|
|
6759
|
+
pNumber32("circle-size", "mm", 100, 1, 1e3, 1),
|
|
6760
|
+
pCheckbox5("contour", true),
|
|
6761
|
+
pNumber32("contour-size", "mm", 30, 1, 1e3, 1),
|
|
6762
|
+
pCheckbox5("contour-arc-large", false)
|
|
5653
6763
|
],
|
|
5654
6764
|
paramSvg: {
|
|
5655
6765
|
circle: "default_param_blank.svg",
|
|
@@ -5664,20 +6774,20 @@ var pDef28 = {
|
|
|
5664
6774
|
tUpdate: 500
|
|
5665
6775
|
}
|
|
5666
6776
|
};
|
|
5667
|
-
function
|
|
5668
|
-
const rGeome =
|
|
6777
|
+
function pGeom32(t, param, suffix = "") {
|
|
6778
|
+
const rGeome = initGeom32(pDef32.partName + suffix);
|
|
5669
6779
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5670
6780
|
`;
|
|
5671
6781
|
try {
|
|
5672
|
-
const figOne =
|
|
6782
|
+
const figOne = figure32();
|
|
5673
6783
|
if (param.circle === 1) {
|
|
5674
|
-
const theCircle =
|
|
6784
|
+
const theCircle = contourCircle18(0, 0, param["circle-size"]);
|
|
5675
6785
|
figOne.addMain(theCircle);
|
|
5676
6786
|
}
|
|
5677
6787
|
if (param.contour === 1) {
|
|
5678
6788
|
const csize = param["contour-size"];
|
|
5679
6789
|
const carcl = param["contour-arc-large"] === 1 ? true : false;
|
|
5680
|
-
const ctr1 =
|
|
6790
|
+
const ctr1 = contour23(0, 0).addSegStrokeA(csize, 0).addPointA(csize, csize).addSegArc(csize * 0.8, carcl, true).closeSegStroke();
|
|
5681
6791
|
figOne.addMain(ctr1);
|
|
5682
6792
|
}
|
|
5683
6793
|
rGeome.fig = { one: figOne };
|
|
@@ -5687,7 +6797,7 @@ function pGeom28(t, param, suffix = "") {
|
|
|
5687
6797
|
{
|
|
5688
6798
|
outName: `subpax_${designName}_one`,
|
|
5689
6799
|
face: `${designName}_one`,
|
|
5690
|
-
extrudeMethod:
|
|
6800
|
+
extrudeMethod: EExtrude16.eLinearOrtho,
|
|
5691
6801
|
length: 10,
|
|
5692
6802
|
rotate: [0, 0, 0],
|
|
5693
6803
|
translate: [0, 0, 0]
|
|
@@ -5696,7 +6806,7 @@ function pGeom28(t, param, suffix = "") {
|
|
|
5696
6806
|
volumes: [
|
|
5697
6807
|
{
|
|
5698
6808
|
outName: `pax_${designName}`,
|
|
5699
|
-
boolMethod:
|
|
6809
|
+
boolMethod: EBVolume19.eIdentity,
|
|
5700
6810
|
inList: [`subpax_${designName}_one`]
|
|
5701
6811
|
}
|
|
5702
6812
|
]
|
|
@@ -5712,8 +6822,8 @@ function pGeom28(t, param, suffix = "") {
|
|
|
5712
6822
|
var verifyExports1Def = {
|
|
5713
6823
|
pTitle: "Verify exports 1",
|
|
5714
6824
|
pDescription: "For dev & debug of Openscad export",
|
|
5715
|
-
pDef:
|
|
5716
|
-
pGeom:
|
|
6825
|
+
pDef: pDef32,
|
|
6826
|
+
pGeom: pGeom32
|
|
5717
6827
|
};
|
|
5718
6828
|
export {
|
|
5719
6829
|
baseDef,
|
|
@@ -5722,17 +6832,21 @@ export {
|
|
|
5722
6832
|
gearWheelWheelDef,
|
|
5723
6833
|
heliostatDef,
|
|
5724
6834
|
heliostat_2Def,
|
|
5725
|
-
poleRotorDef,
|
|
5726
6835
|
poleStaticDef,
|
|
5727
6836
|
rakeDef,
|
|
5728
6837
|
rakeStopperDef,
|
|
5729
6838
|
rectangleDef,
|
|
6839
|
+
ringDef,
|
|
6840
|
+
ringGuidanceDef,
|
|
5730
6841
|
rodDef,
|
|
5731
6842
|
simplifiedGearWheelDef,
|
|
5732
6843
|
spiderDef,
|
|
5733
6844
|
surfaceDef,
|
|
5734
6845
|
swingDef,
|
|
5735
6846
|
trapezeDef,
|
|
6847
|
+
vaxisDef,
|
|
6848
|
+
vaxisGuidanceDef,
|
|
6849
|
+
vaxisHolderDef,
|
|
5736
6850
|
verifyContour1Def,
|
|
5737
6851
|
verifyContour2Def,
|
|
5738
6852
|
verifyContour3Def,
|