desi77 0.1.15 → 0.1.17
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 +5 -1
- package/dist/index.js +1498 -878
- package/dist/pgdsvg/capsule_nose.svg +1 -1
- package/dist/pgdsvg/capsule_side.svg +1 -1
- package/dist/pgdsvg/capsule_top.svg +1 -1
- package/dist/pgdsvg/capsule_wall.svg +1 -1
- package/dist/pgdsvg/capsule_wheels.svg +1 -1
- package/dist/pgdsvg/door1Arc_face.svg +1 -1
- package/dist/pgdsvg/door1Arc_nArcs.svg +1 -1
- package/dist/pgdsvg/door1Arc_spread.svg +1 -1
- package/dist/pgdsvg/door1Arc_vaultStone.svg +1 -1
- package/dist/pgdsvg/doubleBone_face.svg +1 -1
- package/dist/pgdsvg/doubleBone_folding.svg +1 -1
- package/dist/pgdsvg/doubleBone_side.svg +1 -1
- package/dist/pgdsvg/doubleBone_top.svg +1 -1
- package/dist/pgdsvg/factory_front_window.svg +1 -0
- package/dist/pgdsvg/factory_side_window.svg +1 -0
- package/dist/pgdsvg/factory_top.svg +2 -0
- package/dist/pgdsvg/factory_west.svg +1 -0
- package/dist/pgdsvg/heliostat_bottom.svg +1 -1
- package/dist/pgdsvg/heliostat_fixation.svg +1 -1
- package/dist/pgdsvg/heliostat_hand.svg +1 -1
- package/dist/pgdsvg/heliostat_junction.svg +2 -2
- package/dist/pgdsvg/heliostat_top.svg +1 -1
- package/dist/pgdsvg/house_pignon.svg +1 -1
- package/dist/pgdsvg/house_top.svg +1 -1
- package/dist/pgdsvg/pcar_front.svg +3 -0
- package/dist/pgdsvg/pcar_side.svg +1 -0
- package/dist/pgdsvg/pcar_top.svg +1 -0
- package/dist/pgdsvg/plugTorque_parts.svg +1 -1
- package/dist/pgdsvg/plugTorque_teeth_adden.svg +1 -1
- package/dist/pgdsvg/plugTorque_teeth_deden.svg +1 -1
- package/dist/pgdsvg/plugTorque_teeth_radial.svg +1 -1
- package/dist/pgdsvg/rccar_all_xy.svg +3 -3
- package/dist/pgdsvg/rccar_all_xz.svg +1 -1
- package/dist/pgdsvg/rccar_bone.svg +1 -1
- package/dist/pgdsvg/rccar_motor_xz.svg +1 -1
- package/dist/pgdsvg/rccar_one_xy.svg +1 -1
- package/dist/pgdsvg/rccar_platform_xz.svg +1 -1
- package/dist/pgdsvg/singleBone_face.svg +1 -1
- package/dist/pgdsvg/springInt_face.svg +3 -3
- package/dist/pgdsvg/springInt_global.svg +1 -1
- package/dist/pgdsvg/springInt_section.svg +2 -2
- package/dist/pgdsvg/springInt_spring.svg +1 -1
- package/dist/pgdsvg/springOne_face.svg +3 -3
- package/dist/pgdsvg/springOne_side.svg +2 -2
- package/dist/pgdsvg/springOne_spring.svg +1 -1
- package/dist/pgdsvg/springOne_top.svg +2 -2
- package/dist/pgdsvg/springSide_face.svg +3 -3
- package/dist/pgdsvg/springSide_section.svg +2 -2
- package/dist/pgdsvg/springSide_spring.svg +1 -1
- package/dist/pgdsvg/springSide_top.svg +1 -1
- package/dist/pgdsvg/springTorqueA_profile.svg +1 -1
- package/dist/pgdsvg/springTorqueB_profile.svg +5 -5
- package/dist/pgdsvg/springTorqueC_profile.svg +5 -5
- package/dist/pgdsvg/springWorm_caps.svg +3 -3
- package/dist/pgdsvg/springWorm_mid.svg +1 -1
- package/dist/pgdsvg/springWorm_side.svg +1 -1
- package/dist/pgdsvg/src_capsule.svg +2 -2
- package/dist/pgdsvg/src_door1Arc.svg +1 -1
- package/dist/pgdsvg/src_doubleBone.svg +1 -1
- package/dist/pgdsvg/src_factory.svg +2 -0
- package/dist/pgdsvg/src_heliostat.svg +2 -2
- package/dist/pgdsvg/src_house.svg +1 -1
- package/dist/pgdsvg/src_pcar.svg +6 -0
- package/dist/pgdsvg/src_plugTorque.svg +1 -1
- package/dist/pgdsvg/src_rccar.svg +3 -3
- package/dist/pgdsvg/src_singleBone.svg +1 -1
- package/dist/pgdsvg/src_springInt.svg +4 -4
- package/dist/pgdsvg/src_springOne.svg +5 -5
- package/dist/pgdsvg/src_springSide.svg +5 -5
- package/dist/pgdsvg/src_springTorqueA.svg +1 -1
- package/dist/pgdsvg/src_springTorqueB.svg +5 -5
- package/dist/pgdsvg/src_springTorqueC.svg +5 -5
- package/dist/pgdsvg/src_springWorm.svg +3 -3
- package/dist/pgdsvg/src_stoneTower.svg +1 -1
- package/dist/pgdsvg/stoneTower_hplan.svg +1 -1
- package/dist/pgdsvg/stoneTower_vw.svg +1 -1
- package/dist/pgdsvg/stoneTower_window2.svg +1 -1
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -1161,40 +1161,275 @@ var houseDef = {
|
|
|
1161
1161
|
pGeom: pGeom3
|
|
1162
1162
|
};
|
|
1163
1163
|
|
|
1164
|
-
// src/
|
|
1164
|
+
// src/stone/factory.ts
|
|
1165
1165
|
import {
|
|
1166
|
-
|
|
1167
|
-
contour as contour4,
|
|
1168
|
-
contourCircle as contourCircle2,
|
|
1166
|
+
ctrRectangle as ctrRectangle4,
|
|
1169
1167
|
figure as figure4,
|
|
1170
|
-
radToDeg as radToDeg3,
|
|
1171
1168
|
ffix as ffix4,
|
|
1172
1169
|
pNumber as pNumber4,
|
|
1173
1170
|
pCheckbox as pCheckbox2,
|
|
1171
|
+
pDropdown as pDropdown2,
|
|
1174
1172
|
pSectionSeparator as pSectionSeparator4,
|
|
1175
1173
|
EExtrude as EExtrude4,
|
|
1176
1174
|
EBVolume as EBVolume4,
|
|
1177
1175
|
initGeom as initGeom4
|
|
1178
1176
|
} from "geometrix";
|
|
1179
1177
|
var pDef4 = {
|
|
1178
|
+
// partName is used in URL. Choose a name without slash, backslash and space.
|
|
1179
|
+
partName: "factory",
|
|
1180
|
+
params: [
|
|
1181
|
+
//pNumber(name, unit, init, min, max, step)
|
|
1182
|
+
pNumber4("onx", "office", 4, 1, 50, 1),
|
|
1183
|
+
pNumber4("ony", "office", 3, 1, 50, 1),
|
|
1184
|
+
pNumber4("olx", "mm", 5e3, 1e3, 5e4, 10),
|
|
1185
|
+
pNumber4("oly", "mm", 5e3, 1e3, 5e4, 10),
|
|
1186
|
+
pNumber4("iwx", "mm", 2e3, 500, 1e4, 10),
|
|
1187
|
+
pNumber4("iwy", "mm", 2e3, 500, 1e4, 10),
|
|
1188
|
+
pSectionSeparator4("details"),
|
|
1189
|
+
pNumber4("ewx", "mm", 5e3, 500, 2e4, 10),
|
|
1190
|
+
pNumber4("ewy", "mm", 5e3, 500, 2e4, 10),
|
|
1191
|
+
pDropdown2("officeOrientation", ["xdw", "xup", "xal", "ydw", "yup", "yal"]),
|
|
1192
|
+
pNumber4("ith", "mm", 400, 100, 2e3, 10),
|
|
1193
|
+
pNumber4("eth", "mm", 400, 100, 2e3, 10),
|
|
1194
|
+
pNumber4("bw", "mm", 1500, 200, 1e4, 10),
|
|
1195
|
+
pSectionSeparator4("heights and roof"),
|
|
1196
|
+
pNumber4("oh1", "mm", 2800, 2e3, 5e3, 10),
|
|
1197
|
+
pNumber4("oh2", "mm", 4e3, 2e3, 1e4, 10),
|
|
1198
|
+
pNumber4("rth", "mm", 200, 10, 1e3, 10),
|
|
1199
|
+
pNumber4("ras", "degree", 49, 20, 90, 0.1),
|
|
1200
|
+
pNumber4("ran", "degree", 90, 80, 160, 0.1),
|
|
1201
|
+
pSectionSeparator4("lateral windows"),
|
|
1202
|
+
pNumber4("swx1", "mm", 1e3, 10, 5e3, 10),
|
|
1203
|
+
pNumber4("swx2", "mm", 1e3, 10, 5e3, 10),
|
|
1204
|
+
pNumber4("swh1", "mm", 1e3, 10, 5e3, 10),
|
|
1205
|
+
pNumber4("swh2", "mm", 1e3, 10, 5e3, 10),
|
|
1206
|
+
pNumber4("swh3", "mm", 200, 10, 5e3, 10),
|
|
1207
|
+
pSectionSeparator4("front windows"),
|
|
1208
|
+
pNumber4("fwx1", "mm", 1e3, 10, 5e3, 10),
|
|
1209
|
+
pNumber4("fwx2", "mm", 1e3, 10, 5e3, 10),
|
|
1210
|
+
pNumber4("fwh1", "mm", 1e3, 10, 5e3, 10),
|
|
1211
|
+
pNumber4("fwh2", "mm", 1e3, 10, 5e3, 10),
|
|
1212
|
+
pNumber4("fwh3", "mm", 200, 10, 5e3, 10),
|
|
1213
|
+
pNumber4("fdx1", "mm", 1e3, 10, 5e3, 10),
|
|
1214
|
+
pNumber4("fdx2", "mm", 1e3, 10, 5e3, 10),
|
|
1215
|
+
pNumber4("fdh2", "mm", 2e3, 10, 5e3, 10),
|
|
1216
|
+
pNumber4("fdh3", "mm", 200, 10, 5e3, 10),
|
|
1217
|
+
pSectionSeparator4("to be deleted"),
|
|
1218
|
+
pNumber4("L1", "mm", 120, 1, 400, 1),
|
|
1219
|
+
pNumber4("L2", "mm", 80, 1, 400, 1),
|
|
1220
|
+
pNumber4("W1", "mm", 2, 0.1, 10, 0.1),
|
|
1221
|
+
pNumber4("H1", "mm", 40, 1, 400, 1),
|
|
1222
|
+
pNumber4("H2", "mm", 2, 0.1, 10, 0.1),
|
|
1223
|
+
//pSectionSeparator(name)
|
|
1224
|
+
pSectionSeparator4("hollow"),
|
|
1225
|
+
//pCheckbox(name, init)
|
|
1226
|
+
pCheckbox2("holes", true),
|
|
1227
|
+
pNumber4("D1", "mm", 10, 1, 400, 1),
|
|
1228
|
+
pNumber4("D2", "mm", 5, 1, 400, 1),
|
|
1229
|
+
pSectionSeparator4("corners"),
|
|
1230
|
+
pNumber4("Rc", "mm", 10, 0, 400, 1)
|
|
1231
|
+
],
|
|
1232
|
+
paramSvg: {
|
|
1233
|
+
onx: "factory_top.svg",
|
|
1234
|
+
ony: "factory_top.svg",
|
|
1235
|
+
olx: "factory_top.svg",
|
|
1236
|
+
oly: "factory_top.svg",
|
|
1237
|
+
iwx: "factory_top.svg",
|
|
1238
|
+
iwy: "factory_top.svg",
|
|
1239
|
+
ewx: "factory_top.svg",
|
|
1240
|
+
ewy: "factory_top.svg",
|
|
1241
|
+
officeOrientation: "factory_top.svg",
|
|
1242
|
+
ith: "factory_top.svg",
|
|
1243
|
+
eth: "factory_top.svg",
|
|
1244
|
+
bw: "factory_top.svg",
|
|
1245
|
+
oh1: "factory_west.svg",
|
|
1246
|
+
oh2: "factory_west.svg",
|
|
1247
|
+
rth: "factory_west.svg",
|
|
1248
|
+
ras: "factory_west.svg",
|
|
1249
|
+
ran: "factory_west.svg",
|
|
1250
|
+
swx1: "factory_side_window.svg",
|
|
1251
|
+
swx2: "factory_side_window.svg",
|
|
1252
|
+
swh1: "factory_side_window.svg",
|
|
1253
|
+
swh2: "factory_side_window.svg",
|
|
1254
|
+
swh3: "factory_side_window.svg",
|
|
1255
|
+
fwx1: "factory_front_window.svg",
|
|
1256
|
+
fwx2: "factory_front_window.svg",
|
|
1257
|
+
fwh1: "factory_front_window.svg",
|
|
1258
|
+
fwh2: "factory_front_window.svg",
|
|
1259
|
+
fwh3: "factory_front_window.svg",
|
|
1260
|
+
fdx1: "factory_front_window.svg",
|
|
1261
|
+
fdx2: "factory_front_window.svg",
|
|
1262
|
+
fdh2: "factory_front_window.svg",
|
|
1263
|
+
fdh3: "factory_front_window.svg",
|
|
1264
|
+
//
|
|
1265
|
+
L1: "factory_top.svg",
|
|
1266
|
+
L2: "factory_west.svg",
|
|
1267
|
+
W1: "factory_side_window.svg",
|
|
1268
|
+
H1: "factory_front_window.svg",
|
|
1269
|
+
H2: "factory_top.svg",
|
|
1270
|
+
holes: "factory_top.svg",
|
|
1271
|
+
D1: "factory_top.svg",
|
|
1272
|
+
D2: "factory_top.svg",
|
|
1273
|
+
Rc: "factory_top.svg"
|
|
1274
|
+
},
|
|
1275
|
+
sim: {
|
|
1276
|
+
tMax: 180,
|
|
1277
|
+
tStep: 0.5,
|
|
1278
|
+
tUpdate: 500
|
|
1279
|
+
// every 0.5 second
|
|
1280
|
+
}
|
|
1281
|
+
};
|
|
1282
|
+
function pGeom4(t, param, suffix = "") {
|
|
1283
|
+
const rGeome = initGeom4(pDef4.partName + suffix);
|
|
1284
|
+
const figTop = figure4();
|
|
1285
|
+
const figWest = figure4();
|
|
1286
|
+
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
1287
|
+
`;
|
|
1288
|
+
try {
|
|
1289
|
+
const llix = param.onx * param.olx + (param.onx - 1) * param.iwx + 2 * param.ewx;
|
|
1290
|
+
const llex = llix + 2 * param.eth;
|
|
1291
|
+
const lliy = param.ony * param.oly + (param.ony - 1) * param.iwy + 2 * param.ewy;
|
|
1292
|
+
const lley = lliy + 2 * param.eth;
|
|
1293
|
+
const llixm = llix / 1e3;
|
|
1294
|
+
const llexm = llex / 1e3;
|
|
1295
|
+
const lliym = lliy / 1e3;
|
|
1296
|
+
const lleym = lley / 1e3;
|
|
1297
|
+
const fh = param.oh1 + param.oh2;
|
|
1298
|
+
const olix = param.olx - 2 * param.ith;
|
|
1299
|
+
const oliy = param.oly - 2 * param.ith;
|
|
1300
|
+
const officeOx = param.eth + param.ewx;
|
|
1301
|
+
const officeOy = param.eth + param.ewy;
|
|
1302
|
+
if (olix < 0) {
|
|
1303
|
+
throw `err158: olix ${ffix4(olix)} is too small compare to ith ${param.ith}`;
|
|
1304
|
+
}
|
|
1305
|
+
if (oliy < 0) {
|
|
1306
|
+
throw `err161: oliy ${ffix4(oliy)} is too small compare to ith ${param.ith}`;
|
|
1307
|
+
}
|
|
1308
|
+
if (param.olx < 2 * param.ith + param.swx1 + param.swx2) {
|
|
1309
|
+
throw `err151: olx ${param.olx} is too small compare to swx1 ${param.swx1} and swx2 ${param.swx2}`;
|
|
1310
|
+
}
|
|
1311
|
+
if (param.oly < 2 * param.ith + param.fwx1 + param.fwx2 + param.fdx1 + param.fdx2) {
|
|
1312
|
+
throw `err154: oly ${param.oly} is too small compare to fwx1 ${param.fwx1}, fwx2 ${param.fwx2}, fdx1 ${param.fdx1}, fdx2 ${param.fdx2}`;
|
|
1313
|
+
}
|
|
1314
|
+
if (Math.min(param.olx, param.oly) < param.bw) {
|
|
1315
|
+
throw `err172: bw ${param.bw} is too large compare to olx ${param.olx} or oly ${param.oly}`;
|
|
1316
|
+
}
|
|
1317
|
+
rGeome.logstr += `factory size: llex ${ffix4(llexm)} x lley ${ffix4(lleym)} m
|
|
1318
|
+
`;
|
|
1319
|
+
rGeome.logstr += `factory surface: ext ${ffix4(llexm * lleym)}, int ${ffix4(llixm * lliym)} m2
|
|
1320
|
+
`;
|
|
1321
|
+
const ctrFext = ctrRectangle4(0, 0, llex, lley);
|
|
1322
|
+
const ctrFint = ctrRectangle4(param.eth, param.eth, llix, lliy);
|
|
1323
|
+
figTop.addMainOI([ctrFext, ctrFint]);
|
|
1324
|
+
for (let ii = 0; ii < param.onx; ii++) {
|
|
1325
|
+
for (let jj = 0; jj < param.ony; jj++) {
|
|
1326
|
+
const pox = officeOx + ii * (param.olx + param.iwx);
|
|
1327
|
+
const poy = officeOy + jj * (param.oly + param.iwy);
|
|
1328
|
+
const ctrOext = ctrRectangle4(pox, poy, param.olx, param.oly);
|
|
1329
|
+
const ctrOint = ctrRectangle4(pox + param.ith, poy + param.ith, olix, oliy);
|
|
1330
|
+
figTop.addMainOI([ctrOext, ctrOint]);
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
for (let ii = 0; ii < param.onx - 1; ii++) {
|
|
1334
|
+
for (let jj = 0; jj < param.ony; jj++) {
|
|
1335
|
+
const pox = officeOx + ii * (param.olx + param.iwx) + param.olx;
|
|
1336
|
+
const poy = officeOy + jj * (param.oly + param.iwy) + (param.oly - param.bw) / 2;
|
|
1337
|
+
const ctrBridge = ctrRectangle4(pox, poy, param.iwx, param.bw);
|
|
1338
|
+
figTop.addMainO(ctrBridge);
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
for (let ii = 0; ii < param.onx; ii++) {
|
|
1342
|
+
for (let jj = 0; jj < param.ony - 1; jj++) {
|
|
1343
|
+
const pox = officeOx + ii * (param.olx + param.iwx) + (param.olx - param.bw) / 2;
|
|
1344
|
+
const poy = officeOy + jj * (param.oly + param.iwy) + param.oly;
|
|
1345
|
+
const ctrBridge = ctrRectangle4(pox, poy, param.bw, param.iwy);
|
|
1346
|
+
figTop.addMainO(ctrBridge);
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
figWest.addMainO(ctrRectangle4(0, -param.eth, llex, param.eth));
|
|
1350
|
+
figWest.addMainO(ctrRectangle4(0, 0, param.eth, fh));
|
|
1351
|
+
figWest.addMainO(ctrRectangle4(llex - param.eth, 0, param.eth, fh));
|
|
1352
|
+
for (let ii = 0; ii < param.onx; ii++) {
|
|
1353
|
+
const pox = officeOx + ii * (param.olx + param.iwx);
|
|
1354
|
+
figWest.addMainOI([
|
|
1355
|
+
ctrRectangle4(pox, 0, param.olx, param.oh1),
|
|
1356
|
+
ctrRectangle4(pox + param.ith, 0, olix, param.oh1 - param.ith)
|
|
1357
|
+
]);
|
|
1358
|
+
}
|
|
1359
|
+
rGeome.fig = {
|
|
1360
|
+
faceTop: figTop,
|
|
1361
|
+
faceWest: figWest
|
|
1362
|
+
};
|
|
1363
|
+
const designName = rGeome.partName;
|
|
1364
|
+
rGeome.vol = {
|
|
1365
|
+
extrudes: [
|
|
1366
|
+
{
|
|
1367
|
+
outName: `subpax_${designName}_top`,
|
|
1368
|
+
face: `${designName}_faceTop`,
|
|
1369
|
+
extrudeMethod: EExtrude4.eLinearOrtho,
|
|
1370
|
+
length: fh,
|
|
1371
|
+
rotate: [0, 0, 0],
|
|
1372
|
+
translate: [0, 0, 0]
|
|
1373
|
+
}
|
|
1374
|
+
],
|
|
1375
|
+
volumes: [
|
|
1376
|
+
{
|
|
1377
|
+
outName: `pax_${designName}`,
|
|
1378
|
+
boolMethod: EBVolume4.eUnion,
|
|
1379
|
+
inList: [`subpax_${designName}_top`]
|
|
1380
|
+
}
|
|
1381
|
+
]
|
|
1382
|
+
};
|
|
1383
|
+
rGeome.sub = {};
|
|
1384
|
+
rGeome.logstr += "factory drawn successfully!\n";
|
|
1385
|
+
rGeome.calcErr = false;
|
|
1386
|
+
} catch (emsg) {
|
|
1387
|
+
rGeome.logstr += emsg;
|
|
1388
|
+
console.log(emsg);
|
|
1389
|
+
}
|
|
1390
|
+
return rGeome;
|
|
1391
|
+
}
|
|
1392
|
+
var factoryDef = {
|
|
1393
|
+
pTitle: "factory",
|
|
1394
|
+
pDescription: "a scalable factory-plan",
|
|
1395
|
+
pDef: pDef4,
|
|
1396
|
+
pGeom: pGeom4
|
|
1397
|
+
};
|
|
1398
|
+
|
|
1399
|
+
// src/spring/springTorqueA.ts
|
|
1400
|
+
import {
|
|
1401
|
+
point as point2,
|
|
1402
|
+
contour as contour4,
|
|
1403
|
+
contourCircle as contourCircle2,
|
|
1404
|
+
figure as figure5,
|
|
1405
|
+
radToDeg as radToDeg3,
|
|
1406
|
+
ffix as ffix5,
|
|
1407
|
+
pNumber as pNumber5,
|
|
1408
|
+
pCheckbox as pCheckbox3,
|
|
1409
|
+
pSectionSeparator as pSectionSeparator5,
|
|
1410
|
+
EExtrude as EExtrude5,
|
|
1411
|
+
EBVolume as EBVolume5,
|
|
1412
|
+
initGeom as initGeom5
|
|
1413
|
+
} from "geometrix";
|
|
1414
|
+
var pDef5 = {
|
|
1180
1415
|
partName: "springTorqueA",
|
|
1181
1416
|
params: [
|
|
1182
1417
|
//pNumber(name, unit, init, min, max, step)
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1418
|
+
pNumber5("D1", "mm", 20, 1, 1e3, 1),
|
|
1419
|
+
pNumber5("N1", "hole", 16, 0, 400, 1),
|
|
1420
|
+
pNumber5("T1", "mm", 2, 0.1, 50, 0.1),
|
|
1421
|
+
pNumber5("E1", "mm", 1, 0.1, 50, 0.1),
|
|
1422
|
+
pSectionSeparator5("External ring"),
|
|
1423
|
+
pCheckbox3("Ring2", true),
|
|
1424
|
+
pNumber5("D2", "mm", 80, 1, 1e3, 1),
|
|
1425
|
+
pNumber5("N2", "hole", 16, 0, 400, 1),
|
|
1426
|
+
pNumber5("T2", "mm", 2, 0.1, 50, 0.1),
|
|
1427
|
+
pNumber5("E2", "mm", 1, 0.1, 50, 0.1),
|
|
1428
|
+
pSectionSeparator5("Spoke"),
|
|
1429
|
+
pNumber5("N3", "spoke", 5, 0, 60, 1),
|
|
1430
|
+
pNumber5("E3", "mm", 3, 0.1, 100, 0.1),
|
|
1431
|
+
pNumber5("R3", "mm", 3, 0, 100, 0.1),
|
|
1432
|
+
pNumber5("Th", "mm", 3, 0.1, 100, 0.1)
|
|
1198
1433
|
],
|
|
1199
1434
|
paramSvg: {
|
|
1200
1435
|
D1: "springTorqueA_profile.svg",
|
|
@@ -1218,9 +1453,9 @@ var pDef4 = {
|
|
|
1218
1453
|
// every 0.5 second
|
|
1219
1454
|
}
|
|
1220
1455
|
};
|
|
1221
|
-
function
|
|
1222
|
-
const rGeome =
|
|
1223
|
-
const figProfile =
|
|
1456
|
+
function pGeom5(t, param, suffix = "") {
|
|
1457
|
+
const rGeome = initGeom5(pDef5.partName + suffix);
|
|
1458
|
+
const figProfile = figure5();
|
|
1224
1459
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
1225
1460
|
`;
|
|
1226
1461
|
try {
|
|
@@ -1242,12 +1477,12 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1242
1477
|
const aIntMin = 2 * Math.asin((RT1 + 0.5 * param.E1) / R1);
|
|
1243
1478
|
const aInt = param.N1 > 0 ? 2 * Math.PI / param.N1 : 3.14;
|
|
1244
1479
|
if (aInt < aIntMin) {
|
|
1245
|
-
throw `err101: aInt ${
|
|
1480
|
+
throw `err101: aInt ${ffix5(radToDeg3(aInt))} is too small compare to aIntMin ${ffix5(radToDeg3(aIntMin))} degree`;
|
|
1246
1481
|
}
|
|
1247
1482
|
const aExtMin = 2 * Math.asin((RT2 + 0.5 * param.E2) / R2);
|
|
1248
1483
|
const aExt = param.N2 > 0 ? 2 * Math.PI / param.N2 : 3.14;
|
|
1249
1484
|
if (aExt < aExtMin) {
|
|
1250
|
-
throw `err106: aExt ${
|
|
1485
|
+
throw `err106: aExt ${ffix5(radToDeg3(aExt))} is too small compare to aExtMin ${ffix5(radToDeg3(aExtMin))} degree`;
|
|
1251
1486
|
}
|
|
1252
1487
|
const ah2 = Math.asin(E32 / Rh2);
|
|
1253
1488
|
const ah1 = Math.asin(E32 / Rh1);
|
|
@@ -1258,9 +1493,9 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1258
1493
|
const Rh1b2 = sinah02 > 0.1 ? (E32 + param.R3) / sinah02 : Rh1 / 2;
|
|
1259
1494
|
const hollowTriangle = param.N3 > 1 && Rh1b2 > Rh1 + param.R3 - 0.1 ? true : false;
|
|
1260
1495
|
if (!hollowTriangle && ah0 < 2 * ahR1) {
|
|
1261
|
-
throw `err115: ah0 ${
|
|
1496
|
+
throw `err115: ah0 ${ffix5(radToDeg3(ah0))} is too small compare to ah1 ${ffix5(radToDeg3(ah1))}, ahR1 ${ffix5(radToDeg3(ahR1))} degree`;
|
|
1262
1497
|
}
|
|
1263
|
-
rGeome.logstr += `Dmax ${
|
|
1498
|
+
rGeome.logstr += `Dmax ${ffix5(2 * Rmax)}, Dmin ${ffix5(2 * Rmin)} mm
|
|
1264
1499
|
`;
|
|
1265
1500
|
rGeome.logstr += `Triangle vs quadri: ${hollowTriangle ? "triangle" : "quadri"}
|
|
1266
1501
|
`;
|
|
@@ -1305,7 +1540,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1305
1540
|
{
|
|
1306
1541
|
outName: `subpax_${designName}_profile`,
|
|
1307
1542
|
face: `${designName}_faceProfile`,
|
|
1308
|
-
extrudeMethod:
|
|
1543
|
+
extrudeMethod: EExtrude5.eLinearOrtho,
|
|
1309
1544
|
length: param.Th,
|
|
1310
1545
|
rotate: [0, 0, 0],
|
|
1311
1546
|
translate: [0, 0, 0]
|
|
@@ -1314,7 +1549,7 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1314
1549
|
volumes: [
|
|
1315
1550
|
{
|
|
1316
1551
|
outName: `pax_${designName}`,
|
|
1317
|
-
boolMethod:
|
|
1552
|
+
boolMethod: EBVolume5.eIdentity,
|
|
1318
1553
|
inList: [`subpax_${designName}_profile`]
|
|
1319
1554
|
}
|
|
1320
1555
|
]
|
|
@@ -1331,8 +1566,8 @@ function pGeom4(t, param, suffix = "") {
|
|
|
1331
1566
|
var springTorqueADef = {
|
|
1332
1567
|
pTitle: "springTorqueA",
|
|
1333
1568
|
pDescription: "spring disc for torque transmission",
|
|
1334
|
-
pDef:
|
|
1335
|
-
pGeom:
|
|
1569
|
+
pDef: pDef5,
|
|
1570
|
+
pGeom: pGeom5
|
|
1336
1571
|
};
|
|
1337
1572
|
|
|
1338
1573
|
// src/spring/plugTorque.ts
|
|
@@ -1341,16 +1576,16 @@ import {
|
|
|
1341
1576
|
point as point3,
|
|
1342
1577
|
contour as contour6,
|
|
1343
1578
|
contourCircle as contourCircle3,
|
|
1344
|
-
figure as
|
|
1579
|
+
figure as figure6,
|
|
1345
1580
|
degToRad as degToRad2,
|
|
1346
1581
|
radToDeg as radToDeg5,
|
|
1347
|
-
ffix as
|
|
1348
|
-
pNumber as
|
|
1349
|
-
pDropdown as
|
|
1350
|
-
pSectionSeparator as
|
|
1351
|
-
EExtrude as
|
|
1352
|
-
EBVolume as
|
|
1353
|
-
initGeom as
|
|
1582
|
+
ffix as ffix7,
|
|
1583
|
+
pNumber as pNumber6,
|
|
1584
|
+
pDropdown as pDropdown3,
|
|
1585
|
+
pSectionSeparator as pSectionSeparator6,
|
|
1586
|
+
EExtrude as EExtrude6,
|
|
1587
|
+
EBVolume as EBVolume6,
|
|
1588
|
+
initGeom as initGeom6
|
|
1354
1589
|
} from "geometrix";
|
|
1355
1590
|
import { triALLrLAA as triALLrLAA2 } from "triangule";
|
|
1356
1591
|
|
|
@@ -1360,7 +1595,7 @@ import {
|
|
|
1360
1595
|
contour as contour5,
|
|
1361
1596
|
degToRad,
|
|
1362
1597
|
radToDeg as radToDeg4,
|
|
1363
|
-
ffix as
|
|
1598
|
+
ffix as ffix6
|
|
1364
1599
|
} from "geometrix";
|
|
1365
1600
|
import { triALLrLAA } from "triangule";
|
|
1366
1601
|
function ctrPlugExtern(param, RbEmax) {
|
|
@@ -1390,7 +1625,7 @@ function ctrPlugExtern(param, RbEmax) {
|
|
|
1390
1625
|
}
|
|
1391
1626
|
const tooSmallAngle = 1e-4;
|
|
1392
1627
|
if (aAddE < tooSmallAngle || aDedE < tooSmallAngle) {
|
|
1393
|
-
throw `err164: aAddE ${
|
|
1628
|
+
throw `err164: aAddE ${ffix6(radToDeg4(aAddE))} or aDedE ${ffix6(radToDeg4(aDedE))} are too small`;
|
|
1394
1629
|
}
|
|
1395
1630
|
const ctrToothE = contour5(RminE, 0);
|
|
1396
1631
|
for (let ii = 0; ii < param.Nt; ii++) {
|
|
@@ -1414,42 +1649,42 @@ function ctrPlugExtern(param, RbEmax) {
|
|
|
1414
1649
|
}
|
|
1415
1650
|
|
|
1416
1651
|
// src/spring/plugTorque.ts
|
|
1417
|
-
var
|
|
1652
|
+
var pDef6 = {
|
|
1418
1653
|
partName: "plugTorque",
|
|
1419
1654
|
params: [
|
|
1420
1655
|
//pNumber(name, unit, init, min, max, step)
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1656
|
+
pNumber6("Nt", "teeth", 8, 1, 1e3, 1),
|
|
1657
|
+
pNumber6("Dt", "mm", 22, 0.1, 1e3, 0.1),
|
|
1658
|
+
pNumber6("Ht", "mm", 2, 0.1, 100, 0.1),
|
|
1659
|
+
pNumber6("Th", "mm", 1, 0.1, 100, 0.1),
|
|
1660
|
+
pDropdown3("make3D", ["both", "intern", "extern"]),
|
|
1661
|
+
pSectionSeparator6("Tooth profile"),
|
|
1662
|
+
pNumber6("ati", "%", 50, 1, 99, 0.1),
|
|
1663
|
+
pNumber6("ate", "%", 52, 1, 99, 1),
|
|
1664
|
+
pNumber6("ah", "%", 100, 1, 400, 1),
|
|
1665
|
+
pNumber6("dh", "%", 100, 1, 400, 1),
|
|
1666
|
+
pNumber6("aeh", "%", 10, 0, 100, 1),
|
|
1667
|
+
pNumber6("deh", "%", 10, 0, 100, 1),
|
|
1668
|
+
pNumber6("aM", "degree", 0, -30, 30, 0.1),
|
|
1669
|
+
pSectionSeparator6("Tooth profile details"),
|
|
1670
|
+
pDropdown3("SnAai", ["stroke", "arc"]),
|
|
1671
|
+
pDropdown3("SnAae", ["stroke", "arc"]),
|
|
1672
|
+
pDropdown3("SnAdi", ["stroke", "arc"]),
|
|
1673
|
+
pDropdown3("SnAde", ["stroke", "arc"]),
|
|
1674
|
+
pNumber6("Rai", "mm", 1, 0, 50, 0.1),
|
|
1675
|
+
pNumber6("Rae", "mm", 1, 0, 50, 0.1),
|
|
1676
|
+
pNumber6("Rdi", "mm", 1, 0, 50, 0.1),
|
|
1677
|
+
pNumber6("Rde", "mm", 1, 0, 50, 0.1),
|
|
1678
|
+
pSectionSeparator6("Internal part"),
|
|
1679
|
+
pNumber6("Ni", "holes", 5, 0, 1e3, 1),
|
|
1680
|
+
pNumber6("Di", "mm", 12, 0.1, 1e3, 0.1),
|
|
1681
|
+
pNumber6("DTi", "mm", 3, 0.1, 100, 0.1),
|
|
1682
|
+
pNumber6("Ei", "mm", 1, 0.1, 100, 0.1),
|
|
1683
|
+
pSectionSeparator6("External part"),
|
|
1684
|
+
pNumber6("Ne", "holes", 8, 0, 1e3, 1),
|
|
1685
|
+
pNumber6("De", "mm", 32, 0.1, 1e3, 0.1),
|
|
1686
|
+
pNumber6("DTe", "mm", 3, 0.1, 100, 0.1),
|
|
1687
|
+
pNumber6("Ee", "mm", 1, 0.1, 100, 0.1)
|
|
1453
1688
|
],
|
|
1454
1689
|
paramSvg: {
|
|
1455
1690
|
Nt: "plugTorque_teeth_radial.svg",
|
|
@@ -1488,10 +1723,10 @@ var pDef5 = {
|
|
|
1488
1723
|
// every 0.5 second
|
|
1489
1724
|
}
|
|
1490
1725
|
};
|
|
1491
|
-
function
|
|
1492
|
-
const rGeome =
|
|
1493
|
-
const figIntern =
|
|
1494
|
-
const figExtern =
|
|
1726
|
+
function pGeom6(t, param, suffix = "") {
|
|
1727
|
+
const rGeome = initGeom6(pDef6.partName + suffix);
|
|
1728
|
+
const figIntern = figure6();
|
|
1729
|
+
const figExtern = figure6();
|
|
1495
1730
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
1496
1731
|
`;
|
|
1497
1732
|
try {
|
|
@@ -1546,10 +1781,10 @@ function pGeom5(t, param, suffix = "") {
|
|
|
1546
1781
|
throw `err087: RminI ${RminI} is too small because of Di ${param.Di}, DTi ${param.DTi} or Ei ${param.Ei}`;
|
|
1547
1782
|
}
|
|
1548
1783
|
if (adTi < 2 * aMindTi) {
|
|
1549
|
-
throw `err131: adTi ${
|
|
1784
|
+
throw `err131: adTi ${ffix7(radToDeg5(adTi))} is too small compare to aMindTi ${ffix7(radToDeg5(aMindTi))} degree`;
|
|
1550
1785
|
}
|
|
1551
1786
|
if (adTe < 2 * aMindTe) {
|
|
1552
|
-
throw `err134: adTe ${
|
|
1787
|
+
throw `err134: adTe ${ffix7(radToDeg5(adTe))} is too small compare to aMindTe ${ffix7(radToDeg5(aMindTe))} degree`;
|
|
1553
1788
|
}
|
|
1554
1789
|
if (param.ati > param.ate) {
|
|
1555
1790
|
throw `err145: ate ${param.ate} is too small compare to ati ${param.ati} %`;
|
|
@@ -1562,22 +1797,22 @@ function pGeom5(t, param, suffix = "") {
|
|
|
1562
1797
|
}
|
|
1563
1798
|
const tooSmallAngle = 1e-4;
|
|
1564
1799
|
if (aAddI < tooSmallAngle || aDedI < tooSmallAngle) {
|
|
1565
|
-
throw `err161: aAddI ${
|
|
1800
|
+
throw `err161: aAddI ${ffix7(radToDeg5(aAddI))} or aDedI ${ffix7(radToDeg5(aDedI))} are too small`;
|
|
1566
1801
|
}
|
|
1567
1802
|
if (aAddE < tooSmallAngle || aDedE < tooSmallAngle) {
|
|
1568
|
-
throw `err164: aAddE ${
|
|
1803
|
+
throw `err164: aAddE ${ffix7(radToDeg5(aAddE))} or aDedE ${ffix7(radToDeg5(aDedE))} are too small`;
|
|
1569
1804
|
}
|
|
1570
|
-
rGeome.logstr += `Extern: Dmax ${
|
|
1805
|
+
rGeome.logstr += `Extern: Dmax ${ffix7(2 * RmaxE)}, Dmin ${ffix7(2 * RminE)} mm
|
|
1571
1806
|
`;
|
|
1572
|
-
rGeome.logstr += `Intern: Dmax ${
|
|
1807
|
+
rGeome.logstr += `Intern: Dmax ${ffix7(2 * RmaxI)}, Dmin ${ffix7(2 * RminI)} mm
|
|
1573
1808
|
`;
|
|
1574
|
-
rGeome.logstr += `aSlack: ${
|
|
1809
|
+
rGeome.logstr += `aSlack: ${ffix7(radToDeg5(aSlack))} degree
|
|
1575
1810
|
`;
|
|
1576
|
-
rGeome.logstr += `Tooth: Ht ${param.Ht}, moduli ${
|
|
1811
|
+
rGeome.logstr += `Tooth: Ht ${param.Ht}, moduli ${ffix7(moduli)}, Hti ${ffix7(Htai + Htdi)}, Hte ${ffix7(Htae + Htde)} mm
|
|
1577
1812
|
`;
|
|
1578
|
-
rGeome.logstr += `Tooth angle intern: aM ${param.aM}, aM[adden] ${
|
|
1813
|
+
rGeome.logstr += `Tooth angle intern: aM ${param.aM}, aM[adden] ${ffix7(radToDeg5(-aAddenI / 2))}, aM[deden] ${ffix7(radToDeg5((aTooth - aAddenI) / 2))} degree
|
|
1579
1814
|
`;
|
|
1580
|
-
rGeome.logstr += `Tooth angle extern: aM ${param.aM}, aM[adden] ${
|
|
1815
|
+
rGeome.logstr += `Tooth angle extern: aM ${param.aM}, aM[adden] ${ffix7(radToDeg5(-aAddenE / 2))}, aM[deden] ${ffix7(radToDeg5((aTooth - aAddenE) / 2))} degree
|
|
1581
1816
|
`;
|
|
1582
1817
|
const ctrsI = [];
|
|
1583
1818
|
ctrsI.push(contourCircle3(0, 0, RminI));
|
|
@@ -1648,7 +1883,7 @@ function pGeom5(t, param, suffix = "") {
|
|
|
1648
1883
|
{
|
|
1649
1884
|
outName: nameSubpaxIntern,
|
|
1650
1885
|
face: `${designName}_faceIntern`,
|
|
1651
|
-
extrudeMethod:
|
|
1886
|
+
extrudeMethod: EExtrude6.eLinearOrtho,
|
|
1652
1887
|
length: param.Th,
|
|
1653
1888
|
rotate: [0, 0, 0],
|
|
1654
1889
|
translate: [0, 0, 0]
|
|
@@ -1656,7 +1891,7 @@ function pGeom5(t, param, suffix = "") {
|
|
|
1656
1891
|
{
|
|
1657
1892
|
outName: nameSubpaxExtern,
|
|
1658
1893
|
face: `${designName}_faceExtern`,
|
|
1659
|
-
extrudeMethod:
|
|
1894
|
+
extrudeMethod: EExtrude6.eLinearOrtho,
|
|
1660
1895
|
length: param.Th,
|
|
1661
1896
|
rotate: [0, 0, -aSlack / 2],
|
|
1662
1897
|
translate: [0, 0, 0]
|
|
@@ -1665,7 +1900,7 @@ function pGeom5(t, param, suffix = "") {
|
|
|
1665
1900
|
volumes: [
|
|
1666
1901
|
{
|
|
1667
1902
|
outName: `pax_${designName}`,
|
|
1668
|
-
boolMethod:
|
|
1903
|
+
boolMethod: EBVolume6.eUnion,
|
|
1669
1904
|
inList: nameList
|
|
1670
1905
|
}
|
|
1671
1906
|
]
|
|
@@ -1682,8 +1917,8 @@ function pGeom5(t, param, suffix = "") {
|
|
|
1682
1917
|
var plugTorqueDef = {
|
|
1683
1918
|
pTitle: "plugTorque",
|
|
1684
1919
|
pDescription: "plugable torque transmission",
|
|
1685
|
-
pDef:
|
|
1686
|
-
pGeom:
|
|
1920
|
+
pDef: pDef6,
|
|
1921
|
+
pGeom: pGeom6
|
|
1687
1922
|
};
|
|
1688
1923
|
|
|
1689
1924
|
// src/spring/springTorqueB.ts
|
|
@@ -1692,56 +1927,56 @@ import {
|
|
|
1692
1927
|
point as point4,
|
|
1693
1928
|
contour as contour7,
|
|
1694
1929
|
contourCircle as contourCircle4,
|
|
1695
|
-
figure as
|
|
1930
|
+
figure as figure7,
|
|
1696
1931
|
radToDeg as radToDeg6,
|
|
1697
|
-
ffix as
|
|
1698
|
-
pNumber as
|
|
1699
|
-
pCheckbox as
|
|
1700
|
-
pDropdown as
|
|
1701
|
-
pSectionSeparator as
|
|
1702
|
-
EExtrude as
|
|
1703
|
-
EBVolume as
|
|
1704
|
-
initGeom as
|
|
1932
|
+
ffix as ffix8,
|
|
1933
|
+
pNumber as pNumber7,
|
|
1934
|
+
pCheckbox as pCheckbox4,
|
|
1935
|
+
pDropdown as pDropdown4,
|
|
1936
|
+
pSectionSeparator as pSectionSeparator7,
|
|
1937
|
+
EExtrude as EExtrude7,
|
|
1938
|
+
EBVolume as EBVolume7,
|
|
1939
|
+
initGeom as initGeom7
|
|
1705
1940
|
} from "geometrix";
|
|
1706
|
-
var
|
|
1941
|
+
var pDef7 = {
|
|
1707
1942
|
partName: "springTorqueB",
|
|
1708
1943
|
params: [
|
|
1709
1944
|
//pNumber(name, unit, init, min, max, step)
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1945
|
+
pNumber7("De", "mm", 80, 1, 1e3, 1),
|
|
1946
|
+
pNumber7("Ne", "hole", 16, 0, 400, 1),
|
|
1947
|
+
pNumber7("DTe", "mm", 2, 0.1, 50, 0.1),
|
|
1948
|
+
pNumber7("Ee", "mm", 1, 0.1, 50, 0.1),
|
|
1949
|
+
pCheckbox4("Teeth", true),
|
|
1950
|
+
pNumber7("Th", "mm", 3, 0.1, 100, 0.1),
|
|
1951
|
+
pSectionSeparator7("Internal ring"),
|
|
1952
|
+
pNumber7("Di", "mm", 30, 1, 1e3, 1),
|
|
1953
|
+
pNumber7("Ni", "hole", 8, 0, 400, 1),
|
|
1954
|
+
pNumber7("DTi", "mm", 2, 0.1, 50, 0.1),
|
|
1955
|
+
pNumber7("Ei", "mm", 1, 0.1, 50, 0.1),
|
|
1956
|
+
pSectionSeparator7("Spring"),
|
|
1957
|
+
pNumber7("Ns", "spring", 6, 4, 60, 1),
|
|
1958
|
+
pNumber7("aEs", "%", 10, 1, 90, 1),
|
|
1959
|
+
pNumber7("Esi", "%", 10, 1, 90, 1),
|
|
1960
|
+
pNumber7("Ese", "%", 10, 1, 90, 1),
|
|
1961
|
+
pNumber7("Nk", "zigzag", 3, 1, 100, 1),
|
|
1962
|
+
pNumber7("Wk", "mm", 1, 0.1, 20, 0.1),
|
|
1963
|
+
pNumber7("Wc", "mm", 1, 0.1, 20, 0.1),
|
|
1964
|
+
pNumber7("Rrsi", "mm", 1, 0, 20, 0.1),
|
|
1965
|
+
pNumber7("Rrse", "mm", 1, 0, 20, 0.1),
|
|
1966
|
+
pSectionSeparator7("Tooth Profile"),
|
|
1967
|
+
pNumber7("Nt", "teeth", 8, 1, 1e3, 1),
|
|
1968
|
+
pNumber7("Dt", "mm", 20, 0.1, 1e3, 0.1),
|
|
1969
|
+
pNumber7("Ht", "mm", 2, 0.1, 100, 0.1),
|
|
1970
|
+
pNumber7("ate", "%", 52, 1, 99, 1),
|
|
1971
|
+
pNumber7("ah", "%", 100, 1, 400, 1),
|
|
1972
|
+
pNumber7("dh", "%", 100, 1, 400, 1),
|
|
1973
|
+
pNumber7("aeh", "%", 10, 0, 100, 1),
|
|
1974
|
+
pNumber7("aM", "degree", 0, -30, 30, 0.1),
|
|
1975
|
+
pSectionSeparator7("Tooth profile details"),
|
|
1976
|
+
pDropdown4("SnAae", ["stroke", "arc"]),
|
|
1977
|
+
pDropdown4("SnAde", ["stroke", "arc"]),
|
|
1978
|
+
pNumber7("Rae", "mm", 1, 0, 50, 0.1),
|
|
1979
|
+
pNumber7("Rde", "mm", 1, 0, 50, 0.1)
|
|
1745
1980
|
],
|
|
1746
1981
|
paramSvg: {
|
|
1747
1982
|
De: "springTorqueB_profile.svg",
|
|
@@ -1813,9 +2048,9 @@ function calcAzag(cx2, cx1, r2, r1) {
|
|
|
1813
2048
|
}
|
|
1814
2049
|
return [ra22, ra11];
|
|
1815
2050
|
}
|
|
1816
|
-
function
|
|
1817
|
-
const rGeome =
|
|
1818
|
-
const figProfile =
|
|
2051
|
+
function pGeom7(t, param, suffix = "") {
|
|
2052
|
+
const rGeome = initGeom7(pDef7.partName + suffix);
|
|
2053
|
+
const figProfile = figure7();
|
|
1819
2054
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
1820
2055
|
`;
|
|
1821
2056
|
try {
|
|
@@ -1841,14 +2076,14 @@ function pGeom6(t, param, suffix = "") {
|
|
|
1841
2076
|
if (Rmin1 < 0.1) {
|
|
1842
2077
|
throw `err120: Di ${param.Di} is too small compare to DTi ${param.DTi}, Ei ${param.Ei}`;
|
|
1843
2078
|
}
|
|
1844
|
-
if (dRLs < 2 * param.
|
|
1845
|
-
throw `err133: dRLs ${dRLs} is too small compare to
|
|
2079
|
+
if (dRLs < 2 * param.Wk) {
|
|
2080
|
+
throw `err133: dRLs ${dRLs} is too small compare to Wk ${param.Wk}`;
|
|
1846
2081
|
}
|
|
1847
|
-
if (Esi < 0.6 * param.
|
|
1848
|
-
throw `err136: Esi ${Esi} is too small compare to
|
|
2082
|
+
if (Esi < 0.6 * param.Wk) {
|
|
2083
|
+
throw `err136: Esi ${Esi} is too small compare to Wk ${param.Wk}`;
|
|
1849
2084
|
}
|
|
1850
|
-
if (Ese < 0.6 * param.
|
|
1851
|
-
throw `err139: Ese ${Ese} is too small compare to
|
|
2085
|
+
if (Ese < 0.6 * param.Wk) {
|
|
2086
|
+
throw `err139: Ese ${Ese} is too small compare to Wk ${param.Wk}`;
|
|
1852
2087
|
}
|
|
1853
2088
|
if (Ek < 0.1) {
|
|
1854
2089
|
throw `err145: Ek ${Ek} is too small`;
|
|
@@ -1859,12 +2094,12 @@ function pGeom6(t, param, suffix = "") {
|
|
|
1859
2094
|
const aHMinI = 2 * Math.asin((RTi + 0.5 * param.Ei) / Ri);
|
|
1860
2095
|
const aHI = param.Ni > 0 ? 2 * Math.PI / param.Ni : 3.14;
|
|
1861
2096
|
if (aHI < aHMinI) {
|
|
1862
|
-
throw `err126: aHI ${
|
|
2097
|
+
throw `err126: aHI ${ffix8(radToDeg6(aHI))} is too small compare to aHMinI ${ffix8(radToDeg6(aHMinI))} degree`;
|
|
1863
2098
|
}
|
|
1864
2099
|
const aHMinE = 2 * Math.asin((RTe + 0.5 * param.Ee) / Re);
|
|
1865
2100
|
const aHE = param.Ne > 0 ? 2 * Math.PI / param.Ne : 3.14;
|
|
1866
2101
|
if (aHE < aHMinE) {
|
|
1867
|
-
throw `err131: aHE ${
|
|
2102
|
+
throw `err131: aHE ${ffix8(radToDeg6(aHE))} is too small compare to aHMinE ${ffix8(radToDeg6(aHMinE))} degree`;
|
|
1868
2103
|
}
|
|
1869
2104
|
const pts1 = [];
|
|
1870
2105
|
const Rk1 = Rsi + Esi + dRLs - Rk;
|
|
@@ -1894,11 +2129,11 @@ function pGeom6(t, param, suffix = "") {
|
|
|
1894
2129
|
const pt4 = point4(0, 0).translatePolar(-a14, Rsi);
|
|
1895
2130
|
const Rks = Rk - Wk2;
|
|
1896
2131
|
const Rkl = Rk + Wk2;
|
|
1897
|
-
rGeome.logstr += `Dmax ${
|
|
2132
|
+
rGeome.logstr += `Dmax ${ffix8(2 * Rmax)}, Dmin1 ${ffix8(2 * Rmin1)} mm
|
|
1898
2133
|
`;
|
|
1899
|
-
rGeome.logstr += `Spring area: aSpring ${
|
|
2134
|
+
rGeome.logstr += `Spring area: aSpring ${ffix8(radToDeg6(aSpring))} degree, dRLs ${ffix8(dRLs)}, HLs ${ffix8(HLs)} mm
|
|
1900
2135
|
`;
|
|
1901
|
-
rGeome.logstr += `Spring zigzag: Ek ${
|
|
2136
|
+
rGeome.logstr += `Spring zigzag: Ek ${ffix8(Ek)}, Rk ${ffix8(Rk)} mm
|
|
1902
2137
|
`;
|
|
1903
2138
|
const ctrExt = contourCircle4(0, 0, Rmax);
|
|
1904
2139
|
const ctrsH = [];
|
|
@@ -1998,7 +2233,7 @@ function pGeom6(t, param, suffix = "") {
|
|
|
1998
2233
|
{
|
|
1999
2234
|
outName: `subpax_${designName}_profile`,
|
|
2000
2235
|
face: `${designName}_faceProfile`,
|
|
2001
|
-
extrudeMethod:
|
|
2236
|
+
extrudeMethod: EExtrude7.eLinearOrtho,
|
|
2002
2237
|
length: param.Th,
|
|
2003
2238
|
rotate: [0, 0, 0],
|
|
2004
2239
|
translate: [0, 0, 0]
|
|
@@ -2007,7 +2242,7 @@ function pGeom6(t, param, suffix = "") {
|
|
|
2007
2242
|
volumes: [
|
|
2008
2243
|
{
|
|
2009
2244
|
outName: `pax_${designName}`,
|
|
2010
|
-
boolMethod:
|
|
2245
|
+
boolMethod: EBVolume7.eIdentity,
|
|
2011
2246
|
inList: [`subpax_${designName}_profile`]
|
|
2012
2247
|
}
|
|
2013
2248
|
]
|
|
@@ -2024,8 +2259,8 @@ function pGeom6(t, param, suffix = "") {
|
|
|
2024
2259
|
var springTorqueBDef = {
|
|
2025
2260
|
pTitle: "springTorqueB",
|
|
2026
2261
|
pDescription: "spring disc for smooth torque transmission",
|
|
2027
|
-
pDef:
|
|
2028
|
-
pGeom:
|
|
2262
|
+
pDef: pDef7,
|
|
2263
|
+
pGeom: pGeom7
|
|
2029
2264
|
};
|
|
2030
2265
|
|
|
2031
2266
|
// src/spring/springTorqueC.ts
|
|
@@ -2033,57 +2268,57 @@ import {
|
|
|
2033
2268
|
point as point5,
|
|
2034
2269
|
contour as contour8,
|
|
2035
2270
|
contourCircle as contourCircle5,
|
|
2036
|
-
figure as
|
|
2271
|
+
figure as figure8,
|
|
2037
2272
|
radToDeg as radToDeg7,
|
|
2038
|
-
ffix as
|
|
2039
|
-
pNumber as
|
|
2040
|
-
pCheckbox as
|
|
2041
|
-
pDropdown as
|
|
2042
|
-
pSectionSeparator as
|
|
2043
|
-
EExtrude as
|
|
2044
|
-
EBVolume as
|
|
2045
|
-
initGeom as
|
|
2273
|
+
ffix as ffix9,
|
|
2274
|
+
pNumber as pNumber8,
|
|
2275
|
+
pCheckbox as pCheckbox5,
|
|
2276
|
+
pDropdown as pDropdown5,
|
|
2277
|
+
pSectionSeparator as pSectionSeparator8,
|
|
2278
|
+
EExtrude as EExtrude8,
|
|
2279
|
+
EBVolume as EBVolume8,
|
|
2280
|
+
initGeom as initGeom8
|
|
2046
2281
|
} from "geometrix";
|
|
2047
|
-
var
|
|
2282
|
+
var pDef8 = {
|
|
2048
2283
|
partName: "springTorqueC",
|
|
2049
2284
|
params: [
|
|
2050
2285
|
//pNumber(name, unit, init, min, max, step)
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2286
|
+
pNumber8("De", "mm", 80, 1, 1e3, 1),
|
|
2287
|
+
pNumber8("Ne", "hole", 16, 0, 400, 1),
|
|
2288
|
+
pNumber8("DTe", "mm", 2, 0.1, 50, 0.1),
|
|
2289
|
+
pNumber8("Ee", "mm", 1, 0.1, 50, 0.1),
|
|
2290
|
+
pCheckbox5("Teeth", true),
|
|
2291
|
+
pNumber8("Th", "mm", 3, 0.1, 100, 0.1),
|
|
2292
|
+
pSectionSeparator8("Internal ring"),
|
|
2293
|
+
pNumber8("Di", "mm", 30, 1, 1e3, 1),
|
|
2294
|
+
pNumber8("Ni", "hole", 8, 0, 400, 1),
|
|
2295
|
+
pNumber8("DTi", "mm", 2, 0.1, 50, 0.1),
|
|
2296
|
+
pNumber8("Ei", "mm", 1, 0.1, 50, 0.1),
|
|
2297
|
+
pSectionSeparator8("Spring"),
|
|
2298
|
+
pNumber8("Ns", "spring", 6, 1, 60, 1),
|
|
2299
|
+
pDropdown5("zig", ["alt", "one", "two"]),
|
|
2300
|
+
pDropdown5("zag", ["arc", "stroke"]),
|
|
2301
|
+
pNumber8("aEs", "%", 20, 1, 99, 1),
|
|
2302
|
+
pNumber8("Esi", "%", 10, 0, 90, 1),
|
|
2303
|
+
pNumber8("Ese", "%", 10, 0, 90, 1),
|
|
2304
|
+
pNumber8("Nk", "zigzag", 4, 2, 100, 1),
|
|
2305
|
+
pNumber8("Wk", "mm", 1, 0.1, 20, 0.1),
|
|
2306
|
+
pNumber8("Rrsi", "mm", 0.1, 0, 20, 0.1),
|
|
2307
|
+
pNumber8("Rrse", "mm", 1, 0, 20, 0.1),
|
|
2308
|
+
pSectionSeparator8("Tooth Profile"),
|
|
2309
|
+
pNumber8("Nt", "teeth", 8, 1, 1e3, 1),
|
|
2310
|
+
pNumber8("Dt", "mm", 20, 0.1, 1e3, 0.1),
|
|
2311
|
+
pNumber8("Ht", "mm", 2, 0.1, 100, 0.1),
|
|
2312
|
+
pNumber8("ate", "%", 52, 1, 99, 1),
|
|
2313
|
+
pNumber8("ah", "%", 100, 1, 400, 1),
|
|
2314
|
+
pNumber8("dh", "%", 100, 1, 400, 1),
|
|
2315
|
+
pNumber8("aeh", "%", 10, 0, 100, 1),
|
|
2316
|
+
pNumber8("aM", "degree", 0, -30, 30, 0.1),
|
|
2317
|
+
pSectionSeparator8("Tooth profile details"),
|
|
2318
|
+
pDropdown5("SnAae", ["stroke", "arc"]),
|
|
2319
|
+
pDropdown5("SnAde", ["stroke", "arc"]),
|
|
2320
|
+
pNumber8("Rae", "mm", 1, 0, 50, 0.1),
|
|
2321
|
+
pNumber8("Rde", "mm", 1, 0, 50, 0.1)
|
|
2087
2322
|
],
|
|
2088
2323
|
paramSvg: {
|
|
2089
2324
|
De: "springTorqueC_profile.svg",
|
|
@@ -2134,11 +2369,11 @@ function calcZagP2(pA, pE, lAB, lDE, iSign) {
|
|
|
2134
2369
|
const lAC = lAB * lAE / (lAB + lDE);
|
|
2135
2370
|
const aCAB = Math.acos(lAB / lAC);
|
|
2136
2371
|
const rPt = pA.translatePolar(aAE + iSign * aCAB, lAB);
|
|
2137
|
-
return rPt;
|
|
2138
|
-
}
|
|
2139
|
-
function
|
|
2140
|
-
const rGeome =
|
|
2141
|
-
const figProfile =
|
|
2372
|
+
return rPt;
|
|
2373
|
+
}
|
|
2374
|
+
function pGeom8(t, param, suffix = "") {
|
|
2375
|
+
const rGeome = initGeom8(pDef8.partName + suffix);
|
|
2376
|
+
const figProfile = figure8();
|
|
2142
2377
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
2143
2378
|
`;
|
|
2144
2379
|
try {
|
|
@@ -2306,8 +2541,8 @@ function pGeom7(t, param, suffix = "") {
|
|
|
2306
2541
|
if (Rmin1 < 0.1) {
|
|
2307
2542
|
throw `err120: Di ${param.Di} is too small compare to DTi ${param.DTi}, Ei ${param.Ei}`;
|
|
2308
2543
|
}
|
|
2309
|
-
if (dRLs < 2 * param.
|
|
2310
|
-
throw `err133: dRLs ${dRLs} is too small compare to
|
|
2544
|
+
if (dRLs < 2 * param.Wk) {
|
|
2545
|
+
throw `err133: dRLs ${dRLs} is too small compare to Wk ${param.Wk}`;
|
|
2311
2546
|
}
|
|
2312
2547
|
if (Esi < 0.2 * param.Rrsi) {
|
|
2313
2548
|
throw `err136: Esi ${Esi} is too small compare to Rrsi ${param.Rrsi}`;
|
|
@@ -2321,12 +2556,12 @@ function pGeom7(t, param, suffix = "") {
|
|
|
2321
2556
|
const aHMinI = 2 * Math.asin((RTi + 0.5 * param.Ei) / Ri);
|
|
2322
2557
|
const aHI = param.Ni > 0 ? 2 * Math.PI / param.Ni : 3.14;
|
|
2323
2558
|
if (aHI < aHMinI) {
|
|
2324
|
-
throw `err126: aHI ${
|
|
2559
|
+
throw `err126: aHI ${ffix9(radToDeg7(aHI))} is too small compare to aHMinI ${ffix9(radToDeg7(aHMinI))} degree`;
|
|
2325
2560
|
}
|
|
2326
2561
|
const aHMinE = 2 * Math.asin((RTe + 0.5 * param.Ee) / Re);
|
|
2327
2562
|
const aHE = param.Ne > 0 ? 2 * Math.PI / param.Ne : 3.14;
|
|
2328
2563
|
if (aHE < aHMinE) {
|
|
2329
|
-
throw `err131: aHE ${
|
|
2564
|
+
throw `err131: aHE ${ffix9(radToDeg7(aHE))} is too small compare to aHMinE ${ffix9(radToDeg7(aHMinE))} degree`;
|
|
2330
2565
|
}
|
|
2331
2566
|
const pts0 = [];
|
|
2332
2567
|
const pts1 = [];
|
|
@@ -2370,15 +2605,15 @@ function pGeom7(t, param, suffix = "") {
|
|
|
2370
2605
|
ppp1.push(pppI2(-a18, 1, Rsi).rotateOrig(aSpringStep));
|
|
2371
2606
|
const Rks = Rk - Wk2;
|
|
2372
2607
|
const Rkl = Rk + Wk2;
|
|
2373
|
-
rGeome.logstr += `Dmax ${
|
|
2608
|
+
rGeome.logstr += `Dmax ${ffix9(2 * Rmax)}, Dmin1 ${ffix9(2 * Rmin1)} mm
|
|
2374
2609
|
`;
|
|
2375
|
-
rGeome.logstr += `Spring area: aSpring ${
|
|
2610
|
+
rGeome.logstr += `Spring area: aSpring ${ffix9(radToDeg7(aSpring))} degree, dRLs ${ffix9(dRLs)} mm
|
|
2376
2611
|
`;
|
|
2377
|
-
rGeome.logstr += `Spring zigzag: Ek ${
|
|
2612
|
+
rGeome.logstr += `Spring zigzag: Ek ${ffix9(Ek)}, Rk ${ffix9(Rk)} mm
|
|
2378
2613
|
`;
|
|
2379
2614
|
if (aSpring < 2 * aArcMin) {
|
|
2380
2615
|
zagArc = false;
|
|
2381
|
-
rGeome.logstr += `Spring zigzag forced to stroke because of aArcMin ${
|
|
2616
|
+
rGeome.logstr += `Spring zigzag forced to stroke because of aArcMin ${ffix9(radToDeg7(aArcMin))} degree
|
|
2382
2617
|
`;
|
|
2383
2618
|
}
|
|
2384
2619
|
const ctrExt = contourCircle5(0, 0, Rmax);
|
|
@@ -2423,7 +2658,7 @@ function pGeom7(t, param, suffix = "") {
|
|
|
2423
2658
|
{
|
|
2424
2659
|
outName: `subpax_${designName}_profile`,
|
|
2425
2660
|
face: `${designName}_faceProfile`,
|
|
2426
|
-
extrudeMethod:
|
|
2661
|
+
extrudeMethod: EExtrude8.eLinearOrtho,
|
|
2427
2662
|
length: param.Th,
|
|
2428
2663
|
rotate: [0, 0, 0],
|
|
2429
2664
|
translate: [0, 0, 0]
|
|
@@ -2432,7 +2667,7 @@ function pGeom7(t, param, suffix = "") {
|
|
|
2432
2667
|
volumes: [
|
|
2433
2668
|
{
|
|
2434
2669
|
outName: `pax_${designName}`,
|
|
2435
|
-
boolMethod:
|
|
2670
|
+
boolMethod: EBVolume8.eIdentity,
|
|
2436
2671
|
inList: [`subpax_${designName}_profile`]
|
|
2437
2672
|
}
|
|
2438
2673
|
]
|
|
@@ -2449,23 +2684,23 @@ function pGeom7(t, param, suffix = "") {
|
|
|
2449
2684
|
var springTorqueCDef = {
|
|
2450
2685
|
pTitle: "springTorqueC",
|
|
2451
2686
|
pDescription: "spring disc for smooth torque transmission",
|
|
2452
|
-
pDef:
|
|
2453
|
-
pGeom:
|
|
2687
|
+
pDef: pDef8,
|
|
2688
|
+
pGeom: pGeom8
|
|
2454
2689
|
};
|
|
2455
2690
|
|
|
2456
2691
|
// src/spring/springWorm.ts
|
|
2457
2692
|
import {
|
|
2458
2693
|
contour as contour9,
|
|
2459
2694
|
contourCircle as contourCircle6,
|
|
2460
|
-
ctrRectangle as
|
|
2461
|
-
figure as
|
|
2462
|
-
ffix as
|
|
2463
|
-
pNumber as
|
|
2464
|
-
pDropdown as
|
|
2465
|
-
pSectionSeparator as
|
|
2466
|
-
EExtrude as
|
|
2467
|
-
EBVolume as
|
|
2468
|
-
initGeom as
|
|
2695
|
+
ctrRectangle as ctrRectangle5,
|
|
2696
|
+
figure as figure9,
|
|
2697
|
+
ffix as ffix10,
|
|
2698
|
+
pNumber as pNumber9,
|
|
2699
|
+
pDropdown as pDropdown6,
|
|
2700
|
+
pSectionSeparator as pSectionSeparator9,
|
|
2701
|
+
EExtrude as EExtrude9,
|
|
2702
|
+
EBVolume as EBVolume9,
|
|
2703
|
+
initGeom as initGeom9
|
|
2469
2704
|
} from "geometrix";
|
|
2470
2705
|
function makeCtrGroove(x0, y0, xl, yl, roundTop) {
|
|
2471
2706
|
const xl2 = xl / 2;
|
|
@@ -2478,35 +2713,35 @@ function makeCtrGroove(x0, y0, xl, yl, roundTop) {
|
|
|
2478
2713
|
return rCtr;
|
|
2479
2714
|
}
|
|
2480
2715
|
}
|
|
2481
|
-
var
|
|
2716
|
+
var pDef9 = {
|
|
2482
2717
|
partName: "springWorm",
|
|
2483
2718
|
params: [
|
|
2484
2719
|
//pNumber(name, unit, init, min, max, step)
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2720
|
+
pNumber9("D1", "mm", 30, 2, 200, 1),
|
|
2721
|
+
pNumber9("E1", "mm", 2, 0.1, 50, 0.1),
|
|
2722
|
+
pNumber9("N1", "groove", 6, 2, 200, 1),
|
|
2723
|
+
pNumber9("W2", "mm", 2, 0.1, 50, 0.1),
|
|
2724
|
+
pNumber9("W3", "mm", 1, 0.1, 50, 0.1),
|
|
2725
|
+
pNumber9("S1", "mm", 1, 0.1, 50, 0.1),
|
|
2726
|
+
pSectionSeparator9("Extremity caps"),
|
|
2727
|
+
pDropdown6("leftCaps", ["ext", "int"]),
|
|
2728
|
+
pDropdown6("rightCaps", ["ext", "int"]),
|
|
2729
|
+
pNumber9("W1", "mm", 2, 0.1, 50, 0.1),
|
|
2730
|
+
pNumber9("W1b", "mm", 1, 0.1, 50, 0.1),
|
|
2731
|
+
pSectionSeparator9("Tooth Profile"),
|
|
2732
|
+
pNumber9("Nt", "teeth", 8, 1, 1e3, 1),
|
|
2733
|
+
pNumber9("Dt", "mm", 20, 0.1, 1e3, 0.1),
|
|
2734
|
+
pNumber9("Ht", "mm", 2, 0.1, 100, 0.1),
|
|
2735
|
+
pNumber9("ate", "%", 52, 1, 99, 1),
|
|
2736
|
+
pNumber9("ah", "%", 100, 1, 400, 1),
|
|
2737
|
+
pNumber9("dh", "%", 100, 1, 400, 1),
|
|
2738
|
+
pNumber9("aeh", "%", 10, 0, 100, 1),
|
|
2739
|
+
pNumber9("aM", "degree", 0, -30, 30, 0.1),
|
|
2740
|
+
pSectionSeparator9("Tooth profile details"),
|
|
2741
|
+
pDropdown6("SnAae", ["stroke", "arc"]),
|
|
2742
|
+
pDropdown6("SnAde", ["stroke", "arc"]),
|
|
2743
|
+
pNumber9("Rae", "mm", 1, 0, 50, 0.1),
|
|
2744
|
+
pNumber9("Rde", "mm", 1, 0, 50, 0.1)
|
|
2510
2745
|
],
|
|
2511
2746
|
paramSvg: {
|
|
2512
2747
|
D1: "springWorm_mid.svg",
|
|
@@ -2539,14 +2774,14 @@ var pDef8 = {
|
|
|
2539
2774
|
// every 0.5 second
|
|
2540
2775
|
}
|
|
2541
2776
|
};
|
|
2542
|
-
function
|
|
2543
|
-
const rGeome =
|
|
2544
|
-
const figTube =
|
|
2545
|
-
const figGroove1 =
|
|
2546
|
-
const figGroove2 =
|
|
2547
|
-
const figLeft =
|
|
2548
|
-
const figRight =
|
|
2549
|
-
const figW1b =
|
|
2777
|
+
function pGeom9(t, param, suffix = "") {
|
|
2778
|
+
const rGeome = initGeom9(pDef9.partName + suffix);
|
|
2779
|
+
const figTube = figure9();
|
|
2780
|
+
const figGroove1 = figure9();
|
|
2781
|
+
const figGroove2 = figure9();
|
|
2782
|
+
const figLeft = figure9();
|
|
2783
|
+
const figRight = figure9();
|
|
2784
|
+
const figW1b = figure9();
|
|
2550
2785
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
2551
2786
|
`;
|
|
2552
2787
|
try {
|
|
@@ -2567,27 +2802,27 @@ function pGeom8(t, param, suffix = "") {
|
|
|
2567
2802
|
if (R1 - S12 < W32) {
|
|
2568
2803
|
throw `err130: R1 ${R1} is too small compare to S12 ${S12} or W32 ${W32}`;
|
|
2569
2804
|
}
|
|
2570
|
-
rGeome.logstr += `Dint ${
|
|
2805
|
+
rGeome.logstr += `Dint ${ffix10(2 * Ri)} mm
|
|
2571
2806
|
`;
|
|
2572
|
-
rGeome.logstr += `Total length ${
|
|
2807
|
+
rGeome.logstr += `Total length ${ffix10(lenTotal)} mm
|
|
2573
2808
|
`;
|
|
2574
2809
|
const [ctrToothE, logE] = ctrPlugExtern(param, R1);
|
|
2575
2810
|
rGeome.logstr += logE;
|
|
2576
2811
|
figTube.addMainOI([contourCircle6(0, 0, R1), contourCircle6(0, 0, Ri)]);
|
|
2577
|
-
figTube.addSecond(
|
|
2578
|
-
figTube.addSecond(
|
|
2579
|
-
figTube.addSecond(
|
|
2580
|
-
figTube.addSecond(
|
|
2812
|
+
figTube.addSecond(ctrRectangle5(S12, -R12, R1, 2 * R12));
|
|
2813
|
+
figTube.addSecond(ctrRectangle5(-R1 - S12, -R12, R1, 2 * R12));
|
|
2814
|
+
figTube.addSecond(ctrRectangle5(-R12, S12, 2 * R12, R1));
|
|
2815
|
+
figTube.addSecond(ctrRectangle5(-R12, -R1 - S12, 2 * R12, R1));
|
|
2581
2816
|
const ctrTubes = [];
|
|
2582
|
-
ctrTubes.push(
|
|
2817
|
+
ctrTubes.push(ctrRectangle5(0, -R1, param.W1, param.D1));
|
|
2583
2818
|
if (!capsLeftExt) {
|
|
2584
|
-
ctrTubes.push(
|
|
2819
|
+
ctrTubes.push(ctrRectangle5(param.W1, -R1, param.W1b, param.D1));
|
|
2585
2820
|
}
|
|
2586
|
-
ctrTubes.push(
|
|
2821
|
+
ctrTubes.push(ctrRectangle5(lenLeft, -R1, lenMid, param.D1));
|
|
2587
2822
|
if (!capsRightExt) {
|
|
2588
|
-
ctrTubes.push(
|
|
2823
|
+
ctrTubes.push(ctrRectangle5(lenLeft + lenMid, -R1, param.W1b, param.D1));
|
|
2589
2824
|
}
|
|
2590
|
-
ctrTubes.push(
|
|
2825
|
+
ctrTubes.push(ctrRectangle5(lenTotal - param.W1, -R1, param.W1, param.D1));
|
|
2591
2826
|
for (const iCtr of ctrTubes) {
|
|
2592
2827
|
figGroove1.addSecond(iCtr);
|
|
2593
2828
|
figGroove2.addSecond(iCtr);
|
|
@@ -2649,7 +2884,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
2649
2884
|
{
|
|
2650
2885
|
outName: `subpax_${designName}_tube`,
|
|
2651
2886
|
face: `${designName}_faceTube`,
|
|
2652
|
-
extrudeMethod:
|
|
2887
|
+
extrudeMethod: EExtrude9.eLinearOrtho,
|
|
2653
2888
|
length: lenMid,
|
|
2654
2889
|
rotate: [0, 0, 0],
|
|
2655
2890
|
translate: [0, 0, lenLeft]
|
|
@@ -2657,7 +2892,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
2657
2892
|
{
|
|
2658
2893
|
outName: `subpax_${designName}_left`,
|
|
2659
2894
|
face: `${designName}_faceLeft`,
|
|
2660
|
-
extrudeMethod:
|
|
2895
|
+
extrudeMethod: EExtrude9.eLinearOrtho,
|
|
2661
2896
|
length: param.W1,
|
|
2662
2897
|
rotate: [0, 0, 0],
|
|
2663
2898
|
translate: [0, 0, 0]
|
|
@@ -2665,7 +2900,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
2665
2900
|
{
|
|
2666
2901
|
outName: `subpax_${designName}_leftB`,
|
|
2667
2902
|
face: `${designName}_faceW1b`,
|
|
2668
|
-
extrudeMethod:
|
|
2903
|
+
extrudeMethod: EExtrude9.eLinearOrtho,
|
|
2669
2904
|
length: param.W1b,
|
|
2670
2905
|
rotate: [0, 0, 0],
|
|
2671
2906
|
translate: [0, 0, param.W1]
|
|
@@ -2673,7 +2908,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
2673
2908
|
{
|
|
2674
2909
|
outName: `subpax_${designName}_rightB`,
|
|
2675
2910
|
face: `${designName}_faceW1b`,
|
|
2676
|
-
extrudeMethod:
|
|
2911
|
+
extrudeMethod: EExtrude9.eLinearOrtho,
|
|
2677
2912
|
length: param.W1b,
|
|
2678
2913
|
rotate: [0, 0, 0],
|
|
2679
2914
|
translate: [0, 0, lenLeft + lenMid]
|
|
@@ -2681,7 +2916,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
2681
2916
|
{
|
|
2682
2917
|
outName: `subpax_${designName}_right`,
|
|
2683
2918
|
face: `${designName}_faceRight`,
|
|
2684
|
-
extrudeMethod:
|
|
2919
|
+
extrudeMethod: EExtrude9.eLinearOrtho,
|
|
2685
2920
|
length: param.W1,
|
|
2686
2921
|
rotate: [0, 0, 0],
|
|
2687
2922
|
translate: [0, 0, lenTotal - param.W1]
|
|
@@ -2689,7 +2924,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
2689
2924
|
{
|
|
2690
2925
|
outName: `subpax_${designName}_groove1`,
|
|
2691
2926
|
face: `${designName}_faceGroove1`,
|
|
2692
|
-
extrudeMethod:
|
|
2927
|
+
extrudeMethod: EExtrude9.eLinearOrtho,
|
|
2693
2928
|
length: 2 * R12,
|
|
2694
2929
|
rotate: [0, -Math.PI / 2, 0],
|
|
2695
2930
|
translate: [R12, 0, 0]
|
|
@@ -2697,7 +2932,7 @@ function pGeom8(t, param, suffix = "") {
|
|
|
2697
2932
|
{
|
|
2698
2933
|
outName: `subpax_${designName}_groove2`,
|
|
2699
2934
|
face: `${designName}_faceGroove2`,
|
|
2700
|
-
extrudeMethod:
|
|
2935
|
+
extrudeMethod: EExtrude9.eLinearOrtho,
|
|
2701
2936
|
length: 2 * R12,
|
|
2702
2937
|
rotate: [0, -Math.PI / 2, -Math.PI / 2],
|
|
2703
2938
|
translate: [0, -R12, 0]
|
|
@@ -2706,17 +2941,17 @@ function pGeom8(t, param, suffix = "") {
|
|
|
2706
2941
|
volumes: [
|
|
2707
2942
|
{
|
|
2708
2943
|
outName: `ipax_${designName}_plus`,
|
|
2709
|
-
boolMethod:
|
|
2944
|
+
boolMethod: EBVolume9.eUnion,
|
|
2710
2945
|
inList: union_list
|
|
2711
2946
|
},
|
|
2712
2947
|
{
|
|
2713
2948
|
outName: `ipax_${designName}_moins`,
|
|
2714
|
-
boolMethod:
|
|
2949
|
+
boolMethod: EBVolume9.eUnion,
|
|
2715
2950
|
inList: [`subpax_${designName}_groove1`, `subpax_${designName}_groove2`]
|
|
2716
2951
|
},
|
|
2717
2952
|
{
|
|
2718
2953
|
outName: `pax_${designName}`,
|
|
2719
|
-
boolMethod:
|
|
2954
|
+
boolMethod: EBVolume9.eSubstraction,
|
|
2720
2955
|
inList: [`ipax_${designName}_plus`, `ipax_${designName}_moins`]
|
|
2721
2956
|
}
|
|
2722
2957
|
]
|
|
@@ -2733,21 +2968,21 @@ function pGeom8(t, param, suffix = "") {
|
|
|
2733
2968
|
var springWormDef = {
|
|
2734
2969
|
pTitle: "springWorm",
|
|
2735
2970
|
pDescription: "Flex-part for unperfect coaxial transmission",
|
|
2736
|
-
pDef:
|
|
2737
|
-
pGeom:
|
|
2971
|
+
pDef: pDef9,
|
|
2972
|
+
pGeom: pGeom9
|
|
2738
2973
|
};
|
|
2739
2974
|
|
|
2740
2975
|
// src/spring/springOne.ts
|
|
2741
2976
|
import {
|
|
2742
2977
|
contour as contour10,
|
|
2743
2978
|
contourCircle as contourCircle7,
|
|
2744
|
-
figure as
|
|
2979
|
+
figure as figure10,
|
|
2745
2980
|
degToRad as degToRad3,
|
|
2746
|
-
ffix as
|
|
2747
|
-
pNumber as
|
|
2748
|
-
pCheckbox as
|
|
2749
|
-
pSectionSeparator as
|
|
2750
|
-
initGeom as
|
|
2981
|
+
ffix as ffix11,
|
|
2982
|
+
pNumber as pNumber10,
|
|
2983
|
+
pCheckbox as pCheckbox6,
|
|
2984
|
+
pSectionSeparator as pSectionSeparator10,
|
|
2985
|
+
initGeom as initGeom10
|
|
2751
2986
|
} from "geometrix";
|
|
2752
2987
|
import {
|
|
2753
2988
|
tJDir,
|
|
@@ -2757,46 +2992,46 @@ import {
|
|
|
2757
2992
|
facet2figure,
|
|
2758
2993
|
sheetFold
|
|
2759
2994
|
} from "sheetfold";
|
|
2760
|
-
var
|
|
2995
|
+
var pDef10 = {
|
|
2761
2996
|
partName: "springOne",
|
|
2762
2997
|
params: [
|
|
2763
2998
|
//pNumber(name, unit, init, min, max, step)
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2999
|
+
pNumber10("D1", "mm", 16, 1, 100, 0.1),
|
|
3000
|
+
pNumber10("Dbearing", "mm", 35, 1, 100, 0.1),
|
|
3001
|
+
pNumber10("H1", "mm", 5, 1, 100, 1),
|
|
3002
|
+
pNumber10("H2", "mm", 15, 1, 100, 1),
|
|
3003
|
+
pNumber10("R2", "mm", 15, 1, 100, 1),
|
|
3004
|
+
pNumber10("L1", "mm", 50, 1, 200, 1),
|
|
3005
|
+
pNumber10("Rc1", "mm", 5, 0, 50, 1),
|
|
3006
|
+
pSectionSeparator10("Spring zone"),
|
|
3007
|
+
pCheckbox6("spring", true),
|
|
3008
|
+
pNumber10("E1", "mm", 2, 1, 100, 1),
|
|
3009
|
+
pNumber10("E2", "mm", 2, 1, 100, 1),
|
|
3010
|
+
pNumber10("smEy", "mm", 1, 0.1, 10, 0.1),
|
|
3011
|
+
pNumber10("shEy", "mm", 1, 0.1, 10, 0.1),
|
|
3012
|
+
pNumber10("shPr", "%", 90, 0, 99, 1),
|
|
3013
|
+
pNumber10("sNx", "xHoles", 2, 2, 200, 1),
|
|
3014
|
+
pNumber10("smEx", "mm", 1, 0.1, 10, 0.1),
|
|
3015
|
+
pNumber10("smExS", "mm", 0.5, 0.1, 10, 0.1),
|
|
3016
|
+
pSectionSeparator10("Screw holes"),
|
|
3017
|
+
pNumber10("D3", "mm", 6, 1, 100, 1),
|
|
3018
|
+
pNumber10("P3", "mm", 70, 1, 200, 1),
|
|
3019
|
+
pNumber10("P4", "mm", 30, 1, 200, 1),
|
|
3020
|
+
pSectionSeparator10("Borders"),
|
|
3021
|
+
pNumber10("L2", "mm", 20, 1, 200, 1),
|
|
3022
|
+
pNumber10("E3", "mm", 1, 0, 20, 0.1),
|
|
3023
|
+
pNumber10("W1", "mm", 20, 1, 200, 1),
|
|
3024
|
+
pNumber10("W3", "mm", 50, 1, 400, 1),
|
|
3025
|
+
pNumber10("Rc3", "mm", 0.5, 0, 10, 0.1),
|
|
3026
|
+
pCheckbox6("B2", true),
|
|
3027
|
+
pNumber10("A2", "mm", 10, 1, 200, 1),
|
|
3028
|
+
pNumber10("Rc2", "mm", 5, 0, 50, 1),
|
|
3029
|
+
pSectionSeparator10("Folding"),
|
|
3030
|
+
pNumber10("Th", "mm", 1, 0.1, 10, 0.1),
|
|
3031
|
+
pNumber10("Jangle", "degree", 90, 0, 120, 1),
|
|
3032
|
+
pNumber10("Jradius", "mm", 2, 0.1, 10, 0.1),
|
|
3033
|
+
pNumber10("Jneutral", "%", 50, 0, 100, 1),
|
|
3034
|
+
pNumber10("Jmark", "mm", 1, 0.1, 10, 0.1)
|
|
2800
3035
|
],
|
|
2801
3036
|
paramSvg: {
|
|
2802
3037
|
D1: "springOne_face.svg",
|
|
@@ -2839,9 +3074,9 @@ var pDef9 = {
|
|
|
2839
3074
|
// every 0.5 second
|
|
2840
3075
|
}
|
|
2841
3076
|
};
|
|
2842
|
-
function
|
|
2843
|
-
const rGeome =
|
|
2844
|
-
const figWallB =
|
|
3077
|
+
function pGeom10(t, param, suffix = "") {
|
|
3078
|
+
const rGeome = initGeom10(pDef10.partName + suffix);
|
|
3079
|
+
const figWallB = figure10();
|
|
2845
3080
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
2846
3081
|
`;
|
|
2847
3082
|
try {
|
|
@@ -2859,7 +3094,7 @@ function pGeom9(t, param, suffix = "") {
|
|
|
2859
3094
|
const lxAZpre = lx / 2 - param.smEx / 2;
|
|
2860
3095
|
const lxAZ = idx % 2 === 0 ? lxAZpre : lx;
|
|
2861
3096
|
if (lxAZ < 2 * sRc) {
|
|
2862
|
-
throw `err228: lxAZ ${
|
|
3097
|
+
throw `err228: lxAZ ${ffix11(lxAZ)} is too small compare to ${param.sNx} or ${param.smEx}`;
|
|
2863
3098
|
}
|
|
2864
3099
|
return [cx0, lxAZ, lx, nx];
|
|
2865
3100
|
}, makeCtrWall2 = function(iJunctionName) {
|
|
@@ -2883,7 +3118,7 @@ function pGeom9(t, param, suffix = "") {
|
|
|
2883
3118
|
const aBAC = Math.atan2(param.H2, L12);
|
|
2884
3119
|
const lAC = Math.sqrt(L12 ** 2 + param.H2 ** 2);
|
|
2885
3120
|
if (param.R2 > lAC) {
|
|
2886
|
-
throw `err141: R2 ${param.R2} is too large comapre to lAC ${
|
|
3121
|
+
throw `err141: R2 ${param.R2} is too large comapre to lAC ${ffix11(lAC)} mm`;
|
|
2887
3122
|
}
|
|
2888
3123
|
const aCAD = Math.asin(param.R2 / lAC);
|
|
2889
3124
|
const lAD = lAC * Math.cos(aCAD);
|
|
@@ -2911,26 +3146,26 @@ function pGeom9(t, param, suffix = "") {
|
|
|
2911
3146
|
const sNy = Math.floor((sHeight + param.smEy) / sStepY);
|
|
2912
3147
|
const sRc = param.shEy * param.shPr / 200;
|
|
2913
3148
|
if (R1 < 0.1) {
|
|
2914
|
-
throw `err087: R1 ${
|
|
3149
|
+
throw `err087: R1 ${ffix11(R1)} is too small because of D1 ${param.D1}`;
|
|
2915
3150
|
}
|
|
2916
3151
|
if (L2b < 0.1) {
|
|
2917
|
-
throw `err165: L2b ${
|
|
3152
|
+
throw `err165: L2b ${ffix11(L2b)} is too small because of E3 ${param.E3}`;
|
|
2918
3153
|
}
|
|
2919
3154
|
if (param.E3 < param.Rc3) {
|
|
2920
3155
|
throw `err170: E3 ${param.E3} is too small compare to Rc3 ${param.Rc3}`;
|
|
2921
3156
|
}
|
|
2922
3157
|
if (W3b < param.Rc3) {
|
|
2923
|
-
throw `err174: W3b ${
|
|
3158
|
+
throw `err174: W3b ${ffix11(W3b)} is too small compare to Rc3 ${param.Rc3}`;
|
|
2924
3159
|
}
|
|
2925
3160
|
if (param.spring === 1) {
|
|
2926
3161
|
if (sHeight < 0.1) {
|
|
2927
|
-
throw `err189: sHeight ${
|
|
3162
|
+
throw `err189: sHeight ${ffix11(sHeight)} is too small because of E1 ${param.E1} or E2 ${param.E2}`;
|
|
2928
3163
|
}
|
|
2929
3164
|
}
|
|
2930
|
-
rGeome.logstr += `Bearing holder wall: Hwall ${
|
|
3165
|
+
rGeome.logstr += `Bearing holder wall: Hwall ${ffix11(Hwall)}, Hfoot ${ffix11(Hfoot)} mm
|
|
2931
3166
|
`;
|
|
2932
3167
|
if (param.spring === 1) {
|
|
2933
|
-
rGeome.logstr += `spring: sNy ${sNy}, sRc ${
|
|
3168
|
+
rGeome.logstr += `spring: sNy ${sNy}, sRc ${ffix11(sRc)} mm
|
|
2934
3169
|
`;
|
|
2935
3170
|
} else {
|
|
2936
3171
|
rGeome.logstr += `No spring
|
|
@@ -3033,19 +3268,19 @@ function pGeom9(t, param, suffix = "") {
|
|
|
3033
3268
|
var springOneDef = {
|
|
3034
3269
|
pTitle: "springOne",
|
|
3035
3270
|
pDescription: "bearing-holder with integrated spring",
|
|
3036
|
-
pDef:
|
|
3037
|
-
pGeom:
|
|
3271
|
+
pDef: pDef10,
|
|
3272
|
+
pGeom: pGeom10
|
|
3038
3273
|
};
|
|
3039
3274
|
|
|
3040
3275
|
// src/spring/springSide.ts
|
|
3041
3276
|
import {
|
|
3042
3277
|
contour as contour11,
|
|
3043
3278
|
contourCircle as contourCircle8,
|
|
3044
|
-
ffix as
|
|
3045
|
-
pNumber as
|
|
3046
|
-
pCheckbox as
|
|
3047
|
-
pSectionSeparator as
|
|
3048
|
-
initGeom as
|
|
3279
|
+
ffix as ffix12,
|
|
3280
|
+
pNumber as pNumber11,
|
|
3281
|
+
pCheckbox as pCheckbox7,
|
|
3282
|
+
pSectionSeparator as pSectionSeparator11,
|
|
3283
|
+
initGeom as initGeom11
|
|
3049
3284
|
} from "geometrix";
|
|
3050
3285
|
import {
|
|
3051
3286
|
tJDir as tJDir2,
|
|
@@ -3054,34 +3289,34 @@ import {
|
|
|
3054
3289
|
facet as facet2,
|
|
3055
3290
|
sheetFold as sheetFold2
|
|
3056
3291
|
} from "sheetfold";
|
|
3057
|
-
var
|
|
3292
|
+
var pDef11 = {
|
|
3058
3293
|
partName: "springSide",
|
|
3059
3294
|
params: [
|
|
3060
3295
|
//pNumber(name, unit, init, min, max, step)
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3296
|
+
pNumber11("D5", "mm", 100, 10, 5e3, 1),
|
|
3297
|
+
pNumber11("N5", "unit", 8, 3, 100, 1),
|
|
3298
|
+
pNumber11("W2", "mm", 20, 1, 200, 1),
|
|
3299
|
+
pSectionSeparator11("One unit"),
|
|
3300
|
+
pNumber11("D1", "mm", 16, 1, 100, 0.1),
|
|
3301
|
+
pNumber11("H1", "mm", 5, 1, 100, 1),
|
|
3302
|
+
pNumber11("H2", "mm", 15, 1, 100, 1),
|
|
3303
|
+
pNumber11("R2", "mm", 15, 1, 100, 1),
|
|
3304
|
+
pSectionSeparator11("Spring zone"),
|
|
3305
|
+
pCheckbox7("spring", true),
|
|
3306
|
+
pNumber11("E1", "mm", 2, 1, 100, 1),
|
|
3307
|
+
pNumber11("E2", "mm", 2, 1, 100, 1),
|
|
3308
|
+
pNumber11("smEy", "mm", 1, 0.1, 10, 0.1),
|
|
3309
|
+
pNumber11("shEy", "mm", 1, 0.1, 10, 0.1),
|
|
3310
|
+
pNumber11("shPr", "%", 90, 0, 99, 1),
|
|
3311
|
+
pNumber11("sNx", "xHoles", 2, 2, 200, 1),
|
|
3312
|
+
pNumber11("smEx", "mm", 1, 0.1, 10, 0.1),
|
|
3313
|
+
pNumber11("smExS", "mm", 0.5, 0.1, 10, 0.1),
|
|
3314
|
+
pSectionSeparator11("Folding"),
|
|
3315
|
+
pNumber11("Th", "mm", 1, 0.1, 10, 0.1),
|
|
3081
3316
|
//pNumber('Jangle', 'degree', 90, 0, 120, 1),
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3317
|
+
pNumber11("Jradius", "mm", 2, 0.1, 10, 0.1),
|
|
3318
|
+
pNumber11("Jneutral", "%", 50, 0, 100, 1),
|
|
3319
|
+
pNumber11("Jmark", "mm", 1, 0.1, 10, 0.1)
|
|
3085
3320
|
],
|
|
3086
3321
|
paramSvg: {
|
|
3087
3322
|
D5: "springSide_top.svg",
|
|
@@ -3113,8 +3348,8 @@ var pDef10 = {
|
|
|
3113
3348
|
// every 0.5 second
|
|
3114
3349
|
}
|
|
3115
3350
|
};
|
|
3116
|
-
function
|
|
3117
|
-
const rGeome =
|
|
3351
|
+
function pGeom11(t, param, suffix = "") {
|
|
3352
|
+
const rGeome = initGeom11(pDef11.partName + suffix);
|
|
3118
3353
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
3119
3354
|
`;
|
|
3120
3355
|
try {
|
|
@@ -3132,7 +3367,7 @@ function pGeom10(t, param, suffix = "") {
|
|
|
3132
3367
|
const lxAZpre = lx / 2 - param.smEx / 2;
|
|
3133
3368
|
const lxAZ = idx % 2 === 0 ? lxAZpre : lx;
|
|
3134
3369
|
if (lxAZ < 2 * sRc) {
|
|
3135
|
-
throw `err228: lxAZ ${
|
|
3370
|
+
throw `err228: lxAZ ${ffix12(lxAZ)} is too small compare to ${param.sNx} or ${param.smEx}`;
|
|
3136
3371
|
}
|
|
3137
3372
|
return [cx0, lxAZ, lx, nx];
|
|
3138
3373
|
}, makeCtrWall2 = function(iJ0, iJ1, iJb, iL, iL2, iJ1b, iSel) {
|
|
@@ -3192,7 +3427,7 @@ function pGeom10(t, param, suffix = "") {
|
|
|
3192
3427
|
const aBAC = Math.atan2(param.H2, Lih);
|
|
3193
3428
|
const lAC = Math.sqrt(Lih ** 2 + param.H2 ** 2);
|
|
3194
3429
|
if (param.R2 > lAC) {
|
|
3195
|
-
throw `err141: R2 ${param.R2} is too large comapre to lAC ${
|
|
3430
|
+
throw `err141: R2 ${param.R2} is too large comapre to lAC ${ffix12(lAC)} mm`;
|
|
3196
3431
|
}
|
|
3197
3432
|
const aCAD = Math.asin(param.R2 / lAC);
|
|
3198
3433
|
const lAD = lAC * Math.cos(aCAD);
|
|
@@ -3211,34 +3446,34 @@ function pGeom10(t, param, suffix = "") {
|
|
|
3211
3446
|
const sNy = Math.floor((sHeight + param.smEy) / sStepY);
|
|
3212
3447
|
const sRc = param.shEy * param.shPr / 200;
|
|
3213
3448
|
if (R1 < 0.1) {
|
|
3214
|
-
throw `err087: R1 ${
|
|
3449
|
+
throw `err087: R1 ${ffix12(R1)} is too small because of D1 ${param.D1}`;
|
|
3215
3450
|
}
|
|
3216
3451
|
if (LiY < 0.1) {
|
|
3217
|
-
throw `err168: R5 ${
|
|
3452
|
+
throw `err168: R5 ${ffix12(R5)} is too small compare to W2 ${ffix12(W22)} or Th ${param.Th} mm`;
|
|
3218
3453
|
}
|
|
3219
3454
|
if (Li < 0.1) {
|
|
3220
|
-
throw `err171: Li ${
|
|
3455
|
+
throw `err171: Li ${ffix12(Li)} is too small because of aJr ${aJr} mm`;
|
|
3221
3456
|
}
|
|
3222
3457
|
if (W1 < 0.1) {
|
|
3223
|
-
throw `err174: W1 ${
|
|
3458
|
+
throw `err174: W1 ${ffix12(W1)} is too small because of Hfoot ${ffix12(Hfoot)} mm`;
|
|
3224
3459
|
}
|
|
3225
3460
|
if (param.spring === 1) {
|
|
3226
3461
|
if (sHeight < 0.1) {
|
|
3227
|
-
throw `err189: sHeight ${
|
|
3462
|
+
throw `err189: sHeight ${ffix12(sHeight)} is too small because of E1 ${param.E1} or E2 ${param.E2}`;
|
|
3228
3463
|
}
|
|
3229
3464
|
}
|
|
3230
|
-
rGeome.logstr += `Bearing holder wall: Hwall ${
|
|
3465
|
+
rGeome.logstr += `Bearing holder wall: Hwall ${ffix12(Hwall)}, Hfoot ${ffix12(Hfoot)} mm
|
|
3231
3466
|
`;
|
|
3232
|
-
rGeome.logstr += `Width of one unit interior: Lii ${
|
|
3467
|
+
rGeome.logstr += `Width of one unit interior: Lii ${ffix12(Lii)}, Li ${ffix12(Li)} mm
|
|
3233
3468
|
`;
|
|
3234
|
-
rGeome.logstr += `Width of one unit exterior: Lee ${
|
|
3469
|
+
rGeome.logstr += `Width of one unit exterior: Lee ${ffix12(Lee)}, Le ${ffix12(Le)} mm
|
|
3235
3470
|
`;
|
|
3236
|
-
rGeome.logstr += `Ratio R2/Li ${
|
|
3471
|
+
rGeome.logstr += `Ratio R2/Li ${ffix12(100 * param.R2 / Lih)} %
|
|
3237
3472
|
`;
|
|
3238
|
-
rGeome.logstr += `Width of bottom: W1 ${
|
|
3473
|
+
rGeome.logstr += `Width of bottom: W1 ${ffix12(W1)}, D3 ${ffix12(D3)} mm
|
|
3239
3474
|
`;
|
|
3240
3475
|
if (param.spring === 1) {
|
|
3241
|
-
rGeome.logstr += `spring: sNy ${sNy}, sRc ${
|
|
3476
|
+
rGeome.logstr += `spring: sNy ${sNy}, sRc ${ffix12(sRc)} mm
|
|
3242
3477
|
`;
|
|
3243
3478
|
} else {
|
|
3244
3479
|
rGeome.logstr += `No spring
|
|
@@ -3349,8 +3584,8 @@ function pGeom10(t, param, suffix = "") {
|
|
|
3349
3584
|
var springSideDef = {
|
|
3350
3585
|
pTitle: "springSide",
|
|
3351
3586
|
pDescription: "bearing-holder on the side of a ring",
|
|
3352
|
-
pDef:
|
|
3353
|
-
pGeom:
|
|
3587
|
+
pDef: pDef11,
|
|
3588
|
+
pGeom: pGeom11
|
|
3354
3589
|
};
|
|
3355
3590
|
|
|
3356
3591
|
// src/spring/springInt.ts
|
|
@@ -3358,11 +3593,11 @@ import {
|
|
|
3358
3593
|
contour as contour12,
|
|
3359
3594
|
contourCircle as contourCircle9,
|
|
3360
3595
|
degToRad as degToRad4,
|
|
3361
|
-
ffix as
|
|
3362
|
-
pNumber as
|
|
3363
|
-
pCheckbox as
|
|
3364
|
-
pSectionSeparator as
|
|
3365
|
-
initGeom as
|
|
3596
|
+
ffix as ffix13,
|
|
3597
|
+
pNumber as pNumber12,
|
|
3598
|
+
pCheckbox as pCheckbox8,
|
|
3599
|
+
pSectionSeparator as pSectionSeparator12,
|
|
3600
|
+
initGeom as initGeom12
|
|
3366
3601
|
} from "geometrix";
|
|
3367
3602
|
import {
|
|
3368
3603
|
tJDir as tJDir3,
|
|
@@ -3371,34 +3606,34 @@ import {
|
|
|
3371
3606
|
facet as facet3,
|
|
3372
3607
|
sheetFold as sheetFold3
|
|
3373
3608
|
} from "sheetfold";
|
|
3374
|
-
var
|
|
3609
|
+
var pDef12 = {
|
|
3375
3610
|
partName: "springInt",
|
|
3376
3611
|
params: [
|
|
3377
3612
|
//pNumber(name, unit, init, min, max, step)
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3613
|
+
pNumber12("D5", "mm", 140, 10, 5e3, 1),
|
|
3614
|
+
pNumber12("N5", "unit", 8, 3, 100, 1),
|
|
3615
|
+
pNumber12("W2", "mm", 20, 1, 200, 1),
|
|
3616
|
+
pSectionSeparator12("One unit"),
|
|
3617
|
+
pNumber12("D1", "mm", 16, 1, 100, 0.1),
|
|
3618
|
+
pNumber12("H1", "mm", 5, 1, 100, 1),
|
|
3619
|
+
pNumber12("H2", "mm", 15, 1, 100, 1),
|
|
3620
|
+
pNumber12("R2", "mm", 15, 1, 100, 1),
|
|
3621
|
+
pSectionSeparator12("Spring zone"),
|
|
3622
|
+
pCheckbox8("spring", true),
|
|
3623
|
+
pNumber12("E1", "mm", 2, 1, 100, 1),
|
|
3624
|
+
pNumber12("E2", "mm", 2, 1, 100, 1),
|
|
3625
|
+
pNumber12("smEy", "mm", 1, 0.1, 10, 0.1),
|
|
3626
|
+
pNumber12("shEy", "mm", 1, 0.1, 10, 0.1),
|
|
3627
|
+
pNumber12("shPr", "%", 90, 0, 99, 1),
|
|
3628
|
+
pNumber12("sNx", "xHoles", 2, 2, 200, 1),
|
|
3629
|
+
pNumber12("smEx", "mm", 1, 0.1, 10, 0.1),
|
|
3630
|
+
pNumber12("smExS", "mm", 0.5, 0.1, 10, 0.1),
|
|
3631
|
+
pSectionSeparator12("Folding"),
|
|
3632
|
+
pNumber12("Th", "mm", 1, 0.1, 10, 0.1),
|
|
3633
|
+
pNumber12("Jangle", "degree", 90, 0, 120, 1),
|
|
3634
|
+
pNumber12("Jradius", "mm", 2, 0.1, 10, 0.1),
|
|
3635
|
+
pNumber12("Jneutral", "%", 50, 0, 100, 1),
|
|
3636
|
+
pNumber12("Jmark", "mm", 1, 0.1, 10, 0.1)
|
|
3402
3637
|
],
|
|
3403
3638
|
paramSvg: {
|
|
3404
3639
|
D5: "springInt_global.svg",
|
|
@@ -3430,8 +3665,8 @@ var pDef11 = {
|
|
|
3430
3665
|
// every 0.5 second
|
|
3431
3666
|
}
|
|
3432
3667
|
};
|
|
3433
|
-
function
|
|
3434
|
-
const rGeome =
|
|
3668
|
+
function pGeom12(t, param, suffix = "") {
|
|
3669
|
+
const rGeome = initGeom12(pDef12.partName + suffix);
|
|
3435
3670
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
3436
3671
|
`;
|
|
3437
3672
|
try {
|
|
@@ -3449,7 +3684,7 @@ function pGeom11(t, param, suffix = "") {
|
|
|
3449
3684
|
const lxAZpre = lx / 2 - param.smEx / 2;
|
|
3450
3685
|
const lxAZ = idx % 2 === 0 ? lxAZpre : lx;
|
|
3451
3686
|
if (lxAZ < 2 * sRc) {
|
|
3452
|
-
throw `err228: lxAZ ${
|
|
3687
|
+
throw `err228: lxAZ ${ffix13(lxAZ)} is too small compare to ${param.sNx} or ${param.smEx}`;
|
|
3453
3688
|
}
|
|
3454
3689
|
return [cx0, lxAZ, lx, nx];
|
|
3455
3690
|
}, makeCtrWall2 = function(iJb) {
|
|
@@ -3493,7 +3728,7 @@ function pGeom11(t, param, suffix = "") {
|
|
|
3493
3728
|
const aBAC = Math.atan2(param.H2, Lih);
|
|
3494
3729
|
const lAC = Math.sqrt(Lih ** 2 + param.H2 ** 2);
|
|
3495
3730
|
if (param.R2 > lAC) {
|
|
3496
|
-
throw `err141: R2 ${param.R2} is too large comapre to lAC ${
|
|
3731
|
+
throw `err141: R2 ${param.R2} is too large comapre to lAC ${ffix13(lAC)} mm`;
|
|
3497
3732
|
}
|
|
3498
3733
|
const aCAD = Math.asin(param.R2 / lAC);
|
|
3499
3734
|
const lAD = lAC * Math.cos(aCAD);
|
|
@@ -3505,38 +3740,38 @@ function pGeom11(t, param, suffix = "") {
|
|
|
3505
3740
|
const sNy = Math.floor((sHeight + param.smEy) / sStepY);
|
|
3506
3741
|
const sRc = param.shEy * param.shPr / 200;
|
|
3507
3742
|
if (R1 < 0.1) {
|
|
3508
|
-
throw `err087: R1 ${
|
|
3743
|
+
throw `err087: R1 ${ffix13(R1)} is too small because of D1 ${param.D1}`;
|
|
3509
3744
|
}
|
|
3510
3745
|
if (param.R2 < R1 + 0.1) {
|
|
3511
|
-
throw `err150: R2 ${
|
|
3746
|
+
throw `err150: R2 ${ffix13(param.R2)} is too small compare to R1 ${R1} mm`;
|
|
3512
3747
|
}
|
|
3513
3748
|
if (R5b < aJr) {
|
|
3514
|
-
throw `err154: R5b ${
|
|
3749
|
+
throw `err154: R5b ${ffix13(R5b)} is too small because of H2 ${param.D2}, H1 ${param.H1} or Hfoot ${ffix13(Hfoot)}`;
|
|
3515
3750
|
}
|
|
3516
3751
|
if (Li < 0.1) {
|
|
3517
|
-
throw `err158: Li ${
|
|
3752
|
+
throw `err158: Li ${ffix13(Li)} is too small because of aJr ${ffix13(aJr)} radian`;
|
|
3518
3753
|
}
|
|
3519
3754
|
if (W1 < 0.1) {
|
|
3520
|
-
throw `err161: W1 ${
|
|
3755
|
+
throw `err161: W1 ${ffix13(W1)} is too small because of Hfoot ${ffix13(Hfoot)} mm`;
|
|
3521
3756
|
}
|
|
3522
3757
|
if (Li < 3 * D3) {
|
|
3523
|
-
throw `err166: D3 ${
|
|
3758
|
+
throw `err166: D3 ${ffix13(D3)} is too large compare to Li ${ffix13(Li)} mm`;
|
|
3524
3759
|
}
|
|
3525
3760
|
if (param.spring === 1) {
|
|
3526
3761
|
if (sHeight < 0.1) {
|
|
3527
|
-
throw `err189: sHeight ${
|
|
3762
|
+
throw `err189: sHeight ${ffix13(sHeight)} is too small because of E1 ${param.E1} or E2 ${param.E2}`;
|
|
3528
3763
|
}
|
|
3529
3764
|
}
|
|
3530
|
-
rGeome.logstr += `Bearing holder wall: Hwall ${
|
|
3765
|
+
rGeome.logstr += `Bearing holder wall: Hwall ${ffix13(Hwall)}, Hfoot ${ffix13(Hfoot)} mm
|
|
3531
3766
|
`;
|
|
3532
|
-
rGeome.logstr += `Width of one unit: Lii ${
|
|
3767
|
+
rGeome.logstr += `Width of one unit: Lii ${ffix13(Lii)}, Li ${ffix13(Li)} mm
|
|
3533
3768
|
`;
|
|
3534
|
-
rGeome.logstr += `Ratio R2/Li ${
|
|
3769
|
+
rGeome.logstr += `Ratio R2/Li ${ffix13(100 * param.R2 / Lih)} %
|
|
3535
3770
|
`;
|
|
3536
|
-
rGeome.logstr += `Width of bottom: W1 ${
|
|
3771
|
+
rGeome.logstr += `Width of bottom: W1 ${ffix13(W1)}, D3 ${ffix13(D3)} mm
|
|
3537
3772
|
`;
|
|
3538
3773
|
if (param.spring === 1) {
|
|
3539
|
-
rGeome.logstr += `spring: sNy ${sNy}, sRc ${
|
|
3774
|
+
rGeome.logstr += `spring: sNy ${sNy}, sRc ${ffix13(sRc)} mm
|
|
3540
3775
|
`;
|
|
3541
3776
|
} else {
|
|
3542
3777
|
rGeome.logstr += `No spring
|
|
@@ -3605,8 +3840,8 @@ function pGeom11(t, param, suffix = "") {
|
|
|
3605
3840
|
var springIntDef = {
|
|
3606
3841
|
pTitle: "springInt",
|
|
3607
3842
|
pDescription: "bearing-holder in the interior of a ring",
|
|
3608
|
-
pDef:
|
|
3609
|
-
pGeom:
|
|
3843
|
+
pDef: pDef12,
|
|
3844
|
+
pGeom: pGeom12
|
|
3610
3845
|
};
|
|
3611
3846
|
|
|
3612
3847
|
// src/heliostat/heliostat.ts
|
|
@@ -3614,66 +3849,66 @@ import {
|
|
|
3614
3849
|
point as point6,
|
|
3615
3850
|
contour as contour13,
|
|
3616
3851
|
contourCircle as contourCircle10,
|
|
3617
|
-
ctrRectangle as
|
|
3618
|
-
figure as
|
|
3852
|
+
ctrRectangle as ctrRectangle6,
|
|
3853
|
+
figure as figure11,
|
|
3619
3854
|
degToRad as degToRad5,
|
|
3620
|
-
radToDeg as radToDeg8,
|
|
3621
|
-
ffix as
|
|
3622
|
-
pNumber as
|
|
3623
|
-
pDropdown as
|
|
3624
|
-
pSectionSeparator as
|
|
3625
|
-
EExtrude as
|
|
3626
|
-
EBVolume as
|
|
3627
|
-
initGeom as
|
|
3855
|
+
radToDeg as radToDeg8,
|
|
3856
|
+
ffix as ffix14,
|
|
3857
|
+
pNumber as pNumber13,
|
|
3858
|
+
pDropdown as pDropdown7,
|
|
3859
|
+
pSectionSeparator as pSectionSeparator13,
|
|
3860
|
+
EExtrude as EExtrude10,
|
|
3861
|
+
EBVolume as EBVolume10,
|
|
3862
|
+
initGeom as initGeom13
|
|
3628
3863
|
} from "geometrix";
|
|
3629
3864
|
import { triLALrL, triLLLrA } from "triangule";
|
|
3630
|
-
var
|
|
3865
|
+
var pDef13 = {
|
|
3631
3866
|
partName: "heliostat",
|
|
3632
3867
|
params: [
|
|
3633
3868
|
//pNumber(name, unit, init, min, max, step)
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3869
|
+
pNumber13("L1", "mm", 4e3, 1e3, 2e4, 1),
|
|
3870
|
+
pNumber13("D1", "mm", 1e3, 100, 4e3, 1),
|
|
3871
|
+
pNumber13("D3", "mm", 600, 100, 2e3, 1),
|
|
3872
|
+
pNumber13("L9", "mm", 8e3, 1e3, 2e4, 1),
|
|
3873
|
+
pSectionSeparator13("Bottom details"),
|
|
3874
|
+
pNumber13("E1", "mm", 10, 1, 100, 1),
|
|
3875
|
+
pNumber13("E2", "mm", 10, 1, 100, 1),
|
|
3876
|
+
pNumber13("E3", "mm", 10, 1, 100, 1),
|
|
3877
|
+
pNumber13("S1", "mm", 100, 1, 500, 1),
|
|
3878
|
+
pNumber13("S3", "mm", 100, 1, 500, 1),
|
|
3879
|
+
pSectionSeparator13("Fixation"),
|
|
3880
|
+
pNumber13("N2", "holes", 24, 1, 500, 1),
|
|
3881
|
+
pNumber13("D2", "mm", 40, 1, 400, 1),
|
|
3882
|
+
pNumber13("W1", "mm", 20, 1, 400, 1),
|
|
3883
|
+
pSectionSeparator13("Door"),
|
|
3884
|
+
pNumber13("H1H", "mm", 1500, 100, 3e3, 1),
|
|
3885
|
+
pNumber13("H1W", "mm", 600, 100, 1e3, 1),
|
|
3886
|
+
pNumber13("H1P", "mm", 300, 100, 2e3, 1),
|
|
3887
|
+
pSectionSeparator13("Junction"),
|
|
3888
|
+
pNumber13("Z3", "mm", 200, 1, 500, 1),
|
|
3889
|
+
pNumber13("Z4", "mm", 200, 1, 500, 1),
|
|
3890
|
+
pDropdown7("gen3D", ["Both", "Top", "Bottom"]),
|
|
3891
|
+
pSectionSeparator13("Top-trunk"),
|
|
3892
|
+
pNumber13("L4", "mm", 2e3, 100, 2e4, 1),
|
|
3893
|
+
pNumber13("E4", "mm", 10, 1, 100, 1),
|
|
3894
|
+
pNumber13("E5", "mm", 10, 1, 100, 1),
|
|
3895
|
+
pNumber13("H6", "mm", 600, 100, 2e3, 1),
|
|
3896
|
+
pNumber13("E7", "mm", 10, 1, 100, 1),
|
|
3897
|
+
pNumber13("D7", "mm", 200, 10, 2e3, 1),
|
|
3898
|
+
pSectionSeparator13("Top-branch"),
|
|
3899
|
+
pNumber13("E6", "mm", 10, 1, 100, 1),
|
|
3900
|
+
pNumber13("D6", "mm", 400, 100, 2e3, 1),
|
|
3901
|
+
pNumber13("W8", "mm", 300, 100, 2e3, 1),
|
|
3902
|
+
pNumber13("L8", "mm", 2e3, 100, 2e4, 1),
|
|
3903
|
+
pNumber13("H8", "mm", 1e3, 100, 3e3, 1),
|
|
3904
|
+
pNumber13("G8", "mm", 500, 100, 2e3, 1),
|
|
3905
|
+
pNumber13("F8", "mm", 200, 10, 1e3, 1),
|
|
3906
|
+
pNumber13("a8", "degre", 140, 30, 200, 1),
|
|
3907
|
+
pSectionSeparator13("Top-diagonal"),
|
|
3908
|
+
pNumber13("D4", "mm", 300, 10, 2e3, 1),
|
|
3909
|
+
pNumber13("EE4", "mm", 10, 1, 100, 1),
|
|
3910
|
+
pNumber13("R4v", "mm", 400, 10, 5e3, 1),
|
|
3911
|
+
pNumber13("R4h", "mm", 400, 10, 5e3, 1)
|
|
3677
3912
|
],
|
|
3678
3913
|
paramSvg: {
|
|
3679
3914
|
L1: "heliostat_bottom.svg",
|
|
@@ -3720,19 +3955,19 @@ var pDef12 = {
|
|
|
3720
3955
|
// every 0.5 second
|
|
3721
3956
|
}
|
|
3722
3957
|
};
|
|
3723
|
-
function
|
|
3724
|
-
const rGeome =
|
|
3725
|
-
const figBottomDisc =
|
|
3726
|
-
const figBottomPole =
|
|
3727
|
-
const figDoor =
|
|
3728
|
-
const figTopPole =
|
|
3729
|
-
const figHorizPole =
|
|
3730
|
-
const figHorizPoleInt =
|
|
3731
|
-
const figDiag3 =
|
|
3732
|
-
const figDiagE =
|
|
3733
|
-
const figDiagI =
|
|
3734
|
-
const figCleanDiag =
|
|
3735
|
-
const figHand =
|
|
3958
|
+
function pGeom13(t, param, suffix = "") {
|
|
3959
|
+
const rGeome = initGeom13(pDef13.partName + suffix);
|
|
3960
|
+
const figBottomDisc = figure11();
|
|
3961
|
+
const figBottomPole = figure11();
|
|
3962
|
+
const figDoor = figure11();
|
|
3963
|
+
const figTopPole = figure11();
|
|
3964
|
+
const figHorizPole = figure11();
|
|
3965
|
+
const figHorizPoleInt = figure11();
|
|
3966
|
+
const figDiag3 = figure11();
|
|
3967
|
+
const figDiagE = figure11();
|
|
3968
|
+
const figDiagI = figure11();
|
|
3969
|
+
const figCleanDiag = figure11();
|
|
3970
|
+
const figHand = figure11();
|
|
3736
3971
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
3737
3972
|
`;
|
|
3738
3973
|
try {
|
|
@@ -3743,7 +3978,7 @@ function pGeom12(t, param, suffix = "") {
|
|
|
3743
3978
|
const rCtr = contour13(-sig * R4e, posY4).addSegStrokeR(sig * E4b, 0).addSegStrokeR(sig * (R4i - R5b), param.L4).addSegStrokeR(sig * (R5b - R5), 0).addSegStrokeR(0, param.E5).addSegStrokeR(sig * (R5 - R5t), 0).addSegStrokeR(sig * (R5t - R7b), param.H6).addSegStrokeR(sig * (R7b - R7i), 0).addSegStrokeR(0, param.E7).addSegStrokeR(sig * (R7i - R7t), 0).closeSegStroke();
|
|
3744
3979
|
return rCtr;
|
|
3745
3980
|
}, ctrDiag2 = function(posX, RR, AA) {
|
|
3746
|
-
const rCtr =
|
|
3981
|
+
const rCtr = ctrRectangle6(posX - RR, posY4, 2 * RR, diagL).rotate(posX, posY4, AA);
|
|
3747
3982
|
return rCtr;
|
|
3748
3983
|
}, ctrCleanDiag2 = function(sig) {
|
|
3749
3984
|
const rCtr = contour13(-sig * R4i, posY4).addSegStrokeR(sig * (R4i - R5b), param.L4).addSegStrokeR(sig * R5b, 0).addSegStrokeR(0, -param.L4 - 2 * param.D6).addSegStrokeR(-sig * R4i, 0).closeSegStroke();
|
|
@@ -3815,34 +4050,34 @@ function pGeom12(t, param, suffix = "") {
|
|
|
3815
4050
|
const L82 = param.L8 / 2;
|
|
3816
4051
|
const posX9 = [-L92, -L82 - param.W8, L82, L92 - param.W8];
|
|
3817
4052
|
if (R1 < R3) {
|
|
3818
|
-
throw `err176: D1 ${
|
|
4053
|
+
throw `err176: D1 ${ffix14(param.D1)} is too small compare to D3 ${ffix14(param.D3)} mm`;
|
|
3819
4054
|
}
|
|
3820
4055
|
if (R1b < 0.1) {
|
|
3821
|
-
throw `err183: R1b ${
|
|
4056
|
+
throw `err183: R1b ${ffix14(R1b)} is too small because of ${ffix14(param.E2)} or ${ffix14(param.S1)} mm`;
|
|
3822
4057
|
}
|
|
3823
4058
|
if (param.S1 < 2 * (param.W1 + R2)) {
|
|
3824
|
-
throw `err142: S1 ${
|
|
4059
|
+
throw `err142: S1 ${ffix14(param.S1)} is too small compare to W1 ${ffix14(param.W1)} and D2 ${ffix14(2 * R2)} mm`;
|
|
3825
4060
|
}
|
|
3826
4061
|
if (H1h < 0.1) {
|
|
3827
|
-
throw `err167: H1H ${
|
|
4062
|
+
throw `err167: H1H ${ffix14(param.H1H)} is too small compare to H1W ${ffix14(param.H1W)} mm`;
|
|
3828
4063
|
}
|
|
3829
4064
|
if (param.Z4 < d5b) {
|
|
3830
|
-
throw `err154: Z4 ${
|
|
4065
|
+
throw `err154: Z4 ${ffix14(param.Z4)} is too small compare to d5b ${ffix14(d5b)} mm`;
|
|
3831
4066
|
}
|
|
3832
4067
|
if (R7b < R7i) {
|
|
3833
|
-
throw `err169: R7b ${
|
|
4068
|
+
throw `err169: R7b ${ffix14(2 * R7b)} is too small because to D7 ${ffix14(2 * R7i)} mm`;
|
|
3834
4069
|
}
|
|
3835
4070
|
if (R6i < 0.1) {
|
|
3836
|
-
throw `err185: R6i ${
|
|
4071
|
+
throw `err185: R6i ${ffix14(R6i)} is too small because to E6 ${ffix14(param.E6)} mm`;
|
|
3837
4072
|
}
|
|
3838
4073
|
if (param.H6 < param.D6) {
|
|
3839
|
-
throw `err200: H6 ${
|
|
4074
|
+
throw `err200: H6 ${ffix14(param.H6)} is too small compare to D6 ${ffix14(param.D6)} mm`;
|
|
3840
4075
|
}
|
|
3841
|
-
rGeome.logstr += `Cone inclination ${
|
|
4076
|
+
rGeome.logstr += `Cone inclination ${ffix14(radToDeg8(inclination))}, diagonal ${ffix14(radToDeg8(diagA))} deg
|
|
3842
4077
|
`;
|
|
3843
|
-
rGeome.logstr += `Diameters: D1 ${
|
|
4078
|
+
rGeome.logstr += `Diameters: D1 ${ffix14(2 * R1)}, D1b ${ffix14(2 * R1)}, D3 ${ffix14(2 * R3)}, D5 ${ffix14(2 * R5)} mm
|
|
3844
4079
|
`;
|
|
3845
|
-
rGeome.logstr += `TopPole: posY4 ${
|
|
4080
|
+
rGeome.logstr += `TopPole: posY4 ${ffix14(posY4)}, D4 ${ffix14(2 * R4e)} mm
|
|
3846
4081
|
`;
|
|
3847
4082
|
const fixationHoles = [];
|
|
3848
4083
|
for (let ii = 0; ii < param.N2; ii++) {
|
|
@@ -3881,8 +4116,8 @@ function pGeom12(t, param, suffix = "") {
|
|
|
3881
4116
|
figHorizPoleInt.addSecond(ctrTopPole2(-1));
|
|
3882
4117
|
figHorizPoleInt.addSecond(ctrTopPole2(1));
|
|
3883
4118
|
figDiag3.addMainOI([
|
|
3884
|
-
|
|
3885
|
-
|
|
4119
|
+
ctrRectangle6(-L92, posY6 - R6e, 2 * L92, 2 * R6e),
|
|
4120
|
+
ctrRectangle6(-L92, posY6 - R6i, 2 * L92, 2 * R6i)
|
|
3886
4121
|
]);
|
|
3887
4122
|
figDiag3.addSecond(ctrTopPole2(-1));
|
|
3888
4123
|
figDiag3.addSecond(ctrTopPole2(1));
|
|
@@ -3891,7 +4126,7 @@ function pGeom12(t, param, suffix = "") {
|
|
|
3891
4126
|
figDiag3.addSecond(ctrDiag2(-posX4, RR4e, -diagA));
|
|
3892
4127
|
figDiag3.addSecond(ctrDiag2(-posX4, RR4i, -diagA));
|
|
3893
4128
|
for (let ii = 0; ii < 4; ii++) {
|
|
3894
|
-
figDiag3.addSecond(
|
|
4129
|
+
figDiag3.addSecond(ctrRectangle6(posX9[ii], posY6, param.W8, param.H8));
|
|
3895
4130
|
}
|
|
3896
4131
|
const ctrDiagE = contourCircle10(0, 0, RR4e);
|
|
3897
4132
|
const ctrDiagI = contourCircle10(0, 0, RR4i);
|
|
@@ -3941,14 +4176,14 @@ function pGeom12(t, param, suffix = "") {
|
|
|
3941
4176
|
{
|
|
3942
4177
|
outName: `subpax_${designName}_bottomPole`,
|
|
3943
4178
|
face: `${designName}_faceBottomPole`,
|
|
3944
|
-
extrudeMethod:
|
|
4179
|
+
extrudeMethod: EExtrude10.eRotate,
|
|
3945
4180
|
rotate: [0, 0, 0],
|
|
3946
4181
|
translate: [0, 0, 0]
|
|
3947
4182
|
},
|
|
3948
4183
|
{
|
|
3949
4184
|
outName: `subpax_${designName}_door`,
|
|
3950
4185
|
face: `${designName}_faceDoor`,
|
|
3951
|
-
extrudeMethod:
|
|
4186
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
3952
4187
|
length: 2 * R1,
|
|
3953
4188
|
rotate: [pi2, 0, 0],
|
|
3954
4189
|
translate: [0, 0, 0]
|
|
@@ -3956,7 +4191,7 @@ function pGeom12(t, param, suffix = "") {
|
|
|
3956
4191
|
{
|
|
3957
4192
|
outName: `subpax_${designName}_bottomDisc`,
|
|
3958
4193
|
face: `${designName}_faceBottomDisc`,
|
|
3959
|
-
extrudeMethod:
|
|
4194
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
3960
4195
|
length: param.E1,
|
|
3961
4196
|
rotate: [0, 0, 0],
|
|
3962
4197
|
translate: [0, 0, 0]
|
|
@@ -3964,14 +4199,14 @@ function pGeom12(t, param, suffix = "") {
|
|
|
3964
4199
|
{
|
|
3965
4200
|
outName: `subpax_${designName}_topPole`,
|
|
3966
4201
|
face: `${designName}_faceTopPole`,
|
|
3967
|
-
extrudeMethod:
|
|
4202
|
+
extrudeMethod: EExtrude10.eRotate,
|
|
3968
4203
|
rotate: [0, 0, 0],
|
|
3969
4204
|
translate: [0, 0, 0]
|
|
3970
4205
|
},
|
|
3971
4206
|
{
|
|
3972
4207
|
outName: `subpax_${designName}_horizPole`,
|
|
3973
4208
|
face: `${designName}_faceHorizPole`,
|
|
3974
|
-
extrudeMethod:
|
|
4209
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
3975
4210
|
length: param.L9,
|
|
3976
4211
|
rotate: [pi2, 0, 0],
|
|
3977
4212
|
translate: [0, L92, 0]
|
|
@@ -3979,7 +4214,7 @@ function pGeom12(t, param, suffix = "") {
|
|
|
3979
4214
|
{
|
|
3980
4215
|
outName: `subpax_${designName}_horizPoleInt`,
|
|
3981
4216
|
face: `${designName}_faceHorizPoleInt`,
|
|
3982
|
-
extrudeMethod:
|
|
4217
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
3983
4218
|
length: param.L9,
|
|
3984
4219
|
rotate: [pi2, 0, 0],
|
|
3985
4220
|
translate: [0, L92, 0]
|
|
@@ -3987,7 +4222,7 @@ function pGeom12(t, param, suffix = "") {
|
|
|
3987
4222
|
{
|
|
3988
4223
|
outName: `subpax_${designName}_diag1e`,
|
|
3989
4224
|
face: `${designName}_faceDiagE`,
|
|
3990
|
-
extrudeMethod:
|
|
4225
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
3991
4226
|
length: diagL,
|
|
3992
4227
|
rotate: [diagA, 0, 0],
|
|
3993
4228
|
translate: [0, posX4, posY4]
|
|
@@ -3995,7 +4230,7 @@ function pGeom12(t, param, suffix = "") {
|
|
|
3995
4230
|
{
|
|
3996
4231
|
outName: `subpax_${designName}_diag1i`,
|
|
3997
4232
|
face: `${designName}_faceDiagI`,
|
|
3998
|
-
extrudeMethod:
|
|
4233
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
3999
4234
|
length: diagL,
|
|
4000
4235
|
rotate: [diagA, 0, 0],
|
|
4001
4236
|
translate: [0, posX4, posY4]
|
|
@@ -4003,7 +4238,7 @@ function pGeom12(t, param, suffix = "") {
|
|
|
4003
4238
|
{
|
|
4004
4239
|
outName: `subpax_${designName}_diag2e`,
|
|
4005
4240
|
face: `${designName}_faceDiagE`,
|
|
4006
|
-
extrudeMethod:
|
|
4241
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4007
4242
|
length: diagL,
|
|
4008
4243
|
rotate: [-diagA, 0, 0],
|
|
4009
4244
|
translate: [0, -posX4, posY4]
|
|
@@ -4011,7 +4246,7 @@ function pGeom12(t, param, suffix = "") {
|
|
|
4011
4246
|
{
|
|
4012
4247
|
outName: `subpax_${designName}_diag2i`,
|
|
4013
4248
|
face: `${designName}_faceDiagI`,
|
|
4014
|
-
extrudeMethod:
|
|
4249
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4015
4250
|
length: diagL,
|
|
4016
4251
|
rotate: [-diagA, 0, 0],
|
|
4017
4252
|
translate: [0, -posX4, posY4]
|
|
@@ -4019,14 +4254,14 @@ function pGeom12(t, param, suffix = "") {
|
|
|
4019
4254
|
{
|
|
4020
4255
|
outName: `subpax_${designName}_cleanDiag`,
|
|
4021
4256
|
face: `${designName}_faceCleanDiag`,
|
|
4022
|
-
extrudeMethod:
|
|
4257
|
+
extrudeMethod: EExtrude10.eRotate,
|
|
4023
4258
|
rotate: [0, 0, 0],
|
|
4024
4259
|
translate: [0, 0, 0]
|
|
4025
4260
|
},
|
|
4026
4261
|
{
|
|
4027
4262
|
outName: `subpax_${designName}_hand1`,
|
|
4028
4263
|
face: `${designName}_faceHand`,
|
|
4029
|
-
extrudeMethod:
|
|
4264
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4030
4265
|
length: param.W8,
|
|
4031
4266
|
rotate: [pi2, 0, 0],
|
|
4032
4267
|
translate: [0, posX9[0] + param.W8, 0]
|
|
@@ -4034,7 +4269,7 @@ function pGeom12(t, param, suffix = "") {
|
|
|
4034
4269
|
{
|
|
4035
4270
|
outName: `subpax_${designName}_hand2`,
|
|
4036
4271
|
face: `${designName}_faceHand`,
|
|
4037
|
-
extrudeMethod:
|
|
4272
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4038
4273
|
length: param.W8,
|
|
4039
4274
|
rotate: [pi2, 0, 0],
|
|
4040
4275
|
translate: [0, posX9[1] + param.W8, 0]
|
|
@@ -4042,7 +4277,7 @@ function pGeom12(t, param, suffix = "") {
|
|
|
4042
4277
|
{
|
|
4043
4278
|
outName: `subpax_${designName}_hand3`,
|
|
4044
4279
|
face: `${designName}_faceHand`,
|
|
4045
|
-
extrudeMethod:
|
|
4280
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4046
4281
|
length: param.W8,
|
|
4047
4282
|
rotate: [pi2, 0, 0],
|
|
4048
4283
|
translate: [0, posX9[2] + param.W8, 0]
|
|
@@ -4050,7 +4285,7 @@ function pGeom12(t, param, suffix = "") {
|
|
|
4050
4285
|
{
|
|
4051
4286
|
outName: `subpax_${designName}_hand4`,
|
|
4052
4287
|
face: `${designName}_faceHand`,
|
|
4053
|
-
extrudeMethod:
|
|
4288
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4054
4289
|
length: param.W8,
|
|
4055
4290
|
rotate: [pi2, 0, 0],
|
|
4056
4291
|
translate: [0, posX9[3] + param.W8, 0]
|
|
@@ -4059,17 +4294,17 @@ function pGeom12(t, param, suffix = "") {
|
|
|
4059
4294
|
volumes: [
|
|
4060
4295
|
{
|
|
4061
4296
|
outName: `ipax_${designName}_bottomPolePlus`,
|
|
4062
|
-
boolMethod:
|
|
4297
|
+
boolMethod: EBVolume10.eUnion,
|
|
4063
4298
|
inList: [`subpax_${designName}_bottomDisc`, `subpax_${designName}_bottomPole`]
|
|
4064
4299
|
},
|
|
4065
4300
|
{
|
|
4066
4301
|
outName: `ipax_${designName}_bottomPart`,
|
|
4067
|
-
boolMethod:
|
|
4302
|
+
boolMethod: EBVolume10.eSubstraction,
|
|
4068
4303
|
inList: [`ipax_${designName}_bottomPolePlus`, `subpax_${designName}_door`]
|
|
4069
4304
|
},
|
|
4070
4305
|
{
|
|
4071
4306
|
outName: `ipax_${designName}_topPlus`,
|
|
4072
|
-
boolMethod:
|
|
4307
|
+
boolMethod: EBVolume10.eUnion,
|
|
4073
4308
|
inList: [
|
|
4074
4309
|
`subpax_${designName}_topPole`,
|
|
4075
4310
|
`subpax_${designName}_horizPole`,
|
|
@@ -4083,7 +4318,7 @@ function pGeom12(t, param, suffix = "") {
|
|
|
4083
4318
|
},
|
|
4084
4319
|
{
|
|
4085
4320
|
outName: `ipax_${designName}_topMinus`,
|
|
4086
|
-
boolMethod:
|
|
4321
|
+
boolMethod: EBVolume10.eUnion,
|
|
4087
4322
|
inList: [
|
|
4088
4323
|
`subpax_${designName}_horizPoleInt`,
|
|
4089
4324
|
`subpax_${designName}_diag1i`,
|
|
@@ -4093,12 +4328,12 @@ function pGeom12(t, param, suffix = "") {
|
|
|
4093
4328
|
},
|
|
4094
4329
|
{
|
|
4095
4330
|
outName: `ipax_${designName}_topPart`,
|
|
4096
|
-
boolMethod:
|
|
4331
|
+
boolMethod: EBVolume10.eSubstraction,
|
|
4097
4332
|
inList: [`ipax_${designName}_topPlus`, `ipax_${designName}_topMinus`]
|
|
4098
4333
|
},
|
|
4099
4334
|
{
|
|
4100
4335
|
outName: `pax_${designName}`,
|
|
4101
|
-
boolMethod:
|
|
4336
|
+
boolMethod: EBVolume10.eUnion,
|
|
4102
4337
|
inList: selectedList
|
|
4103
4338
|
}
|
|
4104
4339
|
]
|
|
@@ -4115,8 +4350,8 @@ function pGeom12(t, param, suffix = "") {
|
|
|
4115
4350
|
var heliostatDef = {
|
|
4116
4351
|
pTitle: "heliostat",
|
|
4117
4352
|
pDescription: "the structure of an heliostat",
|
|
4118
|
-
pDef:
|
|
4119
|
-
pGeom:
|
|
4353
|
+
pDef: pDef13,
|
|
4354
|
+
pGeom: pGeom13
|
|
4120
4355
|
};
|
|
4121
4356
|
|
|
4122
4357
|
// src/rccar/rccar.ts
|
|
@@ -4126,60 +4361,60 @@ import {
|
|
|
4126
4361
|
point as point7,
|
|
4127
4362
|
contour as contour14,
|
|
4128
4363
|
contourCircle as contourCircle11,
|
|
4129
|
-
ctrRectangle as
|
|
4130
|
-
figure as
|
|
4364
|
+
ctrRectangle as ctrRectangle7,
|
|
4365
|
+
figure as figure12,
|
|
4131
4366
|
degToRad as degToRad6,
|
|
4132
|
-
ffix as
|
|
4133
|
-
pNumber as
|
|
4134
|
-
pCheckbox as
|
|
4135
|
-
pDropdown as
|
|
4136
|
-
pSectionSeparator as
|
|
4367
|
+
ffix as ffix15,
|
|
4368
|
+
pNumber as pNumber14,
|
|
4369
|
+
pCheckbox as pCheckbox9,
|
|
4370
|
+
pDropdown as pDropdown8,
|
|
4371
|
+
pSectionSeparator as pSectionSeparator14,
|
|
4137
4372
|
transform3d,
|
|
4138
|
-
EExtrude as
|
|
4139
|
-
EBVolume as
|
|
4140
|
-
initGeom as
|
|
4373
|
+
EExtrude as EExtrude11,
|
|
4374
|
+
EBVolume as EBVolume11,
|
|
4375
|
+
initGeom as initGeom14
|
|
4141
4376
|
} from "geometrix";
|
|
4142
|
-
var
|
|
4377
|
+
var pDef14 = {
|
|
4143
4378
|
partName: "rccar",
|
|
4144
4379
|
params: [
|
|
4145
4380
|
//pNumber(name, unit, init, min, max, step)
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4381
|
+
pNumber14("N1", "unit", 4, 1, 12, 1),
|
|
4382
|
+
pNumber14("L1", "mm", 300, 10, 2e3, 1),
|
|
4383
|
+
pNumber14("W1", "mm", 1200, 10, 2e3, 1),
|
|
4384
|
+
pSectionSeparator14("General"),
|
|
4385
|
+
pDropdown8("gen3D", ["all", "platform", "bone", "hand", "motor", "wheel"]),
|
|
4386
|
+
pNumber14("T1", "mm", 10, 1, 100, 1),
|
|
4387
|
+
pNumber14("E1", "mm", 10, 1, 100, 1),
|
|
4388
|
+
pNumber14("E2", "mm", 10, 1, 500, 1),
|
|
4389
|
+
pNumber14("E3", "mm", 30, 1, 500, 1),
|
|
4390
|
+
pSectionSeparator14("Platform"),
|
|
4391
|
+
pNumber14("H1", "mm", 230, 10, 2e3, 1),
|
|
4392
|
+
pNumber14("W2", "mm", 100, 10, 2e3, 1),
|
|
4393
|
+
pCheckbox9("triangleInt", true),
|
|
4394
|
+
pCheckbox9("triangleExt", false),
|
|
4395
|
+
pSectionSeparator14("Bone"),
|
|
4396
|
+
pNumber14("D1", "mm", 20, 1, 200, 1),
|
|
4397
|
+
pNumber14("D2", "mm", 40, 1, 200, 1),
|
|
4398
|
+
pNumber14("W3", "mm", 30, 1, 200, 1),
|
|
4399
|
+
pNumber14("L2", "mm", 150, 1, 200, 1),
|
|
4400
|
+
pSectionSeparator14("Unit"),
|
|
4401
|
+
pNumber14("F1", "mm", 180, 1, 1e3, 1),
|
|
4402
|
+
pNumber14("Dwheel", "mm", 250, 10, 2e3, 1),
|
|
4403
|
+
pNumber14("Z1", "mm", 100, 10, 2e3, 1),
|
|
4404
|
+
pNumber14("Z2", "mm", 160, 10, 2e3, 1),
|
|
4405
|
+
pNumber14("Lwheel", "mm", 100, 10, 2e3, 1),
|
|
4406
|
+
pNumber14("Lmotor", "mm", 140, 10, 1e3, 1),
|
|
4407
|
+
pNumber14("Dsteering", "mm", 40, 1, 500, 1),
|
|
4408
|
+
pNumber14("Daxis", "mm", 20, 1, 500, 1),
|
|
4409
|
+
pSectionSeparator14("Angles"),
|
|
4410
|
+
pNumber14("aBoneMin", "degree", -40, -80, 0, 1),
|
|
4411
|
+
pNumber14("aBoneMax", "degree", 20, -80, 80, 1),
|
|
4412
|
+
pNumber14("aBoneLeft", "%", 0, 0, 100, 1),
|
|
4413
|
+
pNumber14("aBoneRight", "%", 0, 0, 100, 1),
|
|
4414
|
+
pDropdown8("wheel", ["straight", "turn"]),
|
|
4415
|
+
pNumber14("ra", "degree", 0, -90, 90, 1),
|
|
4416
|
+
pNumber14("rx", "cm", 0, -1e3, 1e3, 1),
|
|
4417
|
+
pNumber14("ry", "cm", 0, -1e3, 1e3, 1)
|
|
4183
4418
|
],
|
|
4184
4419
|
paramSvg: {
|
|
4185
4420
|
N1: "rccar_all_xy.svg",
|
|
@@ -4222,23 +4457,23 @@ var pDef13 = {
|
|
|
4222
4457
|
// every 0.5 second
|
|
4223
4458
|
}
|
|
4224
4459
|
};
|
|
4225
|
-
function
|
|
4226
|
-
const rGeome =
|
|
4227
|
-
const figPlatform =
|
|
4228
|
-
const figTriangle =
|
|
4229
|
-
const figPFfixation =
|
|
4230
|
-
const figBones =
|
|
4231
|
-
const figHandFixation =
|
|
4232
|
-
const figHandPlateR =
|
|
4233
|
-
const figHandPlateL =
|
|
4234
|
-
const figHandBackR =
|
|
4235
|
-
const figHandBackL =
|
|
4236
|
-
const figMotorBulkR =
|
|
4237
|
-
const figMotorBulkL =
|
|
4238
|
-
const figMFoot =
|
|
4239
|
-
const figWheel =
|
|
4240
|
-
const figTop =
|
|
4241
|
-
const figSide =
|
|
4460
|
+
function pGeom14(t, param, suffix = "") {
|
|
4461
|
+
const rGeome = initGeom14(pDef14.partName + suffix);
|
|
4462
|
+
const figPlatform = figure12();
|
|
4463
|
+
const figTriangle = figure12();
|
|
4464
|
+
const figPFfixation = figure12();
|
|
4465
|
+
const figBones = figure12();
|
|
4466
|
+
const figHandFixation = figure12();
|
|
4467
|
+
const figHandPlateR = figure12();
|
|
4468
|
+
const figHandPlateL = figure12();
|
|
4469
|
+
const figHandBackR = figure12();
|
|
4470
|
+
const figHandBackL = figure12();
|
|
4471
|
+
const figMotorBulkR = figure12();
|
|
4472
|
+
const figMotorBulkL = figure12();
|
|
4473
|
+
const figMFoot = figure12();
|
|
4474
|
+
const figWheel = figure12();
|
|
4475
|
+
const figTop = figure12();
|
|
4476
|
+
const figSide = figure12();
|
|
4242
4477
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4243
4478
|
`;
|
|
4244
4479
|
try {
|
|
@@ -4279,14 +4514,14 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4279
4514
|
const tSin = tL * Math.sin(ia);
|
|
4280
4515
|
const ctrWheel1 = makeCtrWheel2(1, -pi2 + ia, itx + tCos, ity + tSin);
|
|
4281
4516
|
const ctrWheel2 = makeCtrWheel2(-1, -pi2 + ia, itx + tCos, ity + tSin);
|
|
4282
|
-
const ctrMFootPre =
|
|
4517
|
+
const ctrMFootPre = ctrRectangle7(itx + tL, ity - F12, mFootWidth, 2 * F12);
|
|
4283
4518
|
const ctrMFoot = ctrMFootPre.rotate(itx, ity, ia);
|
|
4284
4519
|
return [ctrWheel1, ctrWheel2, ctrMFoot];
|
|
4285
4520
|
}, extrudeTriangle2 = function(posZ, idx) {
|
|
4286
4521
|
const rVol = {
|
|
4287
4522
|
outName: `subpax_${designName}_platformTriangle${idx}`,
|
|
4288
4523
|
face: `${designName}_faceTriangle`,
|
|
4289
|
-
extrudeMethod:
|
|
4524
|
+
extrudeMethod: EExtrude11.eLinearOrtho,
|
|
4290
4525
|
length: param.T1,
|
|
4291
4526
|
rotate: [0, 0, 0],
|
|
4292
4527
|
translate: [0, 0, posZ]
|
|
@@ -4296,7 +4531,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4296
4531
|
const rVol = {
|
|
4297
4532
|
outName: `subpax_${designName}_PFfixation${idx}`,
|
|
4298
4533
|
face: `${designName}_facePFfixation`,
|
|
4299
|
-
extrudeMethod:
|
|
4534
|
+
extrudeMethod: EExtrude11.eLinearOrtho,
|
|
4300
4535
|
length: param.T1,
|
|
4301
4536
|
rotate: [0, 0, 0],
|
|
4302
4537
|
translate: [0, 0, posZ]
|
|
@@ -4306,7 +4541,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4306
4541
|
const rVol = {
|
|
4307
4542
|
outName: `subpax_${designName}_bones${idx}`,
|
|
4308
4543
|
face: `${designName}_faceBones`,
|
|
4309
|
-
extrudeMethod:
|
|
4544
|
+
extrudeMethod: EExtrude11.eLinearOrtho,
|
|
4310
4545
|
length: param.T1,
|
|
4311
4546
|
rotate: [0, 0, 0],
|
|
4312
4547
|
translate: [0, 0, posZ]
|
|
@@ -4316,7 +4551,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4316
4551
|
const rVol = {
|
|
4317
4552
|
outName: `subpax_${designName}_handFixation${idx}`,
|
|
4318
4553
|
face: `${designName}_faceHandFixation`,
|
|
4319
|
-
extrudeMethod:
|
|
4554
|
+
extrudeMethod: EExtrude11.eLinearOrtho,
|
|
4320
4555
|
length: param.T1,
|
|
4321
4556
|
rotate: [0, 0, 0],
|
|
4322
4557
|
translate: [0, 0, posZ]
|
|
@@ -4326,7 +4561,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4326
4561
|
const rVol = {
|
|
4327
4562
|
outName: `subpax_${designName}_handPlate${iRL}${idx}`,
|
|
4328
4563
|
face: `${designName}_faceHandPlate${iRL}`,
|
|
4329
|
-
extrudeMethod:
|
|
4564
|
+
extrudeMethod: EExtrude11.eLinearOrtho,
|
|
4330
4565
|
length: param.T1,
|
|
4331
4566
|
rotate: [pi2, 0, 0],
|
|
4332
4567
|
translate: [0, posY + param.T1, 0]
|
|
@@ -4336,7 +4571,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4336
4571
|
const rVol = {
|
|
4337
4572
|
outName: `subpax_${designName}_handBack${iRL}`,
|
|
4338
4573
|
face: `${designName}_faceHandBack${iRL}`,
|
|
4339
|
-
extrudeMethod:
|
|
4574
|
+
extrudeMethod: EExtrude11.eLinearOrtho,
|
|
4340
4575
|
length: param.Z2,
|
|
4341
4576
|
rotate: [pi2, 0, 0],
|
|
4342
4577
|
translate: [0, posY + param.T1, 0]
|
|
@@ -4346,7 +4581,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4346
4581
|
const rVol = {
|
|
4347
4582
|
outName: `subpax_${designName}_motorBulk${iRL}`,
|
|
4348
4583
|
face: `${designName}_faceMotorBulk${iRL}`,
|
|
4349
|
-
extrudeMethod:
|
|
4584
|
+
extrudeMethod: EExtrude11.eLinearOrtho,
|
|
4350
4585
|
length: motorHeight,
|
|
4351
4586
|
rotate: [pi2, 0, 0],
|
|
4352
4587
|
translate: [0, posY - param.E1, 0]
|
|
@@ -4360,7 +4595,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4360
4595
|
const rVol = {
|
|
4361
4596
|
outName: `subpax_${designName}_mFoot${idx}`,
|
|
4362
4597
|
face: `${designName}_faceMFoot`,
|
|
4363
|
-
extrudeMethod:
|
|
4598
|
+
extrudeMethod: EExtrude11.eLinearOrtho,
|
|
4364
4599
|
length: mFootWidth,
|
|
4365
4600
|
rotate: tm.getRotation(),
|
|
4366
4601
|
translate: tm.getTranslation()
|
|
@@ -4374,7 +4609,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4374
4609
|
const rVol = {
|
|
4375
4610
|
outName: `subpax_${designName}_wheel${idx}`,
|
|
4376
4611
|
face: `${designName}_faceWheel`,
|
|
4377
|
-
extrudeMethod:
|
|
4612
|
+
extrudeMethod: EExtrude11.eRotate,
|
|
4378
4613
|
rotate: tm.getRotation(),
|
|
4379
4614
|
translate: tm.getTranslation()
|
|
4380
4615
|
};
|
|
@@ -4413,7 +4648,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4413
4648
|
const Hplatform = posZplatform + param.H1;
|
|
4414
4649
|
const W32 = param.W3 / 2;
|
|
4415
4650
|
if (R2 < W32) {
|
|
4416
|
-
throw `err152: D2 ${
|
|
4651
|
+
throw `err152: D2 ${ffix15(param.D2)} is too small compare to W3 ${ffix15(param.W3)} mm`;
|
|
4417
4652
|
}
|
|
4418
4653
|
const W32X = Math.sqrt(R2 ** 2 - W32 ** 2);
|
|
4419
4654
|
const L2b = param.L2 - 2 * W32X;
|
|
@@ -4461,44 +4696,44 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4461
4696
|
const dWheelAxis = Rwheel - Raxis;
|
|
4462
4697
|
const roundedWheel = Math.min(param.Lwheel / 3, dWheelAxis / 2);
|
|
4463
4698
|
if (LF2 < 0.1) {
|
|
4464
|
-
throw `err176: L1 ${
|
|
4699
|
+
throw `err176: L1 ${ffix15(param.L1)} is too small compare to F1 ${ffix15(param.F1)} mm`;
|
|
4465
4700
|
}
|
|
4466
4701
|
if (param.H1 < param.Z2 + param.T1) {
|
|
4467
|
-
throw `err130: H1 ${
|
|
4702
|
+
throw `err130: H1 ${ffix15(param.H1)} is too small compare to Z2 ${ffix15(param.Z2)} and T1 ${ffix15(param.T1)} mm`;
|
|
4468
4703
|
}
|
|
4469
4704
|
if (Z2b < 0.1) {
|
|
4470
|
-
throw `err149: Z2 ${
|
|
4705
|
+
throw `err149: Z2 ${ffix15(param.Z2)} is too small compare to D2 ${ffix15(param.D2)} mm`;
|
|
4471
4706
|
}
|
|
4472
4707
|
if (W2c < 0.1) {
|
|
4473
|
-
throw `err153: W2 ${
|
|
4708
|
+
throw `err153: W2 ${ffix15(param.W2)} is too small compare to T1 ${ffix15(param.T1)} mm`;
|
|
4474
4709
|
}
|
|
4475
4710
|
if (H1c < 0.1) {
|
|
4476
|
-
throw `err156: H1c ${
|
|
4711
|
+
throw `err156: H1c ${ffix15(param.H1)} is too small compare to T1 ${ffix15(param.T1)} mm`;
|
|
4477
4712
|
}
|
|
4478
4713
|
if (F1b < 0.1) {
|
|
4479
|
-
throw `err167: F1 ${
|
|
4714
|
+
throw `err167: F1 ${ffix15(param.F1)} is too small compare to T1 ${ffix15(param.T1)} and E1 ${ffix15(param.E1)} mm`;
|
|
4480
4715
|
}
|
|
4481
4716
|
if (AbMax < AbMin) {
|
|
4482
|
-
throw `err181: aBoneMax ${
|
|
4717
|
+
throw `err181: aBoneMax ${ffix15(param.aBoneMax)} is too small compare to aBoneMin ${ffix15(param.BoneMin)} degree`;
|
|
4483
4718
|
}
|
|
4484
4719
|
if (mFootWidth < param.T1) {
|
|
4485
|
-
throw `err218: Lmotor ${
|
|
4720
|
+
throw `err218: Lmotor ${ffix15(param.Lmotor)} is too small compare to F1 ${ffix15(param.F1)}`;
|
|
4486
4721
|
}
|
|
4487
4722
|
if (motorHeight < param.T1) {
|
|
4488
|
-
throw `err226: Z2 ${
|
|
4723
|
+
throw `err226: Z2 ${ffix15(param.Z2)} is too small compare to T1 ${ffix15(param.T1)} and E1 ${ffix15(param.E1)} mm`;
|
|
4489
4724
|
}
|
|
4490
4725
|
if (param.Z1 < mFootR) {
|
|
4491
|
-
throw `err256: Z1 ${
|
|
4726
|
+
throw `err256: Z1 ${ffix15(param.Z1)} is too small compare to mFootR ${ffix15(mFootR)} mm`;
|
|
4492
4727
|
}
|
|
4493
4728
|
if (Rwheel < mFootR) {
|
|
4494
|
-
throw `err259: Dwheel ${
|
|
4729
|
+
throw `err259: Dwheel ${ffix15(param.Dwheel)} is too small compare to mFootR ${ffix15(mFootR)} mm`;
|
|
4495
4730
|
}
|
|
4496
|
-
rGeome.logstr += `Platform Ltotal ${
|
|
4731
|
+
rGeome.logstr += `Platform Ltotal ${ffix15(Ltotal / 1e3)} m, surface ${ffix15(platSurface)} m2
|
|
4497
4732
|
`;
|
|
4498
|
-
rGeome.logstr += `Hplatform ${
|
|
4733
|
+
rGeome.logstr += `Hplatform ${ffix15(Hplatform)} mm
|
|
4499
4734
|
`;
|
|
4500
4735
|
const ctrPlatformMain = contour14(-W22, 0).addSegStrokeR(param.W2, 0).addSegStrokeR(0, H1b).addSegStrokeR(W22b, 0).addSegStrokeR(0, param.T1).addSegStrokeR(-param.W1, 0).addSegStrokeR(0, -param.T1).addSegStrokeR(W22b, 0).closeSegStroke();
|
|
4501
|
-
const ctrPlatformInt =
|
|
4736
|
+
const ctrPlatformInt = ctrRectangle7(-W22 + param.T1, param.T1, W2c, H1c);
|
|
4502
4737
|
figPlatform.addMainOI([ctrPlatformMain, ctrPlatformInt]);
|
|
4503
4738
|
const ctrTriangleL = contour14(-W22, 0).addSegStrokeR(param.T1, 0).addSegStrokeR(0, param.H1).addSegStrokeR(-W22b - param.T1, 0).addSegStrokeR(0, -param.T1).closeSegStroke();
|
|
4504
4739
|
const ctrTriangleR = contour14(W22, 0).addSegStrokeR(W22b, H1b).addSegStrokeR(0, param.T1).addSegStrokeR(-W22b - param.T1, 0).addSegStrokeR(0, -param.H1).closeSegStroke();
|
|
@@ -4549,17 +4784,17 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4549
4784
|
figHandPlateR.addMainOI(makeHandPlate2(pi, param.T1 + param.E2, hPposR, tPosY));
|
|
4550
4785
|
figHandPlateL.addMainOI(makeHandPlate2(0, param.T1 + param.E2, hPposL, tPosY));
|
|
4551
4786
|
}
|
|
4552
|
-
figPlatform.addSecond(
|
|
4553
|
-
figPlatform.addSecond(
|
|
4554
|
-
figPlatform.addSecond(
|
|
4555
|
-
figPlatform.addSecond(
|
|
4787
|
+
figPlatform.addSecond(ctrRectangle7(hBposR, boneSideyRs, hPlen, param.T1));
|
|
4788
|
+
figPlatform.addSecond(ctrRectangle7(hBposR, boneSideyRs + Z2c, hPlen, param.T1));
|
|
4789
|
+
figPlatform.addSecond(ctrRectangle7(hBposL - hPlen, boneSideyLs, hPlen, param.T1));
|
|
4790
|
+
figPlatform.addSecond(ctrRectangle7(hBposL - hPlen, boneSideyLs + Z2c, hPlen, param.T1));
|
|
4556
4791
|
for (let ii = 0; ii < param.N1; ii++) {
|
|
4557
4792
|
const tPosY = ii * (param.L1 + param.T1) + param.T1 + LF2;
|
|
4558
|
-
figHandBackR.addMainO(
|
|
4559
|
-
figHandBackL.addMainO(
|
|
4793
|
+
figHandBackR.addMainO(ctrRectangle7(hBposR, tPosY, param.T1, 2 * F12));
|
|
4794
|
+
figHandBackL.addMainO(ctrRectangle7(hBposL - param.T1, tPosY, param.T1, 2 * F12));
|
|
4560
4795
|
}
|
|
4561
|
-
figPlatform.addSecond(
|
|
4562
|
-
figPlatform.addSecond(
|
|
4796
|
+
figPlatform.addSecond(ctrRectangle7(hBposR, boneSideyRs, param.T1, param.Z2));
|
|
4797
|
+
figPlatform.addSecond(ctrRectangle7(hBposL - param.T1, boneSideyLs, param.T1, param.Z2));
|
|
4563
4798
|
for (let ii = 0; ii < param.N1; ii++) {
|
|
4564
4799
|
const tPosY = ii * (param.L1 + param.T1) + param.T1 + param.L1 / 2;
|
|
4565
4800
|
figMotorBulkR.addMainOI(makeHandPlate2(wheelRA[ii], motorExtraL, hPposR, tPosY));
|
|
@@ -4569,14 +4804,14 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4569
4804
|
const mBRpY = boneSideyRs + param.T1 + param.E1;
|
|
4570
4805
|
const mBLpX = hBposL - param.T1 - param.E2 - motorLen;
|
|
4571
4806
|
const mBLpY = boneSideyLs + param.T1 + param.E1;
|
|
4572
|
-
figPlatform.addSecond(
|
|
4573
|
-
figPlatform.addSecond(
|
|
4807
|
+
figPlatform.addSecond(ctrRectangle7(mBRpX, mBRpY, motorLen, motorHeight));
|
|
4808
|
+
figPlatform.addSecond(ctrRectangle7(mBLpX, mBLpY, motorLen, motorHeight));
|
|
4574
4809
|
const mFRpX = mBRpX + F12 + param.Lmotor - mFootWidth;
|
|
4575
4810
|
const mFRpY = boneSideyRs - param.Z1 - mFootR;
|
|
4576
4811
|
const mFLpX = mBLpX;
|
|
4577
4812
|
const mFLpY = boneSideyLs - param.Z1 - mFootR;
|
|
4578
|
-
figPlatform.addSecond(
|
|
4579
|
-
figPlatform.addSecond(
|
|
4813
|
+
figPlatform.addSecond(ctrRectangle7(mFRpX, mFRpY, mFootWidth, mFootHeight));
|
|
4814
|
+
figPlatform.addSecond(ctrRectangle7(mFLpX, mFLpY, mFootWidth, mFootHeight));
|
|
4580
4815
|
figMFoot.addMainOI(makeMFoot2(0, 0));
|
|
4581
4816
|
figWheel.addMainO(makeCtrWheel2(1, 0, 0, 0));
|
|
4582
4817
|
figWheel.addSecond(makeCtrWheel2(-1, 0, 0, 0));
|
|
@@ -4585,22 +4820,22 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4585
4820
|
figPlatform.addSecond(makeCtrWheel2(1, pi2, mFLpX + mFootWidth, mFLpY + mFootR));
|
|
4586
4821
|
figPlatform.addSecond(makeCtrWheel2(-1, pi2, mFLpX + mFootWidth, mFLpY + mFootR));
|
|
4587
4822
|
figTop.addMainOI([
|
|
4588
|
-
|
|
4589
|
-
|
|
4823
|
+
ctrRectangle7(-W12, 0, param.W1, Ltotal),
|
|
4824
|
+
ctrRectangle7(-W22 + param.T1, 0, W2c, Ltotal)
|
|
4590
4825
|
]);
|
|
4591
|
-
figTop.addSecond(
|
|
4826
|
+
figTop.addSecond(ctrRectangle7(-W22, 0, param.W2, Ltotal));
|
|
4592
4827
|
if (param.triangleExt) {
|
|
4593
4828
|
for (let ii = 0; ii < 2; ii++) {
|
|
4594
4829
|
const tPosY = ii * (param.L1 + param.T1) * param.N1;
|
|
4595
|
-
figTop.addSecond(
|
|
4596
|
-
figTop.addSecond(
|
|
4830
|
+
figTop.addSecond(ctrRectangle7(-W12, tPosY, W22b, param.T1));
|
|
4831
|
+
figTop.addSecond(ctrRectangle7(W22, tPosY, W22b, param.T1));
|
|
4597
4832
|
}
|
|
4598
4833
|
}
|
|
4599
4834
|
if (param.triangleInt) {
|
|
4600
4835
|
for (let ii = 1; ii < param.N1; ii++) {
|
|
4601
4836
|
const tPosY = ii * (param.L1 + param.T1);
|
|
4602
|
-
figTop.addSecond(
|
|
4603
|
-
figTop.addSecond(
|
|
4837
|
+
figTop.addSecond(ctrRectangle7(-W12, tPosY, W22b, param.T1));
|
|
4838
|
+
figTop.addSecond(ctrRectangle7(W22, tPosY, W22b, param.T1));
|
|
4604
4839
|
}
|
|
4605
4840
|
}
|
|
4606
4841
|
const tL2 = param.E2 + 2 * R2;
|
|
@@ -4609,8 +4844,8 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4609
4844
|
const tPosY = param.T1 + ii * (param.L1 + param.T1);
|
|
4610
4845
|
for (const tPosY2 of [LF2, LF23, LF25, LF28]) {
|
|
4611
4846
|
const tPosY3 = tPosY + tPosY2;
|
|
4612
|
-
figTop.addSecond(
|
|
4613
|
-
figTop.addSecond(
|
|
4847
|
+
figTop.addSecond(ctrRectangle7(W22, tPosY3, tL2, param.T1));
|
|
4848
|
+
figTop.addSecond(ctrRectangle7(tPosX2, tPosY3, tL2, param.T1));
|
|
4614
4849
|
}
|
|
4615
4850
|
}
|
|
4616
4851
|
const tPosX3 = -W22 - param.E2 - boneTopxL;
|
|
@@ -4618,16 +4853,16 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4618
4853
|
const tPosY = param.T1 + ii * (param.L1 + param.T1);
|
|
4619
4854
|
for (const tPosY2 of [LF2, LF25]) {
|
|
4620
4855
|
const tPosY3 = tPosY + tPosY2 + param.T1 + param.E1;
|
|
4621
|
-
figTop.addSecond(
|
|
4622
|
-
figTop.addSecond(
|
|
4856
|
+
figTop.addSecond(ctrRectangle7(W22 + param.E2, tPosY3, boneTopxR, param.T1));
|
|
4857
|
+
figTop.addSecond(ctrRectangle7(tPosX3, tPosY3, boneTopxL, param.T1));
|
|
4623
4858
|
}
|
|
4624
4859
|
}
|
|
4625
4860
|
for (let ii = 0; ii < param.N1; ii++) {
|
|
4626
4861
|
const tPosY = param.T1 + ii * (param.L1 + param.T1);
|
|
4627
4862
|
for (const tPosY2 of [LF2, LF23, LF25, LF28]) {
|
|
4628
4863
|
const tPosY3 = tPosY + tPosY2;
|
|
4629
|
-
figTop.addSecond(
|
|
4630
|
-
figTop.addSecond(
|
|
4864
|
+
figTop.addSecond(ctrRectangle7(hFposR, tPosY3, tL2, param.T1));
|
|
4865
|
+
figTop.addSecond(ctrRectangle7(hFposL, tPosY3, tL2, param.T1));
|
|
4631
4866
|
}
|
|
4632
4867
|
}
|
|
4633
4868
|
figTop.mergeFigure(figHandPlateR, true);
|
|
@@ -4646,18 +4881,18 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4646
4881
|
figTop.addSecond(iCtr);
|
|
4647
4882
|
}
|
|
4648
4883
|
}
|
|
4649
|
-
figSide.addMainO(
|
|
4650
|
-
figSide.addSecond(
|
|
4884
|
+
figSide.addMainO(ctrRectangle7(0, 0, Ltotal, param.H1));
|
|
4885
|
+
figSide.addSecond(ctrRectangle7(0, H1b, Ltotal, param.T1));
|
|
4651
4886
|
if (param.triangleExt) {
|
|
4652
4887
|
for (let ii = 0; ii < 2; ii++) {
|
|
4653
4888
|
const tPosY = ii * (param.L1 + param.T1) * param.N1;
|
|
4654
|
-
figSide.addSecond(
|
|
4889
|
+
figSide.addSecond(ctrRectangle7(tPosY, 0, param.T1, H1b));
|
|
4655
4890
|
}
|
|
4656
4891
|
}
|
|
4657
4892
|
if (param.triangleInt) {
|
|
4658
4893
|
for (let ii = 1; ii < param.N1; ii++) {
|
|
4659
4894
|
const tPosY = ii * (param.L1 + param.T1);
|
|
4660
|
-
figSide.addSecond(
|
|
4895
|
+
figSide.addSecond(ctrRectangle7(tPosY, 0, param.T1, H1b));
|
|
4661
4896
|
}
|
|
4662
4897
|
}
|
|
4663
4898
|
const tH2 = 2 * R2;
|
|
@@ -4665,8 +4900,8 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4665
4900
|
const tPosY = param.T1 + ii * (param.L1 + param.T1);
|
|
4666
4901
|
for (const tPosY2 of [LF2, LF23, LF25, LF28]) {
|
|
4667
4902
|
const tPosY3 = tPosY + tPosY2;
|
|
4668
|
-
figSide.addSecond(
|
|
4669
|
-
figSide.addSecond(
|
|
4903
|
+
figSide.addSecond(ctrRectangle7(tPosY3, 0, param.T1, tH2));
|
|
4904
|
+
figSide.addSecond(ctrRectangle7(tPosY3, tH2 + Z2b, param.T1, tH2));
|
|
4670
4905
|
}
|
|
4671
4906
|
}
|
|
4672
4907
|
for (let ii = 0; ii < param.N1; ii++) {
|
|
@@ -4674,12 +4909,12 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4674
4909
|
for (const tPosY2 of [LF2, LF25]) {
|
|
4675
4910
|
const tPosY3 = tPosY + tPosY2 + param.T1 + param.E1;
|
|
4676
4911
|
if (boneSideyR > 0) {
|
|
4677
|
-
figSide.addSecond(
|
|
4678
|
-
figSide.addSecond(
|
|
4912
|
+
figSide.addSecond(ctrRectangle7(tPosY3, 0, param.T1, boneSideyR));
|
|
4913
|
+
figSide.addSecond(ctrRectangle7(tPosY3, 2 * R2 + Z2b, param.T1, boneSideyR));
|
|
4679
4914
|
} else {
|
|
4680
4915
|
const tLy = -boneSideyR;
|
|
4681
|
-
figSide.addSecond(
|
|
4682
|
-
figSide.addSecond(
|
|
4916
|
+
figSide.addSecond(ctrRectangle7(tPosY3, 2 * R2 - tLy, param.T1, tLy));
|
|
4917
|
+
figSide.addSecond(ctrRectangle7(tPosY3, 4 * R2 + Z2b - tLy, param.T1, tLy));
|
|
4683
4918
|
}
|
|
4684
4919
|
}
|
|
4685
4920
|
}
|
|
@@ -4687,8 +4922,8 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4687
4922
|
const tPosY = param.T1 + ii * (param.L1 + param.T1);
|
|
4688
4923
|
for (const tPosY2 of [LF2, LF23, LF25, LF28]) {
|
|
4689
4924
|
const tPosY3 = tPosY + tPosY2;
|
|
4690
|
-
figSide.addSecond(
|
|
4691
|
-
figSide.addSecond(
|
|
4925
|
+
figSide.addSecond(ctrRectangle7(tPosY3, boneSideyRs, param.T1, tH2));
|
|
4926
|
+
figSide.addSecond(ctrRectangle7(tPosY3, boneSideyRs + tH2 + Z2b, param.T1, tH2));
|
|
4692
4927
|
}
|
|
4693
4928
|
}
|
|
4694
4929
|
const ZhpR = [boneSideyRs, boneSideyRs + Z2c];
|
|
@@ -4696,10 +4931,10 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4696
4931
|
for (let ii = 0; ii < param.N1; ii++) {
|
|
4697
4932
|
const tPosY = param.T1 + ii * (param.L1 + param.T1);
|
|
4698
4933
|
const tPosY3 = tPosY + LF2;
|
|
4699
|
-
figSide.addSecond(
|
|
4700
|
-
figSide.addSecond(
|
|
4701
|
-
figSide.addSecond(
|
|
4702
|
-
figSide.addSecond(
|
|
4934
|
+
figSide.addSecond(ctrRectangle7(tPosY3, ZhpR[0], param.F1, param.T1));
|
|
4935
|
+
figSide.addSecond(ctrRectangle7(tPosY3, ZhpR[1], param.F1, param.T1));
|
|
4936
|
+
figSide.addSecond(ctrRectangle7(tPosY3, ZhpR[0], param.F1, param.Z2));
|
|
4937
|
+
figSide.addSecond(ctrRectangle7(tPosY3, mBRpY, param.F1, motorHeight));
|
|
4703
4938
|
const axisX = tPosY + param.L1 / 2;
|
|
4704
4939
|
const axisY = ZhpR[0] - param.Z1;
|
|
4705
4940
|
for (const iCtr of makeMFoot2(axisX, axisY)) {
|
|
@@ -4731,7 +4966,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4731
4966
|
const volPlatformMain = {
|
|
4732
4967
|
outName: `subpax_${designName}_platformMain`,
|
|
4733
4968
|
face: `${designName}_facePlatform`,
|
|
4734
|
-
extrudeMethod:
|
|
4969
|
+
extrudeMethod: EExtrude11.eLinearOrtho,
|
|
4735
4970
|
length: Ltotal,
|
|
4736
4971
|
rotate: [0, 0, 0],
|
|
4737
4972
|
translate: [0, 0, 0]
|
|
@@ -4846,7 +5081,7 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4846
5081
|
volumes: [
|
|
4847
5082
|
{
|
|
4848
5083
|
outName: `pax_${designName}`,
|
|
4849
|
-
boolMethod:
|
|
5084
|
+
boolMethod: EBVolume11.eUnion,
|
|
4850
5085
|
inList: list3D
|
|
4851
5086
|
}
|
|
4852
5087
|
]
|
|
@@ -4863,36 +5098,36 @@ function pGeom13(t, param, suffix = "") {
|
|
|
4863
5098
|
var rccarDef = {
|
|
4864
5099
|
pTitle: "rccar",
|
|
4865
5100
|
pDescription: "high-level concept of the RC-car",
|
|
4866
|
-
pDef:
|
|
4867
|
-
pGeom:
|
|
5101
|
+
pDef: pDef14,
|
|
5102
|
+
pGeom: pGeom14
|
|
4868
5103
|
};
|
|
4869
5104
|
|
|
4870
5105
|
// src/rccar/singleBone.ts
|
|
4871
5106
|
import {
|
|
4872
5107
|
contour as contour15,
|
|
4873
5108
|
contourCircle as contourCircle12,
|
|
4874
|
-
figure as
|
|
4875
|
-
ffix as
|
|
4876
|
-
pNumber as
|
|
4877
|
-
pSectionSeparator as
|
|
4878
|
-
EExtrude as
|
|
4879
|
-
EBVolume as
|
|
4880
|
-
initGeom as
|
|
5109
|
+
figure as figure13,
|
|
5110
|
+
ffix as ffix16,
|
|
5111
|
+
pNumber as pNumber15,
|
|
5112
|
+
pSectionSeparator as pSectionSeparator15,
|
|
5113
|
+
EExtrude as EExtrude12,
|
|
5114
|
+
EBVolume as EBVolume12,
|
|
5115
|
+
initGeom as initGeom15
|
|
4881
5116
|
} from "geometrix";
|
|
4882
|
-
var
|
|
5117
|
+
var pDef15 = {
|
|
4883
5118
|
partName: "singleBone",
|
|
4884
5119
|
params: [
|
|
4885
5120
|
//pNumber(name, unit, init, min, max, step)
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
5121
|
+
pNumber15("D1", "mm", 30, 1, 500, 1),
|
|
5122
|
+
pNumber15("D2", "mm", 70, 1, 500, 1),
|
|
5123
|
+
pNumber15("L1", "mm", 200, 10, 1e3, 1),
|
|
5124
|
+
pSectionSeparator15("Details"),
|
|
5125
|
+
pNumber15("R3", "mm", 50, 0, 1e3, 1),
|
|
5126
|
+
pNumber15("W1", "mm", 30, 1, 500, 1),
|
|
5127
|
+
pNumber15("T1", "mm", 10, 1, 100, 1),
|
|
5128
|
+
pSectionSeparator15("Holes"),
|
|
5129
|
+
pNumber15("P2", "%", 50, 0, 99, 1),
|
|
5130
|
+
pNumber15("W2", "mm", 10, 1, 500, 1)
|
|
4896
5131
|
],
|
|
4897
5132
|
paramSvg: {
|
|
4898
5133
|
D1: "singleBone_face.svg",
|
|
@@ -4911,9 +5146,9 @@ var pDef14 = {
|
|
|
4911
5146
|
// every 0.5 second
|
|
4912
5147
|
}
|
|
4913
5148
|
};
|
|
4914
|
-
function
|
|
4915
|
-
const rGeome =
|
|
4916
|
-
const figBone =
|
|
5149
|
+
function pGeom15(t, param, suffix = "") {
|
|
5150
|
+
const rGeome = initGeom15(pDef15.partName + suffix);
|
|
5151
|
+
const figBone = figure13();
|
|
4917
5152
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4918
5153
|
`;
|
|
4919
5154
|
try {
|
|
@@ -4923,7 +5158,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4923
5158
|
const boneLen = param.L1 + 2 * R22;
|
|
4924
5159
|
const dX2 = R22 ** 2 - W12 ** 2;
|
|
4925
5160
|
if (dX2 < 0) {
|
|
4926
|
-
throw `err086: D2 ${
|
|
5161
|
+
throw `err086: D2 ${ffix16(param.D2)} is too small compare to W1 ${ffix16(param.W1)} mm`;
|
|
4927
5162
|
}
|
|
4928
5163
|
const dX = Math.sqrt(dX2);
|
|
4929
5164
|
const L1b = param.L1 - 2 * dX;
|
|
@@ -4934,16 +5169,16 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4934
5169
|
const hX0b = R22 + W2b + Rh;
|
|
4935
5170
|
const hX1b = W2b + 2 * Rh;
|
|
4936
5171
|
if (R22 < R12) {
|
|
4937
|
-
throw `err085: D2 ${
|
|
5172
|
+
throw `err085: D2 ${ffix16(param.D2)} is too small compare to D1 ${ffix16(param.D1)} mm`;
|
|
4938
5173
|
}
|
|
4939
5174
|
if (L1b < 0) {
|
|
4940
|
-
throw `err095: L1 ${
|
|
5175
|
+
throw `err095: L1 ${ffix16(param.L1)} is too small compare to D2 ${ffix16(param.D2)} mm`;
|
|
4941
5176
|
}
|
|
4942
|
-
rGeome.logstr += `Bone length ${
|
|
5177
|
+
rGeome.logstr += `Bone length ${ffix16(boneLen)} mm
|
|
4943
5178
|
`;
|
|
4944
|
-
rGeome.logstr += `Bone with N2 ${N2} holes of diameter ${
|
|
5179
|
+
rGeome.logstr += `Bone with N2 ${N2} holes of diameter ${ffix16(2 * Rh)} mm
|
|
4945
5180
|
`;
|
|
4946
|
-
rGeome.logstr += `Bone W2b ${
|
|
5181
|
+
rGeome.logstr += `Bone W2b ${ffix16(W2b)} mm
|
|
4947
5182
|
`;
|
|
4948
5183
|
const ctrBone = contour15(dX, W12).addCornerRounded(param.R3).addPointR(-dX - R22, -W12).addPointR(0, -2 * W12).addSegArc2().addCornerRounded(param.R3).addSegStrokeR(L1b, 0).addCornerRounded(param.R3).addPointR(dX + R22, W12).addPointR(0, 2 * W12).addSegArc2().addCornerRounded(param.R3).closeSegStroke();
|
|
4949
5184
|
const ctrAxis1 = contourCircle12(0, 0, R12);
|
|
@@ -4964,7 +5199,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4964
5199
|
{
|
|
4965
5200
|
outName: `subpax_${designName}_bone`,
|
|
4966
5201
|
face: `${designName}_faceBone`,
|
|
4967
|
-
extrudeMethod:
|
|
5202
|
+
extrudeMethod: EExtrude12.eLinearOrtho,
|
|
4968
5203
|
length: param.T1,
|
|
4969
5204
|
rotate: [0, 0, 0],
|
|
4970
5205
|
translate: [0, 0, 0]
|
|
@@ -4973,7 +5208,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4973
5208
|
volumes: [
|
|
4974
5209
|
{
|
|
4975
5210
|
outName: `pax_${designName}`,
|
|
4976
|
-
boolMethod:
|
|
5211
|
+
boolMethod: EBVolume12.eIdentity,
|
|
4977
5212
|
inList: [`subpax_${designName}_bone`]
|
|
4978
5213
|
}
|
|
4979
5214
|
]
|
|
@@ -4990,18 +5225,18 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4990
5225
|
var singleBoneDef = {
|
|
4991
5226
|
pTitle: "singleBone",
|
|
4992
5227
|
pDescription: "detailed design of the suspension bone of the rccar",
|
|
4993
|
-
pDef:
|
|
4994
|
-
pGeom:
|
|
5228
|
+
pDef: pDef15,
|
|
5229
|
+
pGeom: pGeom15
|
|
4995
5230
|
};
|
|
4996
5231
|
|
|
4997
5232
|
// src/rccar/doubleBone.ts
|
|
4998
5233
|
import {
|
|
4999
5234
|
contourCircle as contourCircle13,
|
|
5000
5235
|
degToRad as degToRad7,
|
|
5001
|
-
ffix as
|
|
5002
|
-
pNumber as
|
|
5003
|
-
pSectionSeparator as
|
|
5004
|
-
initGeom as
|
|
5236
|
+
ffix as ffix17,
|
|
5237
|
+
pNumber as pNumber16,
|
|
5238
|
+
pSectionSeparator as pSectionSeparator16,
|
|
5239
|
+
initGeom as initGeom16
|
|
5005
5240
|
} from "geometrix";
|
|
5006
5241
|
import {
|
|
5007
5242
|
tJDir as tJDir4,
|
|
@@ -5010,37 +5245,37 @@ import {
|
|
|
5010
5245
|
facet as facet4,
|
|
5011
5246
|
sheetFold as sheetFold4
|
|
5012
5247
|
} from "sheetfold";
|
|
5013
|
-
var
|
|
5248
|
+
var pDef16 = {
|
|
5014
5249
|
partName: "doubleBone",
|
|
5015
5250
|
params: [
|
|
5016
5251
|
//pNumber(name, unit, init, min, max, step)
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5252
|
+
pNumber16("D1", "mm", 30, 1, 500, 1),
|
|
5253
|
+
pNumber16("D2", "mm", 70, 1, 500, 1),
|
|
5254
|
+
pNumber16("L1", "mm", 300, 10, 1e3, 1),
|
|
5255
|
+
pNumber16("L2", "mm", 200, 10, 1e3, 1),
|
|
5256
|
+
pNumber16("E1", "mm", 40, 1, 1e3, 1),
|
|
5257
|
+
pSectionSeparator16("Side"),
|
|
5258
|
+
pNumber16("W1", "mm", 30, 1, 500, 1),
|
|
5259
|
+
pNumber16("P2", "%", 50, 0, 99, 1),
|
|
5260
|
+
pNumber16("W2", "mm", 10, 1, 500, 1),
|
|
5261
|
+
pSectionSeparator16("Top"),
|
|
5262
|
+
pNumber16("S1", "mm", 20, 1, 100, 1),
|
|
5263
|
+
pNumber16("S2", "mm", 20, 1, 100, 1),
|
|
5264
|
+
pNumber16("S3", "mm", 20, 1, 100, 1),
|
|
5265
|
+
pNumber16("R3", "mm", 10, 0, 1e3, 1),
|
|
5266
|
+
pSectionSeparator16("Wing width"),
|
|
5267
|
+
pNumber16("P11", "%", 8, 0, 90, 1),
|
|
5268
|
+
pNumber16("P12", "%", 20, 0, 90, 1),
|
|
5269
|
+
pNumber16("P21", "%", 18, 0, 90, 1),
|
|
5270
|
+
pNumber16("P22", "%", 20, 0, 90, 1),
|
|
5271
|
+
pSectionSeparator16("Folding"),
|
|
5272
|
+
pNumber16("T1", "mm", 2, 0.5, 10, 0.1),
|
|
5273
|
+
pNumber16("Jangle", "degree", 90, 30, 120, 1),
|
|
5274
|
+
pNumber16("Jradius", "mm", 10, 0.1, 50, 0.1),
|
|
5275
|
+
pNumber16("Jneutral", "%", 50, 0, 100, 1),
|
|
5276
|
+
pNumber16("Jmark", "mm", 2, 0.1, 10, 0.1),
|
|
5277
|
+
pNumber16("Jradius2", "mm", 4, 0.1, 50, 0.1),
|
|
5278
|
+
pNumber16("Jmark2", "mm", 2, 0.1, 10, 0.1)
|
|
5044
5279
|
],
|
|
5045
5280
|
paramSvg: {
|
|
5046
5281
|
D1: "doubleBone_face.svg",
|
|
@@ -5074,8 +5309,8 @@ var pDef15 = {
|
|
|
5074
5309
|
// every 0.5 second
|
|
5075
5310
|
}
|
|
5076
5311
|
};
|
|
5077
|
-
function
|
|
5078
|
-
const rGeome =
|
|
5312
|
+
function pGeom16(t, param, suffix = "") {
|
|
5313
|
+
const rGeome = initGeom16(pDef16.partName + suffix);
|
|
5079
5314
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5080
5315
|
`;
|
|
5081
5316
|
try {
|
|
@@ -5085,7 +5320,7 @@ function pGeom15(t, param, suffix = "") {
|
|
|
5085
5320
|
return [rA, rInitDist];
|
|
5086
5321
|
}, calcSplitTri2 = function(iL, iP) {
|
|
5087
5322
|
if (iL < 0) {
|
|
5088
|
-
throw `err559: iL ${
|
|
5323
|
+
throw `err559: iL ${ffix17(iL)} is negative mm`;
|
|
5089
5324
|
}
|
|
5090
5325
|
let rLside = iL;
|
|
5091
5326
|
let rLcenter = 0;
|
|
@@ -5138,7 +5373,7 @@ function pGeom15(t, param, suffix = "") {
|
|
|
5138
5373
|
const boneLen = param.L1 + 2 * R22;
|
|
5139
5374
|
const dX2 = R22 ** 2 - W12 ** 2;
|
|
5140
5375
|
if (dX2 < 0) {
|
|
5141
|
-
throw `err086: D2 ${
|
|
5376
|
+
throw `err086: D2 ${ffix17(param.D2)} is too small compare to W1 ${ffix17(param.W1)} mm`;
|
|
5142
5377
|
}
|
|
5143
5378
|
const dX = Math.sqrt(dX2);
|
|
5144
5379
|
const L1b = param.L1 - 2 * dX;
|
|
@@ -5178,22 +5413,22 @@ function pGeom15(t, param, suffix = "") {
|
|
|
5178
5413
|
const [tri22s, tri22c] = calcSplitTri2(tri22L, param.P22);
|
|
5179
5414
|
const wingH = param.W1 / 2 + cornerSizeInt - cornerSizeInt2;
|
|
5180
5415
|
if (R22 < R12) {
|
|
5181
|
-
throw `err085: D2 ${
|
|
5416
|
+
throw `err085: D2 ${ffix17(param.D2)} is too small compare to D1 ${ffix17(param.D1)} mm`;
|
|
5182
5417
|
}
|
|
5183
5418
|
if (L1b < 0) {
|
|
5184
|
-
throw `err095: L1 ${
|
|
5419
|
+
throw `err095: L1 ${ffix17(param.L1)} is too small compare to D2 ${ffix17(param.D2)} mm`;
|
|
5185
5420
|
}
|
|
5186
5421
|
if (param.E1 < cornerSizeInt) {
|
|
5187
|
-
throw `err151: E1 ${
|
|
5422
|
+
throw `err151: E1 ${ffix17(param.E1)} is too small compare to Jradius ${ffix17(param.Jradius)} mm`;
|
|
5188
5423
|
}
|
|
5189
5424
|
if (L2c < 0) {
|
|
5190
|
-
throw `err150: L2 ${
|
|
5425
|
+
throw `err150: L2 ${ffix17(param.L2)} is too small compare to E1 ${ffix17(param.E1)} mm`;
|
|
5191
5426
|
}
|
|
5192
|
-
rGeome.logstr += `Bone length ${
|
|
5427
|
+
rGeome.logstr += `Bone length ${ffix17(boneLen)} mm
|
|
5193
5428
|
`;
|
|
5194
|
-
rGeome.logstr += `Bone with N2 ${N2} holes of diameter ${
|
|
5429
|
+
rGeome.logstr += `Bone with N2 ${N2} holes of diameter ${ffix17(2 * Rh)} and W2b ${ffix17(W2b)} mm
|
|
5195
5430
|
`;
|
|
5196
|
-
rGeome.logstr += `Side with N2c ${N2c} holes of diameter ${
|
|
5431
|
+
rGeome.logstr += `Side with N2c ${N2c} holes of diameter ${ffix17(2 * Rh)} and W2c ${ffix17(W2c)} mm
|
|
5197
5432
|
`;
|
|
5198
5433
|
const ctrAxis1 = contourCircle13(0, 0, R12);
|
|
5199
5434
|
const ctrAxis2 = contourCircle13(param.L1, 0, R12);
|
|
@@ -5292,82 +5527,465 @@ function pGeom15(t, param, suffix = "") {
|
|
|
5292
5527
|
var doubleBoneDef = {
|
|
5293
5528
|
pTitle: "doubleBone",
|
|
5294
5529
|
pDescription: "combined suspension bones of the rccar",
|
|
5295
|
-
pDef:
|
|
5296
|
-
pGeom:
|
|
5530
|
+
pDef: pDef16,
|
|
5531
|
+
pGeom: pGeom16
|
|
5297
5532
|
};
|
|
5298
5533
|
|
|
5299
|
-
// src/
|
|
5534
|
+
// src/rccar/pcar.ts
|
|
5300
5535
|
import {
|
|
5301
|
-
point as point8,
|
|
5302
5536
|
contour as contour16,
|
|
5303
5537
|
contourCircle as contourCircle14,
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
EExtrude as EExtrude12,
|
|
5312
|
-
EBVolume as EBVolume12,
|
|
5313
|
-
initGeom as initGeom16
|
|
5538
|
+
figure as figure14,
|
|
5539
|
+
ffix as ffix18,
|
|
5540
|
+
pNumber as pNumber17,
|
|
5541
|
+
pSectionSeparator as pSectionSeparator17,
|
|
5542
|
+
EExtrude as EExtrude13,
|
|
5543
|
+
EBVolume as EBVolume13,
|
|
5544
|
+
initGeom as initGeom17
|
|
5314
5545
|
} from "geometrix";
|
|
5315
|
-
var
|
|
5546
|
+
var pDef17 = {
|
|
5547
|
+
partName: "pcar",
|
|
5548
|
+
params: [
|
|
5549
|
+
//pNumber(name, unit, init, min, max, step)
|
|
5550
|
+
pNumber17("LB1", "mm", 1e3, 100, 4e3, 1),
|
|
5551
|
+
pNumber17("LB2", "mm", 3e3, 100, 8e3, 1),
|
|
5552
|
+
pNumber17("LB3", "mm", 1e3, 100, 4e3, 1),
|
|
5553
|
+
pNumber17("LT1", "mm", 800, 100, 4e3, 1),
|
|
5554
|
+
pNumber17("LT3", "mm", 1200, 100, 4e3, 1),
|
|
5555
|
+
pNumber17("LT4", "mm", 1600, 100, 4e3, 1),
|
|
5556
|
+
pNumber17("HF1", "mm", 900, 100, 3e3, 1),
|
|
5557
|
+
pNumber17("HF3", "mm", 600, 100, 3e3, 1),
|
|
5558
|
+
pNumber17("HF4", "mm", 300, 100, 3e3, 1),
|
|
5559
|
+
pNumber17("HB1", "mm", 800, 100, 3e3, 1),
|
|
5560
|
+
pSectionSeparator17("Wheels"),
|
|
5561
|
+
pNumber17("HW1", "mm", 200, -1e3, 1e3, 1),
|
|
5562
|
+
pNumber17("DW1", "mm", 100, 1, 500, 1),
|
|
5563
|
+
pNumber17("DW2", "mm", 600, 1, 2e3, 1),
|
|
5564
|
+
pNumber17("DW3", "mm", 800, 1, 2e3, 1),
|
|
5565
|
+
pNumber17("WW1", "mm", 300, 1, 1e3, 1),
|
|
5566
|
+
pNumber17("WW2", "mm", 200, 1, 1e3, 1),
|
|
5567
|
+
pNumber17("RW2", "mm", 50, 1, 1e3, 1),
|
|
5568
|
+
pSectionSeparator17("Side"),
|
|
5569
|
+
pNumber17("C1", "mm", 50, 1, 500, 1),
|
|
5570
|
+
pNumber17("C2", "mm", 100, 1, 500, 1),
|
|
5571
|
+
pNumber17("C3", "mm", 50, 1, 500, 1),
|
|
5572
|
+
pNumber17("C4", "mm", 50, 1, 500, 1),
|
|
5573
|
+
pNumber17("Rs1", "mm", 100, 1, 2e3, 1),
|
|
5574
|
+
pNumber17("Rs2", "mm", 100, 1, 2e3, 1),
|
|
5575
|
+
pNumber17("Rs3", "mm", 100, 1, 2e3, 1),
|
|
5576
|
+
pNumber17("Rs4", "mm", 100, 1, 2e3, 1),
|
|
5577
|
+
pNumber17("Rs5", "mm", 100, 1, 2e3, 1),
|
|
5578
|
+
pNumber17("Rs6", "mm", 500, 1, 2e3, 1),
|
|
5579
|
+
pNumber17("Rs7", "mm", 100, 1, 2e3, 1),
|
|
5580
|
+
pSectionSeparator17("Top"),
|
|
5581
|
+
pNumber17("Wt1", "mm", 600, 1, 2e3, 1),
|
|
5582
|
+
pNumber17("Wt2", "mm", 800, 1, 2e3, 1),
|
|
5583
|
+
pNumber17("Ct1", "mm", 50, 1, 500, 1),
|
|
5584
|
+
pNumber17("Ct2", "mm", 50, 1, 500, 1),
|
|
5585
|
+
pNumber17("Ct3", "mm", 50, 1, 500, 1),
|
|
5586
|
+
pNumber17("Rt1", "mm", 100, 1, 2e3, 1),
|
|
5587
|
+
pNumber17("Rt2", "mm", 400, 1, 2e3, 1),
|
|
5588
|
+
pSectionSeparator17("Front"),
|
|
5589
|
+
pNumber17("Wf1", "mm", 800, 1, 2e3, 1),
|
|
5590
|
+
pNumber17("Wf2", "mm", 300, 1, 1e3, 1),
|
|
5591
|
+
pNumber17("Cf1", "mm", 50, 1, 500, 1),
|
|
5592
|
+
pNumber17("Cf2", "mm", 50, 1, 500, 1),
|
|
5593
|
+
pNumber17("Cf3", "mm", 50, 1, 500, 1),
|
|
5594
|
+
pNumber17("Rf1", "mm", 100, 1, 2e3, 1),
|
|
5595
|
+
pNumber17("Rf2", "mm", 100, 1, 2e3, 1),
|
|
5596
|
+
pNumber17("Rf3", "mm", 100, 1, 2e3, 1)
|
|
5597
|
+
],
|
|
5598
|
+
paramSvg: {
|
|
5599
|
+
LB1: "pcar_side.svg",
|
|
5600
|
+
LB2: "pcar_side.svg",
|
|
5601
|
+
LB3: "pcar_side.svg",
|
|
5602
|
+
LT1: "pcar_side.svg",
|
|
5603
|
+
LT3: "pcar_side.svg",
|
|
5604
|
+
LT4: "pcar_side.svg",
|
|
5605
|
+
HF1: "pcar_side.svg",
|
|
5606
|
+
HF3: "pcar_side.svg",
|
|
5607
|
+
HF4: "pcar_side.svg",
|
|
5608
|
+
HB1: "pcar_side.svg",
|
|
5609
|
+
HW1: "pcar_side.svg",
|
|
5610
|
+
DW1: "pcar_side.svg",
|
|
5611
|
+
DW2: "pcar_side.svg",
|
|
5612
|
+
DW3: "pcar_side.svg",
|
|
5613
|
+
WW1: "pcar_front.svg",
|
|
5614
|
+
WW2: "pcar_front.svg",
|
|
5615
|
+
RW2: "pcar_front.svg",
|
|
5616
|
+
C1: "pcar_side.svg",
|
|
5617
|
+
C2: "pcar_side.svg",
|
|
5618
|
+
C3: "pcar_side.svg",
|
|
5619
|
+
C4: "pcar_side.svg",
|
|
5620
|
+
Rs1: "pcar_side.svg",
|
|
5621
|
+
Rs2: "pcar_side.svg",
|
|
5622
|
+
Rs3: "pcar_side.svg",
|
|
5623
|
+
Rs4: "pcar_side.svg",
|
|
5624
|
+
Rs5: "pcar_side.svg",
|
|
5625
|
+
Rs6: "pcar_side.svg",
|
|
5626
|
+
Rs7: "pcar_side.svg",
|
|
5627
|
+
Wt1: "pcar_top.svg",
|
|
5628
|
+
Wt2: "pcar_top.svg",
|
|
5629
|
+
Ct1: "pcar_top.svg",
|
|
5630
|
+
Ct2: "pcar_top.svg",
|
|
5631
|
+
Ct3: "pcar_top.svg",
|
|
5632
|
+
Ct4: "pcar_top.svg",
|
|
5633
|
+
Rt1: "pcar_top.svg",
|
|
5634
|
+
Rt2: "pcar_top.svg",
|
|
5635
|
+
Wf1: "pcar_front.svg",
|
|
5636
|
+
Wf2: "pcar_front.svg",
|
|
5637
|
+
Cf1: "pcar_front.svg",
|
|
5638
|
+
Cf2: "pcar_front.svg",
|
|
5639
|
+
Cf3: "pcar_front.svg",
|
|
5640
|
+
Rf1: "pcar_front.svg",
|
|
5641
|
+
Rf2: "pcar_front.svg",
|
|
5642
|
+
Rf3: "pcar_front.svg"
|
|
5643
|
+
},
|
|
5644
|
+
sim: {
|
|
5645
|
+
tMax: 180,
|
|
5646
|
+
tStep: 0.5,
|
|
5647
|
+
tUpdate: 500
|
|
5648
|
+
// every 0.5 second
|
|
5649
|
+
}
|
|
5650
|
+
};
|
|
5651
|
+
function pGeom17(t, param, suffix = "") {
|
|
5652
|
+
const rGeome = initGeom17(pDef17.partName + suffix);
|
|
5653
|
+
const figSideWiWheels = figure14();
|
|
5654
|
+
const figSideWoWheels = figure14();
|
|
5655
|
+
const figTop = figure14();
|
|
5656
|
+
const figFront = figure14();
|
|
5657
|
+
const figWheel = figure14();
|
|
5658
|
+
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5659
|
+
`;
|
|
5660
|
+
try {
|
|
5661
|
+
let calcCR2 = function(dX, dY, dC) {
|
|
5662
|
+
const AD2 = (dX ** 2 + dY ** 2) / 4;
|
|
5663
|
+
const AD = Math.sqrt(AD2);
|
|
5664
|
+
const EA = Math.sqrt(AD2 + dC ** 2);
|
|
5665
|
+
const EG = EA / 2;
|
|
5666
|
+
const aAED = Math.atan2(AD, dC);
|
|
5667
|
+
const rEF = EG / Math.cos(aAED);
|
|
5668
|
+
return rEF;
|
|
5669
|
+
}, makeCtrSide2 = function(withWheels) {
|
|
5670
|
+
const rCtr = contour16(-param.LB1, BodyY0).addCornerRounded(param.Rs1);
|
|
5671
|
+
if (withWheels) {
|
|
5672
|
+
rCtr.addSegStrokeR(LB1b, 0).addPointR(dXwheel, param.HW1 + RW3).addPointR(2 * dXwheel, 0).addSegArc2().addSegStrokeR(LB2b, 0).addPointR(dXwheel, param.HW1 + RW3).addPointR(2 * dXwheel, 0).addSegArc2().addSegStrokeR(LB3b, 0);
|
|
5673
|
+
} else {
|
|
5674
|
+
rCtr.addSegStrokeR(BodyLength, 0);
|
|
5675
|
+
}
|
|
5676
|
+
rCtr.addCornerRounded(param.Rs7).addSegStrokeR(0, param.HF1).addCornerRounded(param.Rs6).addPointR(-param.LT4, param.HF4).addSegArc(CR4, false, true).addCornerRounded(param.Rs5).addPointR(-param.LT3, HF3b).addSegArc(CR3, false, true).addCornerRounded(param.Rs4).addPointR(-LT2, 0).addSegArc(CR2, false, true).addCornerRounded(param.Rs3).addPointR(-param.LT1, -HB1b).addSegArc(CR1, false, true).addCornerRounded(param.Rs2).closeSegStroke();
|
|
5677
|
+
return rCtr;
|
|
5678
|
+
}, makeCtrWheel2 = function(sX, x0, y0, r0) {
|
|
5679
|
+
const rCtr = contour16(x0, y0).addSegStrokeR(sX * RW1, 0).addSegStrokeR(0, param.WW1).addSegStrokeR(sX * (RW2 - RW1), 0).addCornerRounded(param.RW2).addSegStrokeR(0, param.WW2).addCornerRounded(param.RW2).addSegStrokeR(-sX * RW2, 0).closeSegStroke().rotate(x0, y0, r0);
|
|
5680
|
+
return rCtr;
|
|
5681
|
+
};
|
|
5682
|
+
var calcCR = calcCR2, makeCtrSide = makeCtrSide2, makeCtrWheel = makeCtrWheel2;
|
|
5683
|
+
const pi = Math.PI;
|
|
5684
|
+
const pi2 = pi / 2;
|
|
5685
|
+
const RW1 = param.DW1 / 2;
|
|
5686
|
+
const RW2 = param.DW2 / 2;
|
|
5687
|
+
const RW3 = param.DW3 / 2;
|
|
5688
|
+
const BodyY0 = RW2 - param.HW1;
|
|
5689
|
+
const BodyHeight = param.HF1 + param.HF3 + param.HF4;
|
|
5690
|
+
const BodyLength = param.LB1 + param.LB2 + param.LB3;
|
|
5691
|
+
const BodyWidth = 2 * param.Wt1 + param.Wt2;
|
|
5692
|
+
const LT2 = BodyLength - (param.LT1 + param.LT3 + param.LT4);
|
|
5693
|
+
const HF3b = param.HF3 - param.C2;
|
|
5694
|
+
const HB1b = param.HB1 - param.C2;
|
|
5695
|
+
const HB2 = BodyHeight - param.HB1;
|
|
5696
|
+
const Wf1b = BodyHeight - param.Cf3 - param.Wf1;
|
|
5697
|
+
const Wf2b = BodyWidth - 2 * (param.Cf1 + param.Wf2);
|
|
5698
|
+
const Wtb = BodyWidth - 2 * param.Cf1;
|
|
5699
|
+
const Cf1b = param.Wt1 - (param.Cf1 + param.WW1 + param.WW2);
|
|
5700
|
+
const Ct2b = param.Wt1 - (param.Ct2 + param.WW1 + param.WW2);
|
|
5701
|
+
const Ct1b = param.LB1 - (param.Ct1 + RW3);
|
|
5702
|
+
const Ct3b = param.LB3 - (param.Ct3 + RW3);
|
|
5703
|
+
const dXwheel2 = RW3 ** 2 - param.HW1 ** 2;
|
|
5704
|
+
if (dXwheel2 < 0) {
|
|
5705
|
+
throw `err158: dXwheel2 ${ffix18(dXwheel2)} is negative because of HW1 ${ffix18(param.HW1)} and RW3 ${ffix18(RW3)} mm`;
|
|
5706
|
+
}
|
|
5707
|
+
const dXwheel = Math.sqrt(RW3 ** 2 - param.HW1 ** 2);
|
|
5708
|
+
const LB1b = param.LB1 - dXwheel;
|
|
5709
|
+
const LB2b = param.LB2 - 2 * dXwheel;
|
|
5710
|
+
const LB3b = param.LB3 - dXwheel;
|
|
5711
|
+
const CR1 = calcCR2(param.LT1, HB1b, param.C1);
|
|
5712
|
+
const CR2 = calcCR2(LT2, 0, param.C2);
|
|
5713
|
+
const CR3 = calcCR2(param.LT3, HF3b, param.C3);
|
|
5714
|
+
const CR4 = calcCR2(param.LT4, param.HF4, param.C4);
|
|
5715
|
+
const CRt1 = calcCR2(0, BodyWidth - 2 * param.Ct2, param.Ct1);
|
|
5716
|
+
const CRt3 = calcCR2(0, BodyWidth - 2 * param.Ct2, param.Ct3);
|
|
5717
|
+
const CRt2 = calcCR2(BodyLength - param.Ct1 - param.Ct3, 0, param.Ct2);
|
|
5718
|
+
const CRf1 = calcCR2(0, param.Wf1, param.Cf1);
|
|
5719
|
+
const CRf2 = calcCR2(param.Wf2, Wf1b, param.Cf2);
|
|
5720
|
+
const CRf3 = calcCR2(Wf2b, 0, param.Cf3);
|
|
5721
|
+
if (BodyY0 < 0) {
|
|
5722
|
+
throw `err147: DW2 ${ffix18(param.DW2)} is too small comapre to HW1 ${ffix18(param.HW1)} mm`;
|
|
5723
|
+
}
|
|
5724
|
+
if (LT2 < 0) {
|
|
5725
|
+
throw `err169: LT2 ${ffix18(LT2)} mm is negative`;
|
|
5726
|
+
}
|
|
5727
|
+
if (HF3b < 0) {
|
|
5728
|
+
throw `err174: HF3b ${ffix18(HF3b)} mm is negative`;
|
|
5729
|
+
}
|
|
5730
|
+
if (HB1b < 0) {
|
|
5731
|
+
throw `err178: HB1b ${ffix18(HB1b)} mm is negative`;
|
|
5732
|
+
}
|
|
5733
|
+
if (HB2 < 0) {
|
|
5734
|
+
throw `err172: HB2 ${ffix18(HB2)} mm is negative`;
|
|
5735
|
+
}
|
|
5736
|
+
if (Wf1b < 0) {
|
|
5737
|
+
throw `err161: Wf1b ${ffix18(Wf1b)} mm is negative`;
|
|
5738
|
+
}
|
|
5739
|
+
if (Wf2b < 0) {
|
|
5740
|
+
throw `err164: Wf2b ${ffix18(Wf2b)} mm is negative`;
|
|
5741
|
+
}
|
|
5742
|
+
if (Cf1b < 0) {
|
|
5743
|
+
throw `err167: Cf1b ${ffix18(Cf1b)} mm is negative`;
|
|
5744
|
+
}
|
|
5745
|
+
if (Ct1b < 0) {
|
|
5746
|
+
throw `err170: Ct1b ${ffix18(Ct1b)} mm is negative`;
|
|
5747
|
+
}
|
|
5748
|
+
if (Ct2b < 0) {
|
|
5749
|
+
throw `err173: Ct2b ${ffix18(Ct2b)} mm is negative`;
|
|
5750
|
+
}
|
|
5751
|
+
if (Ct3b < 0) {
|
|
5752
|
+
throw `err176: Ct3b ${ffix18(Ct3b)} mm is negative`;
|
|
5753
|
+
}
|
|
5754
|
+
if (LB1b < 0) {
|
|
5755
|
+
throw `err185: LB1b ${ffix18(LB1b)} mm is negative`;
|
|
5756
|
+
}
|
|
5757
|
+
if (LB2b < 0) {
|
|
5758
|
+
throw `err189: LB2b ${ffix18(LB2b)} mm is negative`;
|
|
5759
|
+
}
|
|
5760
|
+
if (LB3b < 0) {
|
|
5761
|
+
throw `err193: LB3b ${ffix18(LB3b)} mm is negative`;
|
|
5762
|
+
}
|
|
5763
|
+
rGeome.logstr += `Body: Y0 ${ffix18(BodyY0)}, Height ${ffix18(BodyHeight)}, Lenght: ${ffix18(BodyLength)}, Width: ${ffix18(BodyWidth)} mm
|
|
5764
|
+
`;
|
|
5765
|
+
figSideWiWheels.addMainO(makeCtrSide2(true));
|
|
5766
|
+
figSideWiWheels.addSecond(contourCircle14(0, RW2, RW2));
|
|
5767
|
+
figSideWiWheels.addSecond(contourCircle14(0, RW2, RW1));
|
|
5768
|
+
figSideWiWheels.addSecond(contourCircle14(param.LB2, RW2, RW2));
|
|
5769
|
+
figSideWiWheels.addSecond(contourCircle14(param.LB2, RW2, RW1));
|
|
5770
|
+
figSideWoWheels.addMainO(makeCtrSide2(false));
|
|
5771
|
+
figSideWoWheels.mergeFigure(figSideWiWheels, true);
|
|
5772
|
+
const ctrTop = contour16(-param.LB1 + param.Ct1, param.Ct2).addCornerRounded(param.Rt1).addPointR(BodyLength - param.Ct1 - param.Ct3, 0).addSegArc(CRt2, false, true).addCornerRounded(param.Rt2).addPointR(0, BodyWidth - 2 * param.Ct2).addSegArc(CRt3, false, true).addCornerRounded(param.Rt2).addPointR(-BodyLength + param.Ct1 + param.Ct3, 0).addSegArc(CRt2, false, true).addCornerRounded(param.Rt1).addPointR(0, -BodyWidth + 2 * param.Ct2).addSegArc(CRt1, false, true);
|
|
5773
|
+
figTop.addMainO(ctrTop);
|
|
5774
|
+
const ctrFront = contour16(param.Cf1, BodyY0).addCornerRounded(param.Rf1).addSegStrokeR(Wtb, 0).addCornerRounded(param.Rf1).addPointR(0, param.Wf1).addSegArc(CRf1, false, true).addCornerRounded(param.Rf2).addPointR(-param.Wf2, Wf1b).addSegArc(CRf2, false, true).addCornerRounded(param.Rf3).addPointR(-Wf2b, 0).addSegArc(CRf3, false, true).addCornerRounded(param.Rf3).addPointR(-param.Wf2, -Wf1b).addSegArc(CRf2, false, true).addCornerRounded(param.Rf2).addPointR(0, -param.Wf1).addSegArc(CRf1, false, true);
|
|
5775
|
+
figFront.addMainO(ctrFront);
|
|
5776
|
+
figWheel.addMainO(makeCtrWheel2(1, 0, 0, 0));
|
|
5777
|
+
figWheel.addSecond(makeCtrWheel2(-1, 0, 0, 0));
|
|
5778
|
+
figTop.addSecond(makeCtrWheel2(1, 0, param.Wt1 + param.Wt2, 0));
|
|
5779
|
+
figTop.addSecond(makeCtrWheel2(-1, 0, param.Wt1 + param.Wt2, 0));
|
|
5780
|
+
figTop.addSecond(makeCtrWheel2(1, param.LB2, param.Wt1 + param.Wt2, 0));
|
|
5781
|
+
figTop.addSecond(makeCtrWheel2(-1, param.LB2, param.Wt1 + param.Wt2, 0));
|
|
5782
|
+
figTop.addSecond(makeCtrWheel2(1, 0, param.Wt1, pi));
|
|
5783
|
+
figTop.addSecond(makeCtrWheel2(-1, 0, param.Wt1, pi));
|
|
5784
|
+
figTop.addSecond(makeCtrWheel2(1, param.LB2, param.Wt1, pi));
|
|
5785
|
+
figTop.addSecond(makeCtrWheel2(-1, param.LB2, param.Wt1, pi));
|
|
5786
|
+
figFront.addSecond(makeCtrWheel2(1, param.Wt1, RW2, pi2));
|
|
5787
|
+
figFront.addSecond(makeCtrWheel2(-1, param.Wt1, RW2, pi2));
|
|
5788
|
+
figFront.addSecond(makeCtrWheel2(1, param.Wt1 + param.Wt2, RW2, -pi2));
|
|
5789
|
+
figFront.addSecond(makeCtrWheel2(-1, param.Wt1 + param.Wt2, RW2, -pi2));
|
|
5790
|
+
rGeome.fig = {
|
|
5791
|
+
faceSideWiWheels: figSideWiWheels,
|
|
5792
|
+
faceSideWoWheels: figSideWoWheels,
|
|
5793
|
+
faceTop: figTop,
|
|
5794
|
+
faceFront: figFront,
|
|
5795
|
+
faceWheel: figWheel
|
|
5796
|
+
};
|
|
5797
|
+
const designName = rGeome.partName;
|
|
5798
|
+
rGeome.vol = {
|
|
5799
|
+
extrudes: [
|
|
5800
|
+
{
|
|
5801
|
+
outName: `subpax_${designName}_sideWiW1`,
|
|
5802
|
+
face: `${designName}_faceSideWiWheels`,
|
|
5803
|
+
extrudeMethod: EExtrude13.eLinearOrtho,
|
|
5804
|
+
length: param.Wt1,
|
|
5805
|
+
rotate: [pi2, 0, 0],
|
|
5806
|
+
translate: [0, param.Wt1, 0]
|
|
5807
|
+
},
|
|
5808
|
+
{
|
|
5809
|
+
outName: `subpax_${designName}_sideWiW2`,
|
|
5810
|
+
face: `${designName}_faceSideWiWheels`,
|
|
5811
|
+
extrudeMethod: EExtrude13.eLinearOrtho,
|
|
5812
|
+
length: param.Wt1,
|
|
5813
|
+
rotate: [pi2, 0, 0],
|
|
5814
|
+
translate: [0, param.Wt2 + 2 * param.Wt1, 0]
|
|
5815
|
+
},
|
|
5816
|
+
{
|
|
5817
|
+
outName: `subpax_${designName}_sideWoW`,
|
|
5818
|
+
face: `${designName}_faceSideWoWheels`,
|
|
5819
|
+
extrudeMethod: EExtrude13.eLinearOrtho,
|
|
5820
|
+
length: param.Wt2,
|
|
5821
|
+
rotate: [pi2, 0, 0],
|
|
5822
|
+
translate: [0, param.Wt2 + param.Wt1, 0]
|
|
5823
|
+
},
|
|
5824
|
+
{
|
|
5825
|
+
outName: `subpax_${designName}_front`,
|
|
5826
|
+
face: `${designName}_faceFront`,
|
|
5827
|
+
extrudeMethod: EExtrude13.eLinearOrtho,
|
|
5828
|
+
length: BodyLength,
|
|
5829
|
+
rotate: [pi2, 0, pi2],
|
|
5830
|
+
translate: [-param.LB1, 0, 0]
|
|
5831
|
+
},
|
|
5832
|
+
{
|
|
5833
|
+
outName: `subpax_${designName}_top`,
|
|
5834
|
+
face: `${designName}_faceTop`,
|
|
5835
|
+
extrudeMethod: EExtrude13.eLinearOrtho,
|
|
5836
|
+
length: BodyHeight + BodyY0,
|
|
5837
|
+
rotate: [0, 0, 0],
|
|
5838
|
+
translate: [0, 0, 0]
|
|
5839
|
+
},
|
|
5840
|
+
{
|
|
5841
|
+
outName: `subpax_${designName}_wheel11`,
|
|
5842
|
+
face: `${designName}_faceWheel`,
|
|
5843
|
+
extrudeMethod: EExtrude13.eRotate,
|
|
5844
|
+
rotate: [pi2, 0, 0],
|
|
5845
|
+
translate: [0, param.Wt1, RW2]
|
|
5846
|
+
},
|
|
5847
|
+
{
|
|
5848
|
+
outName: `subpax_${designName}_wheel12`,
|
|
5849
|
+
face: `${designName}_faceWheel`,
|
|
5850
|
+
extrudeMethod: EExtrude13.eRotate,
|
|
5851
|
+
rotate: [-pi2, 0, 0],
|
|
5852
|
+
translate: [0, param.Wt1 + param.Wt2, RW2]
|
|
5853
|
+
},
|
|
5854
|
+
{
|
|
5855
|
+
outName: `subpax_${designName}_wheel21`,
|
|
5856
|
+
face: `${designName}_faceWheel`,
|
|
5857
|
+
extrudeMethod: EExtrude13.eRotate,
|
|
5858
|
+
rotate: [pi2, 0, 0],
|
|
5859
|
+
translate: [param.LB2, param.Wt1, RW2]
|
|
5860
|
+
},
|
|
5861
|
+
{
|
|
5862
|
+
outName: `subpax_${designName}_wheel22`,
|
|
5863
|
+
face: `${designName}_faceWheel`,
|
|
5864
|
+
extrudeMethod: EExtrude13.eRotate,
|
|
5865
|
+
rotate: [-pi2, 0, 0],
|
|
5866
|
+
translate: [param.LB2, param.Wt1 + param.Wt2, RW2]
|
|
5867
|
+
}
|
|
5868
|
+
],
|
|
5869
|
+
volumes: [
|
|
5870
|
+
{
|
|
5871
|
+
outName: `ipax_${designName}_side`,
|
|
5872
|
+
boolMethod: EBVolume13.eUnion,
|
|
5873
|
+
inList: [
|
|
5874
|
+
`subpax_${designName}_sideWiW1`,
|
|
5875
|
+
`subpax_${designName}_sideWiW2`,
|
|
5876
|
+
`subpax_${designName}_sideWoW`
|
|
5877
|
+
]
|
|
5878
|
+
},
|
|
5879
|
+
{
|
|
5880
|
+
outName: `ipax_${designName}_body`,
|
|
5881
|
+
boolMethod: EBVolume13.eIntersection,
|
|
5882
|
+
inList: [
|
|
5883
|
+
`ipax_${designName}_side`,
|
|
5884
|
+
`subpax_${designName}_front`,
|
|
5885
|
+
`subpax_${designName}_top`
|
|
5886
|
+
]
|
|
5887
|
+
},
|
|
5888
|
+
{
|
|
5889
|
+
outName: `pax_${designName}`,
|
|
5890
|
+
boolMethod: EBVolume13.eUnion,
|
|
5891
|
+
inList: [
|
|
5892
|
+
`ipax_${designName}_body`,
|
|
5893
|
+
`subpax_${designName}_wheel11`,
|
|
5894
|
+
`subpax_${designName}_wheel12`,
|
|
5895
|
+
`subpax_${designName}_wheel21`,
|
|
5896
|
+
`subpax_${designName}_wheel22`
|
|
5897
|
+
]
|
|
5898
|
+
}
|
|
5899
|
+
]
|
|
5900
|
+
};
|
|
5901
|
+
rGeome.sub = {};
|
|
5902
|
+
rGeome.logstr += "pcar drawn successfully!\n";
|
|
5903
|
+
rGeome.calcErr = false;
|
|
5904
|
+
} catch (emsg) {
|
|
5905
|
+
rGeome.logstr += emsg;
|
|
5906
|
+
console.log(emsg);
|
|
5907
|
+
}
|
|
5908
|
+
return rGeome;
|
|
5909
|
+
}
|
|
5910
|
+
var pcarDef = {
|
|
5911
|
+
pTitle: "pcar",
|
|
5912
|
+
pDescription: "the envelop of a passager car",
|
|
5913
|
+
pDef: pDef17,
|
|
5914
|
+
pGeom: pGeom17
|
|
5915
|
+
};
|
|
5916
|
+
|
|
5917
|
+
// src/capsule/capsule.ts
|
|
5918
|
+
import {
|
|
5919
|
+
point as point8,
|
|
5920
|
+
contour as contour17,
|
|
5921
|
+
contourCircle as contourCircle15,
|
|
5922
|
+
ctrRectangle as ctrRectangle8,
|
|
5923
|
+
figure as figure15,
|
|
5924
|
+
ffix as ffix19,
|
|
5925
|
+
pNumber as pNumber18,
|
|
5926
|
+
pCheckbox as pCheckbox10,
|
|
5927
|
+
pDropdown as pDropdown9,
|
|
5928
|
+
pSectionSeparator as pSectionSeparator18,
|
|
5929
|
+
EExtrude as EExtrude14,
|
|
5930
|
+
EBVolume as EBVolume14,
|
|
5931
|
+
initGeom as initGeom18
|
|
5932
|
+
} from "geometrix";
|
|
5933
|
+
var pDef18 = {
|
|
5316
5934
|
partName: "capsule",
|
|
5317
5935
|
params: [
|
|
5318
5936
|
//pNumber(name, unit, init, min, max, step)
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5937
|
+
pNumber18("L1", "mm", 5e3, 1e3, 2e4, 1),
|
|
5938
|
+
pNumber18("WW1", "mm", 1800, 100, 4e3, 1),
|
|
5939
|
+
pNumber18("E1", "mm", 10, 1, 100, 1),
|
|
5940
|
+
pSectionSeparator18("Nose"),
|
|
5941
|
+
pNumber18("H1", "mm", 300, 10, 4e3, 1),
|
|
5942
|
+
pNumber18("H2", "mm", 500, 10, 4e3, 1),
|
|
5943
|
+
pNumber18("H3", "mm", 1200, 10, 4e3, 1),
|
|
5944
|
+
pNumber18("W1", "mm", 300, 10, 4e3, 1),
|
|
5945
|
+
pNumber18("W3", "mm", 1500, 10, 4e3, 1),
|
|
5946
|
+
pNumber18("C3", "mm", 200, 1, 1e3, 1),
|
|
5947
|
+
pNumber18("R1", "mm", 100, 0, 500, 1),
|
|
5948
|
+
pNumber18("R2", "mm", 100, 0, 500, 1),
|
|
5949
|
+
pNumber18("R3", "mm", 100, 0, 500, 1),
|
|
5950
|
+
pNumber18("R4", "mm", 100, 0, 500, 1),
|
|
5951
|
+
pSectionSeparator18("Wheels"),
|
|
5952
|
+
pNumber18("H0", "mm", 600, 100, 2e3, 1),
|
|
5953
|
+
pNumber18("D7", "mm", 500, 10, 2e3, 1),
|
|
5954
|
+
pNumber18("D8", "mm", 100, 10, 2e3, 1),
|
|
5955
|
+
pNumber18("WW2", "mm", 1e3, 100, 4e3, 1),
|
|
5956
|
+
pNumber18("WW3", "mm", 100, 1, 500, 1),
|
|
5957
|
+
pSectionSeparator18("Wheels details"),
|
|
5958
|
+
pNumber18("W6", "mm", 500, 10, 2e3, 1),
|
|
5959
|
+
pNumber18("W7", "mm", 600, 10, 2e3, 1),
|
|
5960
|
+
pNumber18("W8", "mm", 300, 10, 2e3, 1),
|
|
5961
|
+
pNumber18("H6", "mm", 300, 10, 2e3, 1),
|
|
5962
|
+
pSectionSeparator18("Front window"),
|
|
5963
|
+
pNumber18("FH1", "mm", 600, 10, 3e3, 1),
|
|
5964
|
+
pNumber18("FW1", "mm", 100, 10, 3e3, 1),
|
|
5965
|
+
pNumber18("FR1", "mm", 100, 0, 500, 1),
|
|
5966
|
+
pNumber18("FH3", "mm", 100, 10, 3e3, 1),
|
|
5967
|
+
pNumber18("FW3", "mm", 300, 10, 3e3, 1),
|
|
5968
|
+
pNumber18("FR3", "mm", 100, 0, 500, 1),
|
|
5969
|
+
pSectionSeparator18("Top"),
|
|
5970
|
+
pDropdown9("topStyle", ["mirador", "sky", "roof"]),
|
|
5971
|
+
pNumber18("H5", "mm", 300, 10, 2e3, 1),
|
|
5972
|
+
pNumber18("W4", "mm", 500, 10, 5e3, 1),
|
|
5973
|
+
pNumber18("W5", "mm", 1e3, 10, 5e3, 1),
|
|
5974
|
+
pNumber18("R5", "mm", 50, 1, 500, 1),
|
|
5975
|
+
pNumber18("S5", "mm", 200, 10, 500, 1),
|
|
5976
|
+
pSectionSeparator18("Wall"),
|
|
5977
|
+
pCheckbox10("sideWall", true),
|
|
5978
|
+
pNumber18("U1", "mm", 100, 10, 1e3, 1),
|
|
5979
|
+
pNumber18("U2", "mm", 500, 10, 3e3, 1),
|
|
5980
|
+
pNumber18("U3", "mm", 400, 10, 3e3, 1),
|
|
5981
|
+
pNumber18("V1", "mm", 600, 10, 3e3, 1),
|
|
5982
|
+
pNumber18("V2", "mm", 400, 10, 3e3, 1),
|
|
5983
|
+
pNumber18("JR1", "mm", 100, 0, 2e3, 1),
|
|
5984
|
+
pNumber18("JR2", "mm", 100, 0, 2e3, 1),
|
|
5985
|
+
pNumber18("JR3", "mm", 100, 0, 2e3, 1),
|
|
5986
|
+
pNumber18("JR4", "mm", 100, 0, 2e3, 1),
|
|
5987
|
+
pNumber18("JR5", "mm", 100, 0, 2e3, 1),
|
|
5988
|
+
pNumber18("JR6", "mm", 100, 0, 2e3, 1)
|
|
5371
5989
|
],
|
|
5372
5990
|
paramSvg: {
|
|
5373
5991
|
L1: "capsule_side.svg",
|
|
@@ -5424,21 +6042,21 @@ var pDef16 = {
|
|
|
5424
6042
|
// every 0.5 second
|
|
5425
6043
|
}
|
|
5426
6044
|
};
|
|
5427
|
-
function
|
|
5428
|
-
const rGeome =
|
|
5429
|
-
const figBody =
|
|
5430
|
-
const figWheels =
|
|
5431
|
-
const figFront =
|
|
5432
|
-
const figTop =
|
|
5433
|
-
const figTopInt =
|
|
5434
|
-
const figTopTop =
|
|
5435
|
-
const figTopLeg =
|
|
5436
|
-
const figWall =
|
|
6045
|
+
function pGeom18(t, param, suffix = "") {
|
|
6046
|
+
const rGeome = initGeom18(pDef18.partName + suffix);
|
|
6047
|
+
const figBody = figure15();
|
|
6048
|
+
const figWheels = figure15();
|
|
6049
|
+
const figFront = figure15();
|
|
6050
|
+
const figTop = figure15();
|
|
6051
|
+
const figTopInt = figure15();
|
|
6052
|
+
const figTopTop = figure15();
|
|
6053
|
+
const figTopLeg = figure15();
|
|
6054
|
+
const figWall = figure15();
|
|
5437
6055
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5438
6056
|
`;
|
|
5439
6057
|
try {
|
|
5440
6058
|
let ctrBody2 = function(withBat) {
|
|
5441
|
-
const rCtr =
|
|
6059
|
+
const rCtr = contour17(-L12, param.H0);
|
|
5442
6060
|
if (withBat) {
|
|
5443
6061
|
rCtr.addSegStrokeR(Wwheels, 0).addSegStrokeR(0, -Hbatterie).addSegStrokeR(Lbatterie, 0).addSegStrokeR(0, Hbatterie).addSegStrokeR(Wwheels, 0);
|
|
5444
6062
|
} else {
|
|
@@ -5447,21 +6065,21 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5447
6065
|
rCtr.addCornerRounded(param.R1).addSegStrokeR(param.W1, param.H1).addCornerRounded(param.R2).addSegStrokeR(0, param.H2).addCornerRounded(param.R3).addPointR(p1.cx, p1.cy).addPointR(-param.W3, param.H3).addSegArc2().addCornerRounded(param.R4).addSegStrokeR(-Lroof, 0).addCornerRounded(param.R4).addPointR(p2.cx, p2.cy).addPointR(-param.W3, -param.H3).addSegArc2().addCornerRounded(param.R3).addSegStrokeR(0, -param.H2).addCornerRounded(param.R2).closeSegStroke().addCornerRounded(param.R1);
|
|
5448
6066
|
return rCtr;
|
|
5449
6067
|
}, ctrWheels2 = function(sign) {
|
|
5450
|
-
const rCtr =
|
|
6068
|
+
const rCtr = contour17(0, posYwheels).addSegStrokeR(sign * R7, 0).addSegStrokeR(0, param.WW3).addSegStrokeR(sign * (R8 - R7), 0).addSegStrokeR(0, 2 * WW22).addSegStrokeR(-sign * (R8 - R7), 0).addSegStrokeR(0, param.WW3).addSegStrokeR(-sign * R7, 0).closeSegStroke();
|
|
5451
6069
|
return rCtr;
|
|
5452
6070
|
}, makeCtrTop2 = function(radius) {
|
|
5453
|
-
const rCtr =
|
|
6071
|
+
const rCtr = contour17(-L52 + topR - radius, -R52).addPointR(radius, -radius).addSegArc(radius, false, true).addSegStrokeR(L53, 0).addPointR(radius, radius).addSegArc(radius, false, true).addSegStrokeR(0, R53).addPointR(-radius, radius).addSegArc(radius, false, true).addSegStrokeR(-L53, 0).addPointR(-radius, -radius).addSegArc(radius, false, true).closeSegStroke();
|
|
5454
6072
|
return rCtr;
|
|
5455
6073
|
}, ctrSideWindow2 = function(sign) {
|
|
5456
6074
|
const p0x = sign * (Ltotal / 2 - param.U1);
|
|
5457
6075
|
const p0y = param.H0 + param.H1 + param.H2 - UH2dy;
|
|
5458
|
-
const rCtr =
|
|
6076
|
+
const rCtr = contour17(p0x, p0y).addCornerRounded(param.JR1).addPointR(sign * p1ub.cx, p1ub.cy).addPointR(-sign * UW3b, UH3b).addSegArc2().addCornerRounded(param.JR4).addSegStrokeR(-sign * param.U2, 0).addCornerRounded(param.JR3).addSegStrokeR(0, -UH3b).addCornerRounded(param.JR2).closeSegStroke();
|
|
5459
6077
|
return rCtr;
|
|
5460
6078
|
}, volWheel2 = function(posX, idx) {
|
|
5461
6079
|
return {
|
|
5462
6080
|
outName: `subpax_${designName}_wheel${idx}`,
|
|
5463
6081
|
face: `${designName}_faceWheels`,
|
|
5464
|
-
extrudeMethod:
|
|
6082
|
+
extrudeMethod: EExtrude14.eRotate,
|
|
5465
6083
|
rotate: [0, 0, 0],
|
|
5466
6084
|
translate: [posX, R7, 0]
|
|
5467
6085
|
};
|
|
@@ -5469,7 +6087,7 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5469
6087
|
return {
|
|
5470
6088
|
outName: `subpax_${designName}_topLeg${idx}`,
|
|
5471
6089
|
face: `${designName}_faceTopLeg`,
|
|
5472
|
-
extrudeMethod:
|
|
6090
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
5473
6091
|
length: E1,
|
|
5474
6092
|
rotate: [0, rotY, 0],
|
|
5475
6093
|
translate: [posX, 0, posZ]
|
|
@@ -5541,62 +6159,62 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5541
6159
|
const HfrontWin = Htotal - param.FH1 - param.FH3;
|
|
5542
6160
|
const Ltot2 = Ltotal + 200;
|
|
5543
6161
|
if (param.L1 - 2 * Wwheels < 2 * E1) {
|
|
5544
|
-
throw `err176: L1 ${
|
|
6162
|
+
throw `err176: L1 ${ffix19(param.L1)} is too small compare to W6 ${ffix19(param.W6)}, W7 ${ffix19(param.W7)} and W8 ${ffix19(param.W8)} mm`;
|
|
5545
6163
|
}
|
|
5546
6164
|
if (Hbatterie < E1) {
|
|
5547
|
-
throw `err114: Hbatterie ${
|
|
6165
|
+
throw `err114: Hbatterie ${ffix19(Hbatterie)} is too small compare to E1 ${ffix19(E1)} mm`;
|
|
5548
6166
|
}
|
|
5549
6167
|
if (Lbatterie < 2 * E1) {
|
|
5550
|
-
throw `err118: Lbatterie ${
|
|
6168
|
+
throw `err118: Lbatterie ${ffix19(Lbatterie)} is too small compare to E1 ${ffix19(E1)} mm`;
|
|
5551
6169
|
}
|
|
5552
6170
|
if (L5 < 3 * param.R5 + param.W5) {
|
|
5553
|
-
throw `err122: L5 ${
|
|
6171
|
+
throw `err122: L5 ${ffix19(L5)} is too small compare to W5 ${ffix19(param.W5)} and R5 ${ffix19(param.R5)} mm`;
|
|
5554
6172
|
}
|
|
5555
6173
|
if (H53 < 0.1) {
|
|
5556
|
-
throw `err220: H5 ${
|
|
6174
|
+
throw `err220: H5 ${ffix19(param.H5)} is too small compare to R5 ${ffix19(param.R5)} mm`;
|
|
5557
6175
|
}
|
|
5558
|
-
rGeome.logstr += `Platform surface: ${
|
|
6176
|
+
rGeome.logstr += `Platform surface: ${ffix19(platSurface)} m2, height: ${ffix19(heightTot / 1e3)} m
|
|
5559
6177
|
`;
|
|
5560
|
-
rGeome.logstr += `Lroof: ${
|
|
6178
|
+
rGeome.logstr += `Lroof: ${ffix19(Lroof)}, L5: ${ffix19(L5)} mm
|
|
5561
6179
|
`;
|
|
5562
|
-
rGeome.logstr += `Ltotal: ${
|
|
6180
|
+
rGeome.logstr += `Ltotal: ${ffix19(Ltotal / 1e3)}, Htotal: ${ffix19(Htotal / 1e3)} m
|
|
5563
6181
|
`;
|
|
5564
|
-
rGeome.logstr += `Batterie: LbatInt ${
|
|
6182
|
+
rGeome.logstr += `Batterie: LbatInt ${ffix19(LbatInt)}, HbatInt: ${ffix19(HbatInt)}, WW1 ${ffix19(param.WW1)} mm
|
|
5565
6183
|
`;
|
|
5566
6184
|
const ctrBodyExt = ctrBody2(true);
|
|
5567
|
-
const ctrBodyInt =
|
|
5568
|
-
const ctrBatterie =
|
|
6185
|
+
const ctrBodyInt = contour17(-L12 + L1dx, param.H0 + E1).addSegStrokeR(2 * L12 - 2 * L1dx, 0).addCornerRounded(iR1).addSegStrokeR(param.W1 - E1 + L1dx, param.H1 - E1 + H2dy).addCornerRounded(iR2).addSegStrokeR(0, param.H2 - 2 * H2dy).addCornerRounded(iR3).addPointR(p1b.cx, p1b.cy).addPointR(-W3b, H3b).addSegArc2().addCornerRounded(iR4).addSegStrokeR(-Lroof + 2 * W3dx, 0).addCornerRounded(iR4).addPointR(p2b.cx, p2b.cy).addPointR(-W3b, -H3b).addSegArc2().addCornerRounded(iR3).addSegStrokeR(0, -param.H2 + 2 * H2dy).addCornerRounded(iR2).closeSegStroke().addCornerRounded(iR1);
|
|
6186
|
+
const ctrBatterie = ctrRectangle8(-LbatInt2, posYbatterie, LbatInt, HbatInt);
|
|
5569
6187
|
figBody.addMainOI([ctrBodyExt, ctrBodyInt, ctrBatterie]);
|
|
5570
|
-
figBody.addSecond(
|
|
5571
|
-
figBody.addSecond(
|
|
5572
|
-
figBody.addSecond(
|
|
5573
|
-
figBody.addSecond(
|
|
5574
|
-
figBody.addSecond(
|
|
5575
|
-
figBody.addSecond(
|
|
5576
|
-
figBody.addSecond(
|
|
5577
|
-
figBody.addSecond(
|
|
5578
|
-
figBody.addSecond(
|
|
5579
|
-
figBody.addSecond(
|
|
6188
|
+
figBody.addSecond(contourCircle15(-posXwheel1, R7, R7));
|
|
6189
|
+
figBody.addSecond(contourCircle15(-posXwheel1, R7, R8));
|
|
6190
|
+
figBody.addSecond(contourCircle15(-posXwheel2, R7, R7));
|
|
6191
|
+
figBody.addSecond(contourCircle15(-posXwheel2, R7, R8));
|
|
6192
|
+
figBody.addSecond(contourCircle15(posXwheel1, R7, R7));
|
|
6193
|
+
figBody.addSecond(contourCircle15(posXwheel1, R7, R8));
|
|
6194
|
+
figBody.addSecond(contourCircle15(posXwheel2, R7, R7));
|
|
6195
|
+
figBody.addSecond(contourCircle15(posXwheel2, R7, R8));
|
|
6196
|
+
figBody.addSecond(ctrRectangle8(-L52, posYtop, L5, param.H5));
|
|
6197
|
+
figBody.addSecond(ctrRectangle8(-L52 - param.S5, posYtop2, L5 + 2 * param.S5, E1));
|
|
5580
6198
|
figWheels.addMainO(ctrWheels2(1));
|
|
5581
6199
|
figWheels.addSecond(ctrWheels2(-1));
|
|
5582
|
-
const ctrFront =
|
|
6200
|
+
const ctrFront = contour17(-FWL1 / 2, param.H0 + param.FH1).addCornerRounded(param.FR1).addSegStrokeR(FWL1, 0).addCornerRounded(param.FR1).addSegStrokeR(param.FW1 - param.FW3, HfrontWin).addCornerRounded(param.FR3).addSegStrokeR(-FWL3, 0).addCornerRounded(param.FR3).closeSegStroke();
|
|
5583
6201
|
figFront.addMainO(ctrFront);
|
|
5584
6202
|
figFront.addSecond(ctrWheels2(1).rotate(0, 0, pi2).translate(WW12, R7));
|
|
5585
6203
|
figFront.addSecond(ctrWheels2(-1).rotate(0, 0, pi2).translate(WW12, R7));
|
|
5586
|
-
figFront.addSecond(
|
|
5587
|
-
figFront.addSecond(
|
|
5588
|
-
figFront.addSecond(
|
|
5589
|
-
figFront.addSecond(
|
|
5590
|
-
figFront.addSecond(
|
|
5591
|
-
figFront.addSecond(
|
|
5592
|
-
figFront.addSecond(
|
|
6204
|
+
figFront.addSecond(ctrRectangle8(-WW12, param.H6, param.WW1, Hbatterie));
|
|
6205
|
+
figFront.addSecond(ctrRectangle8(-WW12, param.H0, param.WW1, param.H1));
|
|
6206
|
+
figFront.addSecond(ctrRectangle8(-WW12, param.H0 + param.H1, param.WW1, param.H2));
|
|
6207
|
+
figFront.addSecond(ctrRectangle8(-WW12, posYH3, param.WW1, param.H3));
|
|
6208
|
+
figFront.addSecond(ctrRectangle8(-W52, posYtop, param.W5, param.H5));
|
|
6209
|
+
figFront.addSecond(ctrRectangle8(-W52 - param.S5, posYtop2, param.W5 + 2 * param.S5, E1));
|
|
6210
|
+
figFront.addSecond(ctrRectangle8(-WW12 + E1, param.H0 + E1, param.WW1 - E12, Htotal - E12));
|
|
5593
6211
|
const ctrTopInt = makeCtrTop2(topR - E1);
|
|
5594
6212
|
const ctrTopExt = makeCtrTop2(topR);
|
|
5595
6213
|
const ctrTopTop = makeCtrTop2(topR + param.S5);
|
|
5596
6214
|
figTop.addMainOI([ctrTopExt, ctrTopInt]);
|
|
5597
6215
|
figTop.addSecond(ctrTopTop);
|
|
5598
|
-
figTop.addSecond(
|
|
5599
|
-
figTop.addSecond(
|
|
6216
|
+
figTop.addSecond(ctrRectangle8(-Lroof / 2, -WW12, Lroof, 2 * WW12));
|
|
6217
|
+
figTop.addSecond(ctrRectangle8(-Ltotal / 2, -WW12, Ltotal, 2 * WW12));
|
|
5600
6218
|
figTop.addSecond(ctrWheels2(1).translate(posXwheels[0], posYwheels2));
|
|
5601
6219
|
figTop.addSecond(ctrWheels2(1).translate(posXwheels[1], posYwheels2));
|
|
5602
6220
|
figTop.addSecond(ctrWheels2(1).translate(posXwheels[2], posYwheels2));
|
|
@@ -5609,10 +6227,10 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5609
6227
|
figTopInt.mergeFigure(figTop, true);
|
|
5610
6228
|
figTopTop.addMainO(ctrTopTop);
|
|
5611
6229
|
figTopTop.mergeFigure(figTop, true);
|
|
5612
|
-
const ctrTopLeg =
|
|
6230
|
+
const ctrTopLeg = contour17(-R52, posYtop).addSegStrokeR(R53, 0).addSegStrokeR(0, param.R5).addPointR(-param.R5, param.R5).addSegArc(param.R5, false, false).addSegStrokeR(0, H53).addPointR(param.R5, param.R5).addSegArc(param.R5, false, false).addSegStrokeR(0, param.R5).addSegStrokeR(-R53, 0).addSegStrokeR(0, -param.R5).addPointR(param.R5, -param.R5).addSegArc(param.R5, false, false).addSegStrokeR(0, -H53).addPointR(-param.R5, -param.R5).addSegArc(param.R5, false, false).closeSegStroke();
|
|
5613
6231
|
figTopLeg.addMainO(ctrTopLeg);
|
|
5614
6232
|
figFront.addSecond(ctrTopLeg);
|
|
5615
|
-
const ctrDoor =
|
|
6233
|
+
const ctrDoor = contour17(-LwallDoor / 2, param.H0 + param.V1).addCornerRounded(param.JR5).addSegStrokeR(LwallDoor, 0).addCornerRounded(param.JR5).addSegStrokeR(0, HwallDoor).addCornerRounded(param.JR6).addSegStrokeR(-LwallDoor, 0).addCornerRounded(param.JR6).closeSegStroke();
|
|
5616
6234
|
figWall.addMainOI([ctrBody2(false), ctrSideWindow2(1), ctrSideWindow2(-1), ctrDoor]);
|
|
5617
6235
|
figWall.mergeFigure(figBody, true);
|
|
5618
6236
|
rGeome.fig = {
|
|
@@ -5655,7 +6273,7 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5655
6273
|
{
|
|
5656
6274
|
outName: `subpax_${designName}_body`,
|
|
5657
6275
|
face: `${designName}_faceBody`,
|
|
5658
|
-
extrudeMethod:
|
|
6276
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
5659
6277
|
length: param.WW1,
|
|
5660
6278
|
rotate: [0, 0, 0],
|
|
5661
6279
|
translate: [0, 0, 0]
|
|
@@ -5667,7 +6285,7 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5667
6285
|
{
|
|
5668
6286
|
outName: `subpax_${designName}_frontWin`,
|
|
5669
6287
|
face: `${designName}_faceFront`,
|
|
5670
|
-
extrudeMethod:
|
|
6288
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
5671
6289
|
length: Ltot2,
|
|
5672
6290
|
rotate: [0, pi2, 0],
|
|
5673
6291
|
translate: [-Ltot2 / 2, 0, WW12]
|
|
@@ -5675,7 +6293,7 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5675
6293
|
{
|
|
5676
6294
|
outName: `subpax_${designName}_topInt`,
|
|
5677
6295
|
face: `${designName}_faceTopInt`,
|
|
5678
|
-
extrudeMethod:
|
|
6296
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
5679
6297
|
length: 3 * E1,
|
|
5680
6298
|
rotate: [-pi2, 0, 0],
|
|
5681
6299
|
translate: [0, posYtop - 2 * E1, WW12]
|
|
@@ -5683,7 +6301,7 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5683
6301
|
{
|
|
5684
6302
|
outName: `subpax_${designName}_top1`,
|
|
5685
6303
|
face: `${designName}_faceTop`,
|
|
5686
|
-
extrudeMethod:
|
|
6304
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
5687
6305
|
length: param.R5,
|
|
5688
6306
|
rotate: [-pi2, 0, 0],
|
|
5689
6307
|
translate: [0, posYtop, WW12]
|
|
@@ -5691,7 +6309,7 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5691
6309
|
{
|
|
5692
6310
|
outName: `subpax_${designName}_top2`,
|
|
5693
6311
|
face: `${designName}_faceTop`,
|
|
5694
|
-
extrudeMethod:
|
|
6312
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
5695
6313
|
length: param.R5,
|
|
5696
6314
|
rotate: [-pi2, 0, 0],
|
|
5697
6315
|
translate: [0, posYtop2 - param.R5, WW12]
|
|
@@ -5699,7 +6317,7 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5699
6317
|
{
|
|
5700
6318
|
outName: `subpax_${designName}_topTop`,
|
|
5701
6319
|
face: `${designName}_faceTopTop`,
|
|
5702
|
-
extrudeMethod:
|
|
6320
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
5703
6321
|
length: E1,
|
|
5704
6322
|
rotate: [-pi2, 0, 0],
|
|
5705
6323
|
translate: [0, posYtop2, WW12]
|
|
@@ -5713,7 +6331,7 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5713
6331
|
{
|
|
5714
6332
|
outName: `subpax_${designName}_wall1`,
|
|
5715
6333
|
face: `${designName}_faceWall`,
|
|
5716
|
-
extrudeMethod:
|
|
6334
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
5717
6335
|
length: E1,
|
|
5718
6336
|
rotate: [0, 0, 0],
|
|
5719
6337
|
translate: [0, 0, 0]
|
|
@@ -5721,7 +6339,7 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5721
6339
|
{
|
|
5722
6340
|
outName: `subpax_${designName}_wall2`,
|
|
5723
6341
|
face: `${designName}_faceWall`,
|
|
5724
|
-
extrudeMethod:
|
|
6342
|
+
extrudeMethod: EExtrude14.eLinearOrtho,
|
|
5725
6343
|
length: E1,
|
|
5726
6344
|
rotate: [0, 0, 0],
|
|
5727
6345
|
translate: [0, 0, param.WW1 - E1]
|
|
@@ -5730,7 +6348,7 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5730
6348
|
volumes: [
|
|
5731
6349
|
{
|
|
5732
6350
|
outName: `ipax_${designName}_plus`,
|
|
5733
|
-
boolMethod:
|
|
6351
|
+
boolMethod: EBVolume14.eUnion,
|
|
5734
6352
|
inList: [
|
|
5735
6353
|
`subpax_${designName}_body`,
|
|
5736
6354
|
`subpax_${designName}_wheel1`,
|
|
@@ -5743,12 +6361,12 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5743
6361
|
},
|
|
5744
6362
|
{
|
|
5745
6363
|
outName: `ipax_${designName}_minus`,
|
|
5746
|
-
boolMethod:
|
|
6364
|
+
boolMethod: EBVolume14.eUnion,
|
|
5747
6365
|
inList: [`subpax_${designName}_frontWin`, ...roofHoleList]
|
|
5748
6366
|
},
|
|
5749
6367
|
{
|
|
5750
6368
|
outName: `pax_${designName}`,
|
|
5751
|
-
boolMethod:
|
|
6369
|
+
boolMethod: EBVolume14.eSubstraction,
|
|
5752
6370
|
inList: [`ipax_${designName}_plus`, `ipax_${designName}_minus`]
|
|
5753
6371
|
}
|
|
5754
6372
|
]
|
|
@@ -5765,15 +6383,17 @@ function pGeom16(t, param, suffix = "") {
|
|
|
5765
6383
|
var capsuleDef = {
|
|
5766
6384
|
pTitle: "capsule",
|
|
5767
6385
|
pDescription: "high-level concept of the train-capsule",
|
|
5768
|
-
pDef:
|
|
5769
|
-
pGeom:
|
|
6386
|
+
pDef: pDef18,
|
|
6387
|
+
pGeom: pGeom18
|
|
5770
6388
|
};
|
|
5771
6389
|
export {
|
|
5772
6390
|
capsuleDef,
|
|
5773
6391
|
door1arcDef,
|
|
5774
6392
|
doubleBoneDef,
|
|
6393
|
+
factoryDef,
|
|
5775
6394
|
heliostatDef,
|
|
5776
6395
|
houseDef,
|
|
6396
|
+
pcarDef,
|
|
5777
6397
|
plugTorqueDef,
|
|
5778
6398
|
rccarDef,
|
|
5779
6399
|
singleBoneDef,
|