designix 0.5.27 → 0.5.29
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 +3 -1
- package/dist/index.js +830 -519
- package/dist/pgdsvg/haxis_guidance.svg +1 -0
- package/dist/pgdsvg/haxis_guidance_outer.svg +1 -0
- package/dist/pgdsvg/haxis_guidance_spring.svg +1 -0
- package/dist/pgdsvg/rake.svg +1 -1
- package/dist/pgdsvg/rake_low_stopper_holder.svg +1 -0
- package/dist/pgdsvg/rake_side_stopper.svg +1 -1
- package/dist/pgdsvg/rake_top_stopper.svg +1 -1
- package/dist/pgdsvg/vaxis_guidance.svg +2 -1
- package/dist/pgdsvg/vaxis_guidance_spring.svg +1 -1
- package/dist/pgdsvg/vaxis_guidance_top.svg +2 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1557,72 +1557,124 @@ function ctrGuidanceOuter(param) {
|
|
|
1557
1557
|
}
|
|
1558
1558
|
return [rLog, rCtr, stepA1];
|
|
1559
1559
|
}
|
|
1560
|
+
function ctrSpring(param, startOuter) {
|
|
1561
|
+
let rLog = "";
|
|
1562
|
+
const SR2 = param.SD2 / 2;
|
|
1563
|
+
const SR2l = SR2 + param.SE1;
|
|
1564
|
+
const SD2l = 2 * SR2l;
|
|
1565
|
+
let ticCCW = false;
|
|
1566
|
+
let ticR = -SR2;
|
|
1567
|
+
let tocR = -SR2l;
|
|
1568
|
+
if (startOuter) {
|
|
1569
|
+
ticCCW = true;
|
|
1570
|
+
ticR = SR2l;
|
|
1571
|
+
tocR = SR2;
|
|
1572
|
+
}
|
|
1573
|
+
if (param.SL2 < SR2l) {
|
|
1574
|
+
throw `err421: SL2 ${param.SL2} is too small compare to SD2 ${param.SD2} and SE1 ${param.SE1}`;
|
|
1575
|
+
}
|
|
1576
|
+
rLog += `info309: spring height: ${ffix4(param.SL1 + SD2l)} length: ${ffix4(param.SN1 * 2 * (param.SD2 + param.SE1))}
|
|
1577
|
+
`;
|
|
1578
|
+
const rCtr = contour4(0, 0);
|
|
1579
|
+
for (let i = 0; i < param.SN1; i++) {
|
|
1580
|
+
rCtr.addSegStrokeR(0, -param.SL1).addPointR(2 * ticR, 0).addSegArc(Math.abs(ticR), false, ticCCW);
|
|
1581
|
+
if (i < param.SN1 - 1) {
|
|
1582
|
+
rCtr.addSegStrokeR(0, param.SL1).addPointR(2 * tocR, 0).addSegArc(Math.abs(tocR), false, !ticCCW);
|
|
1583
|
+
} else if (param.Send === 1) {
|
|
1584
|
+
rCtr.addSegStrokeR(0, param.SL2);
|
|
1585
|
+
} else {
|
|
1586
|
+
rCtr.addSegStrokeR(0, param.SL2 - SR2l).addPointR(2 * tocR, 0).addSegArc(Math.abs(tocR), false, !ticCCW);
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
if (param.Send === 1) {
|
|
1590
|
+
rCtr.addSegStrokeR(-param.SE1, 0);
|
|
1591
|
+
} else {
|
|
1592
|
+
rCtr.addSegStrokeR(param.SE1, 0);
|
|
1593
|
+
}
|
|
1594
|
+
for (let i = 0; i < param.SN1; i++) {
|
|
1595
|
+
if (i > 0) {
|
|
1596
|
+
rCtr.addPointR(-2 * ticR, 0).addSegArc(Math.abs(ticR), false, ticCCW).addSegStrokeR(0, -param.SL1);
|
|
1597
|
+
} else if (param.Send === 1) {
|
|
1598
|
+
rCtr.addSegStrokeR(0, -param.SL2);
|
|
1599
|
+
} else {
|
|
1600
|
+
rCtr.addPointR(-2 * ticR, 0).addSegArc(Math.abs(ticR), false, ticCCW).addSegStrokeR(0, -param.SL2 + SR2l);
|
|
1601
|
+
}
|
|
1602
|
+
rCtr.addPointR(-2 * tocR, 0).addSegArc(Math.abs(tocR), false, !ticCCW).addSegStrokeR(0, param.SL1);
|
|
1603
|
+
}
|
|
1604
|
+
return [rLog, rCtr];
|
|
1605
|
+
}
|
|
1560
1606
|
function ctrGuidanceInner(param) {
|
|
1561
|
-
|
|
1607
|
+
let rLog = "";
|
|
1562
1608
|
const R6 = param.D6 / 2;
|
|
1563
1609
|
const stepA2 = 2 * Math.PI / param.N2;
|
|
1564
1610
|
const E22 = param.E2 / 2;
|
|
1565
1611
|
const aE2 = 2 * Math.asin(E22 / R6);
|
|
1566
1612
|
const iarcA2 = (stepA2 - aE2) / 2;
|
|
1567
|
-
const a1Plus = param.N2 < 3 ? 0 : Math.PI /
|
|
1568
|
-
const
|
|
1613
|
+
const a1Plus = param.N2 < 3 ? 0 : Math.PI / param.N2;
|
|
1614
|
+
const ar1 = a1Plus + degToRad2(param.SA1);
|
|
1615
|
+
const ab1 = Math.PI / 2 - ar1;
|
|
1616
|
+
const ab2 = -Math.PI / 2 + ar1;
|
|
1617
|
+
const SR1 = param.SD1 / 2;
|
|
1569
1618
|
if (iarcA2 < 0) {
|
|
1570
1619
|
throw `err564: N2 ${param.N2} is too large compare to D6 ${param.D6}, E2 ${param.E2}`;
|
|
1571
1620
|
}
|
|
1572
|
-
|
|
1621
|
+
if (param.orientation === 2 && param.N2 % 2 === 1) {
|
|
1622
|
+
throw `err565: N2 ${param.N2} is odd and orientation is alt`;
|
|
1623
|
+
}
|
|
1624
|
+
const [spring1Log, spring1Ctr] = ctrSpring(param, false);
|
|
1625
|
+
const [, spring2Ctr] = ctrSpring(param, true);
|
|
1626
|
+
rLog += spring1Log;
|
|
1573
1627
|
const pF = point3(0, -R6);
|
|
1574
1628
|
const pO = point3(0, 0);
|
|
1575
|
-
const pG = pF.rotate(pO,
|
|
1576
|
-
const pH = pF.
|
|
1577
|
-
const
|
|
1578
|
-
const
|
|
1579
|
-
const
|
|
1580
|
-
const
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
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;
|
|
1629
|
+
const pG = pF.rotate(pO, aE2);
|
|
1630
|
+
const pH = pF.translate(0, param.L2);
|
|
1631
|
+
const pIc = pH.translate(-SR1, 0);
|
|
1632
|
+
const pJ = pIc.translate(0, SR1);
|
|
1633
|
+
const pM = pIc.translate(0, SR1 + param.SE1);
|
|
1634
|
+
const pL = pM.rotate(pIc, ab1);
|
|
1635
|
+
const pN = pH.translate(0, SR1 + param.SE1).translate(param.SE1, 0);
|
|
1636
|
+
const pG2 = pF.rotate(pO, -aE2);
|
|
1637
|
+
const pIc2 = pH.translate(SR1, 0);
|
|
1638
|
+
const pJ2 = pIc2.translate(0, SR1);
|
|
1639
|
+
const pK2 = pJ2.rotate(pIc2, ab2);
|
|
1640
|
+
const pM2 = pIc2.translate(0, SR1 + param.SE1);
|
|
1641
|
+
const pN2 = pH.translate(0, SR1 + param.SE1).translate(-param.SE1, 0);
|
|
1642
|
+
const ctrSpringBase1 = contour4(pG.cx, pG.cy).addSegStrokeA(pN.cx, pN.cy).addSegStrokeA(pM.cx, pM.cy);
|
|
1643
|
+
const ctrSpringBase1b = contour4(pM.cx, pM.cy).addPointA(pL.cx, pL.cy).addSegArc(SR1 + param.SE1, false, true);
|
|
1644
|
+
ctrSpringBase1b.addPartial(spring1Ctr.rotate(0, 0, -ar1).translate(pL.cx, pL.cy));
|
|
1645
|
+
ctrSpringBase1b.addPointA(pJ.cx, pJ.cy).addPointA(pH.cx, pH.cy).addSegArc2().addSegStrokeA(pF.cx, pF.cy);
|
|
1646
|
+
ctrSpringBase1.addPartial(ctrSpringBase1b);
|
|
1647
|
+
const ctrSpringBase2a = contour4(pF.cx, pF.cy).addSegStrokeA(pH.cx, pH.cy).addPointA(pJ2.cx, pJ2.cy).addPointA(pK2.cx, pK2.cy).addSegArc2();
|
|
1648
|
+
ctrSpringBase2a.addPartial(spring2Ctr.rotate(0, 0, ar1).translate(pK2.cx, pK2.cy));
|
|
1649
|
+
ctrSpringBase2a.addPointA(pM2.cx, pM2.cy).addSegArc(SR1 + param.SE1, false, true);
|
|
1650
|
+
const ctrSpringBase2b = contour4(pM2.cx, pM2.cy).addSegStrokeA(pN2.cx, pN2.cy).addSegStrokeA(pG2.cx, pG2.cy);
|
|
1651
|
+
const ctrSpringBase2 = contour4(pF.cx, pF.cy).addPartial(ctrSpringBase2a).addPartial(ctrSpringBase2b);
|
|
1652
|
+
const rCtr = contour4(R6, 0);
|
|
1653
|
+
if (param.orientation === 2) {
|
|
1654
|
+
for (let i = 0; i < param.N2 / 2; i++) {
|
|
1655
|
+
rCtr.addPointAP(-2 * i * stepA2 - 2 * iarcA2, R6).addPointAP(-2 * i * stepA2 - 4 * iarcA2, R6).addSegArc2();
|
|
1656
|
+
rCtr.addCornerRounded(param.R7);
|
|
1657
|
+
const ar1b = Math.PI / 2 - (2 * i + 2) * stepA2;
|
|
1658
|
+
const ar2a = ar1b + 2 * aE2;
|
|
1659
|
+
rCtr.addPartial(ctrSpringBase2a.rotate(0, 0, ar2a));
|
|
1660
|
+
const ctrSB1 = ctrSpringBase1b.rotate(0, 0, ar1b);
|
|
1661
|
+
const pt1 = ctrSB1.getFirstPoint();
|
|
1662
|
+
rCtr.addCornerRounded(param.R7);
|
|
1663
|
+
rCtr.addSegStrokeA(pt1.cx, pt1.cy);
|
|
1664
|
+
rCtr.addCornerRounded(param.R7);
|
|
1665
|
+
rCtr.addPartial(ctrSB1);
|
|
1666
|
+
rCtr.addCornerRounded(param.R7);
|
|
1619
1667
|
}
|
|
1620
1668
|
} else {
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1669
|
+
for (let i = 0; i < param.N2; i++) {
|
|
1670
|
+
rCtr.addPointAP(-i * stepA2 - iarcA2, R6).addPointAP(-i * stepA2 - 2 * iarcA2, R6).addSegArc2().addCornerRounded(param.R7);
|
|
1671
|
+
if (param.orientation === 0) {
|
|
1672
|
+
rCtr.addPartial(ctrSpringBase2.rotate(0, 0, Math.PI / 2 - (i + 1) * stepA2 + aE2));
|
|
1673
|
+
} else if (param.orientation === 1) {
|
|
1674
|
+
rCtr.addPartial(ctrSpringBase1.rotate(0, 0, Math.PI / 2 - (i + 1) * stepA2));
|
|
1675
|
+
}
|
|
1676
|
+
rCtr.addCornerRounded(param.R7);
|
|
1677
|
+
}
|
|
1626
1678
|
}
|
|
1627
1679
|
return [rLog, rCtr];
|
|
1628
1680
|
}
|
|
@@ -2066,6 +2118,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2066
2118
|
const designName = rGeome.partName;
|
|
2067
2119
|
const inheritList = [];
|
|
2068
2120
|
const inheritNames = [];
|
|
2121
|
+
let subDesignObj = {};
|
|
2069
2122
|
if (param.holders) {
|
|
2070
2123
|
const vaxisHolderB2Param = designParam2(vaxisHolderDef.pDef, "B2");
|
|
2071
2124
|
vaxisHolderB2Param.setVal("PHD1", param.PHD1B);
|
|
@@ -2175,6 +2228,26 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2175
2228
|
};
|
|
2176
2229
|
inheritList.push(inheritHa);
|
|
2177
2230
|
inheritNames.push(`inpax_${designName}_hA`);
|
|
2231
|
+
subDesignObj = {
|
|
2232
|
+
vaxis_holder_B2: {
|
|
2233
|
+
partName: vaxisHolderB2Param.getPartName(),
|
|
2234
|
+
dparam: vaxisHolderB2Param.getDesignParamList(),
|
|
2235
|
+
orientation: [0, 0, 0],
|
|
2236
|
+
position: [0, 0, hb2PosH]
|
|
2237
|
+
},
|
|
2238
|
+
vaxis_holder_B1: {
|
|
2239
|
+
partName: vaxisHolderB1Param.getPartName(),
|
|
2240
|
+
dparam: vaxisHolderB1Param.getDesignParamList(),
|
|
2241
|
+
orientation: [0, 0, 0],
|
|
2242
|
+
position: [0, 0, hb1PosH]
|
|
2243
|
+
},
|
|
2244
|
+
vaxis_holder_A: {
|
|
2245
|
+
partName: vaxisHolderAParam.getPartName(),
|
|
2246
|
+
dparam: vaxisHolderAParam.getDesignParamList(),
|
|
2247
|
+
orientation: [0, 0, 0],
|
|
2248
|
+
position: [0, 0, haPosH]
|
|
2249
|
+
}
|
|
2250
|
+
};
|
|
2178
2251
|
}
|
|
2179
2252
|
rGeome.fig = {
|
|
2180
2253
|
poleCut: figCut,
|
|
@@ -2256,7 +2329,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
2256
2329
|
}
|
|
2257
2330
|
]
|
|
2258
2331
|
};
|
|
2259
|
-
rGeome.sub =
|
|
2332
|
+
rGeome.sub = subDesignObj;
|
|
2260
2333
|
rGeome.logstr += "pole_static drawn successfully!\n";
|
|
2261
2334
|
rGeome.calcErr = false;
|
|
2262
2335
|
} catch (emsg) {
|
|
@@ -3025,6 +3098,7 @@ function pGeom7(t, param, suffix = "") {
|
|
|
3025
3098
|
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
3099
|
figButtress.addMain(ctrButtress);
|
|
3027
3100
|
figButtress.addMain(contourCircle7(0, 0, R1 - param.E1));
|
|
3101
|
+
figSide.addSecond(ctrButtress);
|
|
3028
3102
|
for (const px of facePx) {
|
|
3029
3103
|
figTopWithRod.addMain(ctrRectangle(px, -param.L2 / 2, param.H1, param.L2));
|
|
3030
3104
|
}
|
|
@@ -3072,13 +3146,31 @@ function pGeom7(t, param, suffix = "") {
|
|
|
3072
3146
|
length: param.L2,
|
|
3073
3147
|
rotate: [0, Math.PI / 2, 0],
|
|
3074
3148
|
translate: [-param.L2 / 2, 0, 0]
|
|
3075
|
-
}
|
|
3149
|
+
},
|
|
3150
|
+
...facePx.map((pz, idx) => {
|
|
3151
|
+
const rElem = {
|
|
3152
|
+
outName: `subpax_${designName}_buttress_${idx}`,
|
|
3153
|
+
face: `${designName}_faceButtress`,
|
|
3154
|
+
extrudeMethod: EExtrude6.eLinearOrtho,
|
|
3155
|
+
length: param.H1,
|
|
3156
|
+
rotate: [0, 0, 0],
|
|
3157
|
+
translate: [0, 0, pz]
|
|
3158
|
+
};
|
|
3159
|
+
return rElem;
|
|
3160
|
+
})
|
|
3076
3161
|
],
|
|
3077
3162
|
volumes: [
|
|
3078
3163
|
{
|
|
3079
3164
|
outName: `pax_${designName}`,
|
|
3080
3165
|
boolMethod: EBVolume7.eUnion,
|
|
3081
|
-
inList: [
|
|
3166
|
+
inList: [
|
|
3167
|
+
`subpax_${designName}_side`,
|
|
3168
|
+
`subpax_${designName}_face`,
|
|
3169
|
+
...facePx.map((pz, idx) => {
|
|
3170
|
+
const subElem = `subpax_${designName}_buttress_${idx}`;
|
|
3171
|
+
return subElem;
|
|
3172
|
+
})
|
|
3173
|
+
]
|
|
3082
3174
|
}
|
|
3083
3175
|
]
|
|
3084
3176
|
};
|
|
@@ -3435,8 +3527,9 @@ import {
|
|
|
3435
3527
|
designParam as designParam4,
|
|
3436
3528
|
checkGeom as checkGeom4,
|
|
3437
3529
|
prefixLog as prefixLog4,
|
|
3438
|
-
contour as contour10,
|
|
3439
3530
|
contourCircle as contourCircle8,
|
|
3531
|
+
ctrRectangle as ctrRectangle2,
|
|
3532
|
+
ctrRectRot,
|
|
3440
3533
|
figure as figure9,
|
|
3441
3534
|
radToDeg as radToDeg7,
|
|
3442
3535
|
ffix as ffix11,
|
|
@@ -3482,10 +3575,17 @@ var pDef9 = {
|
|
|
3482
3575
|
pNumber9("H7", "mm", 600, 1, 2e3, 1),
|
|
3483
3576
|
pNumber9("L9", "mm", 300, 1, 1e3, 1),
|
|
3484
3577
|
pNumber9("R9", "mm", 50, 0, 300, 1),
|
|
3485
|
-
pSectionSeparator8("
|
|
3578
|
+
pSectionSeparator8("stoppers"),
|
|
3486
3579
|
pNumber9("S1", "mm", 100, 1, 300, 1),
|
|
3487
3580
|
pNumber9("S2", "mm", 2e3, 1, 8e3, 1),
|
|
3488
|
-
pNumber9("E7", "mm", 5, 1, 80, 1)
|
|
3581
|
+
pNumber9("E7", "mm", 5, 1, 80, 1),
|
|
3582
|
+
pSectionSeparator8("low stopper"),
|
|
3583
|
+
pNumber9("JD1", "mm", 200, 1, 500, 1),
|
|
3584
|
+
pNumber9("JE1", "mm", 5, 1, 80, 1),
|
|
3585
|
+
pNumber9("JL1", "mm", 260, 1, 2e3, 1),
|
|
3586
|
+
pNumber9("JH1", "mm", 20, -500, 500, 1),
|
|
3587
|
+
pNumber9("JS1", "mm", 100, 1, 500, 1),
|
|
3588
|
+
pNumber9("JS2", "mm", 200, 1, 500, 1)
|
|
3489
3589
|
],
|
|
3490
3590
|
paramSvg: {
|
|
3491
3591
|
D1: "rake_face.svg",
|
|
@@ -3518,7 +3618,13 @@ var pDef9 = {
|
|
|
3518
3618
|
R9: "rake_door.svg",
|
|
3519
3619
|
S1: "rake_side_stopper.svg",
|
|
3520
3620
|
S2: "rake_top_stopper.svg",
|
|
3521
|
-
E7: "rake_side_stopper.svg"
|
|
3621
|
+
E7: "rake_side_stopper.svg",
|
|
3622
|
+
JD1: "rake_low_stopper_holder.svg",
|
|
3623
|
+
JE1: "rake_low_stopper_holder.svg",
|
|
3624
|
+
JL1: "rake_low_stopper_holder.svg",
|
|
3625
|
+
JH1: "rake_low_stopper_holder.svg",
|
|
3626
|
+
JS1: "rake_side_stopper.svg",
|
|
3627
|
+
JS2: "rake_top_stopper.svg"
|
|
3522
3628
|
},
|
|
3523
3629
|
sim: {
|
|
3524
3630
|
tMax: 180,
|
|
@@ -3529,7 +3635,6 @@ var pDef9 = {
|
|
|
3529
3635
|
};
|
|
3530
3636
|
function pGeom9(t, param, suffix = "") {
|
|
3531
3637
|
const rGeome = initGeom9(pDef9.partName + suffix);
|
|
3532
|
-
let ctrRect;
|
|
3533
3638
|
const figCone = figure9();
|
|
3534
3639
|
const figBeam = figure9();
|
|
3535
3640
|
const figBeamHollow = figure9();
|
|
@@ -3545,36 +3650,65 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3545
3650
|
const figStopperFaceTH = figure9();
|
|
3546
3651
|
const figStopperFaceB = figure9();
|
|
3547
3652
|
const figStopperFaceBH = figure9();
|
|
3653
|
+
const figLowStopperHolderPre = figure9();
|
|
3654
|
+
const figLowStopperHolder = figure9();
|
|
3548
3655
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
3549
3656
|
`;
|
|
3550
3657
|
try {
|
|
3551
3658
|
const R1 = param.D1 / 2;
|
|
3552
3659
|
const H1H2 = param.H1 + param.H2;
|
|
3553
3660
|
const H1H5 = H1H2 - param.H4 + param.H5;
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3661
|
+
const stopper1H = H1H5 - param.S2;
|
|
3662
|
+
const stopper2H = param.H1 + param.H2 - param.H4 + param.D4 / 2;
|
|
3663
|
+
const stopper3H = param.H1 + param.L8 - param.S1;
|
|
3664
|
+
const L5h = param.L5 / 2;
|
|
3665
|
+
const S1r = param.S1 / 2;
|
|
3666
|
+
const S1h = param.S1 - 2 * param.E7;
|
|
3667
|
+
const S1hr = S1h / 2;
|
|
3668
|
+
const lowStopperTopPosX = -R1 - param.S1 / 2 - param.JS1;
|
|
3669
|
+
const S2s = param.S2 - param.S1 / 2;
|
|
3670
|
+
const lowSPosY = stopper1H - S1r;
|
|
3671
|
+
const lowSHPosZ = stopper1H - param.JH1;
|
|
3672
|
+
const JR1 = param.JD1 / 2;
|
|
3673
|
+
const JR1H = JR1 - param.JE1;
|
|
3674
|
+
const lowSHL = R1 + param.JS2;
|
|
3558
3675
|
if (2 * param.E7 >= param.S1) {
|
|
3559
3676
|
throw `err135: E7 ${param.E7} too large compare to S1 ${param.S1}`;
|
|
3560
3677
|
}
|
|
3561
3678
|
if (param.L5 < param.D2) {
|
|
3562
3679
|
throw `err138: L5 ${param.L5} too small compare to D2 ${param.D2}`;
|
|
3563
3680
|
}
|
|
3564
|
-
|
|
3565
|
-
if (stopper1H < 0) {
|
|
3681
|
+
if (stopper1H - param.JH1 - param.JD1 / 2 < 0) {
|
|
3566
3682
|
throw `err143: S2 ${param.S2} too large compare to H1H5 ${ffix11(H1H5)}`;
|
|
3567
3683
|
}
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3684
|
+
if (param.JS1 < param.S1 / 2) {
|
|
3685
|
+
throw `err144: JS1 ${param.JS1} too small compare to S1 ${param.S1}`;
|
|
3686
|
+
}
|
|
3687
|
+
if (param.JE1 > param.JD1 / 2) {
|
|
3688
|
+
throw `err145: JE1 ${param.JE1} too large compare to JD1 ${param.JD1}`;
|
|
3689
|
+
}
|
|
3690
|
+
if (param.JL1 > param.D1) {
|
|
3691
|
+
throw `err146: JL1 ${param.JL1} too large compare to D1 ${param.D1}`;
|
|
3692
|
+
}
|
|
3693
|
+
if (param.JL1 < param.JD1) {
|
|
3694
|
+
throw `err147: JL1 ${param.JL1} too small compare to JD1 ${param.JD1}`;
|
|
3695
|
+
}
|
|
3696
|
+
if (Math.abs(param.JH1) > param.JD1 / 2 + S1r) {
|
|
3697
|
+
throw `err148: JH1 ${param.JH1} too large compare to JD1 ${param.JD1} and S1 ${param.S1}`;
|
|
3698
|
+
}
|
|
3699
|
+
if (param.JS2 < param.JS1 - S1r) {
|
|
3700
|
+
throw `err149: JS2 ${param.JS2} too small compare to JS1 ${param.JS1} and S1 ${param.S1}`;
|
|
3701
|
+
}
|
|
3702
|
+
rGeome.logstr += `cone-height: ${ffix11(H1H2)} mm
|
|
3703
|
+
`;
|
|
3704
|
+
rGeome.logstr += `cone-height total: ${ffix11(H1H5)} mm
|
|
3705
|
+
`;
|
|
3706
|
+
figLowStopperHolderPre.addSecond(ctrRectangle2(-L5h, lowSPosY, param.L5, param.S1));
|
|
3707
|
+
figLowStopperHolderPre.addSecond(ctrRectangle2(-L5h, lowSPosY + param.E7, param.L5, S1h));
|
|
3708
|
+
figLowStopperHolderPre.addMain(contourCircle8(-param.JL1 / 2, lowSHPosZ, JR1));
|
|
3709
|
+
figLowStopperHolderPre.addMain(contourCircle8(-param.JL1 / 2, lowSHPosZ, JR1H));
|
|
3710
|
+
figLowStopperHolderPre.addMain(contourCircle8(param.JL1 / 2, lowSHPosZ, JR1));
|
|
3711
|
+
figLowStopperHolderPre.addMain(contourCircle8(param.JL1 / 2, lowSHPosZ, JR1H));
|
|
3578
3712
|
const rakeParam = designParam4(rakeDef.pDef);
|
|
3579
3713
|
rakeParam.setVal("D1", param.D1);
|
|
3580
3714
|
rakeParam.setVal("D2", param.D2);
|
|
@@ -3608,6 +3742,7 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3608
3742
|
checkGeom4(rakeGeom);
|
|
3609
3743
|
rGeome.logstr += prefixLog4(rakeGeom.logstr, rakeParam.getPartNameSuffix());
|
|
3610
3744
|
figCone.mergeFigure(rakeGeom.fig.faceCone);
|
|
3745
|
+
figCone.mergeFigure(figLowStopperHolderPre, true);
|
|
3611
3746
|
figBeam.mergeFigure(rakeGeom.fig.faceBeam);
|
|
3612
3747
|
figBeamHollow.mergeFigure(rakeGeom.fig.faceBeamHollow);
|
|
3613
3748
|
figDisc.mergeFigure(rakeGeom.fig.faceDisc);
|
|
@@ -3615,31 +3750,31 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3615
3750
|
figWing.mergeFigure(rakeGeom.fig.faceWing);
|
|
3616
3751
|
figWingHollow.mergeFigure(rakeGeom.fig.faceWingHollow);
|
|
3617
3752
|
figDoor.mergeFigure(rakeGeom.fig.faceDoor);
|
|
3753
|
+
figDoor.mergeFigure(figLowStopperHolderPre, true);
|
|
3618
3754
|
figStopperTop.mergeFigure(rakeGeom.fig.faceDisc, true);
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
figStopperTop.addMain(
|
|
3624
|
-
figStopperTop.addMain(
|
|
3625
|
-
figStopperTop.addMain(
|
|
3626
|
-
figStopperTop.addMain(
|
|
3627
|
-
|
|
3628
|
-
figStopperTop.addMain(
|
|
3629
|
-
figStopperTop.addMain(
|
|
3630
|
-
figStopperTop.addMain(
|
|
3631
|
-
figStopperTop.
|
|
3632
|
-
figStopperTop.
|
|
3633
|
-
figStopperTop.
|
|
3634
|
-
figStopperTop.
|
|
3635
|
-
figStopperTop.addMain(ctrRect(S2s, S1h, 0, R1 + param.E7, 0));
|
|
3755
|
+
figStopperTop.addMain(ctrRectangle2(lowStopperTopPosX, -L5h, param.S1, param.L5));
|
|
3756
|
+
figStopperTop.addMain(ctrRectangle2(lowStopperTopPosX + param.E7, -L5h, S1h, param.L5));
|
|
3757
|
+
figStopperTop.addMain(ctrRectangle2(param.S2 - param.S1, -L5h, param.S1, param.L5));
|
|
3758
|
+
figStopperTop.addMain(ctrRectangle2(param.S2 - param.E7 - S1h, -L5h, S1h, param.L5));
|
|
3759
|
+
figStopperTop.addMain(ctrRectangle2(0, -L5h, S2s, param.S1));
|
|
3760
|
+
figStopperTop.addMain(ctrRectangle2(0, -L5h + param.E7, S2s, S1h));
|
|
3761
|
+
figStopperTop.addMain(ctrRectangle2(0, L5h - param.S1, S2s, param.S1));
|
|
3762
|
+
figStopperTop.addMain(ctrRectangle2(0, L5h - param.S1 + param.E7, S2s, S1h));
|
|
3763
|
+
figStopperTop.addMain(ctrRectangle2(0, -R1 - param.S1, S2s, param.S1));
|
|
3764
|
+
figStopperTop.addMain(ctrRectangle2(0, -R1 - param.S1 + param.E7, S2s, S1h));
|
|
3765
|
+
figStopperTop.addMain(ctrRectangle2(0, R1, S2s, param.S1));
|
|
3766
|
+
figStopperTop.addMain(ctrRectangle2(0, R1 + param.E7, S2s, S1h));
|
|
3767
|
+
figStopperTop.addSecond(ctrRectangle2(-lowSHL, -param.JL1 / 2 - JR1, lowSHL, 2 * JR1));
|
|
3768
|
+
figStopperTop.addSecond(ctrRectangle2(-lowSHL, -param.JL1 / 2 - JR1H, lowSHL, 2 * JR1H));
|
|
3769
|
+
figStopperTop.addSecond(ctrRectangle2(-lowSHL, param.JL1 / 2 - JR1, lowSHL, 2 * JR1));
|
|
3770
|
+
figStopperTop.addSecond(ctrRectangle2(-lowSHL, param.JL1 / 2 - JR1H, lowSHL, 2 * JR1H));
|
|
3636
3771
|
figStopperSide.mergeFigure(rakeGeom.fig.faceBeam, true);
|
|
3637
|
-
figStopperSide.addMain(contourCircle8(-R1 -
|
|
3638
|
-
figStopperSide.addMain(contourCircle8(-R1 -
|
|
3772
|
+
figStopperSide.addMain(contourCircle8(-R1 - param.JS1, stopper1H, S1r));
|
|
3773
|
+
figStopperSide.addMain(contourCircle8(-R1 - param.JS1, stopper1H, S1hr));
|
|
3639
3774
|
figStopperSide.addMain(contourCircle8(param.S2 - S1r, stopper2H + S1r, S1r));
|
|
3640
3775
|
figStopperSide.addMain(contourCircle8(param.S2 - S1r, stopper2H + S1r, S1hr));
|
|
3641
|
-
figStopperSide.addSecond(
|
|
3642
|
-
figStopperSide.addSecond(
|
|
3776
|
+
figStopperSide.addSecond(ctrRectangle2(0, stopper2H, S2s, param.S1));
|
|
3777
|
+
figStopperSide.addSecond(ctrRectangle2(0, stopper2H + param.E7, S2s, S1h));
|
|
3643
3778
|
const stopper3Ly = stopper2H + param.S1 / 2 - stopper3H;
|
|
3644
3779
|
const stopper3L = Math.sqrt(S2s ** 2 + stopper3Ly ** 2);
|
|
3645
3780
|
const stopper3A = Math.atan2(stopper3Ly, S2s);
|
|
@@ -3650,36 +3785,46 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3650
3785
|
const stp3posdX = S1r * Math.sin(stopper3A);
|
|
3651
3786
|
const stp3posdY = S1r * Math.cos(stopper3A);
|
|
3652
3787
|
const stp3posY = stopper3H - stp3posdY;
|
|
3653
|
-
figStopperSide.addSecond(
|
|
3788
|
+
figStopperSide.addSecond(ctrRectRot(stp3posdX, stp3posY, stopper3L, param.S1, stopper3A));
|
|
3654
3789
|
const stp3posdX2 = S1hr * Math.sin(stopper3A);
|
|
3655
3790
|
const stp3posdY2 = S1hr * Math.cos(stopper3A);
|
|
3656
3791
|
const stp3posY2 = stopper3H - stp3posdY2;
|
|
3657
|
-
figStopperSide.addSecond(
|
|
3792
|
+
figStopperSide.addSecond(ctrRectRot(stp3posdX2, stp3posY2, stopper3L, S1h, stopper3A));
|
|
3793
|
+
figStopperSide.addSecond(ctrRectangle2(-lowSHL, lowSHPosZ - JR1, lowSHL, 2 * JR1));
|
|
3794
|
+
figStopperSide.addSecond(ctrRectangle2(-lowSHL, lowSHPosZ - JR1H, lowSHL, 2 * JR1H));
|
|
3658
3795
|
figStopperSideH.mergeFigure(rakeGeom.fig.faceBeam, true);
|
|
3659
|
-
figStopperSideH.addSecond(contourCircle8(-R1 -
|
|
3660
|
-
figStopperSideH.addMain(contourCircle8(-R1 -
|
|
3796
|
+
figStopperSideH.addSecond(contourCircle8(-R1 - param.JS1, stopper1H, S1r));
|
|
3797
|
+
figStopperSideH.addMain(contourCircle8(-R1 - param.JS1, stopper1H, S1hr));
|
|
3661
3798
|
figStopperSideH.addSecond(contourCircle8(param.S2 - S1r, stopper2H + S1r, S1r));
|
|
3662
3799
|
figStopperSideH.addMain(contourCircle8(param.S2 - S1r, stopper2H + S1r, S1hr));
|
|
3800
|
+
figStopperSideH.addSecond(ctrRectangle2(-lowSHL, lowSHPosZ - JR1, lowSHL, 2 * JR1));
|
|
3801
|
+
figStopperSideH.addSecond(ctrRectangle2(-lowSHL, lowSHPosZ - JR1H, lowSHL, 2 * JR1H));
|
|
3663
3802
|
figStopperFaceT.mergeFigure(rakeGeom.fig.faceCone, true);
|
|
3803
|
+
figStopperFaceT.mergeFigure(figLowStopperHolderPre, true);
|
|
3664
3804
|
figStopperFaceT.addMain(contourCircle8(-param.L5 / 2 + S1r, stopper2H + S1r, S1r));
|
|
3665
3805
|
figStopperFaceT.addMain(contourCircle8(-param.L5 / 2 + S1r, stopper2H + S1r, S1hr));
|
|
3666
3806
|
figStopperFaceT.addMain(contourCircle8(param.L5 / 2 - S1r, stopper2H + S1r, S1r));
|
|
3667
3807
|
figStopperFaceT.addMain(contourCircle8(param.L5 / 2 - S1r, stopper2H + S1r, S1hr));
|
|
3668
3808
|
figStopperFaceTH.mergeFigure(rakeGeom.fig.faceCone, true);
|
|
3809
|
+
figStopperFaceTH.mergeFigure(figLowStopperHolderPre, true);
|
|
3669
3810
|
figStopperFaceTH.addSecond(contourCircle8(-param.L5 / 2 + S1r, stopper2H + S1r, S1r));
|
|
3670
3811
|
figStopperFaceTH.addMain(contourCircle8(-param.L5 / 2 + S1r, stopper2H + S1r, S1hr));
|
|
3671
3812
|
figStopperFaceTH.addSecond(contourCircle8(param.L5 / 2 - S1r, stopper2H + S1r, S1r));
|
|
3672
3813
|
figStopperFaceTH.addMain(contourCircle8(param.L5 / 2 - S1r, stopper2H + S1r, S1hr));
|
|
3673
3814
|
figStopperFaceB.mergeFigure(rakeGeom.fig.faceCone, true);
|
|
3815
|
+
figStopperFaceB.mergeFigure(figLowStopperHolderPre, true);
|
|
3674
3816
|
figStopperFaceB.addMain(contourCircle8(-R1 - S1r, 0, S1r));
|
|
3675
3817
|
figStopperFaceB.addMain(contourCircle8(-R1 - S1r, 0, S1hr));
|
|
3676
3818
|
figStopperFaceB.addMain(contourCircle8(R1 + S1r, 0, S1r));
|
|
3677
3819
|
figStopperFaceB.addMain(contourCircle8(R1 + S1r, 0, S1hr));
|
|
3678
3820
|
figStopperFaceBH.mergeFigure(rakeGeom.fig.faceCone, true);
|
|
3821
|
+
figStopperFaceBH.mergeFigure(figLowStopperHolderPre, true);
|
|
3679
3822
|
figStopperFaceBH.addSecond(contourCircle8(-R1 - S1r, 0, S1r));
|
|
3680
3823
|
figStopperFaceBH.addMain(contourCircle8(-R1 - S1r, 0, S1hr));
|
|
3681
3824
|
figStopperFaceBH.addSecond(contourCircle8(R1 + S1r, 0, S1r));
|
|
3682
3825
|
figStopperFaceBH.addMain(contourCircle8(R1 + S1r, 0, S1hr));
|
|
3826
|
+
figLowStopperHolder.mergeFigure(rakeGeom.fig.faceCone, true);
|
|
3827
|
+
figLowStopperHolder.mergeFigure(figLowStopperHolderPre);
|
|
3683
3828
|
rGeome.fig = {
|
|
3684
3829
|
faceCone: figCone,
|
|
3685
3830
|
faceBeam: figBeam,
|
|
@@ -3695,7 +3840,8 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3695
3840
|
faceStopperFaceT: figStopperFaceT,
|
|
3696
3841
|
faceStopperFaceTH: figStopperFaceTH,
|
|
3697
3842
|
faceStopperFaceB: figStopperFaceB,
|
|
3698
|
-
faceStopperFaceBH: figStopperFaceBH
|
|
3843
|
+
faceStopperFaceBH: figStopperFaceBH,
|
|
3844
|
+
faceLowStopperHolder: figLowStopperHolder
|
|
3699
3845
|
};
|
|
3700
3846
|
const designName = rGeome.partName;
|
|
3701
3847
|
rGeome.vol = {
|
|
@@ -4085,7 +4231,7 @@ var heliostat_2Def = {
|
|
|
4085
4231
|
|
|
4086
4232
|
// src/heliostat/base.ts
|
|
4087
4233
|
import {
|
|
4088
|
-
contour as
|
|
4234
|
+
contour as contour10,
|
|
4089
4235
|
contourCircle as contourCircle9,
|
|
4090
4236
|
figure as figure11,
|
|
4091
4237
|
ffix as ffix13,
|
|
@@ -4172,11 +4318,11 @@ function pGeom11(t, param, suffix = "") {
|
|
|
4172
4318
|
rGeome.logstr += `inter-hollow: ${ffix13(interHollow)} mm
|
|
4173
4319
|
`;
|
|
4174
4320
|
ctrBaseCut1 = function(orient) {
|
|
4175
|
-
const rBaseCut1 =
|
|
4321
|
+
const rBaseCut1 = contour10(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();
|
|
4176
4322
|
return rBaseCut1;
|
|
4177
4323
|
};
|
|
4178
4324
|
ctrBaseCut2 = function(orient) {
|
|
4179
|
-
const rBaseCut2 =
|
|
4325
|
+
const rBaseCut2 = contour10(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();
|
|
4180
4326
|
return rBaseCut2;
|
|
4181
4327
|
};
|
|
4182
4328
|
if (param.H1 < param.E3 + param.H2 + param.H3 + param.E1) {
|
|
@@ -4191,7 +4337,7 @@ function pGeom11(t, param, suffix = "") {
|
|
|
4191
4337
|
}
|
|
4192
4338
|
const hollowH = param.E3 + param.H2 + RL2;
|
|
4193
4339
|
ctrHollow = function(orient) {
|
|
4194
|
-
const rHollow =
|
|
4340
|
+
const rHollow = contour10(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);
|
|
4195
4341
|
return rHollow;
|
|
4196
4342
|
};
|
|
4197
4343
|
figCut.addMain(ctrBaseCut1(1));
|
|
@@ -4298,7 +4444,7 @@ var baseDef = {
|
|
|
4298
4444
|
|
|
4299
4445
|
// src/heliostat/vaxis.ts
|
|
4300
4446
|
import {
|
|
4301
|
-
contour as
|
|
4447
|
+
contour as contour11,
|
|
4302
4448
|
contourCircle as contourCircle10,
|
|
4303
4449
|
figure as figure12,
|
|
4304
4450
|
ffix as ffix14,
|
|
@@ -4352,10 +4498,10 @@ function pGeom12(t, param, suffix = "") {
|
|
|
4352
4498
|
const R3 = param.D3 / 2;
|
|
4353
4499
|
rGeome.logstr += `vaxis-height: ${ffix14(param.H1)} mm
|
|
4354
4500
|
`;
|
|
4355
|
-
const ctrCylinder =
|
|
4501
|
+
const ctrCylinder = contour11(R1, 0).addSegStrokeA(R1, param.H1).addSegStrokeA(R1 - param.E1, param.H1).addSegStrokeA(R1 - param.E1, 0).closeSegStroke();
|
|
4356
4502
|
figCut.addMain(ctrCylinder);
|
|
4357
4503
|
ctrPoleProfile = function(orient) {
|
|
4358
|
-
const rPoleProfile =
|
|
4504
|
+
const rPoleProfile = contour11(orient * R1, 0).addSegStrokeA(orient * R1, param.H1).addSegStrokeA(orient * R2, param.H1).addSegStrokeA(orient * R2, param.H1 - param.E2).addSegStrokeA(orient * (R1 - param.E1), param.H1 - param.E2).addSegStrokeA(orient * (R1 - param.E1), param.E2).addSegStrokeA(orient * R2, param.E2).addSegStrokeA(orient * R2, 0).closeSegStroke();
|
|
4359
4505
|
return rPoleProfile;
|
|
4360
4506
|
};
|
|
4361
4507
|
figCut.addSecond(ctrPoleProfile(1));
|
|
@@ -4431,7 +4577,7 @@ var vaxisDef = {
|
|
|
4431
4577
|
|
|
4432
4578
|
// src/heliostat/ring.ts
|
|
4433
4579
|
import {
|
|
4434
|
-
contour as
|
|
4580
|
+
contour as contour12,
|
|
4435
4581
|
contourCircle as contourCircle11,
|
|
4436
4582
|
figure as figure13,
|
|
4437
4583
|
ffix as ffix15,
|
|
@@ -4503,7 +4649,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4503
4649
|
const tR1 = R3 - param.L2;
|
|
4504
4650
|
const tR2 = tR1 - param.L3;
|
|
4505
4651
|
const tA = 2 * Math.PI / (2 * param.N1);
|
|
4506
|
-
const ctrTeeth =
|
|
4652
|
+
const ctrTeeth = contour12(tR1, 0);
|
|
4507
4653
|
for (let i = 0; i < param.N1; i++) {
|
|
4508
4654
|
const ti1 = 2 * i + 1;
|
|
4509
4655
|
const ti2 = 2 * i + 2;
|
|
@@ -4527,17 +4673,17 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4527
4673
|
figRingTeeth.addMain(contourCircle11(0, 0, R3));
|
|
4528
4674
|
figRingTeeth.addMain(ctrTeeth);
|
|
4529
4675
|
figRingTeeth.addSecond(contourCircle11(0, 0, R1));
|
|
4530
|
-
const ctrInner =
|
|
4676
|
+
const ctrInner = contour12(R1, 0).addSegStrokeA(-R1, 0).addSegStrokeA(-R1, -param.H1).addSegStrokeA(R1, -param.H1).closeSegStroke();
|
|
4531
4677
|
const ctrScrewHole = function(rnl) {
|
|
4532
|
-
const rCtr =
|
|
4678
|
+
const rCtr = contour12(rnl * (R1 + param.L1) + R2, 0).addSegStrokeR(-2 * R2, 0).addSegStrokeR(0, -param.H1).addSegStrokeR(2 * R2, 0).closeSegStroke();
|
|
4533
4679
|
return rCtr;
|
|
4534
4680
|
};
|
|
4535
4681
|
const ctrGearTeeth = function(rnl) {
|
|
4536
|
-
const rCtr =
|
|
4682
|
+
const rCtr = contour12(rnl * (R3 - param.L2), -param.H1).addSegStrokeR(-rnl * param.L3, 0).addSegStrokeR(0, -param.H2).addSegStrokeR(rnl * param.L3, 0).closeSegStroke();
|
|
4537
4683
|
return rCtr;
|
|
4538
4684
|
};
|
|
4539
4685
|
const ctrL = function(rnl) {
|
|
4540
|
-
const rCtr =
|
|
4686
|
+
const rCtr = contour12(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
4687
|
return rCtr;
|
|
4542
4688
|
};
|
|
4543
4689
|
figSection.addSecond(ctrInner);
|
|
@@ -4598,7 +4744,7 @@ var ringDef = {
|
|
|
4598
4744
|
|
|
4599
4745
|
// src/heliostat/ring_guidance.ts
|
|
4600
4746
|
import {
|
|
4601
|
-
contour as
|
|
4747
|
+
contour as contour13,
|
|
4602
4748
|
contourCircle as contourCircle12,
|
|
4603
4749
|
figure as figure14,
|
|
4604
4750
|
ffix as ffix16,
|
|
@@ -4684,7 +4830,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4684
4830
|
figTop.addMain(contourCircle12(R1, 0, R3).rotate(0, 0, i * stepA1));
|
|
4685
4831
|
}
|
|
4686
4832
|
const rect = function(xbl, ybl, width, height) {
|
|
4687
|
-
const rCtr =
|
|
4833
|
+
const rCtr = contour13(xbl, ybl).addSegStrokeR(width, 0).addSegStrokeR(0, height).addSegStrokeR(-width, 0).closeSegStroke();
|
|
4688
4834
|
return rCtr;
|
|
4689
4835
|
};
|
|
4690
4836
|
const w1 = R1 - R6 + R4;
|
|
@@ -4738,10 +4884,11 @@ var ringGuidanceDef = {
|
|
|
4738
4884
|
// src/heliostat/vaxis_guidance.ts
|
|
4739
4885
|
import {
|
|
4740
4886
|
contourCircle as contourCircle13,
|
|
4741
|
-
ctrRectangle as
|
|
4887
|
+
ctrRectangle as ctrRectangle3,
|
|
4742
4888
|
figure as figure15,
|
|
4743
4889
|
ffix as ffix17,
|
|
4744
4890
|
pNumber as pNumber15,
|
|
4891
|
+
pDropdown as pDropdown2,
|
|
4745
4892
|
pSectionSeparator as pSectionSeparator14,
|
|
4746
4893
|
initGeom as initGeom15,
|
|
4747
4894
|
EExtrude as EExtrude12,
|
|
@@ -4759,18 +4906,22 @@ var pDef15 = {
|
|
|
4759
4906
|
pNumber15("D4", "mm", 50, 1, 200, 1),
|
|
4760
4907
|
pNumber15("L1", "mm", 90, 1, 900, 1),
|
|
4761
4908
|
pNumber15("R5", "mm", 20, 0, 500, 1),
|
|
4762
|
-
pSectionSeparator14("inner
|
|
4909
|
+
pSectionSeparator14("inner"),
|
|
4763
4910
|
pNumber15("D6", "mm", 540, 1, 1e3, 1),
|
|
4764
4911
|
pNumber15("N2", "springs", 6, 1, 24, 1),
|
|
4912
|
+
pDropdown2("orientation", ["ccw", "cw", "alt"]),
|
|
4765
4913
|
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
4914
|
pNumber15("L2", "mm", 100, 1, 900, 1),
|
|
4771
|
-
pNumber15("
|
|
4772
|
-
|
|
4773
|
-
pNumber15("
|
|
4915
|
+
pNumber15("E2", "mm", 20, 1, 200, 1),
|
|
4916
|
+
pSectionSeparator14("spring"),
|
|
4917
|
+
pNumber15("SA1", "degree", 0, -45, 45, 1),
|
|
4918
|
+
pNumber15("SE1", "mm", 10, 1, 200, 1),
|
|
4919
|
+
pNumber15("SD1", "mm", 20, 1, 200, 1),
|
|
4920
|
+
pNumber15("SD2", "mm", 10, 1, 200, 1),
|
|
4921
|
+
pNumber15("SN1", "loops", 2, 0, 8, 1),
|
|
4922
|
+
pNumber15("SL1", "mm", 40, 1, 900, 1),
|
|
4923
|
+
pNumber15("SL2", "mm", 70, 0, 900, 1),
|
|
4924
|
+
pDropdown2("Send", ["round", "pike"]),
|
|
4774
4925
|
pSectionSeparator14("thickness"),
|
|
4775
4926
|
pNumber15("T1", "mm", 10, 1, 200, 1),
|
|
4776
4927
|
pNumber15("Dvaxis", "mm", 260, 5, 1e3, 1)
|
|
@@ -4785,15 +4936,18 @@ var pDef15 = {
|
|
|
4785
4936
|
R5: "vaxis_guidance_top.svg",
|
|
4786
4937
|
D6: "vaxis_guidance_top.svg",
|
|
4787
4938
|
N2: "vaxis_guidance_top.svg",
|
|
4939
|
+
orientation: "vaxis_guidance_top.svg",
|
|
4788
4940
|
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
4941
|
L2: "vaxis_guidance_spring.svg",
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4942
|
+
E2: "vaxis_guidance_spring.svg",
|
|
4943
|
+
SA1: "vaxis_guidance_spring.svg",
|
|
4944
|
+
SE1: "vaxis_guidance_spring.svg",
|
|
4945
|
+
SD1: "vaxis_guidance_spring.svg",
|
|
4946
|
+
SD2: "vaxis_guidance_spring.svg",
|
|
4947
|
+
SN1: "vaxis_guidance_spring.svg",
|
|
4948
|
+
SL1: "vaxis_guidance_spring.svg",
|
|
4949
|
+
SL2: "vaxis_guidance_spring.svg",
|
|
4950
|
+
Send: "vaxis_guidance_spring.svg",
|
|
4797
4951
|
T1: "vaxis_guidance_top.svg",
|
|
4798
4952
|
Dvaxis: "vaxis_guidance_top.svg"
|
|
4799
4953
|
},
|
|
@@ -4832,10 +4986,10 @@ function pGeom15(t, param, suffix = "") {
|
|
|
4832
4986
|
figTop.addMain(innerCtr);
|
|
4833
4987
|
figTop.addSecond(contourCircle13(0, 0, param.Dvaxis / 2));
|
|
4834
4988
|
const w1 = R1 - R6 + R4;
|
|
4835
|
-
figSection.addMain(
|
|
4836
|
-
figSection.addMain(
|
|
4837
|
-
figSection.addSecond(
|
|
4838
|
-
figSection.addSecond(
|
|
4989
|
+
figSection.addMain(ctrRectangle3(R6, 0, w1, param.T1));
|
|
4990
|
+
figSection.addMain(ctrRectangle3(-R6 - w1, 0, w1, param.T1));
|
|
4991
|
+
figSection.addSecond(ctrRectangle3(R1 - R3, 0, 2 * R3, param.T1));
|
|
4992
|
+
figSection.addSecond(ctrRectangle3(-R1 - R3, 0, 2 * R3, param.T1));
|
|
4839
4993
|
rGeome.fig = {
|
|
4840
4994
|
faceTop: figTop,
|
|
4841
4995
|
faceSection: figSection
|
|
@@ -4876,37 +5030,193 @@ var vaxisGuidanceDef = {
|
|
|
4876
5030
|
pGeom: pGeom15
|
|
4877
5031
|
};
|
|
4878
5032
|
|
|
4879
|
-
// src/heliostat/
|
|
5033
|
+
// src/heliostat/haxis_guidance.ts
|
|
4880
5034
|
import {
|
|
4881
|
-
|
|
5035
|
+
point as point6,
|
|
5036
|
+
contour as contour14,
|
|
4882
5037
|
contourCircle as contourCircle14,
|
|
5038
|
+
ctrRectangle as ctrRectangle4,
|
|
4883
5039
|
figure as figure16,
|
|
5040
|
+
degToRad as degToRad6,
|
|
4884
5041
|
ffix as ffix18,
|
|
4885
5042
|
pNumber as pNumber16,
|
|
5043
|
+
pDropdown as pDropdown3,
|
|
4886
5044
|
pSectionSeparator as pSectionSeparator15,
|
|
4887
5045
|
initGeom as initGeom16,
|
|
4888
5046
|
EExtrude as EExtrude13,
|
|
4889
5047
|
EBVolume as EBVolume16
|
|
4890
5048
|
} from "geometrix";
|
|
4891
5049
|
var pDef16 = {
|
|
5050
|
+
partName: "haxis_guidance",
|
|
5051
|
+
params: [
|
|
5052
|
+
//pNumber(name, unit, init, min, max, step)
|
|
5053
|
+
pNumber16("D5", "mm", 600, 1, 2e3, 1),
|
|
5054
|
+
pNumber16("D8", "mm", 1e3, 1, 2e3, 1),
|
|
5055
|
+
pSectionSeparator15("outer details"),
|
|
5056
|
+
pNumber16("E5", "mm", 1, 0, 200, 1),
|
|
5057
|
+
pNumber16("E8", "mm", 20, 1, 200, 1),
|
|
5058
|
+
pNumber16("L5", "mm", 20, 1, 200, 1),
|
|
5059
|
+
pNumber16("R9", "mm", 20, 0, 500, 1),
|
|
5060
|
+
pSectionSeparator15("inner spring"),
|
|
5061
|
+
pNumber16("SA1", "degree", 0, -45, 45, 1),
|
|
5062
|
+
pNumber16("SE1", "mm", 2, 0.1, 100, 0.1),
|
|
5063
|
+
pNumber16("SD1", "mm", 20, 1, 200, 1),
|
|
5064
|
+
pNumber16("SD2", "mm", 10, 1, 200, 1),
|
|
5065
|
+
pNumber16("SN1", "springs", 7, 1, 24, 1),
|
|
5066
|
+
pNumber16("SL1", "mm", 60, 0, 500, 1),
|
|
5067
|
+
pNumber16("SL2", "mm", 100, 0, 500, 1),
|
|
5068
|
+
pDropdown3("Send", ["round", "pike"]),
|
|
5069
|
+
pSectionSeparator15("thickness"),
|
|
5070
|
+
pNumber16("L4", "mm", 400, 1, 2e3, 1)
|
|
5071
|
+
],
|
|
5072
|
+
paramSvg: {
|
|
5073
|
+
D5: "haxis_guidance_outer.svg",
|
|
5074
|
+
D8: "haxis_guidance_outer.svg",
|
|
5075
|
+
E5: "haxis_guidance_outer.svg",
|
|
5076
|
+
E8: "haxis_guidance_outer.svg",
|
|
5077
|
+
L5: "haxis_guidance_outer.svg",
|
|
5078
|
+
R9: "haxis_guidance_outer.svg",
|
|
5079
|
+
SA1: "haxis_guidance_spring.svg",
|
|
5080
|
+
SE1: "haxis_guidance_spring.svg",
|
|
5081
|
+
SD1: "haxis_guidance_spring.svg",
|
|
5082
|
+
SD2: "haxis_guidance_spring.svg",
|
|
5083
|
+
SN1: "haxis_guidance_spring.svg",
|
|
5084
|
+
SL1: "haxis_guidance_spring.svg",
|
|
5085
|
+
SL2: "haxis_guidance_spring.svg",
|
|
5086
|
+
Send: "haxis_guidance_spring.svg",
|
|
5087
|
+
L4: "haxis_guidance_outer.svg"
|
|
5088
|
+
},
|
|
5089
|
+
sim: {
|
|
5090
|
+
tMax: 100,
|
|
5091
|
+
tStep: 0.5,
|
|
5092
|
+
tUpdate: 500
|
|
5093
|
+
// every 0.5 second
|
|
5094
|
+
}
|
|
5095
|
+
};
|
|
5096
|
+
function pGeom16(t, param, suffix = "") {
|
|
5097
|
+
const rGeome = initGeom16(pDef16.partName + suffix);
|
|
5098
|
+
const figProfile = figure16();
|
|
5099
|
+
const figSide = figure16();
|
|
5100
|
+
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5101
|
+
`;
|
|
5102
|
+
try {
|
|
5103
|
+
const R5 = param.D5 / 2;
|
|
5104
|
+
const R8 = param.D8 / 2;
|
|
5105
|
+
const SR1 = param.SD1 / 2;
|
|
5106
|
+
const Rinner = R5 + param.E5;
|
|
5107
|
+
const Rinner2 = R8 - param.E8;
|
|
5108
|
+
const aLeg = 2 * Math.asin(param.L5 / (2 * Rinner));
|
|
5109
|
+
const sA0 = Math.PI / 12 + degToRad6(param.SA1);
|
|
5110
|
+
const sA = Math.PI / 2 + aLeg - sA0;
|
|
5111
|
+
const sA1 = Math.PI - sA0;
|
|
5112
|
+
const sA2 = Math.PI / 2 - Math.PI / 6 + sA0;
|
|
5113
|
+
if (Rinner + SR1 + param.SE1 > Rinner2) {
|
|
5114
|
+
throw `err411: D8 ${param.D8} is too small compare to D5 ${param.D5}, E5 ${param.D5}, E8 ${param.E8}`;
|
|
5115
|
+
}
|
|
5116
|
+
if (2 * Math.PI / 3 - 2 * aLeg < param.R9 / Rinner2) {
|
|
5117
|
+
throw `err412: L5 ${param.L5} is too large compare to R9 ${param.R9}`;
|
|
5118
|
+
}
|
|
5119
|
+
rGeome.logstr += `haxis_guidance: Dinner ${ffix18(2 * Rinner)} mm
|
|
5120
|
+
`;
|
|
5121
|
+
figProfile.addSecond(contourCircle14(0, 0, R5));
|
|
5122
|
+
figProfile.addSecond(contourCircle14(0, 0, R8));
|
|
5123
|
+
const [spring1Log, spring1Ctr] = ctrSpring(param, false);
|
|
5124
|
+
const [, spring2Ctr] = ctrSpring(param, true);
|
|
5125
|
+
rGeome.logstr += spring1Log;
|
|
5126
|
+
const Ai1 = Math.PI / 2 - aLeg;
|
|
5127
|
+
const Ai2 = -Math.PI / 6 + aLeg;
|
|
5128
|
+
const p0 = point6(0, 0);
|
|
5129
|
+
const p11 = p0.translatePolar(Ai1, Rinner + param.SE1 + SR1);
|
|
5130
|
+
const p12c = p11.translatePolar(Ai1 - Math.PI / 2, SR1);
|
|
5131
|
+
const p13 = p12c.translatePolar(Ai1 + Math.PI, SR1 + param.SE1);
|
|
5132
|
+
const p14 = p12c.translatePolar(Ai1 + Math.PI, SR1);
|
|
5133
|
+
const p15 = p13.rotate(p12c, sA);
|
|
5134
|
+
const p21 = p0.translatePolar(Ai2, Rinner + param.SE1 + SR1);
|
|
5135
|
+
const p22c = p21.translatePolar(Ai2 + Math.PI / 2, SR1);
|
|
5136
|
+
const p23 = p22c.translatePolar(Ai2 + Math.PI, SR1 + param.SE1);
|
|
5137
|
+
const p24 = p22c.translatePolar(Ai2 + Math.PI, SR1);
|
|
5138
|
+
const p26 = p24.rotate(p22c, -sA);
|
|
5139
|
+
const ctrProfile = contour14(0, Rinner).addSegStrokeA(p13.cx, p13.cy).addPointA(p15.cx, p15.cy).addSegArc(SR1 + param.SE1, false, true);
|
|
5140
|
+
ctrProfile.addPartial(spring1Ctr.rotate(0, 0, sA1).translate(p15.cx, p15.cy));
|
|
5141
|
+
ctrProfile.addPointA(p14.cx, p14.cy).addPointA(p11.cx, p11.cy).addSegArc2().addSegStrokeAP(Ai1, Rinner2).addCornerRounded(param.R9).addPointAP(Ai2, Rinner2).addSegArc(Rinner2, false, false).addCornerRounded(param.R9).addSegStrokeA(p21.cx, p21.cy).addPointA(p24.cx, p24.cy).addPointA(p26.cx, p26.cy).addSegArc2();
|
|
5142
|
+
ctrProfile.addPartial(spring2Ctr.rotate(0, 0, sA2).translate(p26.cx, p26.cy));
|
|
5143
|
+
ctrProfile.addPointA(p23.cx, p23.cy).addSegArc(SR1 + param.SE1, false, true).addSegStrokeAP(-Math.PI / 6, Rinner).addSegStrokeAP(-Math.PI / 6, R8).addPointAP(Math.PI / 2, R8).addSegArc(R8, false, true).closeSegStroke();
|
|
5144
|
+
figProfile.addMain(ctrProfile);
|
|
5145
|
+
const R8plus = R8 * Math.sin(Math.PI / 6);
|
|
5146
|
+
figSide.addMain(ctrRectangle4(0, -R8plus, param.L4, R8 + R8plus));
|
|
5147
|
+
figSide.addSecond(ctrRectangle4(0, -R8, param.L4, 2 * R8));
|
|
5148
|
+
figSide.addSecond(ctrRectangle4(0, -R5, param.L4, 2 * R5));
|
|
5149
|
+
rGeome.fig = {
|
|
5150
|
+
faceProfile: figProfile,
|
|
5151
|
+
faceSide: figSide
|
|
5152
|
+
};
|
|
5153
|
+
const designName = rGeome.partName;
|
|
5154
|
+
rGeome.vol = {
|
|
5155
|
+
extrudes: [
|
|
5156
|
+
{
|
|
5157
|
+
outName: `subpax_${designName}_profile`,
|
|
5158
|
+
face: `${designName}_faceProfile`,
|
|
5159
|
+
extrudeMethod: EExtrude13.eLinearOrtho,
|
|
5160
|
+
length: param.L4,
|
|
5161
|
+
rotate: [0, 0, 0],
|
|
5162
|
+
translate: [0, 0, 0]
|
|
5163
|
+
}
|
|
5164
|
+
],
|
|
5165
|
+
volumes: [
|
|
5166
|
+
{
|
|
5167
|
+
outName: `pax_${designName}`,
|
|
5168
|
+
boolMethod: EBVolume16.eIdentity,
|
|
5169
|
+
inList: [`subpax_${designName}_profile`]
|
|
5170
|
+
}
|
|
5171
|
+
]
|
|
5172
|
+
};
|
|
5173
|
+
rGeome.sub = {};
|
|
5174
|
+
rGeome.logstr += "haxis_guidance drawn successfully!\n";
|
|
5175
|
+
rGeome.calcErr = false;
|
|
5176
|
+
} catch (emsg) {
|
|
5177
|
+
rGeome.logstr += emsg;
|
|
5178
|
+
console.log(emsg);
|
|
5179
|
+
}
|
|
5180
|
+
return rGeome;
|
|
5181
|
+
}
|
|
5182
|
+
var haxisGuidanceDef = {
|
|
5183
|
+
pTitle: "Haxis-guidance",
|
|
5184
|
+
pDescription: "The guidance of the H-Axis for the heliostat inclination",
|
|
5185
|
+
pDef: pDef16,
|
|
5186
|
+
pGeom: pGeom16
|
|
5187
|
+
};
|
|
5188
|
+
|
|
5189
|
+
// src/heliostat/rod.ts
|
|
5190
|
+
import {
|
|
5191
|
+
contour as contour15,
|
|
5192
|
+
contourCircle as contourCircle15,
|
|
5193
|
+
figure as figure17,
|
|
5194
|
+
ffix as ffix19,
|
|
5195
|
+
pNumber as pNumber17,
|
|
5196
|
+
pSectionSeparator as pSectionSeparator16,
|
|
5197
|
+
initGeom as initGeom17,
|
|
5198
|
+
EExtrude as EExtrude14,
|
|
5199
|
+
EBVolume as EBVolume17
|
|
5200
|
+
} from "geometrix";
|
|
5201
|
+
var pDef17 = {
|
|
4892
5202
|
partName: "rod",
|
|
4893
5203
|
params: [
|
|
4894
5204
|
//pNumber(name, unit, init, min, max, step)
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
5205
|
+
pNumber17("L1", "mm", 1e4, 100, 4e4, 10),
|
|
5206
|
+
pNumber17("L2", "mm", 100, 2, 400, 1),
|
|
5207
|
+
pNumber17("L3", "mm", 400, 10, 1e3, 1),
|
|
5208
|
+
pNumber17("L4", "mm", 600, 10, 1e3, 1),
|
|
5209
|
+
pNumber17("N1", "", 10, 2, 50, 1),
|
|
5210
|
+
pSectionSeparator16("section"),
|
|
5211
|
+
pNumber17("H1", "mm", 200, 5, 4e3, 1),
|
|
5212
|
+
pNumber17("E1", "mm", 2, 1, 80, 1),
|
|
5213
|
+
pNumber17("E2", "mm", 10, 1, 80, 1),
|
|
5214
|
+
pSectionSeparator16("pad"),
|
|
5215
|
+
pNumber17("N3", "", 2, 1, 20, 1),
|
|
5216
|
+
pNumber17("N4", "", 4, 1, 20, 1),
|
|
5217
|
+
pNumber17("R3", "mm", 100, 1, 500, 1),
|
|
5218
|
+
pNumber17("D2", "mm", 10, 1, 100, 1),
|
|
5219
|
+
pNumber17("L7", "mm", 10, 1, 300, 1)
|
|
4910
5220
|
],
|
|
4911
5221
|
paramSvg: {
|
|
4912
5222
|
L1: "rod_top.svg",
|
|
@@ -4930,36 +5240,36 @@ var pDef16 = {
|
|
|
4930
5240
|
// every 0.5 second
|
|
4931
5241
|
}
|
|
4932
5242
|
};
|
|
4933
|
-
function
|
|
4934
|
-
const rGeome =
|
|
5243
|
+
function pGeom17(t, param, suffix = "") {
|
|
5244
|
+
const rGeome = initGeom17(pDef17.partName + suffix);
|
|
4935
5245
|
let ctrPlate;
|
|
4936
5246
|
let ctrRod;
|
|
4937
|
-
const figCut =
|
|
4938
|
-
const figPlate =
|
|
4939
|
-
const figTop =
|
|
5247
|
+
const figCut = figure17();
|
|
5248
|
+
const figPlate = figure17();
|
|
5249
|
+
const figTop = figure17();
|
|
4940
5250
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4941
5251
|
`;
|
|
4942
5252
|
try {
|
|
4943
5253
|
const R2 = param.D2 / 2;
|
|
4944
5254
|
const n3step = param.L3 / (param.N3 + 1);
|
|
4945
5255
|
const n4step = param.L4 / (param.N4 + 1);
|
|
4946
|
-
rGeome.logstr += `rod-length: ${
|
|
5256
|
+
rGeome.logstr += `rod-length: ${ffix19(param.L1)} mm
|
|
4947
5257
|
`;
|
|
4948
5258
|
const space_length = (param.L1 - param.L3) / (param.N1 - 1);
|
|
4949
|
-
rGeome.logstr += `space-length: ${
|
|
5259
|
+
rGeome.logstr += `space-length: ${ffix19(space_length)} mm
|
|
4950
5260
|
`;
|
|
4951
5261
|
ctrPlate = function(py) {
|
|
4952
5262
|
const rPlate = [];
|
|
4953
5263
|
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();
|
|
4954
5264
|
rPlate.push(plateExt);
|
|
4955
5265
|
for (let i = 1; i < param.N3 + 1; i++) {
|
|
4956
|
-
rPlate.push(
|
|
4957
|
-
rPlate.push(
|
|
5266
|
+
rPlate.push(contourCircle15(param.L4 / 2 - param.L7, py + i * n3step, R2));
|
|
5267
|
+
rPlate.push(contourCircle15(-param.L4 / 2 + param.L7, py + i * n3step, R2));
|
|
4958
5268
|
}
|
|
4959
5269
|
for (let i = 1; i < param.N4 + 1; i++) {
|
|
4960
|
-
rPlate.push(
|
|
5270
|
+
rPlate.push(contourCircle15(-param.L4 / 2 + i * n4step, py + param.L7, R2));
|
|
4961
5271
|
rPlate.push(
|
|
4962
|
-
|
|
5272
|
+
contourCircle15(-param.L4 / 2 + i * n4step, py + param.L3 - param.L7, R2)
|
|
4963
5273
|
);
|
|
4964
5274
|
}
|
|
4965
5275
|
return rPlate;
|
|
@@ -4996,7 +5306,7 @@ function pGeom16(t, param, suffix = "") {
|
|
|
4996
5306
|
{
|
|
4997
5307
|
outName: `subpax_${designName}_rod`,
|
|
4998
5308
|
face: `${designName}_faceCut`,
|
|
4999
|
-
extrudeMethod:
|
|
5309
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
5000
5310
|
length: param.L1,
|
|
5001
5311
|
rotate: [0, 0, 0],
|
|
5002
5312
|
translate: [0, 0, 0]
|
|
@@ -5004,7 +5314,7 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5004
5314
|
{
|
|
5005
5315
|
outName: `subpax_${designName}_plates`,
|
|
5006
5316
|
face: `${designName}_faceTop`,
|
|
5007
|
-
extrudeMethod:
|
|
5317
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
5008
5318
|
length: param.E2,
|
|
5009
5319
|
rotate: [Math.PI / 2, 0, 0],
|
|
5010
5320
|
translate: [0, param.E2 + param.H1, 0]
|
|
@@ -5013,7 +5323,7 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5013
5323
|
volumes: [
|
|
5014
5324
|
{
|
|
5015
5325
|
outName: `pax_${designName}`,
|
|
5016
|
-
boolMethod:
|
|
5326
|
+
boolMethod: EBVolume17.eUnion,
|
|
5017
5327
|
inList: [`subpax_${designName}_rod`, `subpax_${designName}_plates`]
|
|
5018
5328
|
}
|
|
5019
5329
|
]
|
|
@@ -5030,51 +5340,51 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5030
5340
|
var rodDef = {
|
|
5031
5341
|
pTitle: "Heliostat rod",
|
|
5032
5342
|
pDescription: "The rod of an heliostat-surface",
|
|
5033
|
-
pDef:
|
|
5034
|
-
pGeom:
|
|
5343
|
+
pDef: pDef17,
|
|
5344
|
+
pGeom: pGeom17
|
|
5035
5345
|
};
|
|
5036
5346
|
|
|
5037
5347
|
// src/heliostat/trapeze.ts
|
|
5038
5348
|
import {
|
|
5039
5349
|
contour as contour16,
|
|
5040
|
-
contourCircle as
|
|
5041
|
-
figure as
|
|
5350
|
+
contourCircle as contourCircle16,
|
|
5351
|
+
figure as figure18,
|
|
5042
5352
|
radToDeg as radToDeg9,
|
|
5043
|
-
ffix as
|
|
5044
|
-
pNumber as
|
|
5045
|
-
pSectionSeparator as
|
|
5046
|
-
initGeom as
|
|
5047
|
-
EExtrude as
|
|
5048
|
-
EBVolume as
|
|
5353
|
+
ffix as ffix20,
|
|
5354
|
+
pNumber as pNumber18,
|
|
5355
|
+
pSectionSeparator as pSectionSeparator17,
|
|
5356
|
+
initGeom as initGeom18,
|
|
5357
|
+
EExtrude as EExtrude15,
|
|
5358
|
+
EBVolume as EBVolume18
|
|
5049
5359
|
} from "geometrix";
|
|
5050
|
-
var
|
|
5360
|
+
var pDef18 = {
|
|
5051
5361
|
partName: "trapeze",
|
|
5052
5362
|
params: [
|
|
5053
5363
|
//pNumber(name, unit, init, min, max, step)
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5364
|
+
pNumber18("L1", "mm", 1600, 10, 4e3, 1),
|
|
5365
|
+
pNumber18("L2", "mm", 1e3, 10, 4e3, 1),
|
|
5366
|
+
pNumber18("L3", "mm", 400, 5, 800, 1),
|
|
5367
|
+
pNumber18("L4", "mm", 300, 5, 800, 1),
|
|
5368
|
+
pSectionSeparator17("outer frame"),
|
|
5369
|
+
pNumber18("N1", "", 7, 1, 20, 1),
|
|
5370
|
+
pNumber18("N2", "", 4, 1, 20, 1),
|
|
5371
|
+
pNumber18("D1", "mm", 10, 1, 40, 1),
|
|
5372
|
+
pNumber18("L5", "mm", 100, 1, 400, 1),
|
|
5373
|
+
pNumber18("L6", "mm", 20, 1, 400, 1),
|
|
5374
|
+
pNumber18("R1", "mm", 60, 1, 400, 1),
|
|
5375
|
+
pNumber18("R2", "mm", 20, 1, 400, 1),
|
|
5376
|
+
pSectionSeparator17("inner pad"),
|
|
5377
|
+
pNumber18("N3", "", 2, 1, 20, 1),
|
|
5378
|
+
pNumber18("N4", "", 2, 1, 20, 1),
|
|
5379
|
+
pNumber18("D2", "mm", 10, 1, 40, 1),
|
|
5380
|
+
pNumber18("L7", "mm", 20, 1, 400, 1),
|
|
5381
|
+
pNumber18("R3", "mm", 20, 1, 400, 1),
|
|
5382
|
+
pSectionSeparator17("diagonal shaft"),
|
|
5383
|
+
pNumber18("D3", "mm", 30, 1, 100, 1),
|
|
5384
|
+
pNumber18("D4", "mm", 26, 1, 100, 1),
|
|
5385
|
+
pNumber18("H1", "mm", 300, 0.5, 800, 0.5),
|
|
5386
|
+
pNumber18("H2", "mm", 2, 0.5, 800, 0.5),
|
|
5387
|
+
pNumber18("H3", "mm", 5, 0.5, 800, 0.5)
|
|
5078
5388
|
],
|
|
5079
5389
|
paramSvg: {
|
|
5080
5390
|
L1: "trapeze_top.svg",
|
|
@@ -5106,15 +5416,15 @@ var pDef17 = {
|
|
|
5106
5416
|
// every 0.5 second
|
|
5107
5417
|
}
|
|
5108
5418
|
};
|
|
5109
|
-
function
|
|
5110
|
-
const rGeome =
|
|
5419
|
+
function pGeom18(t, param, suffix = "") {
|
|
5420
|
+
const rGeome = initGeom18(pDef18.partName + suffix);
|
|
5111
5421
|
let ctrRodFootprint;
|
|
5112
5422
|
let ctrRod;
|
|
5113
|
-
const figFrame =
|
|
5114
|
-
const figPlate =
|
|
5115
|
-
const figRod =
|
|
5116
|
-
const figRodHollow =
|
|
5117
|
-
const figCutRod =
|
|
5423
|
+
const figFrame = figure18();
|
|
5424
|
+
const figPlate = figure18();
|
|
5425
|
+
const figRod = figure18();
|
|
5426
|
+
const figRodHollow = figure18();
|
|
5427
|
+
const figCutRod = figure18();
|
|
5118
5428
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5119
5429
|
`;
|
|
5120
5430
|
try {
|
|
@@ -5136,14 +5446,14 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5136
5446
|
const rod_slope_length = Math.sqrt(rod_xy ** 2 + rod_z ** 2);
|
|
5137
5447
|
const rod_slope_angle = Math.atan2(rod_z, rod_xy);
|
|
5138
5448
|
const rod_xy_angle = Math.atan2(rod_y, rod_x);
|
|
5139
|
-
rGeome.logstr += `rod-slope: length: ${
|
|
5449
|
+
rGeome.logstr += `rod-slope: length: ${ffix20(rod_slope_length)} mm, angle: ${ffix20(
|
|
5140
5450
|
radToDeg9(rod_slope_angle)
|
|
5141
5451
|
)} degree
|
|
5142
5452
|
`;
|
|
5143
|
-
rGeome.logstr += `rod-xy-angle: ${
|
|
5453
|
+
rGeome.logstr += `rod-xy-angle: ${ffix20(radToDeg9(rod_xy_angle))} degree
|
|
5144
5454
|
`;
|
|
5145
5455
|
const rodFootprintLength = param.D3 / Math.cos(Math.PI / 2 - rod_slope_angle);
|
|
5146
|
-
rGeome.logstr += `rod-footprint-length: ${
|
|
5456
|
+
rGeome.logstr += `rod-footprint-length: ${ffix20(rodFootprintLength)} mm
|
|
5147
5457
|
`;
|
|
5148
5458
|
const rodFPl = Math.sqrt((rodFootprintLength / 2) ** 2 + (param.D3 / 2) ** 2);
|
|
5149
5459
|
const rodFPa = Math.atan2(param.D3, rodFootprintLength);
|
|
@@ -5188,35 +5498,35 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5188
5498
|
const lFrameHole = [];
|
|
5189
5499
|
for (let i = 1; i < param.N1 + 1; i++) {
|
|
5190
5500
|
lFrameHole.push(
|
|
5191
|
-
|
|
5501
|
+
contourCircle16(param.L2 / 2 - param.L6, -param.L1 / 2 + i * step1, param.D1 / 2)
|
|
5192
5502
|
);
|
|
5193
5503
|
lFrameHole.push(
|
|
5194
|
-
|
|
5504
|
+
contourCircle16(-param.L2 / 2 + param.L6, -param.L1 / 2 + i * step1, param.D1 / 2)
|
|
5195
5505
|
);
|
|
5196
5506
|
}
|
|
5197
5507
|
for (let i = 1; i < param.N2 + 1; i++) {
|
|
5198
5508
|
lFrameHole.push(
|
|
5199
|
-
|
|
5509
|
+
contourCircle16(-param.L2 / 2 + i * step2, param.L1 / 2 - param.L6, param.D1 / 2)
|
|
5200
5510
|
);
|
|
5201
5511
|
lFrameHole.push(
|
|
5202
|
-
|
|
5512
|
+
contourCircle16(-param.L2 / 2 + i * step2, -param.L1 / 2 + param.L6, param.D1 / 2)
|
|
5203
5513
|
);
|
|
5204
5514
|
}
|
|
5205
5515
|
const lPlateHole = [];
|
|
5206
5516
|
for (let i = 1; i < param.N3 + 1; i++) {
|
|
5207
5517
|
lPlateHole.push(
|
|
5208
|
-
|
|
5518
|
+
contourCircle16(param.L4 / 2 - param.L7, -param.L3 / 2 + i * step3, param.D2 / 2)
|
|
5209
5519
|
);
|
|
5210
5520
|
lPlateHole.push(
|
|
5211
|
-
|
|
5521
|
+
contourCircle16(-param.L4 / 2 + param.L7, -param.L3 / 2 + i * step3, param.D2 / 2)
|
|
5212
5522
|
);
|
|
5213
5523
|
}
|
|
5214
5524
|
for (let i = 1; i < param.N4 + 1; i++) {
|
|
5215
5525
|
lPlateHole.push(
|
|
5216
|
-
|
|
5526
|
+
contourCircle16(-param.L4 / 2 + i * step4, param.L3 / 2 - param.L7, param.D2 / 2)
|
|
5217
5527
|
);
|
|
5218
5528
|
lPlateHole.push(
|
|
5219
|
-
|
|
5529
|
+
contourCircle16(-param.L4 / 2 + i * step4, -param.L3 / 2 + param.L7, param.D2 / 2)
|
|
5220
5530
|
);
|
|
5221
5531
|
}
|
|
5222
5532
|
lFrameHole.forEach((ctr) => {
|
|
@@ -5271,10 +5581,10 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5271
5581
|
if (param.D4 >= param.D3) {
|
|
5272
5582
|
throw `err218: D4 ${param.D4} larger than D3 ${param.D3}`;
|
|
5273
5583
|
}
|
|
5274
|
-
figRod.addMain(
|
|
5275
|
-
figRod.addSecond(
|
|
5276
|
-
figRodHollow.addMain(
|
|
5277
|
-
figRodHollow.addSecond(
|
|
5584
|
+
figRod.addMain(contourCircle16(0, 0, param.D3 / 2));
|
|
5585
|
+
figRod.addSecond(contourCircle16(0, 0, param.D4 / 2));
|
|
5586
|
+
figRodHollow.addMain(contourCircle16(0, 0, param.D4 / 2));
|
|
5587
|
+
figRodHollow.addSecond(contourCircle16(0, 0, param.D3 / 2));
|
|
5278
5588
|
const rodFootprintHeight = param.D3 * Math.cos(rod_slope_angle);
|
|
5279
5589
|
const rodFootprintBack = rodFootprintHeight / Math.tan(rod_slope_angle);
|
|
5280
5590
|
const pad3x = pad3 + (rodFootprintLength / 2 + rodFootprintBack) * Math.cos(rod_xy_angle);
|
|
@@ -5296,7 +5606,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5296
5606
|
{
|
|
5297
5607
|
outName: `subpax_${designName}_frame`,
|
|
5298
5608
|
face: `${designName}_faceFrame`,
|
|
5299
|
-
extrudeMethod:
|
|
5609
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5300
5610
|
length: param.H2,
|
|
5301
5611
|
rotate: [0, 0, 0],
|
|
5302
5612
|
translate: [0, 0, param.H1 - param.H2]
|
|
@@ -5304,7 +5614,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5304
5614
|
{
|
|
5305
5615
|
outName: `subpax_${designName}_plate`,
|
|
5306
5616
|
face: `${designName}_facePlate`,
|
|
5307
|
-
extrudeMethod:
|
|
5617
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5308
5618
|
length: param.H3,
|
|
5309
5619
|
rotate: [0, 0, 0],
|
|
5310
5620
|
translate: [0, 0, 0]
|
|
@@ -5312,7 +5622,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5312
5622
|
{
|
|
5313
5623
|
outName: `subpax_${designName}_rod1`,
|
|
5314
5624
|
face: `${designName}_faceRod`,
|
|
5315
|
-
extrudeMethod:
|
|
5625
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5316
5626
|
length: rodExtrudeLength,
|
|
5317
5627
|
rotate: [0, Math.PI / 2 - rod_slope_angle, rod_xy_angle],
|
|
5318
5628
|
translate: [
|
|
@@ -5324,7 +5634,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5324
5634
|
{
|
|
5325
5635
|
outName: `subpax_${designName}_rod2`,
|
|
5326
5636
|
face: `${designName}_faceRod`,
|
|
5327
|
-
extrudeMethod:
|
|
5637
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5328
5638
|
length: rodExtrudeLength,
|
|
5329
5639
|
rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI - rod_xy_angle],
|
|
5330
5640
|
translate: [
|
|
@@ -5336,7 +5646,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5336
5646
|
{
|
|
5337
5647
|
outName: `subpax_${designName}_rod3`,
|
|
5338
5648
|
face: `${designName}_faceRod`,
|
|
5339
|
-
extrudeMethod:
|
|
5649
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5340
5650
|
length: rodExtrudeLength,
|
|
5341
5651
|
rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI + rod_xy_angle],
|
|
5342
5652
|
translate: [
|
|
@@ -5348,7 +5658,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5348
5658
|
{
|
|
5349
5659
|
outName: `subpax_${designName}_rod4`,
|
|
5350
5660
|
face: `${designName}_faceRod`,
|
|
5351
|
-
extrudeMethod:
|
|
5661
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5352
5662
|
length: rodExtrudeLength,
|
|
5353
5663
|
rotate: [0, Math.PI / 2 - rod_slope_angle, -rod_xy_angle],
|
|
5354
5664
|
translate: [
|
|
@@ -5360,7 +5670,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5360
5670
|
{
|
|
5361
5671
|
outName: `subpax_${designName}_rodH1`,
|
|
5362
5672
|
face: `${designName}_faceRodHollow`,
|
|
5363
|
-
extrudeMethod:
|
|
5673
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5364
5674
|
length: rodExtrudeLength,
|
|
5365
5675
|
rotate: [0, Math.PI / 2 - rod_slope_angle, rod_xy_angle],
|
|
5366
5676
|
translate: [
|
|
@@ -5372,7 +5682,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5372
5682
|
{
|
|
5373
5683
|
outName: `subpax_${designName}_rodH2`,
|
|
5374
5684
|
face: `${designName}_faceRodHollow`,
|
|
5375
|
-
extrudeMethod:
|
|
5685
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5376
5686
|
length: rodExtrudeLength,
|
|
5377
5687
|
rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI - rod_xy_angle],
|
|
5378
5688
|
translate: [
|
|
@@ -5384,7 +5694,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5384
5694
|
{
|
|
5385
5695
|
outName: `subpax_${designName}_rodH3`,
|
|
5386
5696
|
face: `${designName}_faceRodHollow`,
|
|
5387
|
-
extrudeMethod:
|
|
5697
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5388
5698
|
length: rodExtrudeLength,
|
|
5389
5699
|
rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI + rod_xy_angle],
|
|
5390
5700
|
translate: [
|
|
@@ -5396,7 +5706,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5396
5706
|
{
|
|
5397
5707
|
outName: `subpax_${designName}_rodH4`,
|
|
5398
5708
|
face: `${designName}_faceRodHollow`,
|
|
5399
|
-
extrudeMethod:
|
|
5709
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5400
5710
|
length: rodExtrudeLength,
|
|
5401
5711
|
rotate: [0, Math.PI / 2 - rod_slope_angle, -rod_xy_angle],
|
|
5402
5712
|
translate: [
|
|
@@ -5408,7 +5718,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5408
5718
|
{
|
|
5409
5719
|
outName: `subpax_${designName}_cut1`,
|
|
5410
5720
|
face: `${designName}_faceCutRod`,
|
|
5411
|
-
extrudeMethod:
|
|
5721
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5412
5722
|
length: cutL,
|
|
5413
5723
|
rotate: [0, 0, 0],
|
|
5414
5724
|
translate: [0, 0, -cutL]
|
|
@@ -5416,7 +5726,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5416
5726
|
{
|
|
5417
5727
|
outName: `subpax_${designName}_cut2`,
|
|
5418
5728
|
face: `${designName}_faceCutRod`,
|
|
5419
|
-
extrudeMethod:
|
|
5729
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5420
5730
|
length: cutL,
|
|
5421
5731
|
rotate: [0, 0, 0],
|
|
5422
5732
|
translate: [0, 0, param.H1]
|
|
@@ -5425,7 +5735,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5425
5735
|
volumes: [
|
|
5426
5736
|
{
|
|
5427
5737
|
outName: `ipax_${designName}_rawRod`,
|
|
5428
|
-
boolMethod:
|
|
5738
|
+
boolMethod: EBVolume18.eUnion,
|
|
5429
5739
|
inList: [
|
|
5430
5740
|
`subpax_${designName}_rod1`,
|
|
5431
5741
|
`subpax_${designName}_rod2`,
|
|
@@ -5435,7 +5745,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5435
5745
|
},
|
|
5436
5746
|
{
|
|
5437
5747
|
outName: `ipax_${designName}_rodHollow`,
|
|
5438
|
-
boolMethod:
|
|
5748
|
+
boolMethod: EBVolume18.eUnion,
|
|
5439
5749
|
inList: [
|
|
5440
5750
|
`subpax_${designName}_rodH1`,
|
|
5441
5751
|
`subpax_${designName}_rodH2`,
|
|
@@ -5445,17 +5755,17 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5445
5755
|
},
|
|
5446
5756
|
{
|
|
5447
5757
|
outName: `ipax_${designName}_halfRods`,
|
|
5448
|
-
boolMethod:
|
|
5758
|
+
boolMethod: EBVolume18.eSubstraction,
|
|
5449
5759
|
inList: [`ipax_${designName}_rawRod`, `subpax_${designName}_cut1`]
|
|
5450
5760
|
},
|
|
5451
5761
|
{
|
|
5452
5762
|
outName: `ipax_${designName}_rods`,
|
|
5453
|
-
boolMethod:
|
|
5763
|
+
boolMethod: EBVolume18.eSubstraction,
|
|
5454
5764
|
inList: [`ipax_${designName}_halfRods`, `subpax_${designName}_cut2`]
|
|
5455
5765
|
},
|
|
5456
5766
|
{
|
|
5457
5767
|
outName: `ipax_${designName}_plus`,
|
|
5458
|
-
boolMethod:
|
|
5768
|
+
boolMethod: EBVolume18.eUnion,
|
|
5459
5769
|
inList: [
|
|
5460
5770
|
`subpax_${designName}_frame`,
|
|
5461
5771
|
`subpax_${designName}_plate`,
|
|
@@ -5464,7 +5774,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5464
5774
|
},
|
|
5465
5775
|
{
|
|
5466
5776
|
outName: `pax_${designName}`,
|
|
5467
|
-
boolMethod:
|
|
5777
|
+
boolMethod: EBVolume18.eSubstraction,
|
|
5468
5778
|
inList: [`ipax_${designName}_plus`, `ipax_${designName}_rodHollow`]
|
|
5469
5779
|
}
|
|
5470
5780
|
]
|
|
@@ -5481,54 +5791,54 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5481
5791
|
var trapezeDef = {
|
|
5482
5792
|
pTitle: "Heliostat trapeze",
|
|
5483
5793
|
pDescription: "The support of one solar panel. Made out of aluminium for lightness and cooling",
|
|
5484
|
-
pDef:
|
|
5485
|
-
pGeom:
|
|
5794
|
+
pDef: pDef18,
|
|
5795
|
+
pGeom: pGeom18
|
|
5486
5796
|
};
|
|
5487
5797
|
|
|
5488
5798
|
// src/heliostat/surface.ts
|
|
5489
5799
|
import {
|
|
5490
5800
|
contour as contour17,
|
|
5491
|
-
figure as
|
|
5492
|
-
ffix as
|
|
5493
|
-
pNumber as
|
|
5801
|
+
figure as figure19,
|
|
5802
|
+
ffix as ffix21,
|
|
5803
|
+
pNumber as pNumber19,
|
|
5494
5804
|
pCheckbox as pCheckbox4,
|
|
5495
|
-
pDropdown as
|
|
5496
|
-
pSectionSeparator as
|
|
5497
|
-
initGeom as
|
|
5498
|
-
EExtrude as
|
|
5499
|
-
EBVolume as
|
|
5805
|
+
pDropdown as pDropdown4,
|
|
5806
|
+
pSectionSeparator as pSectionSeparator18,
|
|
5807
|
+
initGeom as initGeom19,
|
|
5808
|
+
EExtrude as EExtrude16,
|
|
5809
|
+
EBVolume as EBVolume19
|
|
5500
5810
|
} from "geometrix";
|
|
5501
|
-
var
|
|
5811
|
+
var pDef19 = {
|
|
5502
5812
|
partName: "surface",
|
|
5503
5813
|
params: [
|
|
5504
5814
|
//pNumber(name, unit, init, min, max, step)
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5815
|
+
pNumber19("LH", "mm", 1600, 10, 4e3, 1),
|
|
5816
|
+
pNumber19("LV", "mm", 1e3, 10, 4e3, 1),
|
|
5817
|
+
pNumber19("LZ", "mm", 40, 0, 100, 1),
|
|
5818
|
+
pNumber19("nx", "", 9, 1, 40, 1),
|
|
5819
|
+
pNumber19("ny", "", 9, 1, 40, 1),
|
|
5820
|
+
pSectionSeparator18("main fantasia"),
|
|
5821
|
+
pDropdown4("main_direction", ["horizontal", "vertical"]),
|
|
5512
5822
|
pCheckbox4("crenel", false),
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5823
|
+
pNumber19("first_row", "", 9, 1, 40, 1),
|
|
5824
|
+
pNumber19("second_row", "", 9, 1, 40, 1),
|
|
5825
|
+
pSectionSeparator18("horizontal spacing"),
|
|
5826
|
+
pNumber19("EH", "mm", 10, 0, 1e3, 1),
|
|
5517
5827
|
pCheckbox4("EH_gradient", false),
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5828
|
+
pNumber19("EH_sup", "mm", 500, 0, 1e3, 1),
|
|
5829
|
+
pNumber19("EH_cycle", "", 1, 0, 3, 0.05),
|
|
5830
|
+
pNumber19("EH_start", "", 0, 0, 1, 0.05),
|
|
5831
|
+
pDropdown4("EH_shape", ["sinusoid", "triangle", "sawUp", "sawDown"]),
|
|
5832
|
+
pSectionSeparator18("vertical spacing"),
|
|
5833
|
+
pNumber19("EV", "mm", 10, 0, 1e3, 1),
|
|
5524
5834
|
pCheckbox4("EV_gradient", false),
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5835
|
+
pNumber19("EV_sup", "mm", 500, 0, 1e3, 1),
|
|
5836
|
+
pNumber19("EV_cycle", "", 1, 0, 3, 0.05),
|
|
5837
|
+
pNumber19("EV_start", "", 0, 0, 1, 0.05),
|
|
5838
|
+
pDropdown4("EV_shape", ["sinusoid", "triangle", "sawUp", "sawDown"]),
|
|
5839
|
+
pSectionSeparator18("solar power"),
|
|
5840
|
+
pNumber19("power_efficiency", "%", 16, 0, 100, 0.1),
|
|
5841
|
+
pNumber19("solar_power", "W/m2", 816, 100, 2e3, 1)
|
|
5532
5842
|
// 1361*0.6=816 W/m2
|
|
5533
5843
|
],
|
|
5534
5844
|
paramSvg: {
|
|
@@ -5563,26 +5873,26 @@ var pDef18 = {
|
|
|
5563
5873
|
// every 0.5 second
|
|
5564
5874
|
}
|
|
5565
5875
|
};
|
|
5566
|
-
function
|
|
5567
|
-
const rGeome =
|
|
5876
|
+
function pGeom19(t, param, suffix = "") {
|
|
5877
|
+
const rGeome = initGeom19(pDef19.partName + suffix);
|
|
5568
5878
|
let ctrPanelProfile;
|
|
5569
|
-
const figSurface =
|
|
5570
|
-
const figOnePanel =
|
|
5879
|
+
const figSurface = figure19();
|
|
5880
|
+
const figOnePanel = figure19();
|
|
5571
5881
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5572
5882
|
`;
|
|
5573
5883
|
try {
|
|
5574
5884
|
const panel_surface = param.LH * param.LV / 10 ** 6;
|
|
5575
5885
|
const panel_power = param.solar_power * panel_surface * param.power_efficiency / 100;
|
|
5576
|
-
rGeome.logstr += `panel surface: ${
|
|
5886
|
+
rGeome.logstr += `panel surface: ${ffix21(panel_surface)} m2
|
|
5577
5887
|
`;
|
|
5578
|
-
rGeome.logstr += `panel power: ${
|
|
5888
|
+
rGeome.logstr += `panel power: ${ffix21(panel_power)} W
|
|
5579
5889
|
`;
|
|
5580
5890
|
const max_panel_nb = param.nx * param.ny;
|
|
5581
5891
|
rGeome.logstr += `max panel number: ${max_panel_nb}
|
|
5582
5892
|
`;
|
|
5583
|
-
rGeome.logstr += `max panel surface: ${
|
|
5893
|
+
rGeome.logstr += `max panel surface: ${ffix21(max_panel_nb * panel_surface)} m2
|
|
5584
5894
|
`;
|
|
5585
|
-
rGeome.logstr += `max panel power: ${
|
|
5895
|
+
rGeome.logstr += `max panel power: ${ffix21(max_panel_nb * panel_power)} W
|
|
5586
5896
|
`;
|
|
5587
5897
|
const lenMain = param.main_direction === 1 ? param.ny : param.nx;
|
|
5588
5898
|
const lenLateral = param.main_direction === 1 ? param.nx : param.ny;
|
|
@@ -5615,13 +5925,13 @@ function pGeom18(t, param, suffix = "") {
|
|
|
5615
5925
|
lenRow.forEach((oneRow) => {
|
|
5616
5926
|
panelNb += oneRow;
|
|
5617
5927
|
});
|
|
5618
|
-
rGeome.logstr += `actual panel number: ${panelNb} (${
|
|
5928
|
+
rGeome.logstr += `actual panel number: ${panelNb} (${ffix21(
|
|
5619
5929
|
100 * panelNb / max_panel_nb
|
|
5620
5930
|
)} %)
|
|
5621
5931
|
`;
|
|
5622
|
-
rGeome.logstr += `actual panel surface: ${
|
|
5932
|
+
rGeome.logstr += `actual panel surface: ${ffix21(panelNb * panel_surface)} m2
|
|
5623
5933
|
`;
|
|
5624
|
-
rGeome.logstr += `actual panel power: ${
|
|
5934
|
+
rGeome.logstr += `actual panel power: ${ffix21(panelNb * panel_power)} W
|
|
5625
5935
|
`;
|
|
5626
5936
|
const eMain = [];
|
|
5627
5937
|
for (let i = 0; i < lenMain - 1; i++) {
|
|
@@ -5697,13 +6007,13 @@ function pGeom18(t, param, suffix = "") {
|
|
|
5697
6007
|
gLenVertical = lenMain * param.LV + eMainTotal;
|
|
5698
6008
|
}
|
|
5699
6009
|
const gArea = gLenHorizontal * gLenVertical / 10 ** 6;
|
|
5700
|
-
rGeome.logstr += `global horizontal width: ${
|
|
6010
|
+
rGeome.logstr += `global horizontal width: ${ffix21(gLenHorizontal / 1e3)} m
|
|
5701
6011
|
`;
|
|
5702
|
-
rGeome.logstr += `global vertical height: ${
|
|
6012
|
+
rGeome.logstr += `global vertical height: ${ffix21(gLenVertical / 1e3)} m
|
|
5703
6013
|
`;
|
|
5704
|
-
rGeome.logstr += `global area: ${
|
|
6014
|
+
rGeome.logstr += `global area: ${ffix21(gArea)} m2
|
|
5705
6015
|
`;
|
|
5706
|
-
rGeome.logstr += `area efficiency: ${
|
|
6016
|
+
rGeome.logstr += `area efficiency: ${ffix21(100 * panelNb * panel_surface / gArea)} %
|
|
5707
6017
|
`;
|
|
5708
6018
|
const ox = -gLenHorizontal / 2;
|
|
5709
6019
|
const oy = -gLenVertical / 2;
|
|
@@ -5748,7 +6058,7 @@ function pGeom18(t, param, suffix = "") {
|
|
|
5748
6058
|
const rElem = {
|
|
5749
6059
|
outName: `subpax_${designName}_panel_${idx}`,
|
|
5750
6060
|
face: `${designName}_faceOnePanel`,
|
|
5751
|
-
extrudeMethod:
|
|
6061
|
+
extrudeMethod: EExtrude16.eLinearOrtho,
|
|
5752
6062
|
length: param.LZ,
|
|
5753
6063
|
rotate: [0, 0, 0],
|
|
5754
6064
|
translate: [elem[0], elem[1], 0]
|
|
@@ -5759,7 +6069,7 @@ function pGeom18(t, param, suffix = "") {
|
|
|
5759
6069
|
{
|
|
5760
6070
|
outName: `pax_${designName}`,
|
|
5761
6071
|
//boolMethod: EBVolume.eIdentity,
|
|
5762
|
-
boolMethod:
|
|
6072
|
+
boolMethod: EBVolume19.eUnion,
|
|
5763
6073
|
inList: panelPositions.map((elem, idx) => {
|
|
5764
6074
|
const subElem = `subpax_${designName}_panel_${idx}`;
|
|
5765
6075
|
return subElem;
|
|
@@ -5779,19 +6089,19 @@ function pGeom18(t, param, suffix = "") {
|
|
|
5779
6089
|
var surfaceDef = {
|
|
5780
6090
|
pTitle: "Heliostat panel-surface",
|
|
5781
6091
|
pDescription: "The surface collecting the solar power",
|
|
5782
|
-
pDef:
|
|
5783
|
-
pGeom:
|
|
6092
|
+
pDef: pDef19,
|
|
6093
|
+
pGeom: pGeom19
|
|
5784
6094
|
};
|
|
5785
6095
|
|
|
5786
6096
|
// src/dummy/circles.ts
|
|
5787
|
-
import { degToRad as
|
|
5788
|
-
var
|
|
6097
|
+
import { degToRad as degToRad7, point as point7, figure as figure20, pNumber as pNumber20, initGeom as initGeom20 } from "geometrix";
|
|
6098
|
+
var pDef20 = {
|
|
5789
6099
|
partName: "circles",
|
|
5790
6100
|
params: [
|
|
5791
6101
|
//pNumber(name, unit, init, min, max, step)
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
6102
|
+
pNumber20("angle", "degree", 15, 5, 45, 1),
|
|
6103
|
+
pNumber20("amplitude-offset", "mm", 1, 0.5, 4, 0.1),
|
|
6104
|
+
pNumber20("amplitude-scale", "scalar", 0.2, 0.1, 0.5, 0.01)
|
|
5795
6105
|
],
|
|
5796
6106
|
paramSvg: {
|
|
5797
6107
|
angle: "circles_angle.svg",
|
|
@@ -5804,18 +6114,18 @@ var pDef19 = {
|
|
|
5804
6114
|
tUpdate: 500
|
|
5805
6115
|
}
|
|
5806
6116
|
};
|
|
5807
|
-
function
|
|
5808
|
-
const rGeome =
|
|
6117
|
+
function pGeom20(t, param, suffix = "") {
|
|
6118
|
+
const rGeome = initGeom20(pDef20.partName + suffix);
|
|
5809
6119
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5810
6120
|
`;
|
|
5811
6121
|
try {
|
|
5812
|
-
const figOne =
|
|
5813
|
-
const p1 =
|
|
5814
|
-
const p2 =
|
|
6122
|
+
const figOne = figure20();
|
|
6123
|
+
const p1 = point7(10, 10);
|
|
6124
|
+
const p2 = point7(10, 30);
|
|
5815
6125
|
figOne.addPoint(p2);
|
|
5816
6126
|
for (let i = 0; i < 20; i++) {
|
|
5817
6127
|
figOne.addPoint(
|
|
5818
|
-
p1.scale(p2, param["amplitude-offset"] + param["amplitude-scale"] * i).rotate(p2, i *
|
|
6128
|
+
p1.scale(p2, param["amplitude-offset"] + param["amplitude-scale"] * i).rotate(p2, i * degToRad7(param.angle) + t * Math.PI / 2 / pDef20.sim.tMax)
|
|
5819
6129
|
);
|
|
5820
6130
|
}
|
|
5821
6131
|
rGeome.fig = { one: figOne };
|
|
@@ -5830,18 +6140,18 @@ function pGeom19(t, param, suffix = "") {
|
|
|
5830
6140
|
var circlesDef = {
|
|
5831
6141
|
pTitle: "Circles",
|
|
5832
6142
|
pDescription: "A spiral made by points.",
|
|
5833
|
-
pDef:
|
|
5834
|
-
pGeom:
|
|
6143
|
+
pDef: pDef20,
|
|
6144
|
+
pGeom: pGeom20
|
|
5835
6145
|
};
|
|
5836
6146
|
|
|
5837
6147
|
// src/dummy/rectangle.ts
|
|
5838
|
-
import { point as
|
|
5839
|
-
var
|
|
6148
|
+
import { point as point8, figure as figure21, pNumber as pNumber21, initGeom as initGeom21 } from "geometrix";
|
|
6149
|
+
var pDef21 = {
|
|
5840
6150
|
partName: "rectangle",
|
|
5841
6151
|
params: [
|
|
5842
6152
|
//pNumber(name, unit, init, min, max, step)
|
|
5843
|
-
|
|
5844
|
-
|
|
6153
|
+
pNumber21("width", "mm", 15, 3, 40, 0.5),
|
|
6154
|
+
pNumber21("height", "mm", 10, 3, 40, 0.5)
|
|
5845
6155
|
],
|
|
5846
6156
|
paramSvg: {
|
|
5847
6157
|
width: "rectangle_width.svg",
|
|
@@ -5853,16 +6163,16 @@ var pDef20 = {
|
|
|
5853
6163
|
tUpdate: 500
|
|
5854
6164
|
}
|
|
5855
6165
|
};
|
|
5856
|
-
function
|
|
5857
|
-
const rGeome =
|
|
6166
|
+
function pGeom21(t, param, suffix = "") {
|
|
6167
|
+
const rGeome = initGeom21(pDef21.partName + suffix);
|
|
5858
6168
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5859
6169
|
`;
|
|
5860
6170
|
try {
|
|
5861
|
-
const figOne =
|
|
5862
|
-
const p1 =
|
|
5863
|
-
const p2 =
|
|
5864
|
-
const p3 =
|
|
5865
|
-
const p4 =
|
|
6171
|
+
const figOne = figure21();
|
|
6172
|
+
const p1 = point8(10, 10);
|
|
6173
|
+
const p2 = point8(10 + param.width, 10);
|
|
6174
|
+
const p3 = point8(10 + param.width, 10 + param.height);
|
|
6175
|
+
const p4 = point8(10, 10 + param.height);
|
|
5866
6176
|
const angle = t * Math.PI / 180;
|
|
5867
6177
|
figOne.addPoint(p1);
|
|
5868
6178
|
figOne.addPoint(p2.rotate(p1, angle));
|
|
@@ -5880,25 +6190,25 @@ function pGeom20(t, param, suffix = "") {
|
|
|
5880
6190
|
var rectangleDef = {
|
|
5881
6191
|
pTitle: "Rectangle",
|
|
5882
6192
|
pDescription: "Just a rectangle.",
|
|
5883
|
-
pDef:
|
|
5884
|
-
pGeom:
|
|
6193
|
+
pDef: pDef21,
|
|
6194
|
+
pGeom: pGeom21
|
|
5885
6195
|
};
|
|
5886
6196
|
|
|
5887
6197
|
// src/dummy/pole_static.ts
|
|
5888
6198
|
import {
|
|
5889
6199
|
contour as contour18,
|
|
5890
|
-
contourCircle as
|
|
5891
|
-
figure as
|
|
5892
|
-
pNumber as
|
|
5893
|
-
initGeom as
|
|
6200
|
+
contourCircle as contourCircle17,
|
|
6201
|
+
figure as figure22,
|
|
6202
|
+
pNumber as pNumber22,
|
|
6203
|
+
initGeom as initGeom22
|
|
5894
6204
|
} from "geometrix";
|
|
5895
|
-
var
|
|
6205
|
+
var pDef22 = {
|
|
5896
6206
|
partName: "pole_static",
|
|
5897
6207
|
params: [
|
|
5898
6208
|
//pNumber(name, unit, init, min, max, step)
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
6209
|
+
pNumber22("H1", "mm", 4e3, 100, 4e4, 10),
|
|
6210
|
+
pNumber22("H2", "mm", 5e3, 100, 4e4, 10),
|
|
6211
|
+
pNumber22("radius", "mm", 1e3, 100, 4e4, 10)
|
|
5902
6212
|
],
|
|
5903
6213
|
paramSvg: {
|
|
5904
6214
|
H1: "dummy_pole_static_face.svg",
|
|
@@ -5912,15 +6222,15 @@ var pDef21 = {
|
|
|
5912
6222
|
// every 0.5 second
|
|
5913
6223
|
}
|
|
5914
6224
|
};
|
|
5915
|
-
function
|
|
5916
|
-
const rGeome =
|
|
5917
|
-
const figFace =
|
|
6225
|
+
function pGeom22(t, param, suffix = "") {
|
|
6226
|
+
const rGeome = initGeom22(pDef22.partName + suffix);
|
|
6227
|
+
const figFace = figure22();
|
|
5918
6228
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5919
6229
|
`;
|
|
5920
6230
|
try {
|
|
5921
6231
|
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();
|
|
5922
6232
|
figFace.addMain(ctrPoleFace);
|
|
5923
|
-
figFace.addMain(
|
|
6233
|
+
figFace.addMain(contourCircle17(0, 0, param.radius));
|
|
5924
6234
|
rGeome.fig = {
|
|
5925
6235
|
poleFace: figFace
|
|
5926
6236
|
};
|
|
@@ -5936,22 +6246,22 @@ function pGeom21(t, param, suffix = "") {
|
|
|
5936
6246
|
var dummyPoleStaticDef = {
|
|
5937
6247
|
pTitle: "Dummy pole static",
|
|
5938
6248
|
pDescription: "Testing two design with identical name",
|
|
5939
|
-
pDef:
|
|
5940
|
-
pGeom:
|
|
6249
|
+
pDef: pDef22,
|
|
6250
|
+
pGeom: pGeom22
|
|
5941
6251
|
};
|
|
5942
6252
|
|
|
5943
6253
|
// src/geometrix_verification/verify_point.ts
|
|
5944
|
-
import { degToRad as
|
|
5945
|
-
var
|
|
6254
|
+
import { degToRad as degToRad8, point as point9, figure as figure23, pNumber as pNumber23, initGeom as initGeom23 } from "geometrix";
|
|
6255
|
+
var pDef23 = {
|
|
5946
6256
|
partName: "verify_point",
|
|
5947
6257
|
params: [
|
|
5948
6258
|
//pNumber(name, unit, init, min, max, step)
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
6259
|
+
pNumber23("p1x", "mm", 30, -200, 200, 1),
|
|
6260
|
+
pNumber23("p1y", "mm", 50, -200, 200, 1),
|
|
6261
|
+
pNumber23("p2a", "degree", 30, -200, 200, 1),
|
|
6262
|
+
pNumber23("p2l", "mm", 60, 0, 200, 1),
|
|
6263
|
+
pNumber23("rotateOrig", "degree", 45, -200, 200, 1),
|
|
6264
|
+
pNumber23("scaleOrig", "scalar", 1.5, 0.1, 2, 0.1)
|
|
5955
6265
|
],
|
|
5956
6266
|
paramSvg: {
|
|
5957
6267
|
p1x: "verify_point_p1x.svg",
|
|
@@ -5968,15 +6278,15 @@ var pDef22 = {
|
|
|
5968
6278
|
// every 0.5 second
|
|
5969
6279
|
}
|
|
5970
6280
|
};
|
|
5971
|
-
function
|
|
5972
|
-
const rGeome =
|
|
6281
|
+
function pGeom23(t, param, suffix = "") {
|
|
6282
|
+
const rGeome = initGeom23(pDef23.partName + suffix);
|
|
5973
6283
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5974
6284
|
`;
|
|
5975
6285
|
try {
|
|
5976
|
-
const figOne =
|
|
5977
|
-
const p1 =
|
|
5978
|
-
const p2 =
|
|
5979
|
-
const p3 = p1.rotateOrig(
|
|
6286
|
+
const figOne = figure23();
|
|
6287
|
+
const p1 = point9(param.p1x, param.p1y + t);
|
|
6288
|
+
const p2 = point9(0, 0).setPolar(degToRad8(param.p2a), param.p2l);
|
|
6289
|
+
const p3 = p1.rotateOrig(degToRad8(param.rotateOrig));
|
|
5980
6290
|
const p4 = p1.scaleOrig(param.scaleOrig);
|
|
5981
6291
|
figOne.addPoint(p1);
|
|
5982
6292
|
figOne.addPoint(p2);
|
|
@@ -5994,23 +6304,23 @@ function pGeom22(t, param, suffix = "") {
|
|
|
5994
6304
|
var verifyPoint1Def = {
|
|
5995
6305
|
pTitle: "Verify point",
|
|
5996
6306
|
pDescription: "Debugging point.ts",
|
|
5997
|
-
pDef:
|
|
5998
|
-
pGeom:
|
|
6307
|
+
pDef: pDef23,
|
|
6308
|
+
pGeom: pGeom23
|
|
5999
6309
|
};
|
|
6000
6310
|
|
|
6001
6311
|
// src/geometrix_verification/verify_point_2.ts
|
|
6002
|
-
import { point as
|
|
6003
|
-
var
|
|
6312
|
+
import { point as point10, figure as figure24, pNumber as pNumber24, initGeom as initGeom24 } from "geometrix";
|
|
6313
|
+
var pDef24 = {
|
|
6004
6314
|
partName: "verify_point_2",
|
|
6005
6315
|
params: [
|
|
6006
6316
|
//pNumber(name, unit, init, min, max, step)
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6317
|
+
pNumber24("p1x", "mm", 30, -200, 200, 1),
|
|
6318
|
+
pNumber24("p1y", "mm", 50, -200, 200, 1),
|
|
6319
|
+
pNumber24("p2x", "mm", -10, -200, 200, 1),
|
|
6320
|
+
pNumber24("p2y", "mm", 60, -200, 200, 1),
|
|
6321
|
+
pNumber24("p3x", "mm", 70, -200, 200, 1),
|
|
6322
|
+
pNumber24("p3y", "mm", -20, -200, 200, 1),
|
|
6323
|
+
pNumber24("dist", "mm", 50, 0, 200, 1)
|
|
6014
6324
|
],
|
|
6015
6325
|
paramSvg: {
|
|
6016
6326
|
p1x: "verify_line_p1x.svg",
|
|
@@ -6028,15 +6338,15 @@ var pDef23 = {
|
|
|
6028
6338
|
// every 0.5 second
|
|
6029
6339
|
}
|
|
6030
6340
|
};
|
|
6031
|
-
function
|
|
6032
|
-
const rGeome =
|
|
6341
|
+
function pGeom24(t, param, suffix = "") {
|
|
6342
|
+
const rGeome = initGeom24(pDef24.partName + suffix);
|
|
6033
6343
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6034
6344
|
`;
|
|
6035
6345
|
try {
|
|
6036
|
-
const figOne =
|
|
6037
|
-
const p1 =
|
|
6038
|
-
const p2 =
|
|
6039
|
-
const p3 =
|
|
6346
|
+
const figOne = figure24();
|
|
6347
|
+
const p1 = point10(param.p1x, param.p1y + t);
|
|
6348
|
+
const p2 = point10(param.p2x, param.p2y);
|
|
6349
|
+
const p3 = point10(param.p3x, param.p3y);
|
|
6040
6350
|
const mp1p2 = p1.middlePoint(p2);
|
|
6041
6351
|
const ep1p2 = p1.equidistantPoint(p2, param.dist, p3);
|
|
6042
6352
|
figOne.addPoint(p1);
|
|
@@ -6056,22 +6366,22 @@ function pGeom23(t, param, suffix = "") {
|
|
|
6056
6366
|
var verifyPoint2Def = {
|
|
6057
6367
|
pTitle: "Verify point 2",
|
|
6058
6368
|
pDescription: "Debugging more point.ts",
|
|
6059
|
-
pDef:
|
|
6060
|
-
pGeom:
|
|
6369
|
+
pDef: pDef24,
|
|
6370
|
+
pGeom: pGeom24
|
|
6061
6371
|
};
|
|
6062
6372
|
|
|
6063
6373
|
// src/geometrix_verification/verify_line.ts
|
|
6064
|
-
import { point as
|
|
6065
|
-
var
|
|
6374
|
+
import { point as point11, line, linePP, figure as figure25, pNumber as pNumber25, initGeom as initGeom25 } from "geometrix";
|
|
6375
|
+
var pDef25 = {
|
|
6066
6376
|
partName: "verify_line",
|
|
6067
6377
|
params: [
|
|
6068
6378
|
//pNumber(name, unit, init, min, max, step)
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6379
|
+
pNumber25("p1x", "mm", 30, -200, 200, 1),
|
|
6380
|
+
pNumber25("p1y", "mm", 50, -200, 200, 1),
|
|
6381
|
+
pNumber25("p2x", "mm", 40, -200, 200, 1),
|
|
6382
|
+
pNumber25("p2y", "mm", -20, -200, 200, 1),
|
|
6383
|
+
pNumber25("p3x", "mm", -30, -200, 200, 1),
|
|
6384
|
+
pNumber25("p3y", "mm", 30, -200, 200, 1)
|
|
6075
6385
|
],
|
|
6076
6386
|
paramSvg: {
|
|
6077
6387
|
p1x: "verify_line_p1x.svg",
|
|
@@ -6088,25 +6398,25 @@ var pDef24 = {
|
|
|
6088
6398
|
// every 0.5 second
|
|
6089
6399
|
}
|
|
6090
6400
|
};
|
|
6091
|
-
function
|
|
6092
|
-
const rGeome =
|
|
6401
|
+
function pGeom25(t, param, suffix = "") {
|
|
6402
|
+
const rGeome = initGeom25(pDef25.partName + suffix);
|
|
6093
6403
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6094
6404
|
`;
|
|
6095
6405
|
try {
|
|
6096
|
-
const figOne =
|
|
6097
|
-
const p1 =
|
|
6098
|
-
const p2 =
|
|
6099
|
-
const p3 =
|
|
6406
|
+
const figOne = figure25();
|
|
6407
|
+
const p1 = point11(param.p1x, param.p1y + t);
|
|
6408
|
+
const p2 = point11(param.p2x, param.p2y);
|
|
6409
|
+
const p3 = point11(param.p3x, param.p3y);
|
|
6100
6410
|
figOne.addPoint(p1);
|
|
6101
6411
|
figOne.addPoint(p2);
|
|
6102
6412
|
figOne.addPoint(p3);
|
|
6103
6413
|
const l1 = line(0, 0, 0).setFromPoints(p1, p2);
|
|
6104
6414
|
figOne.addLine(l1);
|
|
6105
|
-
figOne.addPoint(
|
|
6106
|
-
figOne.addPoint(
|
|
6415
|
+
figOne.addPoint(point11(l1.getAxisXIntersection(), 0));
|
|
6416
|
+
figOne.addPoint(point11(0, l1.getAxisYIntersection()));
|
|
6107
6417
|
const p4 = l1.projectOrig();
|
|
6108
6418
|
figOne.addPoint(p4);
|
|
6109
|
-
const p0 =
|
|
6419
|
+
const p0 = point11(0, 0);
|
|
6110
6420
|
if (!p0.isEqual(p4)) {
|
|
6111
6421
|
const l2 = linePP(p0, p4);
|
|
6112
6422
|
figOne.addLine(l2);
|
|
@@ -6128,24 +6438,24 @@ function pGeom24(t, param, suffix = "") {
|
|
|
6128
6438
|
var verifyLine1Def = {
|
|
6129
6439
|
pTitle: "Verify line",
|
|
6130
6440
|
pDescription: "Debugging line.ts",
|
|
6131
|
-
pDef:
|
|
6132
|
-
pGeom:
|
|
6441
|
+
pDef: pDef25,
|
|
6442
|
+
pGeom: pGeom25
|
|
6133
6443
|
};
|
|
6134
6444
|
|
|
6135
6445
|
// src/geometrix_verification/verify_line_2.ts
|
|
6136
|
-
import { degToRad as
|
|
6137
|
-
var
|
|
6446
|
+
import { degToRad as degToRad9, point as point12, line as line2, figure as figure26, pNumber as pNumber26, initGeom as initGeom26 } from "geometrix";
|
|
6447
|
+
var pDef26 = {
|
|
6138
6448
|
partName: "verify_line_2",
|
|
6139
6449
|
params: [
|
|
6140
6450
|
//pNumber(name, unit, init, min, max, step)
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6451
|
+
pNumber26("l1cx", "mm", 10, -200, 200, 1),
|
|
6452
|
+
pNumber26("l1cy", "mm", 20, -200, 200, 1),
|
|
6453
|
+
pNumber26("l1ca", "degree", 15, -200, 200, 1),
|
|
6454
|
+
pNumber26("l2cx", "mm", 30, -200, 200, 1),
|
|
6455
|
+
pNumber26("l2cy", "mm", 50, -200, 200, 1),
|
|
6456
|
+
pNumber26("l2ca", "degree", 35, -200, 200, 1),
|
|
6457
|
+
pNumber26("p3x", "mm", -30, -200, 200, 1),
|
|
6458
|
+
pNumber26("p3y", "mm", 30, -200, 200, 1)
|
|
6149
6459
|
],
|
|
6150
6460
|
paramSvg: {
|
|
6151
6461
|
l1cx: "verify_line_2_l1cx.svg",
|
|
@@ -6164,20 +6474,20 @@ var pDef25 = {
|
|
|
6164
6474
|
// every 0.5 second
|
|
6165
6475
|
}
|
|
6166
6476
|
};
|
|
6167
|
-
function
|
|
6168
|
-
const rGeome =
|
|
6477
|
+
function pGeom26(t, param, suffix = "") {
|
|
6478
|
+
const rGeome = initGeom26(pDef26.partName + suffix);
|
|
6169
6479
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6170
6480
|
`;
|
|
6171
6481
|
try {
|
|
6172
|
-
const figOne =
|
|
6173
|
-
const p1 =
|
|
6174
|
-
const p2 =
|
|
6175
|
-
const p3 =
|
|
6482
|
+
const figOne = figure26();
|
|
6483
|
+
const p1 = point12(param.l1cx, param.l1cy);
|
|
6484
|
+
const p2 = point12(param.l2cx, param.l2cy);
|
|
6485
|
+
const p3 = point12(param.p3x, param.p3y);
|
|
6176
6486
|
figOne.addPoint(p1);
|
|
6177
6487
|
figOne.addPoint(p2);
|
|
6178
6488
|
figOne.addPoint(p3);
|
|
6179
|
-
const l1 = line2(param.l1cx, param.l1cy,
|
|
6180
|
-
const l2 = line2(param.l2cx, param.l2cy,
|
|
6489
|
+
const l1 = line2(param.l1cx, param.l1cy, degToRad9(param.l1ca + t));
|
|
6490
|
+
const l2 = line2(param.l2cx, param.l2cy, degToRad9(param.l2ca));
|
|
6181
6491
|
figOne.addLine(l1);
|
|
6182
6492
|
figOne.addLine(l2);
|
|
6183
6493
|
figOne.addPoint(l1.intersection(l2));
|
|
@@ -6188,7 +6498,7 @@ function pGeom25(t, param, suffix = "") {
|
|
|
6188
6498
|
rGeome.logstr += `dist(l2, p3) = ${l2.distanceToPoint(p3)}
|
|
6189
6499
|
`;
|
|
6190
6500
|
const bisector2 = l1.bisector(l2, p3);
|
|
6191
|
-
const pBisec =
|
|
6501
|
+
const pBisec = point12(bisector2.cx, bisector2.cy).translatePolar(bisector2.ca, 30);
|
|
6192
6502
|
figOne.addPoint(pBisec);
|
|
6193
6503
|
rGeome.fig = { one: figOne };
|
|
6194
6504
|
rGeome.logstr += "verify_line_2 drawn successfully!\n";
|
|
@@ -6202,22 +6512,22 @@ function pGeom25(t, param, suffix = "") {
|
|
|
6202
6512
|
var verifyLine2Def = {
|
|
6203
6513
|
pTitle: "Verify line 2",
|
|
6204
6514
|
pDescription: "Debugging more line.ts",
|
|
6205
|
-
pDef:
|
|
6206
|
-
pGeom:
|
|
6515
|
+
pDef: pDef26,
|
|
6516
|
+
pGeom: pGeom26
|
|
6207
6517
|
};
|
|
6208
6518
|
|
|
6209
6519
|
// src/geometrix_verification/verify_line_3.ts
|
|
6210
|
-
import { point as
|
|
6211
|
-
var
|
|
6520
|
+
import { point as point13, bisector, circleCenter, figure as figure27, pNumber as pNumber27, initGeom as initGeom27 } from "geometrix";
|
|
6521
|
+
var pDef27 = {
|
|
6212
6522
|
partName: "verify_line_3",
|
|
6213
6523
|
params: [
|
|
6214
6524
|
//pNumber(name, unit, init, min, max, step)
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6525
|
+
pNumber27("p1x", "mm", 30, -200, 200, 1),
|
|
6526
|
+
pNumber27("p1y", "mm", 50, -200, 200, 1),
|
|
6527
|
+
pNumber27("p2x", "mm", 40, -200, 200, 1),
|
|
6528
|
+
pNumber27("p2y", "mm", -20, -200, 200, 1),
|
|
6529
|
+
pNumber27("p3x", "mm", -30, -200, 200, 1),
|
|
6530
|
+
pNumber27("p3y", "mm", 30, -200, 200, 1)
|
|
6221
6531
|
],
|
|
6222
6532
|
paramSvg: {
|
|
6223
6533
|
p1x: "verify_line_p1x.svg",
|
|
@@ -6234,15 +6544,15 @@ var pDef26 = {
|
|
|
6234
6544
|
// every 0.5 second
|
|
6235
6545
|
}
|
|
6236
6546
|
};
|
|
6237
|
-
function
|
|
6238
|
-
const rGeome =
|
|
6547
|
+
function pGeom27(t, param, suffix = "") {
|
|
6548
|
+
const rGeome = initGeom27(pDef27.partName + suffix);
|
|
6239
6549
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6240
6550
|
`;
|
|
6241
6551
|
try {
|
|
6242
|
-
const figOne =
|
|
6243
|
-
const p1 =
|
|
6244
|
-
const p2 =
|
|
6245
|
-
const p3 =
|
|
6552
|
+
const figOne = figure27();
|
|
6553
|
+
const p1 = point13(param.p1x, param.p1y + t);
|
|
6554
|
+
const p2 = point13(param.p2x, param.p2y);
|
|
6555
|
+
const p3 = point13(param.p3x, param.p3y);
|
|
6246
6556
|
figOne.addPoint(p1);
|
|
6247
6557
|
figOne.addPoint(p2);
|
|
6248
6558
|
figOne.addPoint(p3);
|
|
@@ -6262,24 +6572,24 @@ function pGeom26(t, param, suffix = "") {
|
|
|
6262
6572
|
var verifyLine3Def = {
|
|
6263
6573
|
pTitle: "Verify line 3",
|
|
6264
6574
|
pDescription: "Debugging more more line.ts",
|
|
6265
|
-
pDef:
|
|
6266
|
-
pGeom:
|
|
6575
|
+
pDef: pDef27,
|
|
6576
|
+
pGeom: pGeom27
|
|
6267
6577
|
};
|
|
6268
6578
|
|
|
6269
6579
|
// src/geometrix_verification/verify_vector.ts
|
|
6270
|
-
import { degToRad as
|
|
6271
|
-
var
|
|
6580
|
+
import { degToRad as degToRad10, point as point14, vector, figure as figure28, pNumber as pNumber28, initGeom as initGeom28 } from "geometrix";
|
|
6581
|
+
var pDef28 = {
|
|
6272
6582
|
partName: "verify_vector",
|
|
6273
6583
|
params: [
|
|
6274
6584
|
//pNumber(name, unit, init, min, max, step)
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6585
|
+
pNumber28("p1x", "mm", 30, -200, 200, 1),
|
|
6586
|
+
pNumber28("p1y", "mm", 50, -200, 200, 1),
|
|
6587
|
+
pNumber28("p2x", "mm", 80, -200, 200, 1),
|
|
6588
|
+
pNumber28("p2y", "mm", -30, -200, 200, 1),
|
|
6589
|
+
pNumber28("v1a", "degree", 30, -200, 200, 1),
|
|
6590
|
+
pNumber28("v1l", "mm", 60, 0, 200, 1),
|
|
6591
|
+
pNumber28("v2a", "degree", 30, -200, 200, 1),
|
|
6592
|
+
pNumber28("v2l", "mm", 60, 0, 200, 1)
|
|
6283
6593
|
],
|
|
6284
6594
|
paramSvg: {
|
|
6285
6595
|
p1x: "verify_vector_p1x.svg",
|
|
@@ -6298,16 +6608,16 @@ var pDef27 = {
|
|
|
6298
6608
|
// every 0.5 second
|
|
6299
6609
|
}
|
|
6300
6610
|
};
|
|
6301
|
-
function
|
|
6302
|
-
const rGeome =
|
|
6611
|
+
function pGeom28(t, param, suffix = "") {
|
|
6612
|
+
const rGeome = initGeom28(pDef28.partName + suffix);
|
|
6303
6613
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6304
6614
|
`;
|
|
6305
6615
|
try {
|
|
6306
|
-
const figOne =
|
|
6307
|
-
const p1 =
|
|
6308
|
-
const p2 =
|
|
6309
|
-
const v1 = vector(
|
|
6310
|
-
const v2 = vector(
|
|
6616
|
+
const figOne = figure28();
|
|
6617
|
+
const p1 = point14(param.p1x, param.p1y + t);
|
|
6618
|
+
const p2 = point14(param.p2x, param.p2y);
|
|
6619
|
+
const v1 = vector(degToRad10(param.v1a), param.v1l, p1);
|
|
6620
|
+
const v2 = vector(degToRad10(param.v2a), param.v2l, p1);
|
|
6311
6621
|
figOne.addPoint(p1);
|
|
6312
6622
|
figOne.addPoint(p2);
|
|
6313
6623
|
figOne.addVector(v1);
|
|
@@ -6328,22 +6638,22 @@ function pGeom27(t, param, suffix = "") {
|
|
|
6328
6638
|
var verifyVector1Def = {
|
|
6329
6639
|
pTitle: "Verify vector",
|
|
6330
6640
|
pDescription: "Debugging vector.ts",
|
|
6331
|
-
pDef:
|
|
6332
|
-
pGeom:
|
|
6641
|
+
pDef: pDef28,
|
|
6642
|
+
pGeom: pGeom28
|
|
6333
6643
|
};
|
|
6334
6644
|
|
|
6335
6645
|
// src/geometrix_verification/verify_contour_1.ts
|
|
6336
|
-
import { contour as contour19, contourCircle as
|
|
6337
|
-
var
|
|
6646
|
+
import { contour as contour19, contourCircle as contourCircle18, figure as figure29, pNumber as pNumber29, initGeom as initGeom29 } from "geometrix";
|
|
6647
|
+
var pDef29 = {
|
|
6338
6648
|
partName: "verify_contour_1",
|
|
6339
6649
|
params: [
|
|
6340
6650
|
//pNumber(name, unit, init, min, max, step)
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6651
|
+
pNumber29("r1", "mm", 30, 10, 200, 1),
|
|
6652
|
+
pNumber29("d1", "mm", 20, 10, 200, 1),
|
|
6653
|
+
pNumber29("w1", "mm", 100, 10, 200, 1),
|
|
6654
|
+
pNumber29("r2", "mm", 60, 10, 200, 1),
|
|
6655
|
+
pNumber29("l1", "mm", 10, 5, 200, 1),
|
|
6656
|
+
pNumber29("l2", "mm", 30, 5, 200, 1)
|
|
6347
6657
|
],
|
|
6348
6658
|
paramSvg: {
|
|
6349
6659
|
r1: "verify_contour_1_r1.svg",
|
|
@@ -6360,12 +6670,12 @@ var pDef28 = {
|
|
|
6360
6670
|
// every 0.5 second
|
|
6361
6671
|
}
|
|
6362
6672
|
};
|
|
6363
|
-
function
|
|
6364
|
-
const rGeome =
|
|
6673
|
+
function pGeom29(t, param, suffix = "") {
|
|
6674
|
+
const rGeome = initGeom29(pDef29.partName + suffix);
|
|
6365
6675
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6366
6676
|
`;
|
|
6367
6677
|
try {
|
|
6368
|
-
const figOne =
|
|
6678
|
+
const figOne = figure29();
|
|
6369
6679
|
const r1 = param.r1;
|
|
6370
6680
|
const d1 = param.d1;
|
|
6371
6681
|
const w1 = param.w1;
|
|
@@ -6385,10 +6695,10 @@ function pGeom28(t, param, suffix = "") {
|
|
|
6385
6695
|
ctr1.closeSegStroke();
|
|
6386
6696
|
ctr1.check();
|
|
6387
6697
|
figOne.addMain(ctr1);
|
|
6388
|
-
figOne.addMain(
|
|
6389
|
-
figOne.addMain(
|
|
6390
|
-
figOne.addMain(
|
|
6391
|
-
const ctr2 =
|
|
6698
|
+
figOne.addMain(contourCircle18(w12, c1, r1));
|
|
6699
|
+
figOne.addMain(contourCircle18(w12, c2, r1 + t));
|
|
6700
|
+
figOne.addMain(contourCircle18(w12, c3, r1));
|
|
6701
|
+
const ctr2 = contourCircle18(w1 + r2, 3 * c1, r2);
|
|
6392
6702
|
ctr2.check();
|
|
6393
6703
|
figOne.addSecond(ctr2);
|
|
6394
6704
|
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();
|
|
@@ -6406,20 +6716,20 @@ function pGeom28(t, param, suffix = "") {
|
|
|
6406
6716
|
var verifyContour1Def = {
|
|
6407
6717
|
pTitle: "Verify contour 1",
|
|
6408
6718
|
pDescription: "Debugging contour.ts",
|
|
6409
|
-
pDef:
|
|
6410
|
-
pGeom:
|
|
6719
|
+
pDef: pDef29,
|
|
6720
|
+
pGeom: pGeom29
|
|
6411
6721
|
};
|
|
6412
6722
|
|
|
6413
6723
|
// src/geometrix_verification/verify_contour_2.ts
|
|
6414
|
-
import { degToRad as
|
|
6415
|
-
var
|
|
6724
|
+
import { degToRad as degToRad11, contour as contour20, figure as figure30, pNumber as pNumber30, initGeom as initGeom30 } from "geometrix";
|
|
6725
|
+
var pDef30 = {
|
|
6416
6726
|
partName: "verify_contour_2",
|
|
6417
6727
|
params: [
|
|
6418
6728
|
//pNumber(name, unit, init, min, max, step)
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6729
|
+
pNumber30("r1", "mm", 20, 5, 200, 1),
|
|
6730
|
+
pNumber30("a1", "deg", 30, -200, 200, 1),
|
|
6731
|
+
pNumber30("at1", "deg", 30, -200, 200, 1),
|
|
6732
|
+
pNumber30("at2", "deg", 50, -200, 200, 1)
|
|
6423
6733
|
],
|
|
6424
6734
|
paramSvg: {
|
|
6425
6735
|
r1: "verify_contour_1_r1.svg",
|
|
@@ -6434,12 +6744,12 @@ var pDef29 = {
|
|
|
6434
6744
|
// every 0.5 second
|
|
6435
6745
|
}
|
|
6436
6746
|
};
|
|
6437
|
-
function
|
|
6438
|
-
const rGeome =
|
|
6747
|
+
function pGeom30(t, param, suffix = "") {
|
|
6748
|
+
const rGeome = initGeom30(pDef30.partName + suffix);
|
|
6439
6749
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6440
6750
|
`;
|
|
6441
6751
|
try {
|
|
6442
|
-
const figOne =
|
|
6752
|
+
const figOne = figure30();
|
|
6443
6753
|
const r1 = param.r1 + t;
|
|
6444
6754
|
const ata = param.a1 + t;
|
|
6445
6755
|
const at1 = param.at1 + t;
|
|
@@ -6481,17 +6791,17 @@ function pGeom29(t, param, suffix = "") {
|
|
|
6481
6791
|
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();
|
|
6482
6792
|
ctr2.check();
|
|
6483
6793
|
figOne.addMain(ctr2);
|
|
6484
|
-
const ctr3 = contour20(200, 200).addSegStrokeR(20, 0).addPointR(20, 0).addSegArc3(
|
|
6794
|
+
const ctr3 = contour20(200, 200).addSegStrokeR(20, 0).addPointR(20, 0).addSegArc3(degToRad11(ata), true).addSegStrokeR(20, 0).addPointR(20, 0).addSegArc3(degToRad11(ata), false).addSegStrokeR(20, 0).addSegStrokeR(0, 20).addPointR(0, 20).addSegArc3(degToRad11(ata), true).addSegStrokeR(0, 20).addPointR(0, 20).addSegArc3(degToRad11(ata), false).addSegStrokeR(0, 20).addSegStrokeR(-20, 0).addPointR(-20, 0).addSegArc3(degToRad11(ata), true).addSegStrokeR(-20, 0).addPointR(-20, 0).addSegArc3(degToRad11(ata), false).addSegStrokeR(-20, 0).addSegStrokeR(0, -20).addPointR(0, -20).addSegArc3(degToRad11(ata), true).addSegStrokeR(0, -20).addPointR(0, -20).addSegArc3(degToRad11(ata), false).addSegStrokeR(0, -20);
|
|
6485
6795
|
ctr3.check();
|
|
6486
6796
|
figOne.addMain(ctr3);
|
|
6487
|
-
const ctr4 = contour20(600, 200).addSegStrokeR(20, 20).addPointR(20, 20).addSegArc3(
|
|
6797
|
+
const ctr4 = contour20(600, 200).addSegStrokeR(20, 20).addPointR(20, 20).addSegArc3(degToRad11(ata), true).addSegStrokeR(20, 20).addPointR(20, 20).addSegArc3(degToRad11(ata), false).addSegStrokeR(20, 20).addSegStrokeR(-20, 20).addPointR(-20, 20).addSegArc3(degToRad11(ata), true).addSegStrokeR(-20, 20).addPointR(-20, 20).addSegArc3(degToRad11(ata), false).addSegStrokeR(-20, 20).addSegStrokeR(-20, -20).addPointR(-20, -20).addSegArc3(degToRad11(ata), true).addSegStrokeR(-20, -20).addPointR(-20, -20).addSegArc3(degToRad11(ata), false).addSegStrokeR(-20, -20).addSegStrokeR(20, -20).addPointR(20, -20).addSegArc3(degToRad11(ata), true).addSegStrokeR(20, -20).addPointR(20, -20).addSegArc3(degToRad11(ata), false).addSegStrokeR(20, -20);
|
|
6488
6798
|
ctr4.check();
|
|
6489
6799
|
figOne.addMain(ctr4);
|
|
6490
6800
|
const ctr5 = contour20(100, 500);
|
|
6491
6801
|
for (let i = 0; i < 8; i++) {
|
|
6492
6802
|
const adir = i * 45;
|
|
6493
|
-
const adirRad =
|
|
6494
|
-
ctr5.addSegStrokeRP(adirRad, 20).addPointRP(adirRad, 20).addSeg2Arcs(
|
|
6803
|
+
const adirRad = degToRad11(adir);
|
|
6804
|
+
ctr5.addSegStrokeRP(adirRad, 20).addPointRP(adirRad, 20).addSeg2Arcs(degToRad11(adir + at1), degToRad11(180 + adir - at2)).addSegStrokeRP(adirRad, 20).addPointRP(adirRad, 20).addSeg2Arcs(degToRad11(adir - at1), degToRad11(180 + adir + at2)).addSegStrokeRP(adirRad, 20);
|
|
6495
6805
|
}
|
|
6496
6806
|
ctr5.check();
|
|
6497
6807
|
figOne.addMain(ctr5);
|
|
@@ -6507,22 +6817,22 @@ function pGeom29(t, param, suffix = "") {
|
|
|
6507
6817
|
var verifyContour2Def = {
|
|
6508
6818
|
pTitle: "Verify contour 2",
|
|
6509
6819
|
pDescription: "Debugging more contour.ts",
|
|
6510
|
-
pDef:
|
|
6511
|
-
pGeom:
|
|
6820
|
+
pDef: pDef30,
|
|
6821
|
+
pGeom: pGeom30
|
|
6512
6822
|
};
|
|
6513
6823
|
|
|
6514
6824
|
// src/geometrix_verification/verify_contour_3.ts
|
|
6515
|
-
import { degToRad as
|
|
6516
|
-
var
|
|
6825
|
+
import { degToRad as degToRad12, contour as contour21, figure as figure31, pNumber as pNumber31, initGeom as initGeom31 } from "geometrix";
|
|
6826
|
+
var pDef31 = {
|
|
6517
6827
|
partName: "verify_contour_3",
|
|
6518
6828
|
params: [
|
|
6519
6829
|
//pNumber(name, unit, init, min, max, step)
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6830
|
+
pNumber31("r1", "mm", 10, 0, 200, 1),
|
|
6831
|
+
pNumber31("r2", "mm", 10, 0, 200, 1),
|
|
6832
|
+
pNumber31("r3", "mm", 10, 0, 200, 1),
|
|
6833
|
+
pNumber31("r4", "mm", 10, 0, 200, 1),
|
|
6834
|
+
pNumber31("r5", "mm", 10, 0, 200, 1),
|
|
6835
|
+
pNumber31("r6", "mm", 5, 0, 200, 1)
|
|
6526
6836
|
],
|
|
6527
6837
|
paramSvg: {
|
|
6528
6838
|
r1: "verify_contour_1_r1.svg",
|
|
@@ -6539,12 +6849,12 @@ var pDef30 = {
|
|
|
6539
6849
|
// every 0.5 second
|
|
6540
6850
|
}
|
|
6541
6851
|
};
|
|
6542
|
-
function
|
|
6543
|
-
const rGeome =
|
|
6852
|
+
function pGeom31(t, param, suffix = "") {
|
|
6853
|
+
const rGeome = initGeom31(pDef31.partName + suffix);
|
|
6544
6854
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6545
6855
|
`;
|
|
6546
6856
|
try {
|
|
6547
|
-
const figOne =
|
|
6857
|
+
const figOne = figure31();
|
|
6548
6858
|
const r1 = param.r1 + t;
|
|
6549
6859
|
const r2 = param.r2 + t;
|
|
6550
6860
|
const r3 = param.r3 + t;
|
|
@@ -6558,7 +6868,7 @@ function pGeom30(t, param, suffix = "") {
|
|
|
6558
6868
|
const ctr2 = contour21(300, 0);
|
|
6559
6869
|
for (let i = 0; i < 4; i++) {
|
|
6560
6870
|
const angle = 90 * (1 - i);
|
|
6561
|
-
ctr2.addSegStrokeRP(
|
|
6871
|
+
ctr2.addSegStrokeRP(degToRad12(angle), l2).addCornerRounded(r2).addSegStrokeRP(degToRad12(angle - 45), l2).addCornerRounded(r2).addSegStrokeRP(degToRad12(angle + 45), l2).addCornerRounded(r2).addSegStrokeRP(degToRad12(angle), l2).addCornerRounded(r2);
|
|
6562
6872
|
}
|
|
6563
6873
|
rGeome.logstr += ctr2.check();
|
|
6564
6874
|
figOne.addMain(ctr2);
|
|
@@ -6658,19 +6968,19 @@ function pGeom30(t, param, suffix = "") {
|
|
|
6658
6968
|
var verifyContour3Def = {
|
|
6659
6969
|
pTitle: "Verify contour 3",
|
|
6660
6970
|
pDescription: "Debugging contour.ts for rounded corners and widened corners",
|
|
6661
|
-
pDef:
|
|
6662
|
-
pGeom:
|
|
6971
|
+
pDef: pDef31,
|
|
6972
|
+
pGeom: pGeom31
|
|
6663
6973
|
};
|
|
6664
6974
|
|
|
6665
6975
|
// src/geometrix_verification/verify_contour_4.ts
|
|
6666
|
-
import { contour as contour22, figure as
|
|
6667
|
-
var
|
|
6976
|
+
import { contour as contour22, figure as figure32, pNumber as pNumber32, initGeom as initGeom32 } from "geometrix";
|
|
6977
|
+
var pDef32 = {
|
|
6668
6978
|
partName: "verify_contour_4",
|
|
6669
6979
|
params: [
|
|
6670
6980
|
//pNumber(name, unit, init, min, max, step)
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6981
|
+
pNumber32("n1", "scalar", 16, 1, 50, 1),
|
|
6982
|
+
pNumber32("n2", "scalar", 6, 3, 50, 1),
|
|
6983
|
+
pNumber32("r1", "mm", 5, 0, 20, 1)
|
|
6674
6984
|
],
|
|
6675
6985
|
paramSvg: {
|
|
6676
6986
|
n1: "verify_contour_1_r1.svg",
|
|
@@ -6684,12 +6994,12 @@ var pDef31 = {
|
|
|
6684
6994
|
// every 0.5 second
|
|
6685
6995
|
}
|
|
6686
6996
|
};
|
|
6687
|
-
function
|
|
6688
|
-
const rGeome =
|
|
6997
|
+
function pGeom32(t, param, suffix = "") {
|
|
6998
|
+
const rGeome = initGeom32(pDef32.partName + suffix);
|
|
6689
6999
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6690
7000
|
`;
|
|
6691
7001
|
try {
|
|
6692
|
-
const figOne =
|
|
7002
|
+
const figOne = figure32();
|
|
6693
7003
|
const n1 = param.n1;
|
|
6694
7004
|
const n2 = param.n2;
|
|
6695
7005
|
const r1 = param.r1;
|
|
@@ -6736,29 +7046,29 @@ function pGeom31(t, param, suffix = "") {
|
|
|
6736
7046
|
var verifyContour4Def = {
|
|
6737
7047
|
pTitle: "Verify contour 4",
|
|
6738
7048
|
pDescription: "Debugging contour.ts for addPartial",
|
|
6739
|
-
pDef:
|
|
6740
|
-
pGeom:
|
|
7049
|
+
pDef: pDef32,
|
|
7050
|
+
pGeom: pGeom32
|
|
6741
7051
|
};
|
|
6742
7052
|
|
|
6743
7053
|
// src/geometrix_verification/verify_exports_1.ts
|
|
6744
7054
|
import {
|
|
6745
7055
|
contour as contour23,
|
|
6746
|
-
contourCircle as
|
|
6747
|
-
figure as
|
|
6748
|
-
pNumber as
|
|
7056
|
+
contourCircle as contourCircle19,
|
|
7057
|
+
figure as figure33,
|
|
7058
|
+
pNumber as pNumber33,
|
|
6749
7059
|
pCheckbox as pCheckbox5,
|
|
6750
|
-
initGeom as
|
|
6751
|
-
EExtrude as
|
|
6752
|
-
EBVolume as
|
|
7060
|
+
initGeom as initGeom33,
|
|
7061
|
+
EExtrude as EExtrude17,
|
|
7062
|
+
EBVolume as EBVolume20
|
|
6753
7063
|
} from "geometrix";
|
|
6754
|
-
var
|
|
7064
|
+
var pDef33 = {
|
|
6755
7065
|
partName: "verify_exports_1",
|
|
6756
7066
|
params: [
|
|
6757
7067
|
//pNumber(name, unit, init, min, max, step)
|
|
6758
7068
|
pCheckbox5("circle", true),
|
|
6759
|
-
|
|
7069
|
+
pNumber33("circle-size", "mm", 100, 1, 1e3, 1),
|
|
6760
7070
|
pCheckbox5("contour", true),
|
|
6761
|
-
|
|
7071
|
+
pNumber33("contour-size", "mm", 30, 1, 1e3, 1),
|
|
6762
7072
|
pCheckbox5("contour-arc-large", false)
|
|
6763
7073
|
],
|
|
6764
7074
|
paramSvg: {
|
|
@@ -6774,14 +7084,14 @@ var pDef32 = {
|
|
|
6774
7084
|
tUpdate: 500
|
|
6775
7085
|
}
|
|
6776
7086
|
};
|
|
6777
|
-
function
|
|
6778
|
-
const rGeome =
|
|
7087
|
+
function pGeom33(t, param, suffix = "") {
|
|
7088
|
+
const rGeome = initGeom33(pDef33.partName + suffix);
|
|
6779
7089
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6780
7090
|
`;
|
|
6781
7091
|
try {
|
|
6782
|
-
const figOne =
|
|
7092
|
+
const figOne = figure33();
|
|
6783
7093
|
if (param.circle === 1) {
|
|
6784
|
-
const theCircle =
|
|
7094
|
+
const theCircle = contourCircle19(0, 0, param["circle-size"]);
|
|
6785
7095
|
figOne.addMain(theCircle);
|
|
6786
7096
|
}
|
|
6787
7097
|
if (param.contour === 1) {
|
|
@@ -6797,7 +7107,7 @@ function pGeom32(t, param, suffix = "") {
|
|
|
6797
7107
|
{
|
|
6798
7108
|
outName: `subpax_${designName}_one`,
|
|
6799
7109
|
face: `${designName}_one`,
|
|
6800
|
-
extrudeMethod:
|
|
7110
|
+
extrudeMethod: EExtrude17.eLinearOrtho,
|
|
6801
7111
|
length: 10,
|
|
6802
7112
|
rotate: [0, 0, 0],
|
|
6803
7113
|
translate: [0, 0, 0]
|
|
@@ -6806,7 +7116,7 @@ function pGeom32(t, param, suffix = "") {
|
|
|
6806
7116
|
volumes: [
|
|
6807
7117
|
{
|
|
6808
7118
|
outName: `pax_${designName}`,
|
|
6809
|
-
boolMethod:
|
|
7119
|
+
boolMethod: EBVolume20.eIdentity,
|
|
6810
7120
|
inList: [`subpax_${designName}_one`]
|
|
6811
7121
|
}
|
|
6812
7122
|
]
|
|
@@ -6822,14 +7132,15 @@ function pGeom32(t, param, suffix = "") {
|
|
|
6822
7132
|
var verifyExports1Def = {
|
|
6823
7133
|
pTitle: "Verify exports 1",
|
|
6824
7134
|
pDescription: "For dev & debug of Openscad export",
|
|
6825
|
-
pDef:
|
|
6826
|
-
pGeom:
|
|
7135
|
+
pDef: pDef33,
|
|
7136
|
+
pGeom: pGeom33
|
|
6827
7137
|
};
|
|
6828
7138
|
export {
|
|
6829
7139
|
baseDef,
|
|
6830
7140
|
circlesDef,
|
|
6831
7141
|
dummyPoleStaticDef,
|
|
6832
7142
|
gearWheelWheelDef,
|
|
7143
|
+
haxisGuidanceDef,
|
|
6833
7144
|
heliostatDef,
|
|
6834
7145
|
heliostat_2Def,
|
|
6835
7146
|
poleStaticDef,
|