designix 0.5.28 → 0.5.30
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 +1060 -628
- 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_door.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 +23 -16
package/dist/index.js
CHANGED
|
@@ -1432,7 +1432,7 @@ import {
|
|
|
1432
1432
|
checkGeom as checkGeom3,
|
|
1433
1433
|
prefixLog as prefixLog3,
|
|
1434
1434
|
figure as figure8,
|
|
1435
|
-
degToRad as
|
|
1435
|
+
degToRad as degToRad5,
|
|
1436
1436
|
radToDeg as radToDeg6,
|
|
1437
1437
|
ffix as ffix10,
|
|
1438
1438
|
pNumber as pNumber8,
|
|
@@ -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) {
|
|
@@ -2276,7 +2349,10 @@ var poleStaticDef = {
|
|
|
2276
2349
|
import {
|
|
2277
2350
|
contour as contour7,
|
|
2278
2351
|
contourCircle as contourCircle5,
|
|
2352
|
+
ctrRectangle,
|
|
2353
|
+
ctrRectRot,
|
|
2279
2354
|
figure as figure5,
|
|
2355
|
+
degToRad as degToRad4,
|
|
2280
2356
|
radToDeg as radToDeg4,
|
|
2281
2357
|
ffix as ffix7,
|
|
2282
2358
|
pNumber as pNumber5,
|
|
@@ -2320,7 +2396,8 @@ var pDef5 = {
|
|
|
2320
2396
|
pNumber5("H6", "mm", 100, 1, 1e3, 10),
|
|
2321
2397
|
pNumber5("H7", "mm", 600, 10, 2e3, 10),
|
|
2322
2398
|
pNumber5("L9", "mm", 300, 1, 1e3, 10),
|
|
2323
|
-
pNumber5("R9", "mm", 50, 0, 300, 1)
|
|
2399
|
+
pNumber5("R9", "mm", 50, 0, 300, 1),
|
|
2400
|
+
pNumber5("doorOrientation", "degree", 0, -180, 180, 1)
|
|
2324
2401
|
],
|
|
2325
2402
|
paramSvg: {
|
|
2326
2403
|
D1: "rake_face.svg",
|
|
@@ -2350,7 +2427,8 @@ var pDef5 = {
|
|
|
2350
2427
|
H6: "rake_door.svg",
|
|
2351
2428
|
H7: "rake_door.svg",
|
|
2352
2429
|
L9: "rake_door.svg",
|
|
2353
|
-
R9: "rake_door.svg"
|
|
2430
|
+
R9: "rake_door.svg",
|
|
2431
|
+
doorOrientation: "rake_door.svg"
|
|
2354
2432
|
},
|
|
2355
2433
|
sim: {
|
|
2356
2434
|
tMax: 180,
|
|
@@ -2361,10 +2439,8 @@ var pDef5 = {
|
|
|
2361
2439
|
};
|
|
2362
2440
|
function pGeom5(t, param, suffix = "") {
|
|
2363
2441
|
const rGeome = initGeom5(pDef5.partName + suffix);
|
|
2364
|
-
let ctrCone;
|
|
2365
|
-
let ctrConePlus;
|
|
2366
|
-
let ctrRect;
|
|
2367
2442
|
const figCone = figure5();
|
|
2443
|
+
const figConeHollow = figure5();
|
|
2368
2444
|
const figBeam = figure5();
|
|
2369
2445
|
const figBeamHollow = figure5();
|
|
2370
2446
|
const figDisc = figure5();
|
|
@@ -2385,28 +2461,6 @@ function pGeom5(t, param, suffix = "") {
|
|
|
2385
2461
|
const R8 = param.D8 / 2;
|
|
2386
2462
|
const H1H2 = param.H1 + param.H2;
|
|
2387
2463
|
const H1H5 = H1H2 - param.H4 + param.H5;
|
|
2388
|
-
rGeome.logstr += `cone-height: ${ffix7(H1H2)} mm
|
|
2389
|
-
`;
|
|
2390
|
-
rGeome.logstr += `cone-height total: ${ffix7(H1H5)} mm
|
|
2391
|
-
`;
|
|
2392
|
-
if (param.D2 > param.D1) {
|
|
2393
|
-
throw `err110: D2 ${param.D2} is larger than D1 ${param.D1}`;
|
|
2394
|
-
}
|
|
2395
|
-
if (param.D3 + param.E1 > param.D1) {
|
|
2396
|
-
throw `err113: D3 ${param.D3} is too large compare to D1 ${param.D1} and E1 ${param.E1}`;
|
|
2397
|
-
}
|
|
2398
|
-
if (param.H3 + param.E3 > param.H1) {
|
|
2399
|
-
throw `err116: H3 ${param.H3} is too large compare to H1 ${param.H1} and E3 ${param.E3}`;
|
|
2400
|
-
}
|
|
2401
|
-
if (param.H4 + R4 > param.H2) {
|
|
2402
|
-
throw `err119: H4 ${param.H4} is too large compare to H2 ${param.H2} and D4 ${param.D4}`;
|
|
2403
|
-
}
|
|
2404
|
-
if (param.E4 > R4) {
|
|
2405
|
-
throw `err122: E4 ${param.E4} is too large compare to D4 ${param.D4}`;
|
|
2406
|
-
}
|
|
2407
|
-
if (param.D8 <= param.D5) {
|
|
2408
|
-
throw `err146: D8 ${param.D8} is too small compare to D5 ${param.D5}`;
|
|
2409
|
-
}
|
|
2410
2464
|
const beamL = 4 * param.L4 + param.L5 + 2 * param.L6;
|
|
2411
2465
|
const beamH = param.H1 + param.H2 - param.H4;
|
|
2412
2466
|
const handLowX = R4 * Math.cos(Math.PI / 6);
|
|
@@ -2417,17 +2471,10 @@ function pGeom5(t, param, suffix = "") {
|
|
|
2417
2471
|
const handHighYext = R8 * Math.sin(Math.PI / 6);
|
|
2418
2472
|
const handPos = [-beamL / 2, -param.L5 / 2 - param.L4, param.L5 / 2, beamL / 2 - param.L4];
|
|
2419
2473
|
const wingLy = param.H2 - param.L8 - param.H4 - R4;
|
|
2420
|
-
if (wingLy < 0) {
|
|
2421
|
-
throw `err140: H2 ${param.H2} too small compare to L8 ${param.L8}, H4 ${param.H4} and D4 ${param.D4}`;
|
|
2422
|
-
}
|
|
2423
2474
|
const coneAngle = Math.atan2(R1 - R2, param.H2);
|
|
2424
|
-
rGeome.logstr += `cone-angle: ${ffix7(radToDeg4(coneAngle))} degree
|
|
2425
|
-
`;
|
|
2426
2475
|
const wingLx = beamL / 2 - param.L7 - R1 + param.L8 * Math.tan(coneAngle);
|
|
2427
2476
|
const wingL = Math.sqrt(wingLx ** 2 + wingLy ** 2);
|
|
2428
2477
|
const wingAngle = Math.atan2(wingLx, wingLy);
|
|
2429
|
-
rGeome.logstr += `wing-angle: ${ffix7(radToDeg4(wingAngle))} degree
|
|
2430
|
-
`;
|
|
2431
2478
|
const wingLPre = param.E1 / Math.sin(wingAngle + coneAngle);
|
|
2432
2479
|
const wingL2 = wingL + param.E4 / Math.cos(wingAngle) + wingLPre;
|
|
2433
2480
|
const wingPosX = R1 - param.L8 * Math.tan(coneAngle) - wingLPre * Math.sin(wingAngle);
|
|
@@ -2440,49 +2487,75 @@ function pGeom5(t, param, suffix = "") {
|
|
|
2440
2487
|
const wingAngleC = Math.PI / 2 - wingAngle;
|
|
2441
2488
|
const doorLowX = param.L9 / 2;
|
|
2442
2489
|
const doorHighX = doorLowX - param.H7 * Math.tan(coneAngle);
|
|
2490
|
+
if (param.D2 > param.D1) {
|
|
2491
|
+
throw `err110: D2 ${param.D2} is larger than D1 ${param.D1}`;
|
|
2492
|
+
}
|
|
2493
|
+
if (param.D3 + param.E1 > param.D1) {
|
|
2494
|
+
throw `err113: D3 ${param.D3} is too large compare to D1 ${param.D1} and E1 ${param.E1}`;
|
|
2495
|
+
}
|
|
2496
|
+
if (param.H3 + param.E3 > param.H1) {
|
|
2497
|
+
throw `err116: H3 ${param.H3} is too large compare to H1 ${param.H1} and E3 ${param.E3}`;
|
|
2498
|
+
}
|
|
2499
|
+
if (param.H4 + R4 > param.H2) {
|
|
2500
|
+
throw `err119: H4 ${param.H4} is too large compare to H2 ${param.H2} and D4 ${param.D4}`;
|
|
2501
|
+
}
|
|
2502
|
+
if (param.E4 > R4) {
|
|
2503
|
+
throw `err122: E4 ${param.E4} is too large compare to D4 ${param.D4}`;
|
|
2504
|
+
}
|
|
2505
|
+
if (param.D8 <= param.D5) {
|
|
2506
|
+
throw `err146: D8 ${param.D8} is too small compare to D5 ${param.D5}`;
|
|
2507
|
+
}
|
|
2508
|
+
if (wingLy < 0) {
|
|
2509
|
+
throw `err140: H2 ${param.H2} too small compare to L8 ${param.L8}, H4 ${param.H4} and D4 ${param.D4}`;
|
|
2510
|
+
}
|
|
2443
2511
|
if (doorHighX < param.R9) {
|
|
2444
2512
|
throw `err177: R9 ${param.R9} too large compare to doorHighX ${doorHighX} and L9 ${param.L9}`;
|
|
2445
2513
|
}
|
|
2446
2514
|
if (param.L9 > param.D1) {
|
|
2447
2515
|
throw `err180: L9 ${param.L9} too large compare to D1 ${param.D1}`;
|
|
2448
2516
|
}
|
|
2517
|
+
rGeome.logstr += `cone-height: ${ffix7(H1H2)} mm
|
|
2518
|
+
`;
|
|
2519
|
+
rGeome.logstr += `cone-height total: ${ffix7(H1H5)} mm
|
|
2520
|
+
`;
|
|
2521
|
+
rGeome.logstr += `cone-angle: ${ffix7(radToDeg4(coneAngle))} degree
|
|
2522
|
+
`;
|
|
2523
|
+
rGeome.logstr += `wing-angle: ${ffix7(radToDeg4(wingAngle))} degree
|
|
2524
|
+
`;
|
|
2449
2525
|
const coneSlopeX = param.E1 * Math.cos(coneAngle);
|
|
2450
2526
|
const coneSlopeY = param.E1 * Math.sin(coneAngle);
|
|
2451
2527
|
const coneFC = param.E1 * Math.tan(coneAngle / 2);
|
|
2452
|
-
ctrCone = function(orient) {
|
|
2528
|
+
const ctrCone = function(orient) {
|
|
2453
2529
|
const rCtr = contour7(orient * R1, 0).addSegStrokeA(orient * R1, param.H1).addSegStrokeA(orient * R2, H1H2).addSegStrokeA(orient * (R2 - coneSlopeX), H1H2 - coneSlopeY).addSegStrokeA(orient * (R1 - param.E1), param.H1 - coneFC).addSegStrokeA(orient * (R1 - param.E1), 0).closeSegStroke();
|
|
2454
2530
|
return rCtr;
|
|
2455
2531
|
};
|
|
2456
|
-
ctrConePlus = function(orient) {
|
|
2532
|
+
const ctrConePlus = function(orient) {
|
|
2457
2533
|
const rCtr = contour7(orient * R1, 0).addSegStrokeA(orient * R1, param.H1).addSegStrokeA(orient * R2, H1H2).addSegStrokeA(orient * (R2 - coneSlopeX), H1H2 - coneSlopeY).addSegStrokeA(orient * (R1 - param.E1), param.H1 - coneFC).addSegStrokeA(orient * (R1 - param.E1), param.H1 - param.H3).addSegStrokeA(orient * R3, param.H1 - param.H3).addSegStrokeA(orient * R3, param.H1 - param.H3 - param.E3).addSegStrokeA(orient * (R1 - param.E1), param.H1 - param.H3 - param.E3).addSegStrokeA(orient * (R1 - param.E1), 0).closeSegStroke();
|
|
2458
2534
|
return rCtr;
|
|
2459
2535
|
};
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
const xHeight = -height * Math.sin(angle);
|
|
2464
|
-
const yHeight = height * Math.cos(angle);
|
|
2465
|
-
const rCtr = contour7(xpos, ypos).addSegStrokeA(xpos + xWidth, ypos + yWidth).addSegStrokeA(xpos + xWidth + xHeight, ypos + yWidth + yHeight).addSegStrokeA(xpos + xHeight, ypos + yHeight).closeSegStroke();
|
|
2466
|
-
return rCtr;
|
|
2467
|
-
};
|
|
2536
|
+
const coneHollowHeight2 = beamH - R4 - (param.H1 - coneFC);
|
|
2537
|
+
const coneHollowR2 = R1 - param.E1 - Math.tan(coneAngle) * coneHollowHeight2;
|
|
2538
|
+
const ctrConeHollow = contour7(0, beamH - R4).addSegStrokeA(coneHollowR2, beamH - R4).addSegStrokeA(R1 - param.E1, param.H1 - coneFC).addSegStrokeA(R1 - param.E1, param.H1 - param.H3).addSegStrokeA(0, param.H1 - param.H3).closeSegStroke();
|
|
2468
2539
|
const ctrDoor = contour7(doorLowX, param.H1 + param.H6).addCornerRounded(param.R9).addSegStrokeA(doorHighX, param.H1 + param.H6 + param.H7).addCornerRounded(param.R9).addSegStrokeA(-doorHighX, param.H1 + param.H6 + param.H7).addCornerRounded(param.R9).addSegStrokeA(-doorLowX, param.H1 + param.H6).addCornerRounded(param.R9).closeSegStroke();
|
|
2469
2540
|
figCone.addMain(ctrCone(1));
|
|
2470
2541
|
figCone.addSecond(ctrConePlus(1));
|
|
2471
2542
|
figCone.addSecond(ctrConePlus(-1));
|
|
2472
|
-
figCone.addSecond(
|
|
2543
|
+
figCone.addSecond(ctrRectangle(-beamL / 2, beamH - R4, beamL, param.D4));
|
|
2473
2544
|
figCone.addSecond(
|
|
2474
|
-
|
|
2545
|
+
ctrRectangle(-beamL / 2, beamH - R4 + param.E4, beamL, param.D4 - 2 * param.E4)
|
|
2475
2546
|
);
|
|
2476
2547
|
for (const posX of handPos) {
|
|
2477
2548
|
figCone.addSecond(
|
|
2478
|
-
|
|
2549
|
+
ctrRectangle(posX, beamH + handLowY, param.L4, param.H5 - handLowY - handHighYint)
|
|
2479
2550
|
);
|
|
2480
2551
|
}
|
|
2481
|
-
figCone.addSecond(
|
|
2482
|
-
figCone.addSecond(
|
|
2483
|
-
figCone.addSecond(
|
|
2484
|
-
figCone.addSecond(
|
|
2552
|
+
figCone.addSecond(ctrRectRot(wingPosX, wingPosY, wingL2, 2 * R6, wingAngleC));
|
|
2553
|
+
figCone.addSecond(ctrRectRot(wingHPosX, wingHPosY, wingL2, 2 * wingHR, wingAngleC));
|
|
2554
|
+
figCone.addSecond(ctrRectRot(-wingPosX, wingPosY, 2 * R6, wingL2, wingAngle));
|
|
2555
|
+
figCone.addSecond(ctrRectRot(-wingHPosX, wingHPosY, 2 * wingHR, wingL2, wingAngle));
|
|
2485
2556
|
figCone.addSecond(ctrDoor);
|
|
2557
|
+
figConeHollow.mergeFigure(figCone, true);
|
|
2558
|
+
figConeHollow.addMain(ctrConeHollow);
|
|
2486
2559
|
const ctrHand = contour7(handLowX, beamH + handLowY).addSegStrokeA(handHighXext, beamH + param.H5 - handHighYext).addSegStrokeA(handHighXint, beamH + param.H5 - handHighYint).addPointA(-handHighXint, beamH + param.H5 - handHighYint).addSegArc(R5, false, false).addSegStrokeA(-handHighXext, beamH + param.H5 - handHighYext).addSegStrokeA(-handLowX, beamH + handLowY).closeSegArc(R4, false, false);
|
|
2487
2560
|
figBeam.addMain(contourCircle5(0, beamH, R4));
|
|
2488
2561
|
figBeam.addMain(contourCircle5(0, beamH, R4 - param.E4));
|
|
@@ -2490,8 +2563,8 @@ function pGeom5(t, param, suffix = "") {
|
|
|
2490
2563
|
figBeam.addSecond(ctrConePlus(-1));
|
|
2491
2564
|
figBeam.addSecond(ctrHand);
|
|
2492
2565
|
figBeam.addSecond(contourCircle5(0, beamH + param.H5, R5));
|
|
2493
|
-
figBeam.addSecond(
|
|
2494
|
-
figBeam.addSecond(
|
|
2566
|
+
figBeam.addSecond(ctrRectangle(-R6, param.H1 + param.L8, 2 * R6, wingLy));
|
|
2567
|
+
figBeam.addSecond(ctrRectangle(-wingHR, param.H1 + param.L8, 2 * wingHR, wingLy));
|
|
2495
2568
|
figBeam.addSecond(ctrDoor);
|
|
2496
2569
|
figBeamHollow.addMain(contourCircle5(0, beamH, R4 - param.E4));
|
|
2497
2570
|
figBeamHollow.addSecond(contourCircle5(0, beamH, R4));
|
|
@@ -2507,22 +2580,22 @@ function pGeom5(t, param, suffix = "") {
|
|
|
2507
2580
|
}
|
|
2508
2581
|
figDisc.addSecond(contourCircle5(0, 0, R1 - param.E1));
|
|
2509
2582
|
figDisc.addSecond(contourCircle5(0, 0, R2));
|
|
2510
|
-
figDisc.addSecond(
|
|
2511
|
-
figDisc.addSecond(
|
|
2583
|
+
figDisc.addSecond(ctrRectangle(-R4, -beamL / 2, param.D4, beamL));
|
|
2584
|
+
figDisc.addSecond(ctrRectangle(-R4 + param.E4, -beamL / 2, param.D4 - 2 * param.E4, beamL));
|
|
2512
2585
|
for (const posX of handPos) {
|
|
2513
|
-
figDisc.addSecond(
|
|
2514
|
-
figDisc.addSecond(
|
|
2515
|
-
figDisc.addSecond(
|
|
2586
|
+
figDisc.addSecond(ctrRectangle(-handLowX, posX, 2 * handLowX, param.L4));
|
|
2587
|
+
figDisc.addSecond(ctrRectangle(-handHighXint, posX, 2 * handHighXint, param.L4));
|
|
2588
|
+
figDisc.addSecond(ctrRectangle(-handHighXext, posX, 2 * handHighXext, param.L4));
|
|
2516
2589
|
}
|
|
2517
|
-
figDisc.addSecond(
|
|
2590
|
+
figDisc.addSecond(ctrRectangle(-R6, R1 - param.L8 * Math.tan(coneAngle), 2 * R6, wingLx));
|
|
2518
2591
|
figDisc.addSecond(
|
|
2519
|
-
|
|
2592
|
+
ctrRectangle(-wingHR, R1 - param.L8 * Math.tan(coneAngle), 2 * wingHR, wingLx)
|
|
2520
2593
|
);
|
|
2521
2594
|
figDisc.addSecond(
|
|
2522
|
-
|
|
2595
|
+
ctrRectangle(-R6, -R1 + param.L8 * Math.tan(coneAngle) - wingLx, 2 * R6, wingLx)
|
|
2523
2596
|
);
|
|
2524
2597
|
figDisc.addSecond(
|
|
2525
|
-
|
|
2598
|
+
ctrRectangle(-wingHR, -R1 + param.L8 * Math.tan(coneAngle) - wingLx, 2 * wingHR, wingLx)
|
|
2526
2599
|
);
|
|
2527
2600
|
figHand.addMain(ctrHand);
|
|
2528
2601
|
figHand.addSecond(contourCircle5(0, beamH, R4));
|
|
@@ -2535,21 +2608,22 @@ function pGeom5(t, param, suffix = "") {
|
|
|
2535
2608
|
figDoor.addMain(ctrDoor);
|
|
2536
2609
|
figDoor.addSecond(ctrConePlus(1));
|
|
2537
2610
|
figDoor.addSecond(ctrConePlus(-1));
|
|
2538
|
-
figDoor.addSecond(
|
|
2611
|
+
figDoor.addSecond(ctrRectangle(-beamL / 2, beamH - R4, beamL, param.D4));
|
|
2539
2612
|
figDoor.addSecond(
|
|
2540
|
-
|
|
2613
|
+
ctrRectangle(-beamL / 2, beamH - R4 + param.E4, beamL, param.D4 - 2 * param.E4)
|
|
2541
2614
|
);
|
|
2542
2615
|
for (const posX of handPos) {
|
|
2543
2616
|
figDoor.addSecond(
|
|
2544
|
-
|
|
2617
|
+
ctrRectangle(posX, beamH + handLowY, param.L4, param.H5 - handLowY - handHighYint)
|
|
2545
2618
|
);
|
|
2546
2619
|
}
|
|
2547
|
-
figDoor.addSecond(
|
|
2548
|
-
figDoor.addSecond(
|
|
2549
|
-
figDoor.addSecond(
|
|
2550
|
-
figDoor.addSecond(
|
|
2620
|
+
figDoor.addSecond(ctrRectRot(wingPosX, wingPosY, wingL2, 2 * R6, wingAngleC));
|
|
2621
|
+
figDoor.addSecond(ctrRectRot(wingHPosX, wingHPosY, wingL2, 2 * wingHR, wingAngleC));
|
|
2622
|
+
figDoor.addSecond(ctrRectRot(-wingPosX, wingPosY, 2 * R6, wingL2, wingAngle));
|
|
2623
|
+
figDoor.addSecond(ctrRectRot(-wingHPosX, wingHPosY, 2 * wingHR, wingL2, wingAngle));
|
|
2551
2624
|
rGeome.fig = {
|
|
2552
2625
|
faceCone: figCone,
|
|
2626
|
+
faceConeHollow: figConeHollow,
|
|
2553
2627
|
faceBeam: figBeam,
|
|
2554
2628
|
faceBeamHollow: figBeamHollow,
|
|
2555
2629
|
faceDisc: figDisc,
|
|
@@ -2579,6 +2653,13 @@ function pGeom5(t, param, suffix = "") {
|
|
|
2579
2653
|
rotate: [0, 0, 0],
|
|
2580
2654
|
translate: [0, 0, 0]
|
|
2581
2655
|
},
|
|
2656
|
+
{
|
|
2657
|
+
outName: `subpax_${designName}_coneHollow`,
|
|
2658
|
+
face: `${designName}_faceConeHollow`,
|
|
2659
|
+
extrudeMethod: EExtrude4.eRotate,
|
|
2660
|
+
rotate: [0, 0, 0],
|
|
2661
|
+
translate: [0, 0, 0]
|
|
2662
|
+
},
|
|
2582
2663
|
{
|
|
2583
2664
|
outName: `subpax_${designName}_beam`,
|
|
2584
2665
|
face: `${designName}_faceBeam`,
|
|
@@ -2640,7 +2721,7 @@ function pGeom5(t, param, suffix = "") {
|
|
|
2640
2721
|
face: `${designName}_faceDoor`,
|
|
2641
2722
|
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
2642
2723
|
length: param.D1,
|
|
2643
|
-
rotate: [Math.PI / 2, 0, Math.PI / 2],
|
|
2724
|
+
rotate: [Math.PI / 2, 0, -Math.PI / 2 + degToRad4(param.doorOrientation)],
|
|
2644
2725
|
translate: [0, 0, 0]
|
|
2645
2726
|
},
|
|
2646
2727
|
...preExtrude
|
|
@@ -2665,6 +2746,7 @@ function pGeom5(t, param, suffix = "") {
|
|
|
2665
2746
|
outName: `ipax_${designName}_hollow`,
|
|
2666
2747
|
boolMethod: EBVolume5.eUnion,
|
|
2667
2748
|
inList: [
|
|
2749
|
+
`subpax_${designName}_coneHollow`,
|
|
2668
2750
|
`subpax_${designName}_beamHollow`,
|
|
2669
2751
|
`subpax_${designName}_wing_hollow_right`,
|
|
2670
2752
|
`subpax_${designName}_wing_hollow_left`,
|
|
@@ -2889,7 +2971,7 @@ import {
|
|
|
2889
2971
|
point as point5,
|
|
2890
2972
|
contour as contour9,
|
|
2891
2973
|
contourCircle as contourCircle7,
|
|
2892
|
-
ctrRectangle,
|
|
2974
|
+
ctrRectangle as ctrRectangle2,
|
|
2893
2975
|
figure as figure7,
|
|
2894
2976
|
ffix as ffix9,
|
|
2895
2977
|
pNumber as pNumber7,
|
|
@@ -2973,9 +3055,9 @@ function pGeom7(t, param, suffix = "") {
|
|
|
2973
3055
|
figSide.addMain(contourCircle7(0, 0, R1 - param.E1));
|
|
2974
3056
|
const sidePx = [-param.L2 / 2, -param.L3 - param.H2, param.L3, param.L2 / 2 - param.H2];
|
|
2975
3057
|
for (const px of sidePx) {
|
|
2976
|
-
figSide.addMain(
|
|
3058
|
+
figSide.addMain(ctrRectangle2(px, R1 - param.H4, param.H2, param.H4));
|
|
2977
3059
|
figSide.addMain(
|
|
2978
|
-
|
|
3060
|
+
ctrRectangle2(
|
|
2979
3061
|
px + param.E2,
|
|
2980
3062
|
R1 - param.H4 + param.E2,
|
|
2981
3063
|
param.H2 - 2 * param.E2,
|
|
@@ -2983,7 +3065,7 @@ function pGeom7(t, param, suffix = "") {
|
|
|
2983
3065
|
)
|
|
2984
3066
|
);
|
|
2985
3067
|
}
|
|
2986
|
-
figSide.addSecond(
|
|
3068
|
+
figSide.addSecond(ctrRectangle2(-param.L2 / 2, R1, param.L2, param.H3));
|
|
2987
3069
|
const facePx = [];
|
|
2988
3070
|
facePx.push(-param.L1 / 2);
|
|
2989
3071
|
facePx.push(param.L1 / 2 - param.H1);
|
|
@@ -2998,9 +3080,9 @@ function pGeom7(t, param, suffix = "") {
|
|
|
2998
3080
|
}
|
|
2999
3081
|
}
|
|
3000
3082
|
for (const px of facePx) {
|
|
3001
|
-
figFace.addMain(
|
|
3083
|
+
figFace.addMain(ctrRectangle2(px, R1, param.H1, param.H3));
|
|
3002
3084
|
figFace.addMain(
|
|
3003
|
-
|
|
3085
|
+
ctrRectangle2(
|
|
3004
3086
|
px + param.E3,
|
|
3005
3087
|
R1 + param.E3,
|
|
3006
3088
|
param.H1 - 2 * param.E3,
|
|
@@ -3008,15 +3090,15 @@ function pGeom7(t, param, suffix = "") {
|
|
|
3008
3090
|
)
|
|
3009
3091
|
);
|
|
3010
3092
|
}
|
|
3011
|
-
figFace.addSecond(
|
|
3012
|
-
figFace.addSecond(
|
|
3093
|
+
figFace.addSecond(ctrRectangle2(-param.L1 / 2, -R1, param.L1, param.D1));
|
|
3094
|
+
figFace.addSecond(ctrRectangle2(-param.L1 / 2, R1 - param.H4, param.L1, param.H4));
|
|
3013
3095
|
for (const px of facePx) {
|
|
3014
|
-
figTop.addSecond(
|
|
3096
|
+
figTop.addSecond(ctrRectangle2(px, -param.L2 / 2, param.H1, param.L2));
|
|
3015
3097
|
}
|
|
3016
3098
|
for (const py of sidePx) {
|
|
3017
|
-
figTop.addSecond(
|
|
3099
|
+
figTop.addSecond(ctrRectangle2(-param.L1 / 2, py, param.L1, param.H2));
|
|
3018
3100
|
}
|
|
3019
|
-
figTop.addSecond(
|
|
3101
|
+
figTop.addSecond(ctrRectangle2(-param.L1 / 2, -R1, param.L1, param.D1));
|
|
3020
3102
|
const aBAC = Math.atan2(param.S1, R1);
|
|
3021
3103
|
const aDAB = 2 * aBAC;
|
|
3022
3104
|
const pA = point5(0, 0);
|
|
@@ -3025,13 +3107,14 @@ function pGeom7(t, param, suffix = "") {
|
|
|
3025
3107
|
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
3108
|
figButtress.addMain(ctrButtress);
|
|
3027
3109
|
figButtress.addMain(contourCircle7(0, 0, R1 - param.E1));
|
|
3110
|
+
figSide.addSecond(ctrButtress);
|
|
3028
3111
|
for (const px of facePx) {
|
|
3029
|
-
figTopWithRod.addMain(
|
|
3112
|
+
figTopWithRod.addMain(ctrRectangle2(px, -param.L2 / 2, param.H1, param.L2));
|
|
3030
3113
|
}
|
|
3031
3114
|
for (const py of sidePx) {
|
|
3032
|
-
figTopWithRod.addMain(
|
|
3115
|
+
figTopWithRod.addMain(ctrRectangle2(-param.L1 / 2, py, param.L1, param.H2));
|
|
3033
3116
|
}
|
|
3034
|
-
figTopWithRod.addMain(
|
|
3117
|
+
figTopWithRod.addMain(ctrRectangle2(-param.L1 / 2, -R1, param.L1, param.D1));
|
|
3035
3118
|
const rodPx0 = -((param.rod1 - 1) * param.rod2 + param.rod3) / 2;
|
|
3036
3119
|
const rodOffset = (param.rod3 - param.rod4) / 2;
|
|
3037
3120
|
const rodPlateH = param.rod3 / 2;
|
|
@@ -3040,10 +3123,10 @@ function pGeom7(t, param, suffix = "") {
|
|
|
3040
3123
|
const rodPy0 = -rodLength / 2;
|
|
3041
3124
|
for (let i = 0; i < param.rod1; i++) {
|
|
3042
3125
|
const px = rodPx0 + i * param.rod2;
|
|
3043
|
-
figTopWithRod.addSecond(
|
|
3126
|
+
figTopWithRod.addSecond(ctrRectangle2(px + rodOffset, rodPy0, param.rod4, rodLength));
|
|
3044
3127
|
for (let j = 0; j < 4; j++) {
|
|
3045
3128
|
figTopWithRod.addSecond(
|
|
3046
|
-
|
|
3129
|
+
ctrRectangle2(px, rodPy0 + j * rodPyStep, param.rod3, rodPlateH, rodPlateH / 4)
|
|
3047
3130
|
);
|
|
3048
3131
|
}
|
|
3049
3132
|
}
|
|
@@ -3072,13 +3155,31 @@ function pGeom7(t, param, suffix = "") {
|
|
|
3072
3155
|
length: param.L2,
|
|
3073
3156
|
rotate: [0, Math.PI / 2, 0],
|
|
3074
3157
|
translate: [-param.L2 / 2, 0, 0]
|
|
3075
|
-
}
|
|
3158
|
+
},
|
|
3159
|
+
...facePx.map((pz, idx) => {
|
|
3160
|
+
const rElem = {
|
|
3161
|
+
outName: `subpax_${designName}_buttress_${idx}`,
|
|
3162
|
+
face: `${designName}_faceButtress`,
|
|
3163
|
+
extrudeMethod: EExtrude6.eLinearOrtho,
|
|
3164
|
+
length: param.H1,
|
|
3165
|
+
rotate: [0, 0, 0],
|
|
3166
|
+
translate: [0, 0, pz]
|
|
3167
|
+
};
|
|
3168
|
+
return rElem;
|
|
3169
|
+
})
|
|
3076
3170
|
],
|
|
3077
3171
|
volumes: [
|
|
3078
3172
|
{
|
|
3079
3173
|
outName: `pax_${designName}`,
|
|
3080
3174
|
boolMethod: EBVolume7.eUnion,
|
|
3081
|
-
inList: [
|
|
3175
|
+
inList: [
|
|
3176
|
+
`subpax_${designName}_side`,
|
|
3177
|
+
`subpax_${designName}_face`,
|
|
3178
|
+
...facePx.map((pz, idx) => {
|
|
3179
|
+
const subElem = `subpax_${designName}_buttress_${idx}`;
|
|
3180
|
+
return subElem;
|
|
3181
|
+
})
|
|
3182
|
+
]
|
|
3082
3183
|
}
|
|
3083
3184
|
]
|
|
3084
3185
|
};
|
|
@@ -3196,7 +3297,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
3196
3297
|
`;
|
|
3197
3298
|
const posAngleMid = (param.al - param.ar) / 2;
|
|
3198
3299
|
const posAngleDegree = posAngleMid - Math.sin(2 * Math.PI * t / pDef8.sim.tMax) * (param.al + param.ar) / 2;
|
|
3199
|
-
const posAngle =
|
|
3300
|
+
const posAngle = degToRad5(posAngleDegree);
|
|
3200
3301
|
rGeome.logstr += `swing position angle: ${ffix10(radToDeg6(posAngle))} degree
|
|
3201
3302
|
`;
|
|
3202
3303
|
const rakePosY = param.H1 + param.H2 - param.H3;
|
|
@@ -3421,7 +3522,7 @@ import {
|
|
|
3421
3522
|
checkGeom as checkGeom5,
|
|
3422
3523
|
prefixLog as prefixLog5,
|
|
3423
3524
|
figure as figure10,
|
|
3424
|
-
degToRad as
|
|
3525
|
+
degToRad as degToRad6,
|
|
3425
3526
|
radToDeg as radToDeg8,
|
|
3426
3527
|
ffix as ffix12,
|
|
3427
3528
|
pNumber as pNumber10,
|
|
@@ -3435,8 +3536,9 @@ import {
|
|
|
3435
3536
|
designParam as designParam4,
|
|
3436
3537
|
checkGeom as checkGeom4,
|
|
3437
3538
|
prefixLog as prefixLog4,
|
|
3438
|
-
contour as contour10,
|
|
3439
3539
|
contourCircle as contourCircle8,
|
|
3540
|
+
ctrRectangle as ctrRectangle3,
|
|
3541
|
+
ctrRectRot as ctrRectRot2,
|
|
3440
3542
|
figure as figure9,
|
|
3441
3543
|
radToDeg as radToDeg7,
|
|
3442
3544
|
ffix as ffix11,
|
|
@@ -3482,10 +3584,26 @@ var pDef9 = {
|
|
|
3482
3584
|
pNumber9("H7", "mm", 600, 1, 2e3, 1),
|
|
3483
3585
|
pNumber9("L9", "mm", 300, 1, 1e3, 1),
|
|
3484
3586
|
pNumber9("R9", "mm", 50, 0, 300, 1),
|
|
3485
|
-
|
|
3587
|
+
pNumber9("doorOrientation", "degree", 0, -180, 180, 1),
|
|
3588
|
+
pSectionSeparator8("stoppers"),
|
|
3486
3589
|
pNumber9("S1", "mm", 100, 1, 300, 1),
|
|
3487
3590
|
pNumber9("S2", "mm", 2e3, 1, 8e3, 1),
|
|
3488
|
-
pNumber9("
|
|
3591
|
+
pNumber9("S3", "mm", 100, 0, 8e3, 1),
|
|
3592
|
+
pNumber9("E7", "mm", 5, 1, 80, 1),
|
|
3593
|
+
pSectionSeparator8("low stopper"),
|
|
3594
|
+
pNumber9("JD1", "mm", 200, 1, 500, 1),
|
|
3595
|
+
pNumber9("JE1", "mm", 5, 1, 80, 1),
|
|
3596
|
+
pNumber9("JL1", "mm", 260, 1, 2e3, 1),
|
|
3597
|
+
pNumber9("JH1", "mm", 20, -500, 500, 1),
|
|
3598
|
+
pNumber9("JS1", "mm", 100, 1, 500, 1),
|
|
3599
|
+
pNumber9("JS2", "mm", 200, 1, 500, 1),
|
|
3600
|
+
pSectionSeparator8("high stopper"),
|
|
3601
|
+
pNumber9("JD3", "mm", 200, 1, 500, 1),
|
|
3602
|
+
pNumber9("JE3", "mm", 5, 1, 80, 1),
|
|
3603
|
+
pNumber9("JS3", "mm", 120, 1, 500, 1),
|
|
3604
|
+
pNumber9("JD4", "mm", 200, 1, 500, 1),
|
|
3605
|
+
pNumber9("JE4", "mm", 5, 1, 80, 1),
|
|
3606
|
+
pNumber9("JS4", "mm", 120, 1, 500, 1)
|
|
3489
3607
|
],
|
|
3490
3608
|
paramSvg: {
|
|
3491
3609
|
D1: "rake_face.svg",
|
|
@@ -3516,9 +3634,23 @@ var pDef9 = {
|
|
|
3516
3634
|
H7: "rake_door.svg",
|
|
3517
3635
|
L9: "rake_door.svg",
|
|
3518
3636
|
R9: "rake_door.svg",
|
|
3637
|
+
doorOrientation: "rake_door.svg",
|
|
3519
3638
|
S1: "rake_side_stopper.svg",
|
|
3520
3639
|
S2: "rake_top_stopper.svg",
|
|
3521
|
-
|
|
3640
|
+
S3: "rake_side_stopper.svg",
|
|
3641
|
+
E7: "rake_side_stopper.svg",
|
|
3642
|
+
JD1: "rake_low_stopper_holder.svg",
|
|
3643
|
+
JE1: "rake_low_stopper_holder.svg",
|
|
3644
|
+
JL1: "rake_low_stopper_holder.svg",
|
|
3645
|
+
JH1: "rake_low_stopper_holder.svg",
|
|
3646
|
+
JS1: "rake_side_stopper.svg",
|
|
3647
|
+
JS2: "rake_top_stopper.svg",
|
|
3648
|
+
JD3: "rake_side_stopper.svg",
|
|
3649
|
+
JE3: "rake_side_stopper.svg",
|
|
3650
|
+
JS3: "rake_top_stopper.svg",
|
|
3651
|
+
JD4: "rake_top_stopper.svg",
|
|
3652
|
+
JE4: "rake_top_stopper.svg",
|
|
3653
|
+
JS4: "rake_side_stopper.svg"
|
|
3522
3654
|
},
|
|
3523
3655
|
sim: {
|
|
3524
3656
|
tMax: 180,
|
|
@@ -3529,7 +3661,6 @@ var pDef9 = {
|
|
|
3529
3661
|
};
|
|
3530
3662
|
function pGeom9(t, param, suffix = "") {
|
|
3531
3663
|
const rGeome = initGeom9(pDef9.partName + suffix);
|
|
3532
|
-
let ctrRect;
|
|
3533
3664
|
const figCone = figure9();
|
|
3534
3665
|
const figBeam = figure9();
|
|
3535
3666
|
const figBeamHollow = figure9();
|
|
@@ -3545,36 +3676,80 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3545
3676
|
const figStopperFaceTH = figure9();
|
|
3546
3677
|
const figStopperFaceB = figure9();
|
|
3547
3678
|
const figStopperFaceBH = figure9();
|
|
3679
|
+
const figLowStopperHolderPre = figure9();
|
|
3680
|
+
const figLowStopperHolder = figure9();
|
|
3681
|
+
const figHi1StopperHolder = figure9();
|
|
3682
|
+
const figHi2StopperHolder = figure9();
|
|
3548
3683
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
3549
3684
|
`;
|
|
3550
3685
|
try {
|
|
3551
3686
|
const R1 = param.D1 / 2;
|
|
3552
3687
|
const H1H2 = param.H1 + param.H2;
|
|
3553
3688
|
const H1H5 = H1H2 - param.H4 + param.H5;
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3689
|
+
const stopper1H = H1H5 - param.S2;
|
|
3690
|
+
const Hi2SHpz = param.H1 + param.H2 - param.H4;
|
|
3691
|
+
const stopper2H = Hi2SHpz + param.D4 / 2;
|
|
3692
|
+
const stopper3H = param.H1 + param.S3;
|
|
3693
|
+
const L5h = param.L5 / 2;
|
|
3694
|
+
const S1r = param.S1 / 2;
|
|
3695
|
+
const S1h = param.S1 - 2 * param.E7;
|
|
3696
|
+
const S1hr = S1h / 2;
|
|
3697
|
+
const lowStopperTopPosX = -R1 - param.S1 / 2 - param.JS1;
|
|
3698
|
+
const S2s = param.S2 - S1r;
|
|
3699
|
+
const lowSPosY = stopper1H - S1r;
|
|
3700
|
+
const lowSHPosZ = stopper1H - param.JH1;
|
|
3701
|
+
const JR1 = param.JD1 / 2;
|
|
3702
|
+
const JR1H = JR1 - param.JE1;
|
|
3703
|
+
const lowSHL = R1 + param.JS2;
|
|
3704
|
+
const JR3 = param.JD3 / 2;
|
|
3705
|
+
const JR4 = param.JD4 / 2;
|
|
3706
|
+
const Hi2SHpy = L5h - S1r;
|
|
3558
3707
|
if (2 * param.E7 >= param.S1) {
|
|
3559
3708
|
throw `err135: E7 ${param.E7} too large compare to S1 ${param.S1}`;
|
|
3560
3709
|
}
|
|
3561
3710
|
if (param.L5 < param.D2) {
|
|
3562
3711
|
throw `err138: L5 ${param.L5} too small compare to D2 ${param.D2}`;
|
|
3563
3712
|
}
|
|
3564
|
-
|
|
3565
|
-
if (stopper1H < 0) {
|
|
3713
|
+
if (stopper1H - param.JH1 - param.JD1 / 2 < 0) {
|
|
3566
3714
|
throw `err143: S2 ${param.S2} too large compare to H1H5 ${ffix11(H1H5)}`;
|
|
3567
3715
|
}
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3716
|
+
if (param.JS1 < param.S1 / 2) {
|
|
3717
|
+
throw `err144: JS1 ${param.JS1} too small compare to S1 ${param.S1}`;
|
|
3718
|
+
}
|
|
3719
|
+
if (param.JE1 > param.JD1 / 2) {
|
|
3720
|
+
throw `err145: JE1 ${param.JE1} too large compare to JD1 ${param.JD1}`;
|
|
3721
|
+
}
|
|
3722
|
+
if (param.JL1 > param.D1) {
|
|
3723
|
+
throw `err146: JL1 ${param.JL1} too large compare to D1 ${param.D1}`;
|
|
3724
|
+
}
|
|
3725
|
+
if (param.JL1 < param.JD1) {
|
|
3726
|
+
throw `err147: JL1 ${param.JL1} too small compare to JD1 ${param.JD1}`;
|
|
3727
|
+
}
|
|
3728
|
+
if (Math.abs(param.JH1) > param.JD1 / 2 + S1r) {
|
|
3729
|
+
throw `err148: JH1 ${param.JH1} too large compare to JD1 ${param.JD1} and S1 ${param.S1}`;
|
|
3730
|
+
}
|
|
3731
|
+
if (param.JS2 < param.JS1 - S1r) {
|
|
3732
|
+
throw `err149: JS2 ${param.JS2} too small compare to JS1 ${param.JS1} and S1 ${param.S1}`;
|
|
3733
|
+
}
|
|
3734
|
+
if (param.S3 > param.H2 - param.H4) {
|
|
3735
|
+
throw `err150: S3 ${param.S3} too large compare to H2 ${param.H2} and H4 ${param.H4}`;
|
|
3736
|
+
}
|
|
3737
|
+
if (param.JE3 > param.JD3 / 2) {
|
|
3738
|
+
throw `err151: JE3 ${param.JE3} too large compare to JD3 ${param.JD3}`;
|
|
3739
|
+
}
|
|
3740
|
+
if (param.JE4 > param.JD4 / 2) {
|
|
3741
|
+
throw `err152: JE4 ${param.JE4} too large compare to JD4 ${param.JD4}`;
|
|
3742
|
+
}
|
|
3743
|
+
rGeome.logstr += `cone-height: ${ffix11(H1H2)} mm
|
|
3744
|
+
`;
|
|
3745
|
+
rGeome.logstr += `cone-height total: ${ffix11(H1H5)} mm
|
|
3746
|
+
`;
|
|
3747
|
+
figLowStopperHolderPre.addSecond(ctrRectangle3(-L5h, lowSPosY, param.L5, param.S1));
|
|
3748
|
+
figLowStopperHolderPre.addSecond(ctrRectangle3(-L5h, lowSPosY + param.E7, param.L5, S1h));
|
|
3749
|
+
figLowStopperHolderPre.addMain(contourCircle8(-param.JL1 / 2, lowSHPosZ, JR1));
|
|
3750
|
+
figLowStopperHolderPre.addMain(contourCircle8(-param.JL1 / 2, lowSHPosZ, JR1H));
|
|
3751
|
+
figLowStopperHolderPre.addMain(contourCircle8(param.JL1 / 2, lowSHPosZ, JR1));
|
|
3752
|
+
figLowStopperHolderPre.addMain(contourCircle8(param.JL1 / 2, lowSHPosZ, JR1H));
|
|
3578
3753
|
const rakeParam = designParam4(rakeDef.pDef);
|
|
3579
3754
|
rakeParam.setVal("D1", param.D1);
|
|
3580
3755
|
rakeParam.setVal("D2", param.D2);
|
|
@@ -3604,10 +3779,12 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3604
3779
|
rakeParam.setVal("H7", param.H7);
|
|
3605
3780
|
rakeParam.setVal("L9", param.L9);
|
|
3606
3781
|
rakeParam.setVal("R9", param.R9);
|
|
3782
|
+
rakeParam.setVal("doorOrientation", param.doorOrientation);
|
|
3607
3783
|
const rakeGeom = rakeDef.pGeom(0, rakeParam.getParamVal(), rakeParam.getSuffix());
|
|
3608
3784
|
checkGeom4(rakeGeom);
|
|
3609
3785
|
rGeome.logstr += prefixLog4(rakeGeom.logstr, rakeParam.getPartNameSuffix());
|
|
3610
3786
|
figCone.mergeFigure(rakeGeom.fig.faceCone);
|
|
3787
|
+
figCone.mergeFigure(figLowStopperHolderPre, true);
|
|
3611
3788
|
figBeam.mergeFigure(rakeGeom.fig.faceBeam);
|
|
3612
3789
|
figBeamHollow.mergeFigure(rakeGeom.fig.faceBeamHollow);
|
|
3613
3790
|
figDisc.mergeFigure(rakeGeom.fig.faceDisc);
|
|
@@ -3615,71 +3792,106 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3615
3792
|
figWing.mergeFigure(rakeGeom.fig.faceWing);
|
|
3616
3793
|
figWingHollow.mergeFigure(rakeGeom.fig.faceWingHollow);
|
|
3617
3794
|
figDoor.mergeFigure(rakeGeom.fig.faceDoor);
|
|
3795
|
+
figDoor.mergeFigure(figLowStopperHolderPre, true);
|
|
3618
3796
|
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
|
-
|
|
3797
|
+
figStopperTop.addMain(ctrRectangle3(lowStopperTopPosX, -L5h, param.S1, param.L5));
|
|
3798
|
+
figStopperTop.addMain(ctrRectangle3(lowStopperTopPosX + param.E7, -L5h, S1h, param.L5));
|
|
3799
|
+
figStopperTop.addMain(ctrRectangle3(param.S2 - param.S1, -L5h, param.S1, param.L5));
|
|
3800
|
+
figStopperTop.addMain(ctrRectangle3(param.S2 - param.E7 - S1h, -L5h, S1h, param.L5));
|
|
3801
|
+
figStopperTop.addMain(ctrRectangle3(0, -L5h, S2s, param.S1));
|
|
3802
|
+
figStopperTop.addMain(ctrRectangle3(0, -L5h + param.E7, S2s, S1h));
|
|
3803
|
+
figStopperTop.addMain(ctrRectangle3(0, L5h - param.S1, S2s, param.S1));
|
|
3804
|
+
figStopperTop.addMain(ctrRectangle3(0, L5h - param.S1 + param.E7, S2s, S1h));
|
|
3805
|
+
figStopperTop.addMain(ctrRectangle3(0, -R1 - param.S1, S2s, param.S1));
|
|
3806
|
+
figStopperTop.addMain(ctrRectangle3(0, -R1 - param.S1 + param.E7, S2s, S1h));
|
|
3807
|
+
figStopperTop.addMain(ctrRectangle3(0, R1, S2s, param.S1));
|
|
3808
|
+
figStopperTop.addMain(ctrRectangle3(0, R1 + param.E7, S2s, S1h));
|
|
3809
|
+
figStopperTop.addSecond(ctrRectangle3(-lowSHL, -param.JL1 / 2 - JR1, lowSHL, 2 * JR1));
|
|
3810
|
+
figStopperTop.addSecond(ctrRectangle3(-lowSHL, -param.JL1 / 2 - JR1H, lowSHL, 2 * JR1H));
|
|
3811
|
+
figStopperTop.addSecond(ctrRectangle3(-lowSHL, param.JL1 / 2 - JR1, lowSHL, 2 * JR1));
|
|
3812
|
+
figStopperTop.addSecond(ctrRectangle3(-lowSHL, param.JL1 / 2 - JR1H, lowSHL, 2 * JR1H));
|
|
3813
|
+
const Hi1SHL = R1 + param.JS3;
|
|
3814
|
+
const Hi1SHW = param.JD3 - 2 * param.JE3;
|
|
3815
|
+
figStopperTop.addSecond(ctrRectangle3(-param.JD3 / 2, -Hi1SHL, param.JD3, Hi1SHL));
|
|
3816
|
+
figStopperTop.addSecond(ctrRectangle3(-param.JD3 / 2 + param.JE3, -Hi1SHL, Hi1SHW, Hi1SHL));
|
|
3817
|
+
figStopperTop.addSecond(ctrRectangle3(-param.JD3 / 2, 0, param.JD3, Hi1SHL));
|
|
3818
|
+
figStopperTop.addSecond(ctrRectangle3(-param.JD3 / 2 + param.JE3, 0, Hi1SHW, Hi1SHL));
|
|
3636
3819
|
figStopperSide.mergeFigure(rakeGeom.fig.faceBeam, true);
|
|
3637
|
-
figStopperSide.addMain(contourCircle8(-R1 -
|
|
3638
|
-
figStopperSide.addMain(contourCircle8(-R1 -
|
|
3639
|
-
figStopperSide.addMain(contourCircle8(
|
|
3640
|
-
figStopperSide.addMain(contourCircle8(
|
|
3641
|
-
figStopperSide.addSecond(
|
|
3642
|
-
figStopperSide.addSecond(
|
|
3643
|
-
const stopper3Ly = stopper2H +
|
|
3644
|
-
const
|
|
3645
|
-
const
|
|
3646
|
-
rGeome.logstr += `stopper-rod: L ${ffix11(
|
|
3647
|
-
radToDeg7(stopper3A)
|
|
3648
|
-
)} degree
|
|
3820
|
+
figStopperSide.addMain(contourCircle8(-R1 - param.JS1, stopper1H, S1r));
|
|
3821
|
+
figStopperSide.addMain(contourCircle8(-R1 - param.JS1, stopper1H, S1hr));
|
|
3822
|
+
figStopperSide.addMain(contourCircle8(S2s, stopper2H + S1r, S1r));
|
|
3823
|
+
figStopperSide.addMain(contourCircle8(S2s, stopper2H + S1r, S1hr));
|
|
3824
|
+
figStopperSide.addSecond(ctrRectangle3(0, stopper2H, S2s, param.S1));
|
|
3825
|
+
figStopperSide.addSecond(ctrRectangle3(0, stopper2H + param.E7, S2s, S1h));
|
|
3826
|
+
const stopper3Ly = stopper2H + S1r - stopper3H;
|
|
3827
|
+
const stp3L = Math.sqrt(S2s ** 2 + stopper3Ly ** 2);
|
|
3828
|
+
const stp3A = Math.atan2(stopper3Ly, S2s);
|
|
3829
|
+
rGeome.logstr += `stopper-rod: L ${ffix11(stp3L)} mm, A ${ffix11(radToDeg7(stp3A))} degree
|
|
3649
3830
|
`;
|
|
3650
|
-
const stp3posdX = S1r * Math.sin(
|
|
3651
|
-
const stp3posdY = S1r * Math.cos(
|
|
3831
|
+
const stp3posdX = S1r * Math.sin(stp3A);
|
|
3832
|
+
const stp3posdY = S1r * Math.cos(stp3A);
|
|
3652
3833
|
const stp3posY = stopper3H - stp3posdY;
|
|
3653
|
-
figStopperSide.addSecond(
|
|
3654
|
-
const stp3posdX2 = S1hr * Math.sin(
|
|
3655
|
-
const stp3posdY2 = S1hr * Math.cos(
|
|
3834
|
+
figStopperSide.addSecond(ctrRectRot2(stp3posdX, stp3posY, stp3L, param.S1, stp3A));
|
|
3835
|
+
const stp3posdX2 = S1hr * Math.sin(stp3A);
|
|
3836
|
+
const stp3posdY2 = S1hr * Math.cos(stp3A);
|
|
3656
3837
|
const stp3posY2 = stopper3H - stp3posdY2;
|
|
3657
|
-
figStopperSide.addSecond(
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3838
|
+
figStopperSide.addSecond(ctrRectRot2(stp3posdX2, stp3posY2, stp3L, S1h, stp3A));
|
|
3839
|
+
figStopperSide.addSecond(ctrRectangle3(-lowSHL, lowSHPosZ - JR1, lowSHL, 2 * JR1));
|
|
3840
|
+
figStopperSide.addSecond(ctrRectangle3(-lowSHL, lowSHPosZ - JR1H, lowSHL, 2 * JR1H));
|
|
3841
|
+
figStopperSide.addSecond(contourCircle8(0, stopper3H, param.JD3 / 2));
|
|
3842
|
+
figStopperSide.addSecond(contourCircle8(0, stopper3H, param.JD3 / 2 - param.JE3));
|
|
3843
|
+
const Hi2SHL = param.D4 / 2 + param.JS4;
|
|
3844
|
+
const Hi2SHW2 = param.JD4 / 2 - param.JE4;
|
|
3845
|
+
figStopperSide.addSecond(ctrRectangle3(-param.JD4 / 2, Hi2SHpz, param.JD4, Hi2SHL));
|
|
3846
|
+
figStopperSide.addSecond(ctrRectangle3(-Hi2SHW2, Hi2SHpz, 2 * Hi2SHW2, Hi2SHL));
|
|
3847
|
+
figStopperSideH.mergeFigure(figStopperSide, true);
|
|
3848
|
+
figStopperSideH.addMain(contourCircle8(-R1 - param.JS1, stopper1H, S1hr));
|
|
3662
3849
|
figStopperSideH.addMain(contourCircle8(param.S2 - S1r, stopper2H + S1r, S1hr));
|
|
3663
3850
|
figStopperFaceT.mergeFigure(rakeGeom.fig.faceCone, true);
|
|
3851
|
+
figStopperFaceT.mergeFigure(figLowStopperHolderPre, true);
|
|
3664
3852
|
figStopperFaceT.addMain(contourCircle8(-param.L5 / 2 + S1r, stopper2H + S1r, S1r));
|
|
3665
3853
|
figStopperFaceT.addMain(contourCircle8(-param.L5 / 2 + S1r, stopper2H + S1r, S1hr));
|
|
3666
3854
|
figStopperFaceT.addMain(contourCircle8(param.L5 / 2 - S1r, stopper2H + S1r, S1r));
|
|
3667
3855
|
figStopperFaceT.addMain(contourCircle8(param.L5 / 2 - S1r, stopper2H + S1r, S1hr));
|
|
3668
3856
|
figStopperFaceTH.mergeFigure(rakeGeom.fig.faceCone, true);
|
|
3857
|
+
figStopperFaceTH.mergeFigure(figLowStopperHolderPre, true);
|
|
3669
3858
|
figStopperFaceTH.addSecond(contourCircle8(-param.L5 / 2 + S1r, stopper2H + S1r, S1r));
|
|
3670
3859
|
figStopperFaceTH.addMain(contourCircle8(-param.L5 / 2 + S1r, stopper2H + S1r, S1hr));
|
|
3671
3860
|
figStopperFaceTH.addSecond(contourCircle8(param.L5 / 2 - S1r, stopper2H + S1r, S1r));
|
|
3672
3861
|
figStopperFaceTH.addMain(contourCircle8(param.L5 / 2 - S1r, stopper2H + S1r, S1hr));
|
|
3673
3862
|
figStopperFaceB.mergeFigure(rakeGeom.fig.faceCone, true);
|
|
3863
|
+
figStopperFaceB.mergeFigure(figLowStopperHolderPre, true);
|
|
3674
3864
|
figStopperFaceB.addMain(contourCircle8(-R1 - S1r, 0, S1r));
|
|
3675
3865
|
figStopperFaceB.addMain(contourCircle8(-R1 - S1r, 0, S1hr));
|
|
3676
3866
|
figStopperFaceB.addMain(contourCircle8(R1 + S1r, 0, S1r));
|
|
3677
3867
|
figStopperFaceB.addMain(contourCircle8(R1 + S1r, 0, S1hr));
|
|
3678
3868
|
figStopperFaceBH.mergeFigure(rakeGeom.fig.faceCone, true);
|
|
3869
|
+
figStopperFaceBH.mergeFigure(figLowStopperHolderPre, true);
|
|
3679
3870
|
figStopperFaceBH.addSecond(contourCircle8(-R1 - S1r, 0, S1r));
|
|
3680
3871
|
figStopperFaceBH.addMain(contourCircle8(-R1 - S1r, 0, S1hr));
|
|
3681
3872
|
figStopperFaceBH.addSecond(contourCircle8(R1 + S1r, 0, S1r));
|
|
3682
3873
|
figStopperFaceBH.addMain(contourCircle8(R1 + S1r, 0, S1hr));
|
|
3874
|
+
figLowStopperHolder.mergeFigure(rakeGeom.fig.faceCone, true);
|
|
3875
|
+
figLowStopperHolder.mergeFigure(figLowStopperHolderPre);
|
|
3876
|
+
const px8 = -Hi2SHpy - Hi2SHW2;
|
|
3877
|
+
const px9 = Hi2SHpy - Hi2SHW2;
|
|
3878
|
+
const py10 = stopper3H - Hi1SHW / 2;
|
|
3879
|
+
figLowStopperHolder.addSecond(ctrRectangle3(-Hi2SHpy - JR4, Hi2SHpz, param.JD4, Hi2SHL));
|
|
3880
|
+
figLowStopperHolder.addSecond(ctrRectangle3(px8, Hi2SHpz, 2 * Hi2SHW2, Hi2SHL));
|
|
3881
|
+
figLowStopperHolder.addSecond(ctrRectangle3(Hi2SHpy - JR4, Hi2SHpz, param.JD4, Hi2SHL));
|
|
3882
|
+
figLowStopperHolder.addSecond(ctrRectangle3(px9, Hi2SHpz, 2 * Hi2SHW2, Hi2SHL));
|
|
3883
|
+
figLowStopperHolder.addSecond(ctrRectangle3(-Hi1SHL, stopper3H - JR3, Hi1SHL, param.JD3));
|
|
3884
|
+
figLowStopperHolder.addSecond(ctrRectangle3(-Hi1SHL, py10, Hi1SHL, Hi1SHW));
|
|
3885
|
+
figLowStopperHolder.addSecond(ctrRectangle3(0, stopper3H - JR3, Hi1SHL, param.JD3));
|
|
3886
|
+
figLowStopperHolder.addSecond(ctrRectangle3(0, stopper3H - Hi1SHW / 2, Hi1SHL, Hi1SHW));
|
|
3887
|
+
figHi1StopperHolder.mergeFigure(figStopperSide, true);
|
|
3888
|
+
figHi1StopperHolder.addMain(contourCircle8(0, stopper3H, param.JD3 / 2));
|
|
3889
|
+
figHi1StopperHolder.addMain(contourCircle8(0, stopper3H, param.JD3 / 2 - param.JE3));
|
|
3890
|
+
figHi2StopperHolder.mergeFigure(figStopperTop, true);
|
|
3891
|
+
figHi2StopperHolder.addMain(contourCircle8(0, -Hi2SHpy, JR4));
|
|
3892
|
+
figHi2StopperHolder.addMain(contourCircle8(0, -Hi2SHpy, JR4 - param.JE4));
|
|
3893
|
+
figHi2StopperHolder.addMain(contourCircle8(0, Hi2SHpy, JR4));
|
|
3894
|
+
figHi2StopperHolder.addMain(contourCircle8(0, Hi2SHpy, JR4 - param.JE4));
|
|
3683
3895
|
rGeome.fig = {
|
|
3684
3896
|
faceCone: figCone,
|
|
3685
3897
|
faceBeam: figBeam,
|
|
@@ -3695,7 +3907,10 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3695
3907
|
faceStopperFaceT: figStopperFaceT,
|
|
3696
3908
|
faceStopperFaceTH: figStopperFaceTH,
|
|
3697
3909
|
faceStopperFaceB: figStopperFaceB,
|
|
3698
|
-
faceStopperFaceBH: figStopperFaceBH
|
|
3910
|
+
faceStopperFaceBH: figStopperFaceBH,
|
|
3911
|
+
faceLowStopperHolder: figLowStopperHolder,
|
|
3912
|
+
faceHi1StopperHolder: figHi1StopperHolder,
|
|
3913
|
+
faceHi2StopperHolder: figHi2StopperHolder
|
|
3699
3914
|
};
|
|
3700
3915
|
const designName = rGeome.partName;
|
|
3701
3916
|
rGeome.vol = {
|
|
@@ -3706,6 +3921,20 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3706
3921
|
subgeom: rakeGeom,
|
|
3707
3922
|
rotate: [0, 0, 0],
|
|
3708
3923
|
translate: [0, 0, 0]
|
|
3924
|
+
},
|
|
3925
|
+
{
|
|
3926
|
+
outName: `inpax_${designName}_coneHollow`,
|
|
3927
|
+
subdesign: "subpax_rake_coneHollow",
|
|
3928
|
+
subgeom: rakeGeom,
|
|
3929
|
+
rotate: [0, 0, 0],
|
|
3930
|
+
translate: [0, 0, 0]
|
|
3931
|
+
},
|
|
3932
|
+
{
|
|
3933
|
+
outName: `inpax_${designName}_beamHollow`,
|
|
3934
|
+
subdesign: "subpax_rake_beamHollow",
|
|
3935
|
+
subgeom: rakeGeom,
|
|
3936
|
+
rotate: [0, 0, 0],
|
|
3937
|
+
translate: [0, 0, 0]
|
|
3709
3938
|
}
|
|
3710
3939
|
],
|
|
3711
3940
|
extrudes: [
|
|
@@ -3745,17 +3974,49 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3745
3974
|
outName: `subpax_${designName}_stpFaceB`,
|
|
3746
3975
|
face: `${designName}_faceStopperFaceB`,
|
|
3747
3976
|
extrudeMethod: EExtrude7.eLinearOrtho,
|
|
3748
|
-
length:
|
|
3749
|
-
rotate: [Math.PI / 2 -
|
|
3977
|
+
length: stp3L,
|
|
3978
|
+
rotate: [Math.PI / 2 - stp3A, 0, Math.PI / 2],
|
|
3750
3979
|
translate: [0, 0, stopper3H]
|
|
3751
3980
|
},
|
|
3752
3981
|
{
|
|
3753
3982
|
outName: `subpax_${designName}_stpFaceBH`,
|
|
3754
3983
|
face: `${designName}_faceStopperFaceBH`,
|
|
3755
3984
|
extrudeMethod: EExtrude7.eLinearOrtho,
|
|
3756
|
-
length:
|
|
3757
|
-
rotate: [Math.PI / 2 -
|
|
3985
|
+
length: stp3L,
|
|
3986
|
+
rotate: [Math.PI / 2 - stp3A, 0, Math.PI / 2],
|
|
3758
3987
|
translate: [0, 0, stopper3H]
|
|
3988
|
+
},
|
|
3989
|
+
{
|
|
3990
|
+
outName: `subpax_${designName}_lowSH`,
|
|
3991
|
+
face: `${designName}_faceLowStopperHolder`,
|
|
3992
|
+
extrudeMethod: EExtrude7.eLinearOrtho,
|
|
3993
|
+
length: lowSHL,
|
|
3994
|
+
rotate: [Math.PI / 2, 0, -Math.PI / 2],
|
|
3995
|
+
translate: [0, 0, 0]
|
|
3996
|
+
},
|
|
3997
|
+
{
|
|
3998
|
+
outName: `subpax_${designName}_Hi1SH1`,
|
|
3999
|
+
face: `${designName}_faceHi1StopperHolder`,
|
|
4000
|
+
extrudeMethod: EExtrude7.eLinearOrtho,
|
|
4001
|
+
length: Hi1SHL,
|
|
4002
|
+
rotate: [Math.PI / 2, 0, 0],
|
|
4003
|
+
translate: [0, 0, 0]
|
|
4004
|
+
},
|
|
4005
|
+
{
|
|
4006
|
+
outName: `subpax_${designName}_Hi1SH2`,
|
|
4007
|
+
face: `${designName}_faceHi1StopperHolder`,
|
|
4008
|
+
extrudeMethod: EExtrude7.eLinearOrtho,
|
|
4009
|
+
length: Hi1SHL,
|
|
4010
|
+
rotate: [Math.PI / 2, 0, Math.PI],
|
|
4011
|
+
translate: [0, 0, 0]
|
|
4012
|
+
},
|
|
4013
|
+
{
|
|
4014
|
+
outName: `subpax_${designName}_Hi2SH`,
|
|
4015
|
+
face: `${designName}_faceHi2StopperHolder`,
|
|
4016
|
+
extrudeMethod: EExtrude7.eLinearOrtho,
|
|
4017
|
+
length: Hi2SHL,
|
|
4018
|
+
rotate: [0, 0, 0],
|
|
4019
|
+
translate: [0, 0, Hi2SHpz]
|
|
3759
4020
|
}
|
|
3760
4021
|
],
|
|
3761
4022
|
volumes: [
|
|
@@ -3765,13 +4026,19 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3765
4026
|
inList: [
|
|
3766
4027
|
`subpax_${designName}_stpSide`,
|
|
3767
4028
|
`subpax_${designName}_stpFaceT`,
|
|
3768
|
-
`subpax_${designName}_stpFaceB
|
|
4029
|
+
`subpax_${designName}_stpFaceB`,
|
|
4030
|
+
`subpax_${designName}_lowSH`,
|
|
4031
|
+
`subpax_${designName}_Hi1SH1`,
|
|
4032
|
+
`subpax_${designName}_Hi1SH2`,
|
|
4033
|
+
`subpax_${designName}_Hi2SH`
|
|
3769
4034
|
]
|
|
3770
4035
|
},
|
|
3771
4036
|
{
|
|
3772
4037
|
outName: `ipax_${designName}_hollow`,
|
|
3773
4038
|
boolMethod: EBVolume9.eUnion,
|
|
3774
4039
|
inList: [
|
|
4040
|
+
`inpax_${designName}_coneHollow`,
|
|
4041
|
+
`inpax_${designName}_beamHollow`,
|
|
3775
4042
|
`subpax_${designName}_stpSideH`,
|
|
3776
4043
|
`subpax_${designName}_stpFaceTH`,
|
|
3777
4044
|
`subpax_${designName}_stpFaceBH`
|
|
@@ -3893,7 +4160,7 @@ function pGeom10(t, param, suffix = "") {
|
|
|
3893
4160
|
rGeome.logstr += `heliostat-swing-length: ${ffix12(param.L1)}, width ${ffix12(param.L2)} m
|
|
3894
4161
|
`;
|
|
3895
4162
|
const posAngleDegree = param.al * t / pDef10.sim.tMax;
|
|
3896
|
-
const posAngle =
|
|
4163
|
+
const posAngle = degToRad6(posAngleDegree);
|
|
3897
4164
|
rGeome.logstr += `swing position angle: ${ffix12(radToDeg8(posAngle))} degree
|
|
3898
4165
|
`;
|
|
3899
4166
|
const rakePosY = param.H1 + param.H2 - param.H3;
|
|
@@ -4085,7 +4352,7 @@ var heliostat_2Def = {
|
|
|
4085
4352
|
|
|
4086
4353
|
// src/heliostat/base.ts
|
|
4087
4354
|
import {
|
|
4088
|
-
contour as
|
|
4355
|
+
contour as contour10,
|
|
4089
4356
|
contourCircle as contourCircle9,
|
|
4090
4357
|
figure as figure11,
|
|
4091
4358
|
ffix as ffix13,
|
|
@@ -4172,11 +4439,11 @@ function pGeom11(t, param, suffix = "") {
|
|
|
4172
4439
|
rGeome.logstr += `inter-hollow: ${ffix13(interHollow)} mm
|
|
4173
4440
|
`;
|
|
4174
4441
|
ctrBaseCut1 = function(orient) {
|
|
4175
|
-
const rBaseCut1 =
|
|
4442
|
+
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
4443
|
return rBaseCut1;
|
|
4177
4444
|
};
|
|
4178
4445
|
ctrBaseCut2 = function(orient) {
|
|
4179
|
-
const rBaseCut2 =
|
|
4446
|
+
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
4447
|
return rBaseCut2;
|
|
4181
4448
|
};
|
|
4182
4449
|
if (param.H1 < param.E3 + param.H2 + param.H3 + param.E1) {
|
|
@@ -4191,7 +4458,7 @@ function pGeom11(t, param, suffix = "") {
|
|
|
4191
4458
|
}
|
|
4192
4459
|
const hollowH = param.E3 + param.H2 + RL2;
|
|
4193
4460
|
ctrHollow = function(orient) {
|
|
4194
|
-
const rHollow =
|
|
4461
|
+
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
4462
|
return rHollow;
|
|
4196
4463
|
};
|
|
4197
4464
|
figCut.addMain(ctrBaseCut1(1));
|
|
@@ -4298,7 +4565,7 @@ var baseDef = {
|
|
|
4298
4565
|
|
|
4299
4566
|
// src/heliostat/vaxis.ts
|
|
4300
4567
|
import {
|
|
4301
|
-
contour as
|
|
4568
|
+
contour as contour11,
|
|
4302
4569
|
contourCircle as contourCircle10,
|
|
4303
4570
|
figure as figure12,
|
|
4304
4571
|
ffix as ffix14,
|
|
@@ -4352,10 +4619,10 @@ function pGeom12(t, param, suffix = "") {
|
|
|
4352
4619
|
const R3 = param.D3 / 2;
|
|
4353
4620
|
rGeome.logstr += `vaxis-height: ${ffix14(param.H1)} mm
|
|
4354
4621
|
`;
|
|
4355
|
-
const ctrCylinder =
|
|
4622
|
+
const ctrCylinder = contour11(R1, 0).addSegStrokeA(R1, param.H1).addSegStrokeA(R1 - param.E1, param.H1).addSegStrokeA(R1 - param.E1, 0).closeSegStroke();
|
|
4356
4623
|
figCut.addMain(ctrCylinder);
|
|
4357
4624
|
ctrPoleProfile = function(orient) {
|
|
4358
|
-
const rPoleProfile =
|
|
4625
|
+
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
4626
|
return rPoleProfile;
|
|
4360
4627
|
};
|
|
4361
4628
|
figCut.addSecond(ctrPoleProfile(1));
|
|
@@ -4431,7 +4698,7 @@ var vaxisDef = {
|
|
|
4431
4698
|
|
|
4432
4699
|
// src/heliostat/ring.ts
|
|
4433
4700
|
import {
|
|
4434
|
-
contour as
|
|
4701
|
+
contour as contour12,
|
|
4435
4702
|
contourCircle as contourCircle11,
|
|
4436
4703
|
figure as figure13,
|
|
4437
4704
|
ffix as ffix15,
|
|
@@ -4503,7 +4770,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4503
4770
|
const tR1 = R3 - param.L2;
|
|
4504
4771
|
const tR2 = tR1 - param.L3;
|
|
4505
4772
|
const tA = 2 * Math.PI / (2 * param.N1);
|
|
4506
|
-
const ctrTeeth =
|
|
4773
|
+
const ctrTeeth = contour12(tR1, 0);
|
|
4507
4774
|
for (let i = 0; i < param.N1; i++) {
|
|
4508
4775
|
const ti1 = 2 * i + 1;
|
|
4509
4776
|
const ti2 = 2 * i + 2;
|
|
@@ -4527,17 +4794,17 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4527
4794
|
figRingTeeth.addMain(contourCircle11(0, 0, R3));
|
|
4528
4795
|
figRingTeeth.addMain(ctrTeeth);
|
|
4529
4796
|
figRingTeeth.addSecond(contourCircle11(0, 0, R1));
|
|
4530
|
-
const ctrInner =
|
|
4797
|
+
const ctrInner = contour12(R1, 0).addSegStrokeA(-R1, 0).addSegStrokeA(-R1, -param.H1).addSegStrokeA(R1, -param.H1).closeSegStroke();
|
|
4531
4798
|
const ctrScrewHole = function(rnl) {
|
|
4532
|
-
const rCtr =
|
|
4799
|
+
const rCtr = contour12(rnl * (R1 + param.L1) + R2, 0).addSegStrokeR(-2 * R2, 0).addSegStrokeR(0, -param.H1).addSegStrokeR(2 * R2, 0).closeSegStroke();
|
|
4533
4800
|
return rCtr;
|
|
4534
4801
|
};
|
|
4535
4802
|
const ctrGearTeeth = function(rnl) {
|
|
4536
|
-
const rCtr =
|
|
4803
|
+
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
4804
|
return rCtr;
|
|
4538
4805
|
};
|
|
4539
4806
|
const ctrL = function(rnl) {
|
|
4540
|
-
const rCtr =
|
|
4807
|
+
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
4808
|
return rCtr;
|
|
4542
4809
|
};
|
|
4543
4810
|
figSection.addSecond(ctrInner);
|
|
@@ -4598,7 +4865,7 @@ var ringDef = {
|
|
|
4598
4865
|
|
|
4599
4866
|
// src/heliostat/ring_guidance.ts
|
|
4600
4867
|
import {
|
|
4601
|
-
contour as
|
|
4868
|
+
contour as contour13,
|
|
4602
4869
|
contourCircle as contourCircle12,
|
|
4603
4870
|
figure as figure14,
|
|
4604
4871
|
ffix as ffix16,
|
|
@@ -4684,7 +4951,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4684
4951
|
figTop.addMain(contourCircle12(R1, 0, R3).rotate(0, 0, i * stepA1));
|
|
4685
4952
|
}
|
|
4686
4953
|
const rect = function(xbl, ybl, width, height) {
|
|
4687
|
-
const rCtr =
|
|
4954
|
+
const rCtr = contour13(xbl, ybl).addSegStrokeR(width, 0).addSegStrokeR(0, height).addSegStrokeR(-width, 0).closeSegStroke();
|
|
4688
4955
|
return rCtr;
|
|
4689
4956
|
};
|
|
4690
4957
|
const w1 = R1 - R6 + R4;
|
|
@@ -4738,10 +5005,11 @@ var ringGuidanceDef = {
|
|
|
4738
5005
|
// src/heliostat/vaxis_guidance.ts
|
|
4739
5006
|
import {
|
|
4740
5007
|
contourCircle as contourCircle13,
|
|
4741
|
-
ctrRectangle as
|
|
5008
|
+
ctrRectangle as ctrRectangle4,
|
|
4742
5009
|
figure as figure15,
|
|
4743
5010
|
ffix as ffix17,
|
|
4744
5011
|
pNumber as pNumber15,
|
|
5012
|
+
pDropdown as pDropdown2,
|
|
4745
5013
|
pSectionSeparator as pSectionSeparator14,
|
|
4746
5014
|
initGeom as initGeom15,
|
|
4747
5015
|
EExtrude as EExtrude12,
|
|
@@ -4759,18 +5027,22 @@ var pDef15 = {
|
|
|
4759
5027
|
pNumber15("D4", "mm", 50, 1, 200, 1),
|
|
4760
5028
|
pNumber15("L1", "mm", 90, 1, 900, 1),
|
|
4761
5029
|
pNumber15("R5", "mm", 20, 0, 500, 1),
|
|
4762
|
-
pSectionSeparator14("inner
|
|
5030
|
+
pSectionSeparator14("inner"),
|
|
4763
5031
|
pNumber15("D6", "mm", 540, 1, 1e3, 1),
|
|
4764
5032
|
pNumber15("N2", "springs", 6, 1, 24, 1),
|
|
5033
|
+
pDropdown2("orientation", ["ccw", "cw", "alt"]),
|
|
4765
5034
|
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
5035
|
pNumber15("L2", "mm", 100, 1, 900, 1),
|
|
4771
|
-
pNumber15("
|
|
4772
|
-
|
|
4773
|
-
pNumber15("
|
|
5036
|
+
pNumber15("E2", "mm", 20, 1, 200, 1),
|
|
5037
|
+
pSectionSeparator14("spring"),
|
|
5038
|
+
pNumber15("SA1", "degree", 0, -45, 45, 1),
|
|
5039
|
+
pNumber15("SE1", "mm", 10, 1, 200, 1),
|
|
5040
|
+
pNumber15("SD1", "mm", 20, 1, 200, 1),
|
|
5041
|
+
pNumber15("SD2", "mm", 10, 1, 200, 1),
|
|
5042
|
+
pNumber15("SN1", "loops", 2, 0, 8, 1),
|
|
5043
|
+
pNumber15("SL1", "mm", 40, 1, 900, 1),
|
|
5044
|
+
pNumber15("SL2", "mm", 70, 0, 900, 1),
|
|
5045
|
+
pDropdown2("Send", ["round", "pike"]),
|
|
4774
5046
|
pSectionSeparator14("thickness"),
|
|
4775
5047
|
pNumber15("T1", "mm", 10, 1, 200, 1),
|
|
4776
5048
|
pNumber15("Dvaxis", "mm", 260, 5, 1e3, 1)
|
|
@@ -4785,15 +5057,18 @@ var pDef15 = {
|
|
|
4785
5057
|
R5: "vaxis_guidance_top.svg",
|
|
4786
5058
|
D6: "vaxis_guidance_top.svg",
|
|
4787
5059
|
N2: "vaxis_guidance_top.svg",
|
|
5060
|
+
orientation: "vaxis_guidance_top.svg",
|
|
4788
5061
|
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
5062
|
L2: "vaxis_guidance_spring.svg",
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
5063
|
+
E2: "vaxis_guidance_spring.svg",
|
|
5064
|
+
SA1: "vaxis_guidance_spring.svg",
|
|
5065
|
+
SE1: "vaxis_guidance_spring.svg",
|
|
5066
|
+
SD1: "vaxis_guidance_spring.svg",
|
|
5067
|
+
SD2: "vaxis_guidance_spring.svg",
|
|
5068
|
+
SN1: "vaxis_guidance_spring.svg",
|
|
5069
|
+
SL1: "vaxis_guidance_spring.svg",
|
|
5070
|
+
SL2: "vaxis_guidance_spring.svg",
|
|
5071
|
+
Send: "vaxis_guidance_spring.svg",
|
|
4797
5072
|
T1: "vaxis_guidance_top.svg",
|
|
4798
5073
|
Dvaxis: "vaxis_guidance_top.svg"
|
|
4799
5074
|
},
|
|
@@ -4832,10 +5107,10 @@ function pGeom15(t, param, suffix = "") {
|
|
|
4832
5107
|
figTop.addMain(innerCtr);
|
|
4833
5108
|
figTop.addSecond(contourCircle13(0, 0, param.Dvaxis / 2));
|
|
4834
5109
|
const w1 = R1 - R6 + R4;
|
|
4835
|
-
figSection.addMain(
|
|
4836
|
-
figSection.addMain(
|
|
4837
|
-
figSection.addSecond(
|
|
4838
|
-
figSection.addSecond(
|
|
5110
|
+
figSection.addMain(ctrRectangle4(R6, 0, w1, param.T1));
|
|
5111
|
+
figSection.addMain(ctrRectangle4(-R6 - w1, 0, w1, param.T1));
|
|
5112
|
+
figSection.addSecond(ctrRectangle4(R1 - R3, 0, 2 * R3, param.T1));
|
|
5113
|
+
figSection.addSecond(ctrRectangle4(-R1 - R3, 0, 2 * R3, param.T1));
|
|
4839
5114
|
rGeome.fig = {
|
|
4840
5115
|
faceTop: figTop,
|
|
4841
5116
|
faceSection: figSection
|
|
@@ -4876,37 +5151,193 @@ var vaxisGuidanceDef = {
|
|
|
4876
5151
|
pGeom: pGeom15
|
|
4877
5152
|
};
|
|
4878
5153
|
|
|
4879
|
-
// src/heliostat/
|
|
5154
|
+
// src/heliostat/haxis_guidance.ts
|
|
4880
5155
|
import {
|
|
4881
|
-
|
|
5156
|
+
point as point6,
|
|
5157
|
+
contour as contour14,
|
|
4882
5158
|
contourCircle as contourCircle14,
|
|
5159
|
+
ctrRectangle as ctrRectangle5,
|
|
4883
5160
|
figure as figure16,
|
|
5161
|
+
degToRad as degToRad7,
|
|
4884
5162
|
ffix as ffix18,
|
|
4885
5163
|
pNumber as pNumber16,
|
|
5164
|
+
pDropdown as pDropdown3,
|
|
4886
5165
|
pSectionSeparator as pSectionSeparator15,
|
|
4887
5166
|
initGeom as initGeom16,
|
|
4888
5167
|
EExtrude as EExtrude13,
|
|
4889
5168
|
EBVolume as EBVolume16
|
|
4890
5169
|
} from "geometrix";
|
|
4891
5170
|
var pDef16 = {
|
|
5171
|
+
partName: "haxis_guidance",
|
|
5172
|
+
params: [
|
|
5173
|
+
//pNumber(name, unit, init, min, max, step)
|
|
5174
|
+
pNumber16("D5", "mm", 600, 1, 2e3, 1),
|
|
5175
|
+
pNumber16("D8", "mm", 1e3, 1, 2e3, 1),
|
|
5176
|
+
pSectionSeparator15("outer details"),
|
|
5177
|
+
pNumber16("E5", "mm", 1, 0, 200, 1),
|
|
5178
|
+
pNumber16("E8", "mm", 20, 1, 200, 1),
|
|
5179
|
+
pNumber16("L5", "mm", 20, 1, 200, 1),
|
|
5180
|
+
pNumber16("R9", "mm", 20, 0, 500, 1),
|
|
5181
|
+
pSectionSeparator15("inner spring"),
|
|
5182
|
+
pNumber16("SA1", "degree", 0, -45, 45, 1),
|
|
5183
|
+
pNumber16("SE1", "mm", 2, 0.1, 100, 0.1),
|
|
5184
|
+
pNumber16("SD1", "mm", 20, 1, 200, 1),
|
|
5185
|
+
pNumber16("SD2", "mm", 10, 1, 200, 1),
|
|
5186
|
+
pNumber16("SN1", "springs", 7, 1, 24, 1),
|
|
5187
|
+
pNumber16("SL1", "mm", 60, 0, 500, 1),
|
|
5188
|
+
pNumber16("SL2", "mm", 100, 0, 500, 1),
|
|
5189
|
+
pDropdown3("Send", ["round", "pike"]),
|
|
5190
|
+
pSectionSeparator15("thickness"),
|
|
5191
|
+
pNumber16("L4", "mm", 400, 1, 2e3, 1)
|
|
5192
|
+
],
|
|
5193
|
+
paramSvg: {
|
|
5194
|
+
D5: "haxis_guidance_outer.svg",
|
|
5195
|
+
D8: "haxis_guidance_outer.svg",
|
|
5196
|
+
E5: "haxis_guidance_outer.svg",
|
|
5197
|
+
E8: "haxis_guidance_outer.svg",
|
|
5198
|
+
L5: "haxis_guidance_outer.svg",
|
|
5199
|
+
R9: "haxis_guidance_outer.svg",
|
|
5200
|
+
SA1: "haxis_guidance_spring.svg",
|
|
5201
|
+
SE1: "haxis_guidance_spring.svg",
|
|
5202
|
+
SD1: "haxis_guidance_spring.svg",
|
|
5203
|
+
SD2: "haxis_guidance_spring.svg",
|
|
5204
|
+
SN1: "haxis_guidance_spring.svg",
|
|
5205
|
+
SL1: "haxis_guidance_spring.svg",
|
|
5206
|
+
SL2: "haxis_guidance_spring.svg",
|
|
5207
|
+
Send: "haxis_guidance_spring.svg",
|
|
5208
|
+
L4: "haxis_guidance_outer.svg"
|
|
5209
|
+
},
|
|
5210
|
+
sim: {
|
|
5211
|
+
tMax: 100,
|
|
5212
|
+
tStep: 0.5,
|
|
5213
|
+
tUpdate: 500
|
|
5214
|
+
// every 0.5 second
|
|
5215
|
+
}
|
|
5216
|
+
};
|
|
5217
|
+
function pGeom16(t, param, suffix = "") {
|
|
5218
|
+
const rGeome = initGeom16(pDef16.partName + suffix);
|
|
5219
|
+
const figProfile = figure16();
|
|
5220
|
+
const figSide = figure16();
|
|
5221
|
+
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5222
|
+
`;
|
|
5223
|
+
try {
|
|
5224
|
+
const R5 = param.D5 / 2;
|
|
5225
|
+
const R8 = param.D8 / 2;
|
|
5226
|
+
const SR1 = param.SD1 / 2;
|
|
5227
|
+
const Rinner = R5 + param.E5;
|
|
5228
|
+
const Rinner2 = R8 - param.E8;
|
|
5229
|
+
const aLeg = 2 * Math.asin(param.L5 / (2 * Rinner));
|
|
5230
|
+
const sA0 = Math.PI / 12 + degToRad7(param.SA1);
|
|
5231
|
+
const sA = Math.PI / 2 + aLeg - sA0;
|
|
5232
|
+
const sA1 = Math.PI - sA0;
|
|
5233
|
+
const sA2 = Math.PI / 2 - Math.PI / 6 + sA0;
|
|
5234
|
+
if (Rinner + SR1 + param.SE1 > Rinner2) {
|
|
5235
|
+
throw `err411: D8 ${param.D8} is too small compare to D5 ${param.D5}, E5 ${param.D5}, E8 ${param.E8}`;
|
|
5236
|
+
}
|
|
5237
|
+
if (2 * Math.PI / 3 - 2 * aLeg < param.R9 / Rinner2) {
|
|
5238
|
+
throw `err412: L5 ${param.L5} is too large compare to R9 ${param.R9}`;
|
|
5239
|
+
}
|
|
5240
|
+
rGeome.logstr += `haxis_guidance: Dinner ${ffix18(2 * Rinner)} mm
|
|
5241
|
+
`;
|
|
5242
|
+
figProfile.addSecond(contourCircle14(0, 0, R5));
|
|
5243
|
+
figProfile.addSecond(contourCircle14(0, 0, R8));
|
|
5244
|
+
const [spring1Log, spring1Ctr] = ctrSpring(param, false);
|
|
5245
|
+
const [, spring2Ctr] = ctrSpring(param, true);
|
|
5246
|
+
rGeome.logstr += spring1Log;
|
|
5247
|
+
const Ai1 = Math.PI / 2 - aLeg;
|
|
5248
|
+
const Ai2 = -Math.PI / 6 + aLeg;
|
|
5249
|
+
const p0 = point6(0, 0);
|
|
5250
|
+
const p11 = p0.translatePolar(Ai1, Rinner + param.SE1 + SR1);
|
|
5251
|
+
const p12c = p11.translatePolar(Ai1 - Math.PI / 2, SR1);
|
|
5252
|
+
const p13 = p12c.translatePolar(Ai1 + Math.PI, SR1 + param.SE1);
|
|
5253
|
+
const p14 = p12c.translatePolar(Ai1 + Math.PI, SR1);
|
|
5254
|
+
const p15 = p13.rotate(p12c, sA);
|
|
5255
|
+
const p21 = p0.translatePolar(Ai2, Rinner + param.SE1 + SR1);
|
|
5256
|
+
const p22c = p21.translatePolar(Ai2 + Math.PI / 2, SR1);
|
|
5257
|
+
const p23 = p22c.translatePolar(Ai2 + Math.PI, SR1 + param.SE1);
|
|
5258
|
+
const p24 = p22c.translatePolar(Ai2 + Math.PI, SR1);
|
|
5259
|
+
const p26 = p24.rotate(p22c, -sA);
|
|
5260
|
+
const ctrProfile = contour14(0, Rinner).addSegStrokeA(p13.cx, p13.cy).addPointA(p15.cx, p15.cy).addSegArc(SR1 + param.SE1, false, true);
|
|
5261
|
+
ctrProfile.addPartial(spring1Ctr.rotate(0, 0, sA1).translate(p15.cx, p15.cy));
|
|
5262
|
+
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();
|
|
5263
|
+
ctrProfile.addPartial(spring2Ctr.rotate(0, 0, sA2).translate(p26.cx, p26.cy));
|
|
5264
|
+
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();
|
|
5265
|
+
figProfile.addMain(ctrProfile);
|
|
5266
|
+
const R8plus = R8 * Math.sin(Math.PI / 6);
|
|
5267
|
+
figSide.addMain(ctrRectangle5(0, -R8plus, param.L4, R8 + R8plus));
|
|
5268
|
+
figSide.addSecond(ctrRectangle5(0, -R8, param.L4, 2 * R8));
|
|
5269
|
+
figSide.addSecond(ctrRectangle5(0, -R5, param.L4, 2 * R5));
|
|
5270
|
+
rGeome.fig = {
|
|
5271
|
+
faceProfile: figProfile,
|
|
5272
|
+
faceSide: figSide
|
|
5273
|
+
};
|
|
5274
|
+
const designName = rGeome.partName;
|
|
5275
|
+
rGeome.vol = {
|
|
5276
|
+
extrudes: [
|
|
5277
|
+
{
|
|
5278
|
+
outName: `subpax_${designName}_profile`,
|
|
5279
|
+
face: `${designName}_faceProfile`,
|
|
5280
|
+
extrudeMethod: EExtrude13.eLinearOrtho,
|
|
5281
|
+
length: param.L4,
|
|
5282
|
+
rotate: [0, 0, 0],
|
|
5283
|
+
translate: [0, 0, 0]
|
|
5284
|
+
}
|
|
5285
|
+
],
|
|
5286
|
+
volumes: [
|
|
5287
|
+
{
|
|
5288
|
+
outName: `pax_${designName}`,
|
|
5289
|
+
boolMethod: EBVolume16.eIdentity,
|
|
5290
|
+
inList: [`subpax_${designName}_profile`]
|
|
5291
|
+
}
|
|
5292
|
+
]
|
|
5293
|
+
};
|
|
5294
|
+
rGeome.sub = {};
|
|
5295
|
+
rGeome.logstr += "haxis_guidance drawn successfully!\n";
|
|
5296
|
+
rGeome.calcErr = false;
|
|
5297
|
+
} catch (emsg) {
|
|
5298
|
+
rGeome.logstr += emsg;
|
|
5299
|
+
console.log(emsg);
|
|
5300
|
+
}
|
|
5301
|
+
return rGeome;
|
|
5302
|
+
}
|
|
5303
|
+
var haxisGuidanceDef = {
|
|
5304
|
+
pTitle: "Haxis-guidance",
|
|
5305
|
+
pDescription: "The guidance of the H-Axis for the heliostat inclination",
|
|
5306
|
+
pDef: pDef16,
|
|
5307
|
+
pGeom: pGeom16
|
|
5308
|
+
};
|
|
5309
|
+
|
|
5310
|
+
// src/heliostat/rod.ts
|
|
5311
|
+
import {
|
|
5312
|
+
contour as contour15,
|
|
5313
|
+
contourCircle as contourCircle15,
|
|
5314
|
+
figure as figure17,
|
|
5315
|
+
ffix as ffix19,
|
|
5316
|
+
pNumber as pNumber17,
|
|
5317
|
+
pSectionSeparator as pSectionSeparator16,
|
|
5318
|
+
initGeom as initGeom17,
|
|
5319
|
+
EExtrude as EExtrude14,
|
|
5320
|
+
EBVolume as EBVolume17
|
|
5321
|
+
} from "geometrix";
|
|
5322
|
+
var pDef17 = {
|
|
4892
5323
|
partName: "rod",
|
|
4893
5324
|
params: [
|
|
4894
5325
|
//pNumber(name, unit, init, min, max, step)
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
5326
|
+
pNumber17("L1", "mm", 1e4, 100, 4e4, 10),
|
|
5327
|
+
pNumber17("L2", "mm", 100, 2, 400, 1),
|
|
5328
|
+
pNumber17("L3", "mm", 400, 10, 1e3, 1),
|
|
5329
|
+
pNumber17("L4", "mm", 600, 10, 1e3, 1),
|
|
5330
|
+
pNumber17("N1", "", 10, 2, 50, 1),
|
|
5331
|
+
pSectionSeparator16("section"),
|
|
5332
|
+
pNumber17("H1", "mm", 200, 5, 4e3, 1),
|
|
5333
|
+
pNumber17("E1", "mm", 2, 1, 80, 1),
|
|
5334
|
+
pNumber17("E2", "mm", 10, 1, 80, 1),
|
|
5335
|
+
pSectionSeparator16("pad"),
|
|
5336
|
+
pNumber17("N3", "", 2, 1, 20, 1),
|
|
5337
|
+
pNumber17("N4", "", 4, 1, 20, 1),
|
|
5338
|
+
pNumber17("R3", "mm", 100, 1, 500, 1),
|
|
5339
|
+
pNumber17("D2", "mm", 10, 1, 100, 1),
|
|
5340
|
+
pNumber17("L7", "mm", 10, 1, 300, 1)
|
|
4910
5341
|
],
|
|
4911
5342
|
paramSvg: {
|
|
4912
5343
|
L1: "rod_top.svg",
|
|
@@ -4930,36 +5361,36 @@ var pDef16 = {
|
|
|
4930
5361
|
// every 0.5 second
|
|
4931
5362
|
}
|
|
4932
5363
|
};
|
|
4933
|
-
function
|
|
4934
|
-
const rGeome =
|
|
5364
|
+
function pGeom17(t, param, suffix = "") {
|
|
5365
|
+
const rGeome = initGeom17(pDef17.partName + suffix);
|
|
4935
5366
|
let ctrPlate;
|
|
4936
5367
|
let ctrRod;
|
|
4937
|
-
const figCut =
|
|
4938
|
-
const figPlate =
|
|
4939
|
-
const figTop =
|
|
5368
|
+
const figCut = figure17();
|
|
5369
|
+
const figPlate = figure17();
|
|
5370
|
+
const figTop = figure17();
|
|
4940
5371
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4941
5372
|
`;
|
|
4942
5373
|
try {
|
|
4943
5374
|
const R2 = param.D2 / 2;
|
|
4944
5375
|
const n3step = param.L3 / (param.N3 + 1);
|
|
4945
5376
|
const n4step = param.L4 / (param.N4 + 1);
|
|
4946
|
-
rGeome.logstr += `rod-length: ${
|
|
5377
|
+
rGeome.logstr += `rod-length: ${ffix19(param.L1)} mm
|
|
4947
5378
|
`;
|
|
4948
5379
|
const space_length = (param.L1 - param.L3) / (param.N1 - 1);
|
|
4949
|
-
rGeome.logstr += `space-length: ${
|
|
5380
|
+
rGeome.logstr += `space-length: ${ffix19(space_length)} mm
|
|
4950
5381
|
`;
|
|
4951
5382
|
ctrPlate = function(py) {
|
|
4952
5383
|
const rPlate = [];
|
|
4953
5384
|
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
5385
|
rPlate.push(plateExt);
|
|
4955
5386
|
for (let i = 1; i < param.N3 + 1; i++) {
|
|
4956
|
-
rPlate.push(
|
|
4957
|
-
rPlate.push(
|
|
5387
|
+
rPlate.push(contourCircle15(param.L4 / 2 - param.L7, py + i * n3step, R2));
|
|
5388
|
+
rPlate.push(contourCircle15(-param.L4 / 2 + param.L7, py + i * n3step, R2));
|
|
4958
5389
|
}
|
|
4959
5390
|
for (let i = 1; i < param.N4 + 1; i++) {
|
|
4960
|
-
rPlate.push(
|
|
5391
|
+
rPlate.push(contourCircle15(-param.L4 / 2 + i * n4step, py + param.L7, R2));
|
|
4961
5392
|
rPlate.push(
|
|
4962
|
-
|
|
5393
|
+
contourCircle15(-param.L4 / 2 + i * n4step, py + param.L3 - param.L7, R2)
|
|
4963
5394
|
);
|
|
4964
5395
|
}
|
|
4965
5396
|
return rPlate;
|
|
@@ -4996,7 +5427,7 @@ function pGeom16(t, param, suffix = "") {
|
|
|
4996
5427
|
{
|
|
4997
5428
|
outName: `subpax_${designName}_rod`,
|
|
4998
5429
|
face: `${designName}_faceCut`,
|
|
4999
|
-
extrudeMethod:
|
|
5430
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
5000
5431
|
length: param.L1,
|
|
5001
5432
|
rotate: [0, 0, 0],
|
|
5002
5433
|
translate: [0, 0, 0]
|
|
@@ -5004,7 +5435,7 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5004
5435
|
{
|
|
5005
5436
|
outName: `subpax_${designName}_plates`,
|
|
5006
5437
|
face: `${designName}_faceTop`,
|
|
5007
|
-
extrudeMethod:
|
|
5438
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
5008
5439
|
length: param.E2,
|
|
5009
5440
|
rotate: [Math.PI / 2, 0, 0],
|
|
5010
5441
|
translate: [0, param.E2 + param.H1, 0]
|
|
@@ -5013,7 +5444,7 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5013
5444
|
volumes: [
|
|
5014
5445
|
{
|
|
5015
5446
|
outName: `pax_${designName}`,
|
|
5016
|
-
boolMethod:
|
|
5447
|
+
boolMethod: EBVolume17.eUnion,
|
|
5017
5448
|
inList: [`subpax_${designName}_rod`, `subpax_${designName}_plates`]
|
|
5018
5449
|
}
|
|
5019
5450
|
]
|
|
@@ -5030,51 +5461,51 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5030
5461
|
var rodDef = {
|
|
5031
5462
|
pTitle: "Heliostat rod",
|
|
5032
5463
|
pDescription: "The rod of an heliostat-surface",
|
|
5033
|
-
pDef:
|
|
5034
|
-
pGeom:
|
|
5464
|
+
pDef: pDef17,
|
|
5465
|
+
pGeom: pGeom17
|
|
5035
5466
|
};
|
|
5036
5467
|
|
|
5037
5468
|
// src/heliostat/trapeze.ts
|
|
5038
5469
|
import {
|
|
5039
5470
|
contour as contour16,
|
|
5040
|
-
contourCircle as
|
|
5041
|
-
figure as
|
|
5471
|
+
contourCircle as contourCircle16,
|
|
5472
|
+
figure as figure18,
|
|
5042
5473
|
radToDeg as radToDeg9,
|
|
5043
|
-
ffix as
|
|
5044
|
-
pNumber as
|
|
5045
|
-
pSectionSeparator as
|
|
5046
|
-
initGeom as
|
|
5047
|
-
EExtrude as
|
|
5048
|
-
EBVolume as
|
|
5474
|
+
ffix as ffix20,
|
|
5475
|
+
pNumber as pNumber18,
|
|
5476
|
+
pSectionSeparator as pSectionSeparator17,
|
|
5477
|
+
initGeom as initGeom18,
|
|
5478
|
+
EExtrude as EExtrude15,
|
|
5479
|
+
EBVolume as EBVolume18
|
|
5049
5480
|
} from "geometrix";
|
|
5050
|
-
var
|
|
5481
|
+
var pDef18 = {
|
|
5051
5482
|
partName: "trapeze",
|
|
5052
5483
|
params: [
|
|
5053
5484
|
//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
|
-
|
|
5485
|
+
pNumber18("L1", "mm", 1600, 10, 4e3, 1),
|
|
5486
|
+
pNumber18("L2", "mm", 1e3, 10, 4e3, 1),
|
|
5487
|
+
pNumber18("L3", "mm", 400, 5, 800, 1),
|
|
5488
|
+
pNumber18("L4", "mm", 300, 5, 800, 1),
|
|
5489
|
+
pSectionSeparator17("outer frame"),
|
|
5490
|
+
pNumber18("N1", "", 7, 1, 20, 1),
|
|
5491
|
+
pNumber18("N2", "", 4, 1, 20, 1),
|
|
5492
|
+
pNumber18("D1", "mm", 10, 1, 40, 1),
|
|
5493
|
+
pNumber18("L5", "mm", 100, 1, 400, 1),
|
|
5494
|
+
pNumber18("L6", "mm", 20, 1, 400, 1),
|
|
5495
|
+
pNumber18("R1", "mm", 60, 1, 400, 1),
|
|
5496
|
+
pNumber18("R2", "mm", 20, 1, 400, 1),
|
|
5497
|
+
pSectionSeparator17("inner pad"),
|
|
5498
|
+
pNumber18("N3", "", 2, 1, 20, 1),
|
|
5499
|
+
pNumber18("N4", "", 2, 1, 20, 1),
|
|
5500
|
+
pNumber18("D2", "mm", 10, 1, 40, 1),
|
|
5501
|
+
pNumber18("L7", "mm", 20, 1, 400, 1),
|
|
5502
|
+
pNumber18("R3", "mm", 20, 1, 400, 1),
|
|
5503
|
+
pSectionSeparator17("diagonal shaft"),
|
|
5504
|
+
pNumber18("D3", "mm", 30, 1, 100, 1),
|
|
5505
|
+
pNumber18("D4", "mm", 26, 1, 100, 1),
|
|
5506
|
+
pNumber18("H1", "mm", 300, 0.5, 800, 0.5),
|
|
5507
|
+
pNumber18("H2", "mm", 2, 0.5, 800, 0.5),
|
|
5508
|
+
pNumber18("H3", "mm", 5, 0.5, 800, 0.5)
|
|
5078
5509
|
],
|
|
5079
5510
|
paramSvg: {
|
|
5080
5511
|
L1: "trapeze_top.svg",
|
|
@@ -5106,15 +5537,15 @@ var pDef17 = {
|
|
|
5106
5537
|
// every 0.5 second
|
|
5107
5538
|
}
|
|
5108
5539
|
};
|
|
5109
|
-
function
|
|
5110
|
-
const rGeome =
|
|
5540
|
+
function pGeom18(t, param, suffix = "") {
|
|
5541
|
+
const rGeome = initGeom18(pDef18.partName + suffix);
|
|
5111
5542
|
let ctrRodFootprint;
|
|
5112
5543
|
let ctrRod;
|
|
5113
|
-
const figFrame =
|
|
5114
|
-
const figPlate =
|
|
5115
|
-
const figRod =
|
|
5116
|
-
const figRodHollow =
|
|
5117
|
-
const figCutRod =
|
|
5544
|
+
const figFrame = figure18();
|
|
5545
|
+
const figPlate = figure18();
|
|
5546
|
+
const figRod = figure18();
|
|
5547
|
+
const figRodHollow = figure18();
|
|
5548
|
+
const figCutRod = figure18();
|
|
5118
5549
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5119
5550
|
`;
|
|
5120
5551
|
try {
|
|
@@ -5136,14 +5567,14 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5136
5567
|
const rod_slope_length = Math.sqrt(rod_xy ** 2 + rod_z ** 2);
|
|
5137
5568
|
const rod_slope_angle = Math.atan2(rod_z, rod_xy);
|
|
5138
5569
|
const rod_xy_angle = Math.atan2(rod_y, rod_x);
|
|
5139
|
-
rGeome.logstr += `rod-slope: length: ${
|
|
5570
|
+
rGeome.logstr += `rod-slope: length: ${ffix20(rod_slope_length)} mm, angle: ${ffix20(
|
|
5140
5571
|
radToDeg9(rod_slope_angle)
|
|
5141
5572
|
)} degree
|
|
5142
5573
|
`;
|
|
5143
|
-
rGeome.logstr += `rod-xy-angle: ${
|
|
5574
|
+
rGeome.logstr += `rod-xy-angle: ${ffix20(radToDeg9(rod_xy_angle))} degree
|
|
5144
5575
|
`;
|
|
5145
5576
|
const rodFootprintLength = param.D3 / Math.cos(Math.PI / 2 - rod_slope_angle);
|
|
5146
|
-
rGeome.logstr += `rod-footprint-length: ${
|
|
5577
|
+
rGeome.logstr += `rod-footprint-length: ${ffix20(rodFootprintLength)} mm
|
|
5147
5578
|
`;
|
|
5148
5579
|
const rodFPl = Math.sqrt((rodFootprintLength / 2) ** 2 + (param.D3 / 2) ** 2);
|
|
5149
5580
|
const rodFPa = Math.atan2(param.D3, rodFootprintLength);
|
|
@@ -5188,35 +5619,35 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5188
5619
|
const lFrameHole = [];
|
|
5189
5620
|
for (let i = 1; i < param.N1 + 1; i++) {
|
|
5190
5621
|
lFrameHole.push(
|
|
5191
|
-
|
|
5622
|
+
contourCircle16(param.L2 / 2 - param.L6, -param.L1 / 2 + i * step1, param.D1 / 2)
|
|
5192
5623
|
);
|
|
5193
5624
|
lFrameHole.push(
|
|
5194
|
-
|
|
5625
|
+
contourCircle16(-param.L2 / 2 + param.L6, -param.L1 / 2 + i * step1, param.D1 / 2)
|
|
5195
5626
|
);
|
|
5196
5627
|
}
|
|
5197
5628
|
for (let i = 1; i < param.N2 + 1; i++) {
|
|
5198
5629
|
lFrameHole.push(
|
|
5199
|
-
|
|
5630
|
+
contourCircle16(-param.L2 / 2 + i * step2, param.L1 / 2 - param.L6, param.D1 / 2)
|
|
5200
5631
|
);
|
|
5201
5632
|
lFrameHole.push(
|
|
5202
|
-
|
|
5633
|
+
contourCircle16(-param.L2 / 2 + i * step2, -param.L1 / 2 + param.L6, param.D1 / 2)
|
|
5203
5634
|
);
|
|
5204
5635
|
}
|
|
5205
5636
|
const lPlateHole = [];
|
|
5206
5637
|
for (let i = 1; i < param.N3 + 1; i++) {
|
|
5207
5638
|
lPlateHole.push(
|
|
5208
|
-
|
|
5639
|
+
contourCircle16(param.L4 / 2 - param.L7, -param.L3 / 2 + i * step3, param.D2 / 2)
|
|
5209
5640
|
);
|
|
5210
5641
|
lPlateHole.push(
|
|
5211
|
-
|
|
5642
|
+
contourCircle16(-param.L4 / 2 + param.L7, -param.L3 / 2 + i * step3, param.D2 / 2)
|
|
5212
5643
|
);
|
|
5213
5644
|
}
|
|
5214
5645
|
for (let i = 1; i < param.N4 + 1; i++) {
|
|
5215
5646
|
lPlateHole.push(
|
|
5216
|
-
|
|
5647
|
+
contourCircle16(-param.L4 / 2 + i * step4, param.L3 / 2 - param.L7, param.D2 / 2)
|
|
5217
5648
|
);
|
|
5218
5649
|
lPlateHole.push(
|
|
5219
|
-
|
|
5650
|
+
contourCircle16(-param.L4 / 2 + i * step4, -param.L3 / 2 + param.L7, param.D2 / 2)
|
|
5220
5651
|
);
|
|
5221
5652
|
}
|
|
5222
5653
|
lFrameHole.forEach((ctr) => {
|
|
@@ -5271,10 +5702,10 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5271
5702
|
if (param.D4 >= param.D3) {
|
|
5272
5703
|
throw `err218: D4 ${param.D4} larger than D3 ${param.D3}`;
|
|
5273
5704
|
}
|
|
5274
|
-
figRod.addMain(
|
|
5275
|
-
figRod.addSecond(
|
|
5276
|
-
figRodHollow.addMain(
|
|
5277
|
-
figRodHollow.addSecond(
|
|
5705
|
+
figRod.addMain(contourCircle16(0, 0, param.D3 / 2));
|
|
5706
|
+
figRod.addSecond(contourCircle16(0, 0, param.D4 / 2));
|
|
5707
|
+
figRodHollow.addMain(contourCircle16(0, 0, param.D4 / 2));
|
|
5708
|
+
figRodHollow.addSecond(contourCircle16(0, 0, param.D3 / 2));
|
|
5278
5709
|
const rodFootprintHeight = param.D3 * Math.cos(rod_slope_angle);
|
|
5279
5710
|
const rodFootprintBack = rodFootprintHeight / Math.tan(rod_slope_angle);
|
|
5280
5711
|
const pad3x = pad3 + (rodFootprintLength / 2 + rodFootprintBack) * Math.cos(rod_xy_angle);
|
|
@@ -5296,7 +5727,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5296
5727
|
{
|
|
5297
5728
|
outName: `subpax_${designName}_frame`,
|
|
5298
5729
|
face: `${designName}_faceFrame`,
|
|
5299
|
-
extrudeMethod:
|
|
5730
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5300
5731
|
length: param.H2,
|
|
5301
5732
|
rotate: [0, 0, 0],
|
|
5302
5733
|
translate: [0, 0, param.H1 - param.H2]
|
|
@@ -5304,7 +5735,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5304
5735
|
{
|
|
5305
5736
|
outName: `subpax_${designName}_plate`,
|
|
5306
5737
|
face: `${designName}_facePlate`,
|
|
5307
|
-
extrudeMethod:
|
|
5738
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5308
5739
|
length: param.H3,
|
|
5309
5740
|
rotate: [0, 0, 0],
|
|
5310
5741
|
translate: [0, 0, 0]
|
|
@@ -5312,7 +5743,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5312
5743
|
{
|
|
5313
5744
|
outName: `subpax_${designName}_rod1`,
|
|
5314
5745
|
face: `${designName}_faceRod`,
|
|
5315
|
-
extrudeMethod:
|
|
5746
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5316
5747
|
length: rodExtrudeLength,
|
|
5317
5748
|
rotate: [0, Math.PI / 2 - rod_slope_angle, rod_xy_angle],
|
|
5318
5749
|
translate: [
|
|
@@ -5324,7 +5755,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5324
5755
|
{
|
|
5325
5756
|
outName: `subpax_${designName}_rod2`,
|
|
5326
5757
|
face: `${designName}_faceRod`,
|
|
5327
|
-
extrudeMethod:
|
|
5758
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5328
5759
|
length: rodExtrudeLength,
|
|
5329
5760
|
rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI - rod_xy_angle],
|
|
5330
5761
|
translate: [
|
|
@@ -5336,7 +5767,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5336
5767
|
{
|
|
5337
5768
|
outName: `subpax_${designName}_rod3`,
|
|
5338
5769
|
face: `${designName}_faceRod`,
|
|
5339
|
-
extrudeMethod:
|
|
5770
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5340
5771
|
length: rodExtrudeLength,
|
|
5341
5772
|
rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI + rod_xy_angle],
|
|
5342
5773
|
translate: [
|
|
@@ -5348,7 +5779,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5348
5779
|
{
|
|
5349
5780
|
outName: `subpax_${designName}_rod4`,
|
|
5350
5781
|
face: `${designName}_faceRod`,
|
|
5351
|
-
extrudeMethod:
|
|
5782
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5352
5783
|
length: rodExtrudeLength,
|
|
5353
5784
|
rotate: [0, Math.PI / 2 - rod_slope_angle, -rod_xy_angle],
|
|
5354
5785
|
translate: [
|
|
@@ -5360,7 +5791,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5360
5791
|
{
|
|
5361
5792
|
outName: `subpax_${designName}_rodH1`,
|
|
5362
5793
|
face: `${designName}_faceRodHollow`,
|
|
5363
|
-
extrudeMethod:
|
|
5794
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5364
5795
|
length: rodExtrudeLength,
|
|
5365
5796
|
rotate: [0, Math.PI / 2 - rod_slope_angle, rod_xy_angle],
|
|
5366
5797
|
translate: [
|
|
@@ -5372,7 +5803,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5372
5803
|
{
|
|
5373
5804
|
outName: `subpax_${designName}_rodH2`,
|
|
5374
5805
|
face: `${designName}_faceRodHollow`,
|
|
5375
|
-
extrudeMethod:
|
|
5806
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5376
5807
|
length: rodExtrudeLength,
|
|
5377
5808
|
rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI - rod_xy_angle],
|
|
5378
5809
|
translate: [
|
|
@@ -5384,7 +5815,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5384
5815
|
{
|
|
5385
5816
|
outName: `subpax_${designName}_rodH3`,
|
|
5386
5817
|
face: `${designName}_faceRodHollow`,
|
|
5387
|
-
extrudeMethod:
|
|
5818
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5388
5819
|
length: rodExtrudeLength,
|
|
5389
5820
|
rotate: [0, Math.PI / 2 - rod_slope_angle, Math.PI + rod_xy_angle],
|
|
5390
5821
|
translate: [
|
|
@@ -5396,7 +5827,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5396
5827
|
{
|
|
5397
5828
|
outName: `subpax_${designName}_rodH4`,
|
|
5398
5829
|
face: `${designName}_faceRodHollow`,
|
|
5399
|
-
extrudeMethod:
|
|
5830
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5400
5831
|
length: rodExtrudeLength,
|
|
5401
5832
|
rotate: [0, Math.PI / 2 - rod_slope_angle, -rod_xy_angle],
|
|
5402
5833
|
translate: [
|
|
@@ -5408,7 +5839,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5408
5839
|
{
|
|
5409
5840
|
outName: `subpax_${designName}_cut1`,
|
|
5410
5841
|
face: `${designName}_faceCutRod`,
|
|
5411
|
-
extrudeMethod:
|
|
5842
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5412
5843
|
length: cutL,
|
|
5413
5844
|
rotate: [0, 0, 0],
|
|
5414
5845
|
translate: [0, 0, -cutL]
|
|
@@ -5416,7 +5847,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5416
5847
|
{
|
|
5417
5848
|
outName: `subpax_${designName}_cut2`,
|
|
5418
5849
|
face: `${designName}_faceCutRod`,
|
|
5419
|
-
extrudeMethod:
|
|
5850
|
+
extrudeMethod: EExtrude15.eLinearOrtho,
|
|
5420
5851
|
length: cutL,
|
|
5421
5852
|
rotate: [0, 0, 0],
|
|
5422
5853
|
translate: [0, 0, param.H1]
|
|
@@ -5425,7 +5856,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5425
5856
|
volumes: [
|
|
5426
5857
|
{
|
|
5427
5858
|
outName: `ipax_${designName}_rawRod`,
|
|
5428
|
-
boolMethod:
|
|
5859
|
+
boolMethod: EBVolume18.eUnion,
|
|
5429
5860
|
inList: [
|
|
5430
5861
|
`subpax_${designName}_rod1`,
|
|
5431
5862
|
`subpax_${designName}_rod2`,
|
|
@@ -5435,7 +5866,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5435
5866
|
},
|
|
5436
5867
|
{
|
|
5437
5868
|
outName: `ipax_${designName}_rodHollow`,
|
|
5438
|
-
boolMethod:
|
|
5869
|
+
boolMethod: EBVolume18.eUnion,
|
|
5439
5870
|
inList: [
|
|
5440
5871
|
`subpax_${designName}_rodH1`,
|
|
5441
5872
|
`subpax_${designName}_rodH2`,
|
|
@@ -5445,17 +5876,17 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5445
5876
|
},
|
|
5446
5877
|
{
|
|
5447
5878
|
outName: `ipax_${designName}_halfRods`,
|
|
5448
|
-
boolMethod:
|
|
5879
|
+
boolMethod: EBVolume18.eSubstraction,
|
|
5449
5880
|
inList: [`ipax_${designName}_rawRod`, `subpax_${designName}_cut1`]
|
|
5450
5881
|
},
|
|
5451
5882
|
{
|
|
5452
5883
|
outName: `ipax_${designName}_rods`,
|
|
5453
|
-
boolMethod:
|
|
5884
|
+
boolMethod: EBVolume18.eSubstraction,
|
|
5454
5885
|
inList: [`ipax_${designName}_halfRods`, `subpax_${designName}_cut2`]
|
|
5455
5886
|
},
|
|
5456
5887
|
{
|
|
5457
5888
|
outName: `ipax_${designName}_plus`,
|
|
5458
|
-
boolMethod:
|
|
5889
|
+
boolMethod: EBVolume18.eUnion,
|
|
5459
5890
|
inList: [
|
|
5460
5891
|
`subpax_${designName}_frame`,
|
|
5461
5892
|
`subpax_${designName}_plate`,
|
|
@@ -5464,7 +5895,7 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5464
5895
|
},
|
|
5465
5896
|
{
|
|
5466
5897
|
outName: `pax_${designName}`,
|
|
5467
|
-
boolMethod:
|
|
5898
|
+
boolMethod: EBVolume18.eSubstraction,
|
|
5468
5899
|
inList: [`ipax_${designName}_plus`, `ipax_${designName}_rodHollow`]
|
|
5469
5900
|
}
|
|
5470
5901
|
]
|
|
@@ -5481,54 +5912,54 @@ function pGeom17(t, param, suffix = "") {
|
|
|
5481
5912
|
var trapezeDef = {
|
|
5482
5913
|
pTitle: "Heliostat trapeze",
|
|
5483
5914
|
pDescription: "The support of one solar panel. Made out of aluminium for lightness and cooling",
|
|
5484
|
-
pDef:
|
|
5485
|
-
pGeom:
|
|
5915
|
+
pDef: pDef18,
|
|
5916
|
+
pGeom: pGeom18
|
|
5486
5917
|
};
|
|
5487
5918
|
|
|
5488
5919
|
// src/heliostat/surface.ts
|
|
5489
5920
|
import {
|
|
5490
5921
|
contour as contour17,
|
|
5491
|
-
figure as
|
|
5492
|
-
ffix as
|
|
5493
|
-
pNumber as
|
|
5922
|
+
figure as figure19,
|
|
5923
|
+
ffix as ffix21,
|
|
5924
|
+
pNumber as pNumber19,
|
|
5494
5925
|
pCheckbox as pCheckbox4,
|
|
5495
|
-
pDropdown as
|
|
5496
|
-
pSectionSeparator as
|
|
5497
|
-
initGeom as
|
|
5498
|
-
EExtrude as
|
|
5499
|
-
EBVolume as
|
|
5926
|
+
pDropdown as pDropdown4,
|
|
5927
|
+
pSectionSeparator as pSectionSeparator18,
|
|
5928
|
+
initGeom as initGeom19,
|
|
5929
|
+
EExtrude as EExtrude16,
|
|
5930
|
+
EBVolume as EBVolume19
|
|
5500
5931
|
} from "geometrix";
|
|
5501
|
-
var
|
|
5932
|
+
var pDef19 = {
|
|
5502
5933
|
partName: "surface",
|
|
5503
5934
|
params: [
|
|
5504
5935
|
//pNumber(name, unit, init, min, max, step)
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5936
|
+
pNumber19("LH", "mm", 1600, 10, 4e3, 1),
|
|
5937
|
+
pNumber19("LV", "mm", 1e3, 10, 4e3, 1),
|
|
5938
|
+
pNumber19("LZ", "mm", 40, 0, 100, 1),
|
|
5939
|
+
pNumber19("nx", "", 9, 1, 40, 1),
|
|
5940
|
+
pNumber19("ny", "", 9, 1, 40, 1),
|
|
5941
|
+
pSectionSeparator18("main fantasia"),
|
|
5942
|
+
pDropdown4("main_direction", ["horizontal", "vertical"]),
|
|
5512
5943
|
pCheckbox4("crenel", false),
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5944
|
+
pNumber19("first_row", "", 9, 1, 40, 1),
|
|
5945
|
+
pNumber19("second_row", "", 9, 1, 40, 1),
|
|
5946
|
+
pSectionSeparator18("horizontal spacing"),
|
|
5947
|
+
pNumber19("EH", "mm", 10, 0, 1e3, 1),
|
|
5517
5948
|
pCheckbox4("EH_gradient", false),
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5949
|
+
pNumber19("EH_sup", "mm", 500, 0, 1e3, 1),
|
|
5950
|
+
pNumber19("EH_cycle", "", 1, 0, 3, 0.05),
|
|
5951
|
+
pNumber19("EH_start", "", 0, 0, 1, 0.05),
|
|
5952
|
+
pDropdown4("EH_shape", ["sinusoid", "triangle", "sawUp", "sawDown"]),
|
|
5953
|
+
pSectionSeparator18("vertical spacing"),
|
|
5954
|
+
pNumber19("EV", "mm", 10, 0, 1e3, 1),
|
|
5524
5955
|
pCheckbox4("EV_gradient", false),
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5956
|
+
pNumber19("EV_sup", "mm", 500, 0, 1e3, 1),
|
|
5957
|
+
pNumber19("EV_cycle", "", 1, 0, 3, 0.05),
|
|
5958
|
+
pNumber19("EV_start", "", 0, 0, 1, 0.05),
|
|
5959
|
+
pDropdown4("EV_shape", ["sinusoid", "triangle", "sawUp", "sawDown"]),
|
|
5960
|
+
pSectionSeparator18("solar power"),
|
|
5961
|
+
pNumber19("power_efficiency", "%", 16, 0, 100, 0.1),
|
|
5962
|
+
pNumber19("solar_power", "W/m2", 816, 100, 2e3, 1)
|
|
5532
5963
|
// 1361*0.6=816 W/m2
|
|
5533
5964
|
],
|
|
5534
5965
|
paramSvg: {
|
|
@@ -5563,26 +5994,26 @@ var pDef18 = {
|
|
|
5563
5994
|
// every 0.5 second
|
|
5564
5995
|
}
|
|
5565
5996
|
};
|
|
5566
|
-
function
|
|
5567
|
-
const rGeome =
|
|
5997
|
+
function pGeom19(t, param, suffix = "") {
|
|
5998
|
+
const rGeome = initGeom19(pDef19.partName + suffix);
|
|
5568
5999
|
let ctrPanelProfile;
|
|
5569
|
-
const figSurface =
|
|
5570
|
-
const figOnePanel =
|
|
6000
|
+
const figSurface = figure19();
|
|
6001
|
+
const figOnePanel = figure19();
|
|
5571
6002
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5572
6003
|
`;
|
|
5573
6004
|
try {
|
|
5574
6005
|
const panel_surface = param.LH * param.LV / 10 ** 6;
|
|
5575
6006
|
const panel_power = param.solar_power * panel_surface * param.power_efficiency / 100;
|
|
5576
|
-
rGeome.logstr += `panel surface: ${
|
|
6007
|
+
rGeome.logstr += `panel surface: ${ffix21(panel_surface)} m2
|
|
5577
6008
|
`;
|
|
5578
|
-
rGeome.logstr += `panel power: ${
|
|
6009
|
+
rGeome.logstr += `panel power: ${ffix21(panel_power)} W
|
|
5579
6010
|
`;
|
|
5580
6011
|
const max_panel_nb = param.nx * param.ny;
|
|
5581
6012
|
rGeome.logstr += `max panel number: ${max_panel_nb}
|
|
5582
6013
|
`;
|
|
5583
|
-
rGeome.logstr += `max panel surface: ${
|
|
6014
|
+
rGeome.logstr += `max panel surface: ${ffix21(max_panel_nb * panel_surface)} m2
|
|
5584
6015
|
`;
|
|
5585
|
-
rGeome.logstr += `max panel power: ${
|
|
6016
|
+
rGeome.logstr += `max panel power: ${ffix21(max_panel_nb * panel_power)} W
|
|
5586
6017
|
`;
|
|
5587
6018
|
const lenMain = param.main_direction === 1 ? param.ny : param.nx;
|
|
5588
6019
|
const lenLateral = param.main_direction === 1 ? param.nx : param.ny;
|
|
@@ -5615,13 +6046,13 @@ function pGeom18(t, param, suffix = "") {
|
|
|
5615
6046
|
lenRow.forEach((oneRow) => {
|
|
5616
6047
|
panelNb += oneRow;
|
|
5617
6048
|
});
|
|
5618
|
-
rGeome.logstr += `actual panel number: ${panelNb} (${
|
|
6049
|
+
rGeome.logstr += `actual panel number: ${panelNb} (${ffix21(
|
|
5619
6050
|
100 * panelNb / max_panel_nb
|
|
5620
6051
|
)} %)
|
|
5621
6052
|
`;
|
|
5622
|
-
rGeome.logstr += `actual panel surface: ${
|
|
6053
|
+
rGeome.logstr += `actual panel surface: ${ffix21(panelNb * panel_surface)} m2
|
|
5623
6054
|
`;
|
|
5624
|
-
rGeome.logstr += `actual panel power: ${
|
|
6055
|
+
rGeome.logstr += `actual panel power: ${ffix21(panelNb * panel_power)} W
|
|
5625
6056
|
`;
|
|
5626
6057
|
const eMain = [];
|
|
5627
6058
|
for (let i = 0; i < lenMain - 1; i++) {
|
|
@@ -5697,13 +6128,13 @@ function pGeom18(t, param, suffix = "") {
|
|
|
5697
6128
|
gLenVertical = lenMain * param.LV + eMainTotal;
|
|
5698
6129
|
}
|
|
5699
6130
|
const gArea = gLenHorizontal * gLenVertical / 10 ** 6;
|
|
5700
|
-
rGeome.logstr += `global horizontal width: ${
|
|
6131
|
+
rGeome.logstr += `global horizontal width: ${ffix21(gLenHorizontal / 1e3)} m
|
|
5701
6132
|
`;
|
|
5702
|
-
rGeome.logstr += `global vertical height: ${
|
|
6133
|
+
rGeome.logstr += `global vertical height: ${ffix21(gLenVertical / 1e3)} m
|
|
5703
6134
|
`;
|
|
5704
|
-
rGeome.logstr += `global area: ${
|
|
6135
|
+
rGeome.logstr += `global area: ${ffix21(gArea)} m2
|
|
5705
6136
|
`;
|
|
5706
|
-
rGeome.logstr += `area efficiency: ${
|
|
6137
|
+
rGeome.logstr += `area efficiency: ${ffix21(100 * panelNb * panel_surface / gArea)} %
|
|
5707
6138
|
`;
|
|
5708
6139
|
const ox = -gLenHorizontal / 2;
|
|
5709
6140
|
const oy = -gLenVertical / 2;
|
|
@@ -5748,7 +6179,7 @@ function pGeom18(t, param, suffix = "") {
|
|
|
5748
6179
|
const rElem = {
|
|
5749
6180
|
outName: `subpax_${designName}_panel_${idx}`,
|
|
5750
6181
|
face: `${designName}_faceOnePanel`,
|
|
5751
|
-
extrudeMethod:
|
|
6182
|
+
extrudeMethod: EExtrude16.eLinearOrtho,
|
|
5752
6183
|
length: param.LZ,
|
|
5753
6184
|
rotate: [0, 0, 0],
|
|
5754
6185
|
translate: [elem[0], elem[1], 0]
|
|
@@ -5759,7 +6190,7 @@ function pGeom18(t, param, suffix = "") {
|
|
|
5759
6190
|
{
|
|
5760
6191
|
outName: `pax_${designName}`,
|
|
5761
6192
|
//boolMethod: EBVolume.eIdentity,
|
|
5762
|
-
boolMethod:
|
|
6193
|
+
boolMethod: EBVolume19.eUnion,
|
|
5763
6194
|
inList: panelPositions.map((elem, idx) => {
|
|
5764
6195
|
const subElem = `subpax_${designName}_panel_${idx}`;
|
|
5765
6196
|
return subElem;
|
|
@@ -5779,19 +6210,19 @@ function pGeom18(t, param, suffix = "") {
|
|
|
5779
6210
|
var surfaceDef = {
|
|
5780
6211
|
pTitle: "Heliostat panel-surface",
|
|
5781
6212
|
pDescription: "The surface collecting the solar power",
|
|
5782
|
-
pDef:
|
|
5783
|
-
pGeom:
|
|
6213
|
+
pDef: pDef19,
|
|
6214
|
+
pGeom: pGeom19
|
|
5784
6215
|
};
|
|
5785
6216
|
|
|
5786
6217
|
// src/dummy/circles.ts
|
|
5787
|
-
import { degToRad as
|
|
5788
|
-
var
|
|
6218
|
+
import { degToRad as degToRad8, point as point7, figure as figure20, pNumber as pNumber20, initGeom as initGeom20 } from "geometrix";
|
|
6219
|
+
var pDef20 = {
|
|
5789
6220
|
partName: "circles",
|
|
5790
6221
|
params: [
|
|
5791
6222
|
//pNumber(name, unit, init, min, max, step)
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
6223
|
+
pNumber20("angle", "degree", 15, 5, 45, 1),
|
|
6224
|
+
pNumber20("amplitude-offset", "mm", 1, 0.5, 4, 0.1),
|
|
6225
|
+
pNumber20("amplitude-scale", "scalar", 0.2, 0.1, 0.5, 0.01)
|
|
5795
6226
|
],
|
|
5796
6227
|
paramSvg: {
|
|
5797
6228
|
angle: "circles_angle.svg",
|
|
@@ -5804,18 +6235,18 @@ var pDef19 = {
|
|
|
5804
6235
|
tUpdate: 500
|
|
5805
6236
|
}
|
|
5806
6237
|
};
|
|
5807
|
-
function
|
|
5808
|
-
const rGeome =
|
|
6238
|
+
function pGeom20(t, param, suffix = "") {
|
|
6239
|
+
const rGeome = initGeom20(pDef20.partName + suffix);
|
|
5809
6240
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5810
6241
|
`;
|
|
5811
6242
|
try {
|
|
5812
|
-
const figOne =
|
|
5813
|
-
const p1 =
|
|
5814
|
-
const p2 =
|
|
6243
|
+
const figOne = figure20();
|
|
6244
|
+
const p1 = point7(10, 10);
|
|
6245
|
+
const p2 = point7(10, 30);
|
|
5815
6246
|
figOne.addPoint(p2);
|
|
5816
6247
|
for (let i = 0; i < 20; i++) {
|
|
5817
6248
|
figOne.addPoint(
|
|
5818
|
-
p1.scale(p2, param["amplitude-offset"] + param["amplitude-scale"] * i).rotate(p2, i *
|
|
6249
|
+
p1.scale(p2, param["amplitude-offset"] + param["amplitude-scale"] * i).rotate(p2, i * degToRad8(param.angle) + t * Math.PI / 2 / pDef20.sim.tMax)
|
|
5819
6250
|
);
|
|
5820
6251
|
}
|
|
5821
6252
|
rGeome.fig = { one: figOne };
|
|
@@ -5830,18 +6261,18 @@ function pGeom19(t, param, suffix = "") {
|
|
|
5830
6261
|
var circlesDef = {
|
|
5831
6262
|
pTitle: "Circles",
|
|
5832
6263
|
pDescription: "A spiral made by points.",
|
|
5833
|
-
pDef:
|
|
5834
|
-
pGeom:
|
|
6264
|
+
pDef: pDef20,
|
|
6265
|
+
pGeom: pGeom20
|
|
5835
6266
|
};
|
|
5836
6267
|
|
|
5837
6268
|
// src/dummy/rectangle.ts
|
|
5838
|
-
import { point as
|
|
5839
|
-
var
|
|
6269
|
+
import { point as point8, figure as figure21, pNumber as pNumber21, initGeom as initGeom21 } from "geometrix";
|
|
6270
|
+
var pDef21 = {
|
|
5840
6271
|
partName: "rectangle",
|
|
5841
6272
|
params: [
|
|
5842
6273
|
//pNumber(name, unit, init, min, max, step)
|
|
5843
|
-
|
|
5844
|
-
|
|
6274
|
+
pNumber21("width", "mm", 15, 3, 40, 0.5),
|
|
6275
|
+
pNumber21("height", "mm", 10, 3, 40, 0.5)
|
|
5845
6276
|
],
|
|
5846
6277
|
paramSvg: {
|
|
5847
6278
|
width: "rectangle_width.svg",
|
|
@@ -5853,16 +6284,16 @@ var pDef20 = {
|
|
|
5853
6284
|
tUpdate: 500
|
|
5854
6285
|
}
|
|
5855
6286
|
};
|
|
5856
|
-
function
|
|
5857
|
-
const rGeome =
|
|
6287
|
+
function pGeom21(t, param, suffix = "") {
|
|
6288
|
+
const rGeome = initGeom21(pDef21.partName + suffix);
|
|
5858
6289
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5859
6290
|
`;
|
|
5860
6291
|
try {
|
|
5861
|
-
const figOne =
|
|
5862
|
-
const p1 =
|
|
5863
|
-
const p2 =
|
|
5864
|
-
const p3 =
|
|
5865
|
-
const p4 =
|
|
6292
|
+
const figOne = figure21();
|
|
6293
|
+
const p1 = point8(10, 10);
|
|
6294
|
+
const p2 = point8(10 + param.width, 10);
|
|
6295
|
+
const p3 = point8(10 + param.width, 10 + param.height);
|
|
6296
|
+
const p4 = point8(10, 10 + param.height);
|
|
5866
6297
|
const angle = t * Math.PI / 180;
|
|
5867
6298
|
figOne.addPoint(p1);
|
|
5868
6299
|
figOne.addPoint(p2.rotate(p1, angle));
|
|
@@ -5880,25 +6311,25 @@ function pGeom20(t, param, suffix = "") {
|
|
|
5880
6311
|
var rectangleDef = {
|
|
5881
6312
|
pTitle: "Rectangle",
|
|
5882
6313
|
pDescription: "Just a rectangle.",
|
|
5883
|
-
pDef:
|
|
5884
|
-
pGeom:
|
|
6314
|
+
pDef: pDef21,
|
|
6315
|
+
pGeom: pGeom21
|
|
5885
6316
|
};
|
|
5886
6317
|
|
|
5887
6318
|
// src/dummy/pole_static.ts
|
|
5888
6319
|
import {
|
|
5889
6320
|
contour as contour18,
|
|
5890
|
-
contourCircle as
|
|
5891
|
-
figure as
|
|
5892
|
-
pNumber as
|
|
5893
|
-
initGeom as
|
|
6321
|
+
contourCircle as contourCircle17,
|
|
6322
|
+
figure as figure22,
|
|
6323
|
+
pNumber as pNumber22,
|
|
6324
|
+
initGeom as initGeom22
|
|
5894
6325
|
} from "geometrix";
|
|
5895
|
-
var
|
|
6326
|
+
var pDef22 = {
|
|
5896
6327
|
partName: "pole_static",
|
|
5897
6328
|
params: [
|
|
5898
6329
|
//pNumber(name, unit, init, min, max, step)
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
6330
|
+
pNumber22("H1", "mm", 4e3, 100, 4e4, 10),
|
|
6331
|
+
pNumber22("H2", "mm", 5e3, 100, 4e4, 10),
|
|
6332
|
+
pNumber22("radius", "mm", 1e3, 100, 4e4, 10)
|
|
5902
6333
|
],
|
|
5903
6334
|
paramSvg: {
|
|
5904
6335
|
H1: "dummy_pole_static_face.svg",
|
|
@@ -5912,15 +6343,15 @@ var pDef21 = {
|
|
|
5912
6343
|
// every 0.5 second
|
|
5913
6344
|
}
|
|
5914
6345
|
};
|
|
5915
|
-
function
|
|
5916
|
-
const rGeome =
|
|
5917
|
-
const figFace =
|
|
6346
|
+
function pGeom22(t, param, suffix = "") {
|
|
6347
|
+
const rGeome = initGeom22(pDef22.partName + suffix);
|
|
6348
|
+
const figFace = figure22();
|
|
5918
6349
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5919
6350
|
`;
|
|
5920
6351
|
try {
|
|
5921
6352
|
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
6353
|
figFace.addMain(ctrPoleFace);
|
|
5923
|
-
figFace.addMain(
|
|
6354
|
+
figFace.addMain(contourCircle17(0, 0, param.radius));
|
|
5924
6355
|
rGeome.fig = {
|
|
5925
6356
|
poleFace: figFace
|
|
5926
6357
|
};
|
|
@@ -5936,22 +6367,22 @@ function pGeom21(t, param, suffix = "") {
|
|
|
5936
6367
|
var dummyPoleStaticDef = {
|
|
5937
6368
|
pTitle: "Dummy pole static",
|
|
5938
6369
|
pDescription: "Testing two design with identical name",
|
|
5939
|
-
pDef:
|
|
5940
|
-
pGeom:
|
|
6370
|
+
pDef: pDef22,
|
|
6371
|
+
pGeom: pGeom22
|
|
5941
6372
|
};
|
|
5942
6373
|
|
|
5943
6374
|
// src/geometrix_verification/verify_point.ts
|
|
5944
|
-
import { degToRad as
|
|
5945
|
-
var
|
|
6375
|
+
import { degToRad as degToRad9, point as point9, figure as figure23, pNumber as pNumber23, initGeom as initGeom23 } from "geometrix";
|
|
6376
|
+
var pDef23 = {
|
|
5946
6377
|
partName: "verify_point",
|
|
5947
6378
|
params: [
|
|
5948
6379
|
//pNumber(name, unit, init, min, max, step)
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
6380
|
+
pNumber23("p1x", "mm", 30, -200, 200, 1),
|
|
6381
|
+
pNumber23("p1y", "mm", 50, -200, 200, 1),
|
|
6382
|
+
pNumber23("p2a", "degree", 30, -200, 200, 1),
|
|
6383
|
+
pNumber23("p2l", "mm", 60, 0, 200, 1),
|
|
6384
|
+
pNumber23("rotateOrig", "degree", 45, -200, 200, 1),
|
|
6385
|
+
pNumber23("scaleOrig", "scalar", 1.5, 0.1, 2, 0.1)
|
|
5955
6386
|
],
|
|
5956
6387
|
paramSvg: {
|
|
5957
6388
|
p1x: "verify_point_p1x.svg",
|
|
@@ -5968,15 +6399,15 @@ var pDef22 = {
|
|
|
5968
6399
|
// every 0.5 second
|
|
5969
6400
|
}
|
|
5970
6401
|
};
|
|
5971
|
-
function
|
|
5972
|
-
const rGeome =
|
|
6402
|
+
function pGeom23(t, param, suffix = "") {
|
|
6403
|
+
const rGeome = initGeom23(pDef23.partName + suffix);
|
|
5973
6404
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5974
6405
|
`;
|
|
5975
6406
|
try {
|
|
5976
|
-
const figOne =
|
|
5977
|
-
const p1 =
|
|
5978
|
-
const p2 =
|
|
5979
|
-
const p3 = p1.rotateOrig(
|
|
6407
|
+
const figOne = figure23();
|
|
6408
|
+
const p1 = point9(param.p1x, param.p1y + t);
|
|
6409
|
+
const p2 = point9(0, 0).setPolar(degToRad9(param.p2a), param.p2l);
|
|
6410
|
+
const p3 = p1.rotateOrig(degToRad9(param.rotateOrig));
|
|
5980
6411
|
const p4 = p1.scaleOrig(param.scaleOrig);
|
|
5981
6412
|
figOne.addPoint(p1);
|
|
5982
6413
|
figOne.addPoint(p2);
|
|
@@ -5994,23 +6425,23 @@ function pGeom22(t, param, suffix = "") {
|
|
|
5994
6425
|
var verifyPoint1Def = {
|
|
5995
6426
|
pTitle: "Verify point",
|
|
5996
6427
|
pDescription: "Debugging point.ts",
|
|
5997
|
-
pDef:
|
|
5998
|
-
pGeom:
|
|
6428
|
+
pDef: pDef23,
|
|
6429
|
+
pGeom: pGeom23
|
|
5999
6430
|
};
|
|
6000
6431
|
|
|
6001
6432
|
// src/geometrix_verification/verify_point_2.ts
|
|
6002
|
-
import { point as
|
|
6003
|
-
var
|
|
6433
|
+
import { point as point10, figure as figure24, pNumber as pNumber24, initGeom as initGeom24 } from "geometrix";
|
|
6434
|
+
var pDef24 = {
|
|
6004
6435
|
partName: "verify_point_2",
|
|
6005
6436
|
params: [
|
|
6006
6437
|
//pNumber(name, unit, init, min, max, step)
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6438
|
+
pNumber24("p1x", "mm", 30, -200, 200, 1),
|
|
6439
|
+
pNumber24("p1y", "mm", 50, -200, 200, 1),
|
|
6440
|
+
pNumber24("p2x", "mm", -10, -200, 200, 1),
|
|
6441
|
+
pNumber24("p2y", "mm", 60, -200, 200, 1),
|
|
6442
|
+
pNumber24("p3x", "mm", 70, -200, 200, 1),
|
|
6443
|
+
pNumber24("p3y", "mm", -20, -200, 200, 1),
|
|
6444
|
+
pNumber24("dist", "mm", 50, 0, 200, 1)
|
|
6014
6445
|
],
|
|
6015
6446
|
paramSvg: {
|
|
6016
6447
|
p1x: "verify_line_p1x.svg",
|
|
@@ -6028,15 +6459,15 @@ var pDef23 = {
|
|
|
6028
6459
|
// every 0.5 second
|
|
6029
6460
|
}
|
|
6030
6461
|
};
|
|
6031
|
-
function
|
|
6032
|
-
const rGeome =
|
|
6462
|
+
function pGeom24(t, param, suffix = "") {
|
|
6463
|
+
const rGeome = initGeom24(pDef24.partName + suffix);
|
|
6033
6464
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6034
6465
|
`;
|
|
6035
6466
|
try {
|
|
6036
|
-
const figOne =
|
|
6037
|
-
const p1 =
|
|
6038
|
-
const p2 =
|
|
6039
|
-
const p3 =
|
|
6467
|
+
const figOne = figure24();
|
|
6468
|
+
const p1 = point10(param.p1x, param.p1y + t);
|
|
6469
|
+
const p2 = point10(param.p2x, param.p2y);
|
|
6470
|
+
const p3 = point10(param.p3x, param.p3y);
|
|
6040
6471
|
const mp1p2 = p1.middlePoint(p2);
|
|
6041
6472
|
const ep1p2 = p1.equidistantPoint(p2, param.dist, p3);
|
|
6042
6473
|
figOne.addPoint(p1);
|
|
@@ -6056,22 +6487,22 @@ function pGeom23(t, param, suffix = "") {
|
|
|
6056
6487
|
var verifyPoint2Def = {
|
|
6057
6488
|
pTitle: "Verify point 2",
|
|
6058
6489
|
pDescription: "Debugging more point.ts",
|
|
6059
|
-
pDef:
|
|
6060
|
-
pGeom:
|
|
6490
|
+
pDef: pDef24,
|
|
6491
|
+
pGeom: pGeom24
|
|
6061
6492
|
};
|
|
6062
6493
|
|
|
6063
6494
|
// src/geometrix_verification/verify_line.ts
|
|
6064
|
-
import { point as
|
|
6065
|
-
var
|
|
6495
|
+
import { point as point11, line, linePP, figure as figure25, pNumber as pNumber25, initGeom as initGeom25 } from "geometrix";
|
|
6496
|
+
var pDef25 = {
|
|
6066
6497
|
partName: "verify_line",
|
|
6067
6498
|
params: [
|
|
6068
6499
|
//pNumber(name, unit, init, min, max, step)
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6500
|
+
pNumber25("p1x", "mm", 30, -200, 200, 1),
|
|
6501
|
+
pNumber25("p1y", "mm", 50, -200, 200, 1),
|
|
6502
|
+
pNumber25("p2x", "mm", 40, -200, 200, 1),
|
|
6503
|
+
pNumber25("p2y", "mm", -20, -200, 200, 1),
|
|
6504
|
+
pNumber25("p3x", "mm", -30, -200, 200, 1),
|
|
6505
|
+
pNumber25("p3y", "mm", 30, -200, 200, 1)
|
|
6075
6506
|
],
|
|
6076
6507
|
paramSvg: {
|
|
6077
6508
|
p1x: "verify_line_p1x.svg",
|
|
@@ -6088,25 +6519,25 @@ var pDef24 = {
|
|
|
6088
6519
|
// every 0.5 second
|
|
6089
6520
|
}
|
|
6090
6521
|
};
|
|
6091
|
-
function
|
|
6092
|
-
const rGeome =
|
|
6522
|
+
function pGeom25(t, param, suffix = "") {
|
|
6523
|
+
const rGeome = initGeom25(pDef25.partName + suffix);
|
|
6093
6524
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6094
6525
|
`;
|
|
6095
6526
|
try {
|
|
6096
|
-
const figOne =
|
|
6097
|
-
const p1 =
|
|
6098
|
-
const p2 =
|
|
6099
|
-
const p3 =
|
|
6527
|
+
const figOne = figure25();
|
|
6528
|
+
const p1 = point11(param.p1x, param.p1y + t);
|
|
6529
|
+
const p2 = point11(param.p2x, param.p2y);
|
|
6530
|
+
const p3 = point11(param.p3x, param.p3y);
|
|
6100
6531
|
figOne.addPoint(p1);
|
|
6101
6532
|
figOne.addPoint(p2);
|
|
6102
6533
|
figOne.addPoint(p3);
|
|
6103
6534
|
const l1 = line(0, 0, 0).setFromPoints(p1, p2);
|
|
6104
6535
|
figOne.addLine(l1);
|
|
6105
|
-
figOne.addPoint(
|
|
6106
|
-
figOne.addPoint(
|
|
6536
|
+
figOne.addPoint(point11(l1.getAxisXIntersection(), 0));
|
|
6537
|
+
figOne.addPoint(point11(0, l1.getAxisYIntersection()));
|
|
6107
6538
|
const p4 = l1.projectOrig();
|
|
6108
6539
|
figOne.addPoint(p4);
|
|
6109
|
-
const p0 =
|
|
6540
|
+
const p0 = point11(0, 0);
|
|
6110
6541
|
if (!p0.isEqual(p4)) {
|
|
6111
6542
|
const l2 = linePP(p0, p4);
|
|
6112
6543
|
figOne.addLine(l2);
|
|
@@ -6128,24 +6559,24 @@ function pGeom24(t, param, suffix = "") {
|
|
|
6128
6559
|
var verifyLine1Def = {
|
|
6129
6560
|
pTitle: "Verify line",
|
|
6130
6561
|
pDescription: "Debugging line.ts",
|
|
6131
|
-
pDef:
|
|
6132
|
-
pGeom:
|
|
6562
|
+
pDef: pDef25,
|
|
6563
|
+
pGeom: pGeom25
|
|
6133
6564
|
};
|
|
6134
6565
|
|
|
6135
6566
|
// src/geometrix_verification/verify_line_2.ts
|
|
6136
|
-
import { degToRad as
|
|
6137
|
-
var
|
|
6567
|
+
import { degToRad as degToRad10, point as point12, line as line2, figure as figure26, pNumber as pNumber26, initGeom as initGeom26 } from "geometrix";
|
|
6568
|
+
var pDef26 = {
|
|
6138
6569
|
partName: "verify_line_2",
|
|
6139
6570
|
params: [
|
|
6140
6571
|
//pNumber(name, unit, init, min, max, step)
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6572
|
+
pNumber26("l1cx", "mm", 10, -200, 200, 1),
|
|
6573
|
+
pNumber26("l1cy", "mm", 20, -200, 200, 1),
|
|
6574
|
+
pNumber26("l1ca", "degree", 15, -200, 200, 1),
|
|
6575
|
+
pNumber26("l2cx", "mm", 30, -200, 200, 1),
|
|
6576
|
+
pNumber26("l2cy", "mm", 50, -200, 200, 1),
|
|
6577
|
+
pNumber26("l2ca", "degree", 35, -200, 200, 1),
|
|
6578
|
+
pNumber26("p3x", "mm", -30, -200, 200, 1),
|
|
6579
|
+
pNumber26("p3y", "mm", 30, -200, 200, 1)
|
|
6149
6580
|
],
|
|
6150
6581
|
paramSvg: {
|
|
6151
6582
|
l1cx: "verify_line_2_l1cx.svg",
|
|
@@ -6164,20 +6595,20 @@ var pDef25 = {
|
|
|
6164
6595
|
// every 0.5 second
|
|
6165
6596
|
}
|
|
6166
6597
|
};
|
|
6167
|
-
function
|
|
6168
|
-
const rGeome =
|
|
6598
|
+
function pGeom26(t, param, suffix = "") {
|
|
6599
|
+
const rGeome = initGeom26(pDef26.partName + suffix);
|
|
6169
6600
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6170
6601
|
`;
|
|
6171
6602
|
try {
|
|
6172
|
-
const figOne =
|
|
6173
|
-
const p1 =
|
|
6174
|
-
const p2 =
|
|
6175
|
-
const p3 =
|
|
6603
|
+
const figOne = figure26();
|
|
6604
|
+
const p1 = point12(param.l1cx, param.l1cy);
|
|
6605
|
+
const p2 = point12(param.l2cx, param.l2cy);
|
|
6606
|
+
const p3 = point12(param.p3x, param.p3y);
|
|
6176
6607
|
figOne.addPoint(p1);
|
|
6177
6608
|
figOne.addPoint(p2);
|
|
6178
6609
|
figOne.addPoint(p3);
|
|
6179
|
-
const l1 = line2(param.l1cx, param.l1cy,
|
|
6180
|
-
const l2 = line2(param.l2cx, param.l2cy,
|
|
6610
|
+
const l1 = line2(param.l1cx, param.l1cy, degToRad10(param.l1ca + t));
|
|
6611
|
+
const l2 = line2(param.l2cx, param.l2cy, degToRad10(param.l2ca));
|
|
6181
6612
|
figOne.addLine(l1);
|
|
6182
6613
|
figOne.addLine(l2);
|
|
6183
6614
|
figOne.addPoint(l1.intersection(l2));
|
|
@@ -6188,7 +6619,7 @@ function pGeom25(t, param, suffix = "") {
|
|
|
6188
6619
|
rGeome.logstr += `dist(l2, p3) = ${l2.distanceToPoint(p3)}
|
|
6189
6620
|
`;
|
|
6190
6621
|
const bisector2 = l1.bisector(l2, p3);
|
|
6191
|
-
const pBisec =
|
|
6622
|
+
const pBisec = point12(bisector2.cx, bisector2.cy).translatePolar(bisector2.ca, 30);
|
|
6192
6623
|
figOne.addPoint(pBisec);
|
|
6193
6624
|
rGeome.fig = { one: figOne };
|
|
6194
6625
|
rGeome.logstr += "verify_line_2 drawn successfully!\n";
|
|
@@ -6202,22 +6633,22 @@ function pGeom25(t, param, suffix = "") {
|
|
|
6202
6633
|
var verifyLine2Def = {
|
|
6203
6634
|
pTitle: "Verify line 2",
|
|
6204
6635
|
pDescription: "Debugging more line.ts",
|
|
6205
|
-
pDef:
|
|
6206
|
-
pGeom:
|
|
6636
|
+
pDef: pDef26,
|
|
6637
|
+
pGeom: pGeom26
|
|
6207
6638
|
};
|
|
6208
6639
|
|
|
6209
6640
|
// src/geometrix_verification/verify_line_3.ts
|
|
6210
|
-
import { point as
|
|
6211
|
-
var
|
|
6641
|
+
import { point as point13, bisector, circleCenter, figure as figure27, pNumber as pNumber27, initGeom as initGeom27 } from "geometrix";
|
|
6642
|
+
var pDef27 = {
|
|
6212
6643
|
partName: "verify_line_3",
|
|
6213
6644
|
params: [
|
|
6214
6645
|
//pNumber(name, unit, init, min, max, step)
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6646
|
+
pNumber27("p1x", "mm", 30, -200, 200, 1),
|
|
6647
|
+
pNumber27("p1y", "mm", 50, -200, 200, 1),
|
|
6648
|
+
pNumber27("p2x", "mm", 40, -200, 200, 1),
|
|
6649
|
+
pNumber27("p2y", "mm", -20, -200, 200, 1),
|
|
6650
|
+
pNumber27("p3x", "mm", -30, -200, 200, 1),
|
|
6651
|
+
pNumber27("p3y", "mm", 30, -200, 200, 1)
|
|
6221
6652
|
],
|
|
6222
6653
|
paramSvg: {
|
|
6223
6654
|
p1x: "verify_line_p1x.svg",
|
|
@@ -6234,15 +6665,15 @@ var pDef26 = {
|
|
|
6234
6665
|
// every 0.5 second
|
|
6235
6666
|
}
|
|
6236
6667
|
};
|
|
6237
|
-
function
|
|
6238
|
-
const rGeome =
|
|
6668
|
+
function pGeom27(t, param, suffix = "") {
|
|
6669
|
+
const rGeome = initGeom27(pDef27.partName + suffix);
|
|
6239
6670
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6240
6671
|
`;
|
|
6241
6672
|
try {
|
|
6242
|
-
const figOne =
|
|
6243
|
-
const p1 =
|
|
6244
|
-
const p2 =
|
|
6245
|
-
const p3 =
|
|
6673
|
+
const figOne = figure27();
|
|
6674
|
+
const p1 = point13(param.p1x, param.p1y + t);
|
|
6675
|
+
const p2 = point13(param.p2x, param.p2y);
|
|
6676
|
+
const p3 = point13(param.p3x, param.p3y);
|
|
6246
6677
|
figOne.addPoint(p1);
|
|
6247
6678
|
figOne.addPoint(p2);
|
|
6248
6679
|
figOne.addPoint(p3);
|
|
@@ -6262,24 +6693,24 @@ function pGeom26(t, param, suffix = "") {
|
|
|
6262
6693
|
var verifyLine3Def = {
|
|
6263
6694
|
pTitle: "Verify line 3",
|
|
6264
6695
|
pDescription: "Debugging more more line.ts",
|
|
6265
|
-
pDef:
|
|
6266
|
-
pGeom:
|
|
6696
|
+
pDef: pDef27,
|
|
6697
|
+
pGeom: pGeom27
|
|
6267
6698
|
};
|
|
6268
6699
|
|
|
6269
6700
|
// src/geometrix_verification/verify_vector.ts
|
|
6270
|
-
import { degToRad as
|
|
6271
|
-
var
|
|
6701
|
+
import { degToRad as degToRad11, point as point14, vector, figure as figure28, pNumber as pNumber28, initGeom as initGeom28 } from "geometrix";
|
|
6702
|
+
var pDef28 = {
|
|
6272
6703
|
partName: "verify_vector",
|
|
6273
6704
|
params: [
|
|
6274
6705
|
//pNumber(name, unit, init, min, max, step)
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6706
|
+
pNumber28("p1x", "mm", 30, -200, 200, 1),
|
|
6707
|
+
pNumber28("p1y", "mm", 50, -200, 200, 1),
|
|
6708
|
+
pNumber28("p2x", "mm", 80, -200, 200, 1),
|
|
6709
|
+
pNumber28("p2y", "mm", -30, -200, 200, 1),
|
|
6710
|
+
pNumber28("v1a", "degree", 30, -200, 200, 1),
|
|
6711
|
+
pNumber28("v1l", "mm", 60, 0, 200, 1),
|
|
6712
|
+
pNumber28("v2a", "degree", 30, -200, 200, 1),
|
|
6713
|
+
pNumber28("v2l", "mm", 60, 0, 200, 1)
|
|
6283
6714
|
],
|
|
6284
6715
|
paramSvg: {
|
|
6285
6716
|
p1x: "verify_vector_p1x.svg",
|
|
@@ -6298,16 +6729,16 @@ var pDef27 = {
|
|
|
6298
6729
|
// every 0.5 second
|
|
6299
6730
|
}
|
|
6300
6731
|
};
|
|
6301
|
-
function
|
|
6302
|
-
const rGeome =
|
|
6732
|
+
function pGeom28(t, param, suffix = "") {
|
|
6733
|
+
const rGeome = initGeom28(pDef28.partName + suffix);
|
|
6303
6734
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6304
6735
|
`;
|
|
6305
6736
|
try {
|
|
6306
|
-
const figOne =
|
|
6307
|
-
const p1 =
|
|
6308
|
-
const p2 =
|
|
6309
|
-
const v1 = vector(
|
|
6310
|
-
const v2 = vector(
|
|
6737
|
+
const figOne = figure28();
|
|
6738
|
+
const p1 = point14(param.p1x, param.p1y + t);
|
|
6739
|
+
const p2 = point14(param.p2x, param.p2y);
|
|
6740
|
+
const v1 = vector(degToRad11(param.v1a), param.v1l, p1);
|
|
6741
|
+
const v2 = vector(degToRad11(param.v2a), param.v2l, p1);
|
|
6311
6742
|
figOne.addPoint(p1);
|
|
6312
6743
|
figOne.addPoint(p2);
|
|
6313
6744
|
figOne.addVector(v1);
|
|
@@ -6328,22 +6759,22 @@ function pGeom27(t, param, suffix = "") {
|
|
|
6328
6759
|
var verifyVector1Def = {
|
|
6329
6760
|
pTitle: "Verify vector",
|
|
6330
6761
|
pDescription: "Debugging vector.ts",
|
|
6331
|
-
pDef:
|
|
6332
|
-
pGeom:
|
|
6762
|
+
pDef: pDef28,
|
|
6763
|
+
pGeom: pGeom28
|
|
6333
6764
|
};
|
|
6334
6765
|
|
|
6335
6766
|
// src/geometrix_verification/verify_contour_1.ts
|
|
6336
|
-
import { contour as contour19, contourCircle as
|
|
6337
|
-
var
|
|
6767
|
+
import { contour as contour19, contourCircle as contourCircle18, figure as figure29, pNumber as pNumber29, initGeom as initGeom29 } from "geometrix";
|
|
6768
|
+
var pDef29 = {
|
|
6338
6769
|
partName: "verify_contour_1",
|
|
6339
6770
|
params: [
|
|
6340
6771
|
//pNumber(name, unit, init, min, max, step)
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6772
|
+
pNumber29("r1", "mm", 30, 10, 200, 1),
|
|
6773
|
+
pNumber29("d1", "mm", 20, 10, 200, 1),
|
|
6774
|
+
pNumber29("w1", "mm", 100, 10, 200, 1),
|
|
6775
|
+
pNumber29("r2", "mm", 60, 10, 200, 1),
|
|
6776
|
+
pNumber29("l1", "mm", 10, 5, 200, 1),
|
|
6777
|
+
pNumber29("l2", "mm", 30, 5, 200, 1)
|
|
6347
6778
|
],
|
|
6348
6779
|
paramSvg: {
|
|
6349
6780
|
r1: "verify_contour_1_r1.svg",
|
|
@@ -6360,12 +6791,12 @@ var pDef28 = {
|
|
|
6360
6791
|
// every 0.5 second
|
|
6361
6792
|
}
|
|
6362
6793
|
};
|
|
6363
|
-
function
|
|
6364
|
-
const rGeome =
|
|
6794
|
+
function pGeom29(t, param, suffix = "") {
|
|
6795
|
+
const rGeome = initGeom29(pDef29.partName + suffix);
|
|
6365
6796
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6366
6797
|
`;
|
|
6367
6798
|
try {
|
|
6368
|
-
const figOne =
|
|
6799
|
+
const figOne = figure29();
|
|
6369
6800
|
const r1 = param.r1;
|
|
6370
6801
|
const d1 = param.d1;
|
|
6371
6802
|
const w1 = param.w1;
|
|
@@ -6385,10 +6816,10 @@ function pGeom28(t, param, suffix = "") {
|
|
|
6385
6816
|
ctr1.closeSegStroke();
|
|
6386
6817
|
ctr1.check();
|
|
6387
6818
|
figOne.addMain(ctr1);
|
|
6388
|
-
figOne.addMain(
|
|
6389
|
-
figOne.addMain(
|
|
6390
|
-
figOne.addMain(
|
|
6391
|
-
const ctr2 =
|
|
6819
|
+
figOne.addMain(contourCircle18(w12, c1, r1));
|
|
6820
|
+
figOne.addMain(contourCircle18(w12, c2, r1 + t));
|
|
6821
|
+
figOne.addMain(contourCircle18(w12, c3, r1));
|
|
6822
|
+
const ctr2 = contourCircle18(w1 + r2, 3 * c1, r2);
|
|
6392
6823
|
ctr2.check();
|
|
6393
6824
|
figOne.addSecond(ctr2);
|
|
6394
6825
|
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 +6837,20 @@ function pGeom28(t, param, suffix = "") {
|
|
|
6406
6837
|
var verifyContour1Def = {
|
|
6407
6838
|
pTitle: "Verify contour 1",
|
|
6408
6839
|
pDescription: "Debugging contour.ts",
|
|
6409
|
-
pDef:
|
|
6410
|
-
pGeom:
|
|
6840
|
+
pDef: pDef29,
|
|
6841
|
+
pGeom: pGeom29
|
|
6411
6842
|
};
|
|
6412
6843
|
|
|
6413
6844
|
// src/geometrix_verification/verify_contour_2.ts
|
|
6414
|
-
import { degToRad as
|
|
6415
|
-
var
|
|
6845
|
+
import { degToRad as degToRad12, contour as contour20, figure as figure30, pNumber as pNumber30, initGeom as initGeom30 } from "geometrix";
|
|
6846
|
+
var pDef30 = {
|
|
6416
6847
|
partName: "verify_contour_2",
|
|
6417
6848
|
params: [
|
|
6418
6849
|
//pNumber(name, unit, init, min, max, step)
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6850
|
+
pNumber30("r1", "mm", 20, 5, 200, 1),
|
|
6851
|
+
pNumber30("a1", "deg", 30, -200, 200, 1),
|
|
6852
|
+
pNumber30("at1", "deg", 30, -200, 200, 1),
|
|
6853
|
+
pNumber30("at2", "deg", 50, -200, 200, 1)
|
|
6423
6854
|
],
|
|
6424
6855
|
paramSvg: {
|
|
6425
6856
|
r1: "verify_contour_1_r1.svg",
|
|
@@ -6434,12 +6865,12 @@ var pDef29 = {
|
|
|
6434
6865
|
// every 0.5 second
|
|
6435
6866
|
}
|
|
6436
6867
|
};
|
|
6437
|
-
function
|
|
6438
|
-
const rGeome =
|
|
6868
|
+
function pGeom30(t, param, suffix = "") {
|
|
6869
|
+
const rGeome = initGeom30(pDef30.partName + suffix);
|
|
6439
6870
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6440
6871
|
`;
|
|
6441
6872
|
try {
|
|
6442
|
-
const figOne =
|
|
6873
|
+
const figOne = figure30();
|
|
6443
6874
|
const r1 = param.r1 + t;
|
|
6444
6875
|
const ata = param.a1 + t;
|
|
6445
6876
|
const at1 = param.at1 + t;
|
|
@@ -6481,17 +6912,17 @@ function pGeom29(t, param, suffix = "") {
|
|
|
6481
6912
|
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
6913
|
ctr2.check();
|
|
6483
6914
|
figOne.addMain(ctr2);
|
|
6484
|
-
const ctr3 = contour20(200, 200).addSegStrokeR(20, 0).addPointR(20, 0).addSegArc3(
|
|
6915
|
+
const ctr3 = contour20(200, 200).addSegStrokeR(20, 0).addPointR(20, 0).addSegArc3(degToRad12(ata), true).addSegStrokeR(20, 0).addPointR(20, 0).addSegArc3(degToRad12(ata), false).addSegStrokeR(20, 0).addSegStrokeR(0, 20).addPointR(0, 20).addSegArc3(degToRad12(ata), true).addSegStrokeR(0, 20).addPointR(0, 20).addSegArc3(degToRad12(ata), false).addSegStrokeR(0, 20).addSegStrokeR(-20, 0).addPointR(-20, 0).addSegArc3(degToRad12(ata), true).addSegStrokeR(-20, 0).addPointR(-20, 0).addSegArc3(degToRad12(ata), false).addSegStrokeR(-20, 0).addSegStrokeR(0, -20).addPointR(0, -20).addSegArc3(degToRad12(ata), true).addSegStrokeR(0, -20).addPointR(0, -20).addSegArc3(degToRad12(ata), false).addSegStrokeR(0, -20);
|
|
6485
6916
|
ctr3.check();
|
|
6486
6917
|
figOne.addMain(ctr3);
|
|
6487
|
-
const ctr4 = contour20(600, 200).addSegStrokeR(20, 20).addPointR(20, 20).addSegArc3(
|
|
6918
|
+
const ctr4 = contour20(600, 200).addSegStrokeR(20, 20).addPointR(20, 20).addSegArc3(degToRad12(ata), true).addSegStrokeR(20, 20).addPointR(20, 20).addSegArc3(degToRad12(ata), false).addSegStrokeR(20, 20).addSegStrokeR(-20, 20).addPointR(-20, 20).addSegArc3(degToRad12(ata), true).addSegStrokeR(-20, 20).addPointR(-20, 20).addSegArc3(degToRad12(ata), false).addSegStrokeR(-20, 20).addSegStrokeR(-20, -20).addPointR(-20, -20).addSegArc3(degToRad12(ata), true).addSegStrokeR(-20, -20).addPointR(-20, -20).addSegArc3(degToRad12(ata), false).addSegStrokeR(-20, -20).addSegStrokeR(20, -20).addPointR(20, -20).addSegArc3(degToRad12(ata), true).addSegStrokeR(20, -20).addPointR(20, -20).addSegArc3(degToRad12(ata), false).addSegStrokeR(20, -20);
|
|
6488
6919
|
ctr4.check();
|
|
6489
6920
|
figOne.addMain(ctr4);
|
|
6490
6921
|
const ctr5 = contour20(100, 500);
|
|
6491
6922
|
for (let i = 0; i < 8; i++) {
|
|
6492
6923
|
const adir = i * 45;
|
|
6493
|
-
const adirRad =
|
|
6494
|
-
ctr5.addSegStrokeRP(adirRad, 20).addPointRP(adirRad, 20).addSeg2Arcs(
|
|
6924
|
+
const adirRad = degToRad12(adir);
|
|
6925
|
+
ctr5.addSegStrokeRP(adirRad, 20).addPointRP(adirRad, 20).addSeg2Arcs(degToRad12(adir + at1), degToRad12(180 + adir - at2)).addSegStrokeRP(adirRad, 20).addPointRP(adirRad, 20).addSeg2Arcs(degToRad12(adir - at1), degToRad12(180 + adir + at2)).addSegStrokeRP(adirRad, 20);
|
|
6495
6926
|
}
|
|
6496
6927
|
ctr5.check();
|
|
6497
6928
|
figOne.addMain(ctr5);
|
|
@@ -6507,22 +6938,22 @@ function pGeom29(t, param, suffix = "") {
|
|
|
6507
6938
|
var verifyContour2Def = {
|
|
6508
6939
|
pTitle: "Verify contour 2",
|
|
6509
6940
|
pDescription: "Debugging more contour.ts",
|
|
6510
|
-
pDef:
|
|
6511
|
-
pGeom:
|
|
6941
|
+
pDef: pDef30,
|
|
6942
|
+
pGeom: pGeom30
|
|
6512
6943
|
};
|
|
6513
6944
|
|
|
6514
6945
|
// src/geometrix_verification/verify_contour_3.ts
|
|
6515
|
-
import { degToRad as
|
|
6516
|
-
var
|
|
6946
|
+
import { degToRad as degToRad13, contour as contour21, figure as figure31, pNumber as pNumber31, initGeom as initGeom31 } from "geometrix";
|
|
6947
|
+
var pDef31 = {
|
|
6517
6948
|
partName: "verify_contour_3",
|
|
6518
6949
|
params: [
|
|
6519
6950
|
//pNumber(name, unit, init, min, max, step)
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6951
|
+
pNumber31("r1", "mm", 10, 0, 200, 1),
|
|
6952
|
+
pNumber31("r2", "mm", 10, 0, 200, 1),
|
|
6953
|
+
pNumber31("r3", "mm", 10, 0, 200, 1),
|
|
6954
|
+
pNumber31("r4", "mm", 10, 0, 200, 1),
|
|
6955
|
+
pNumber31("r5", "mm", 10, 0, 200, 1),
|
|
6956
|
+
pNumber31("r6", "mm", 5, 0, 200, 1)
|
|
6526
6957
|
],
|
|
6527
6958
|
paramSvg: {
|
|
6528
6959
|
r1: "verify_contour_1_r1.svg",
|
|
@@ -6539,12 +6970,12 @@ var pDef30 = {
|
|
|
6539
6970
|
// every 0.5 second
|
|
6540
6971
|
}
|
|
6541
6972
|
};
|
|
6542
|
-
function
|
|
6543
|
-
const rGeome =
|
|
6973
|
+
function pGeom31(t, param, suffix = "") {
|
|
6974
|
+
const rGeome = initGeom31(pDef31.partName + suffix);
|
|
6544
6975
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6545
6976
|
`;
|
|
6546
6977
|
try {
|
|
6547
|
-
const figOne =
|
|
6978
|
+
const figOne = figure31();
|
|
6548
6979
|
const r1 = param.r1 + t;
|
|
6549
6980
|
const r2 = param.r2 + t;
|
|
6550
6981
|
const r3 = param.r3 + t;
|
|
@@ -6558,7 +6989,7 @@ function pGeom30(t, param, suffix = "") {
|
|
|
6558
6989
|
const ctr2 = contour21(300, 0);
|
|
6559
6990
|
for (let i = 0; i < 4; i++) {
|
|
6560
6991
|
const angle = 90 * (1 - i);
|
|
6561
|
-
ctr2.addSegStrokeRP(
|
|
6992
|
+
ctr2.addSegStrokeRP(degToRad13(angle), l2).addCornerRounded(r2).addSegStrokeRP(degToRad13(angle - 45), l2).addCornerRounded(r2).addSegStrokeRP(degToRad13(angle + 45), l2).addCornerRounded(r2).addSegStrokeRP(degToRad13(angle), l2).addCornerRounded(r2);
|
|
6562
6993
|
}
|
|
6563
6994
|
rGeome.logstr += ctr2.check();
|
|
6564
6995
|
figOne.addMain(ctr2);
|
|
@@ -6658,19 +7089,19 @@ function pGeom30(t, param, suffix = "") {
|
|
|
6658
7089
|
var verifyContour3Def = {
|
|
6659
7090
|
pTitle: "Verify contour 3",
|
|
6660
7091
|
pDescription: "Debugging contour.ts for rounded corners and widened corners",
|
|
6661
|
-
pDef:
|
|
6662
|
-
pGeom:
|
|
7092
|
+
pDef: pDef31,
|
|
7093
|
+
pGeom: pGeom31
|
|
6663
7094
|
};
|
|
6664
7095
|
|
|
6665
7096
|
// src/geometrix_verification/verify_contour_4.ts
|
|
6666
|
-
import { contour as contour22, figure as
|
|
6667
|
-
var
|
|
7097
|
+
import { contour as contour22, figure as figure32, pNumber as pNumber32, initGeom as initGeom32 } from "geometrix";
|
|
7098
|
+
var pDef32 = {
|
|
6668
7099
|
partName: "verify_contour_4",
|
|
6669
7100
|
params: [
|
|
6670
7101
|
//pNumber(name, unit, init, min, max, step)
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
7102
|
+
pNumber32("n1", "scalar", 16, 1, 50, 1),
|
|
7103
|
+
pNumber32("n2", "scalar", 6, 3, 50, 1),
|
|
7104
|
+
pNumber32("r1", "mm", 5, 0, 20, 1)
|
|
6674
7105
|
],
|
|
6675
7106
|
paramSvg: {
|
|
6676
7107
|
n1: "verify_contour_1_r1.svg",
|
|
@@ -6684,12 +7115,12 @@ var pDef31 = {
|
|
|
6684
7115
|
// every 0.5 second
|
|
6685
7116
|
}
|
|
6686
7117
|
};
|
|
6687
|
-
function
|
|
6688
|
-
const rGeome =
|
|
7118
|
+
function pGeom32(t, param, suffix = "") {
|
|
7119
|
+
const rGeome = initGeom32(pDef32.partName + suffix);
|
|
6689
7120
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6690
7121
|
`;
|
|
6691
7122
|
try {
|
|
6692
|
-
const figOne =
|
|
7123
|
+
const figOne = figure32();
|
|
6693
7124
|
const n1 = param.n1;
|
|
6694
7125
|
const n2 = param.n2;
|
|
6695
7126
|
const r1 = param.r1;
|
|
@@ -6736,29 +7167,29 @@ function pGeom31(t, param, suffix = "") {
|
|
|
6736
7167
|
var verifyContour4Def = {
|
|
6737
7168
|
pTitle: "Verify contour 4",
|
|
6738
7169
|
pDescription: "Debugging contour.ts for addPartial",
|
|
6739
|
-
pDef:
|
|
6740
|
-
pGeom:
|
|
7170
|
+
pDef: pDef32,
|
|
7171
|
+
pGeom: pGeom32
|
|
6741
7172
|
};
|
|
6742
7173
|
|
|
6743
7174
|
// src/geometrix_verification/verify_exports_1.ts
|
|
6744
7175
|
import {
|
|
6745
7176
|
contour as contour23,
|
|
6746
|
-
contourCircle as
|
|
6747
|
-
figure as
|
|
6748
|
-
pNumber as
|
|
7177
|
+
contourCircle as contourCircle19,
|
|
7178
|
+
figure as figure33,
|
|
7179
|
+
pNumber as pNumber33,
|
|
6749
7180
|
pCheckbox as pCheckbox5,
|
|
6750
|
-
initGeom as
|
|
6751
|
-
EExtrude as
|
|
6752
|
-
EBVolume as
|
|
7181
|
+
initGeom as initGeom33,
|
|
7182
|
+
EExtrude as EExtrude17,
|
|
7183
|
+
EBVolume as EBVolume20
|
|
6753
7184
|
} from "geometrix";
|
|
6754
|
-
var
|
|
7185
|
+
var pDef33 = {
|
|
6755
7186
|
partName: "verify_exports_1",
|
|
6756
7187
|
params: [
|
|
6757
7188
|
//pNumber(name, unit, init, min, max, step)
|
|
6758
7189
|
pCheckbox5("circle", true),
|
|
6759
|
-
|
|
7190
|
+
pNumber33("circle-size", "mm", 100, 1, 1e3, 1),
|
|
6760
7191
|
pCheckbox5("contour", true),
|
|
6761
|
-
|
|
7192
|
+
pNumber33("contour-size", "mm", 30, 1, 1e3, 1),
|
|
6762
7193
|
pCheckbox5("contour-arc-large", false)
|
|
6763
7194
|
],
|
|
6764
7195
|
paramSvg: {
|
|
@@ -6774,14 +7205,14 @@ var pDef32 = {
|
|
|
6774
7205
|
tUpdate: 500
|
|
6775
7206
|
}
|
|
6776
7207
|
};
|
|
6777
|
-
function
|
|
6778
|
-
const rGeome =
|
|
7208
|
+
function pGeom33(t, param, suffix = "") {
|
|
7209
|
+
const rGeome = initGeom33(pDef33.partName + suffix);
|
|
6779
7210
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
6780
7211
|
`;
|
|
6781
7212
|
try {
|
|
6782
|
-
const figOne =
|
|
7213
|
+
const figOne = figure33();
|
|
6783
7214
|
if (param.circle === 1) {
|
|
6784
|
-
const theCircle =
|
|
7215
|
+
const theCircle = contourCircle19(0, 0, param["circle-size"]);
|
|
6785
7216
|
figOne.addMain(theCircle);
|
|
6786
7217
|
}
|
|
6787
7218
|
if (param.contour === 1) {
|
|
@@ -6797,7 +7228,7 @@ function pGeom32(t, param, suffix = "") {
|
|
|
6797
7228
|
{
|
|
6798
7229
|
outName: `subpax_${designName}_one`,
|
|
6799
7230
|
face: `${designName}_one`,
|
|
6800
|
-
extrudeMethod:
|
|
7231
|
+
extrudeMethod: EExtrude17.eLinearOrtho,
|
|
6801
7232
|
length: 10,
|
|
6802
7233
|
rotate: [0, 0, 0],
|
|
6803
7234
|
translate: [0, 0, 0]
|
|
@@ -6806,7 +7237,7 @@ function pGeom32(t, param, suffix = "") {
|
|
|
6806
7237
|
volumes: [
|
|
6807
7238
|
{
|
|
6808
7239
|
outName: `pax_${designName}`,
|
|
6809
|
-
boolMethod:
|
|
7240
|
+
boolMethod: EBVolume20.eIdentity,
|
|
6810
7241
|
inList: [`subpax_${designName}_one`]
|
|
6811
7242
|
}
|
|
6812
7243
|
]
|
|
@@ -6822,14 +7253,15 @@ function pGeom32(t, param, suffix = "") {
|
|
|
6822
7253
|
var verifyExports1Def = {
|
|
6823
7254
|
pTitle: "Verify exports 1",
|
|
6824
7255
|
pDescription: "For dev & debug of Openscad export",
|
|
6825
|
-
pDef:
|
|
6826
|
-
pGeom:
|
|
7256
|
+
pDef: pDef33,
|
|
7257
|
+
pGeom: pGeom33
|
|
6827
7258
|
};
|
|
6828
7259
|
export {
|
|
6829
7260
|
baseDef,
|
|
6830
7261
|
circlesDef,
|
|
6831
7262
|
dummyPoleStaticDef,
|
|
6832
7263
|
gearWheelWheelDef,
|
|
7264
|
+
haxisGuidanceDef,
|
|
6833
7265
|
heliostatDef,
|
|
6834
7266
|
heliostat_2Def,
|
|
6835
7267
|
poleStaticDef,
|