desi77 0.1.13 → 0.1.15
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 +1229 -140
- package/dist/pgdsvg/doubleBone_face.svg +1 -0
- package/dist/pgdsvg/doubleBone_folding.svg +1 -0
- package/dist/pgdsvg/doubleBone_side.svg +1 -0
- package/dist/pgdsvg/doubleBone_top.svg +1 -0
- package/dist/pgdsvg/rccar_all_xy.svg +3 -0
- package/dist/pgdsvg/rccar_all_xz.svg +1 -0
- package/dist/pgdsvg/rccar_bone.svg +1 -0
- package/dist/pgdsvg/rccar_motor_xz.svg +1 -0
- package/dist/pgdsvg/rccar_one_xy.svg +1 -0
- package/dist/pgdsvg/rccar_platform_xz.svg +1 -0
- package/dist/pgdsvg/singleBone_face.svg +1 -0
- package/dist/pgdsvg/src_doubleBone.svg +1 -0
- package/dist/pgdsvg/src_rccar.svg +3 -1
- package/dist/pgdsvg/src_singleBone.svg +1 -0
- package/package.json +7 -7
- package/dist/pgdsvg/rccar_angles.svg +0 -1
package/dist/index.js
CHANGED
|
@@ -4121,11 +4121,20 @@ var heliostatDef = {
|
|
|
4121
4121
|
|
|
4122
4122
|
// src/rccar/rccar.ts
|
|
4123
4123
|
import {
|
|
4124
|
+
withinHPiHPi,
|
|
4125
|
+
ShapePoint as ShapePoint2,
|
|
4126
|
+
point as point7,
|
|
4127
|
+
contour as contour14,
|
|
4128
|
+
contourCircle as contourCircle11,
|
|
4124
4129
|
ctrRectangle as ctrRectangle6,
|
|
4125
4130
|
figure as figure11,
|
|
4131
|
+
degToRad as degToRad6,
|
|
4126
4132
|
ffix as ffix14,
|
|
4127
4133
|
pNumber as pNumber13,
|
|
4134
|
+
pCheckbox as pCheckbox8,
|
|
4135
|
+
pDropdown as pDropdown7,
|
|
4128
4136
|
pSectionSeparator as pSectionSeparator13,
|
|
4137
|
+
transform3d,
|
|
4129
4138
|
EExtrude as EExtrude10,
|
|
4130
4139
|
EBVolume as EBVolume10,
|
|
4131
4140
|
initGeom as initGeom13
|
|
@@ -4134,23 +4143,80 @@ var pDef13 = {
|
|
|
4134
4143
|
partName: "rccar",
|
|
4135
4144
|
params: [
|
|
4136
4145
|
//pNumber(name, unit, init, min, max, step)
|
|
4137
|
-
pNumber13("
|
|
4138
|
-
pNumber13("L1", "mm",
|
|
4139
|
-
|
|
4146
|
+
pNumber13("N1", "unit", 4, 1, 12, 1),
|
|
4147
|
+
pNumber13("L1", "mm", 300, 10, 2e3, 1),
|
|
4148
|
+
pNumber13("W1", "mm", 1200, 10, 2e3, 1),
|
|
4149
|
+
pSectionSeparator13("General"),
|
|
4150
|
+
pDropdown7("gen3D", ["all", "platform", "bone", "hand", "motor", "wheel"]),
|
|
4151
|
+
pNumber13("T1", "mm", 10, 1, 100, 1),
|
|
4140
4152
|
pNumber13("E1", "mm", 10, 1, 100, 1),
|
|
4153
|
+
pNumber13("E2", "mm", 10, 1, 500, 1),
|
|
4154
|
+
pNumber13("E3", "mm", 30, 1, 500, 1),
|
|
4155
|
+
pSectionSeparator13("Platform"),
|
|
4156
|
+
pNumber13("H1", "mm", 230, 10, 2e3, 1),
|
|
4157
|
+
pNumber13("W2", "mm", 100, 10, 2e3, 1),
|
|
4158
|
+
pCheckbox8("triangleInt", true),
|
|
4159
|
+
pCheckbox8("triangleExt", false),
|
|
4160
|
+
pSectionSeparator13("Bone"),
|
|
4161
|
+
pNumber13("D1", "mm", 20, 1, 200, 1),
|
|
4162
|
+
pNumber13("D2", "mm", 40, 1, 200, 1),
|
|
4163
|
+
pNumber13("W3", "mm", 30, 1, 200, 1),
|
|
4164
|
+
pNumber13("L2", "mm", 150, 1, 200, 1),
|
|
4165
|
+
pSectionSeparator13("Unit"),
|
|
4166
|
+
pNumber13("F1", "mm", 180, 1, 1e3, 1),
|
|
4167
|
+
pNumber13("Dwheel", "mm", 250, 10, 2e3, 1),
|
|
4168
|
+
pNumber13("Z1", "mm", 100, 10, 2e3, 1),
|
|
4169
|
+
pNumber13("Z2", "mm", 160, 10, 2e3, 1),
|
|
4170
|
+
pNumber13("Lwheel", "mm", 100, 10, 2e3, 1),
|
|
4171
|
+
pNumber13("Lmotor", "mm", 140, 10, 1e3, 1),
|
|
4172
|
+
pNumber13("Dsteering", "mm", 40, 1, 500, 1),
|
|
4173
|
+
pNumber13("Daxis", "mm", 20, 1, 500, 1),
|
|
4141
4174
|
pSectionSeparator13("Angles"),
|
|
4142
|
-
pNumber13("
|
|
4143
|
-
pNumber13("
|
|
4175
|
+
pNumber13("aBoneMin", "degree", -40, -80, 0, 1),
|
|
4176
|
+
pNumber13("aBoneMax", "degree", 20, -80, 80, 1),
|
|
4177
|
+
pNumber13("aBoneLeft", "%", 0, 0, 100, 1),
|
|
4178
|
+
pNumber13("aBoneRight", "%", 0, 0, 100, 1),
|
|
4179
|
+
pDropdown7("wheel", ["straight", "turn"]),
|
|
4180
|
+
pNumber13("ra", "degree", 0, -90, 90, 1),
|
|
4181
|
+
pNumber13("rx", "cm", 0, -1e3, 1e3, 1),
|
|
4182
|
+
pNumber13("ry", "cm", 0, -1e3, 1e3, 1)
|
|
4144
4183
|
],
|
|
4145
4184
|
paramSvg: {
|
|
4146
|
-
|
|
4147
|
-
L1: "
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4185
|
+
N1: "rccar_all_xy.svg",
|
|
4186
|
+
L1: "rccar_all_xy.svg",
|
|
4187
|
+
W1: "rccar_all_xz.svg",
|
|
4188
|
+
gen3D: "rccar_all_xy.svg",
|
|
4189
|
+
T1: "rccar_one_xy.svg",
|
|
4190
|
+
E1: "rccar_one_xy.svg",
|
|
4191
|
+
E2: "rccar_motor_xz.svg",
|
|
4192
|
+
E3: "rccar_motor_xz.svg",
|
|
4193
|
+
H1: "rccar_platform_xz.svg",
|
|
4194
|
+
W2: "rccar_platform_xz.svg",
|
|
4195
|
+
triangleInt: "rccar_all_xy.svg",
|
|
4196
|
+
triangleExt: "rccar_all_xy.svg",
|
|
4197
|
+
D1: "rccar_bone.svg",
|
|
4198
|
+
D2: "rccar_bone.svg",
|
|
4199
|
+
W3: "rccar_bone.svg",
|
|
4200
|
+
L2: "rccar_bone.svg",
|
|
4201
|
+
F1: "rccar_one_xy.svg",
|
|
4202
|
+
Dwheel: "rccar_motor_xz.svg",
|
|
4203
|
+
Z1: "rccar_motor_xz.svg",
|
|
4204
|
+
Z2: "rccar_motor_xz.svg",
|
|
4205
|
+
Lwheel: "rccar_motor_xz.svg",
|
|
4206
|
+
Lmotor: "rccar_motor_xz.svg",
|
|
4207
|
+
Dsteering: "rccar_motor_xz.svg",
|
|
4208
|
+
Daxis: "rccar_motor_xz.svg",
|
|
4209
|
+
aBoneMin: "rccar_all_xz.svg",
|
|
4210
|
+
aBoneMax: "rccar_all_xz.svg",
|
|
4211
|
+
aBoneLeft: "rccar_all_xz.svg",
|
|
4212
|
+
aBoneRight: "rccar_all_xz.svg",
|
|
4213
|
+
wheel: "rccar_all_xy.svg",
|
|
4214
|
+
ra: "rccar_all_xy.svg",
|
|
4215
|
+
rx: "rccar_all_xy.svg",
|
|
4216
|
+
ry: "rccar_all_xy.svg"
|
|
4151
4217
|
},
|
|
4152
4218
|
sim: {
|
|
4153
|
-
tMax:
|
|
4219
|
+
tMax: 200,
|
|
4154
4220
|
tStep: 0.5,
|
|
4155
4221
|
tUpdate: 500
|
|
4156
4222
|
// every 0.5 second
|
|
@@ -4159,37 +4225,629 @@ var pDef13 = {
|
|
|
4159
4225
|
function pGeom13(t, param, suffix = "") {
|
|
4160
4226
|
const rGeome = initGeom13(pDef13.partName + suffix);
|
|
4161
4227
|
const figPlatform = figure11();
|
|
4228
|
+
const figTriangle = figure11();
|
|
4229
|
+
const figPFfixation = figure11();
|
|
4230
|
+
const figBones = figure11();
|
|
4231
|
+
const figHandFixation = figure11();
|
|
4232
|
+
const figHandPlateR = figure11();
|
|
4233
|
+
const figHandPlateL = figure11();
|
|
4234
|
+
const figHandBackR = figure11();
|
|
4235
|
+
const figHandBackL = figure11();
|
|
4236
|
+
const figMotorBulkR = figure11();
|
|
4237
|
+
const figMotorBulkL = figure11();
|
|
4238
|
+
const figMFoot = figure11();
|
|
4239
|
+
const figWheel = figure11();
|
|
4240
|
+
const figTop = figure11();
|
|
4241
|
+
const figSide = figure11();
|
|
4162
4242
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4163
4243
|
`;
|
|
4164
4244
|
try {
|
|
4245
|
+
let calcPercent2 = function(aInit) {
|
|
4246
|
+
const percent2 = (aInit + t) % 200;
|
|
4247
|
+
const rP = percent2 > 100 ? 200 - percent2 : percent2;
|
|
4248
|
+
return rP / 100;
|
|
4249
|
+
}, adjustWheelAngle2 = function(dY, dX, ref) {
|
|
4250
|
+
const rawA = Math.atan2(dY, dX);
|
|
4251
|
+
const rA = ref + withinHPiHPi(rawA - ref);
|
|
4252
|
+
return rA;
|
|
4253
|
+
}, makePFfixExt2 = function(sign, tpA, tpL) {
|
|
4254
|
+
const dW22 = sign * (W22 - param.T1);
|
|
4255
|
+
const dW22b = -sign * (W22 + 2 * (param.E2 + R2) + param.T1);
|
|
4256
|
+
const dW22c = tpL > 0 ? dW22b : dW22;
|
|
4257
|
+
const dx1 = sign * (param.E2 + R2);
|
|
4258
|
+
const dx2 = sign * param.T1 + dx1;
|
|
4259
|
+
const dR2 = sign * R2;
|
|
4260
|
+
const dW22d = tpL > 0 ? -dW22 - dx2 : dW22 + dx2;
|
|
4261
|
+
const rCtrExt = contour14(dW22c, 0, "green").addSegStrokeR(dx2, 0).addPointR(dR2, R2).addPointR(0, 2 * R2).addSegArc2().addSegStrokeR(-dx1, 0).addSegStrokeR(0, Z2b).addSegStrokeR(dx1, 0).addPointR(dR2, R2).addPointR(0, 2 * R2).addSegArc2().addSegStrokeR(-dx2, 0).closeSegStroke().translatePolar(tpA, tpL);
|
|
4262
|
+
const rCtr1 = contourCircle11(dW22d, R2, R1).translatePolar(tpA, tpL);
|
|
4263
|
+
const rCtr2 = contourCircle11(dW22d, Z2b + 3 * R2, R1).translatePolar(tpA, tpL);
|
|
4264
|
+
return [rCtrExt, rCtr1, rCtr2];
|
|
4265
|
+
}, makeHandPlate2 = function(az, addL, ipX, ipY) {
|
|
4266
|
+
const rCtrExt = contour14(ipX, ipY + F12).addPointR(-F12, -F12).addPointR(0, -2 * F12).addSegArc2().addSegStrokeR(F12 + addL, 0).addSegStrokeR(0, 2 * F12).closeSegStroke().rotate(ipX, ipY, az);
|
|
4267
|
+
const rCtrHole = contourCircle11(ipX, ipY, Rsteering);
|
|
4268
|
+
return [rCtrExt, rCtrHole];
|
|
4269
|
+
}, makeMFoot2 = function(itx, ity) {
|
|
4270
|
+
const rCtrExt = contour14(itx - mFootR, ity, "green").addPointR(mFootR, -mFootR).addPointR(2 * mFootR, 0).addSegArc2().addSegStrokeR(F12 - mFootR, param.Z1 + param.T1 + param.E1).addSegStrokeR(0, motorHeight).addSegStrokeR(-2 * F12, 0).addSegStrokeR(0, -motorHeight).closeSegStroke();
|
|
4271
|
+
const rCtrHole = contourCircle11(itx, ity, Raxis + param.E1);
|
|
4272
|
+
return [rCtrExt, rCtrHole];
|
|
4273
|
+
}, makeCtrWheel2 = function(xSign, ia, itx, ity) {
|
|
4274
|
+
const rCtr = contour14(itx, ity).addSegStrokeR(xSign * Raxis, 0).addSegStrokeR(0, mFootWidth + param.E3).addSegStrokeR(xSign * dWheelAxis, 0).addCornerRounded(roundedWheel).addSegStrokeR(0, param.Lwheel).addCornerRounded(roundedWheel).addSegStrokeR(-xSign * Rwheel, 0).closeSegStroke().rotate(itx, ity, ia);
|
|
4275
|
+
return rCtr;
|
|
4276
|
+
}, makeTopWheel2 = function(itx, ity, ia) {
|
|
4277
|
+
const tL = param.Lmotor - mFootWidth;
|
|
4278
|
+
const tCos = tL * Math.cos(ia);
|
|
4279
|
+
const tSin = tL * Math.sin(ia);
|
|
4280
|
+
const ctrWheel1 = makeCtrWheel2(1, -pi2 + ia, itx + tCos, ity + tSin);
|
|
4281
|
+
const ctrWheel2 = makeCtrWheel2(-1, -pi2 + ia, itx + tCos, ity + tSin);
|
|
4282
|
+
const ctrMFootPre = ctrRectangle6(itx + tL, ity - F12, mFootWidth, 2 * F12);
|
|
4283
|
+
const ctrMFoot = ctrMFootPre.rotate(itx, ity, ia);
|
|
4284
|
+
return [ctrWheel1, ctrWheel2, ctrMFoot];
|
|
4285
|
+
}, extrudeTriangle2 = function(posZ, idx) {
|
|
4286
|
+
const rVol = {
|
|
4287
|
+
outName: `subpax_${designName}_platformTriangle${idx}`,
|
|
4288
|
+
face: `${designName}_faceTriangle`,
|
|
4289
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4290
|
+
length: param.T1,
|
|
4291
|
+
rotate: [0, 0, 0],
|
|
4292
|
+
translate: [0, 0, posZ]
|
|
4293
|
+
};
|
|
4294
|
+
return rVol;
|
|
4295
|
+
}, extrudePFfixation2 = function(posZ, idx) {
|
|
4296
|
+
const rVol = {
|
|
4297
|
+
outName: `subpax_${designName}_PFfixation${idx}`,
|
|
4298
|
+
face: `${designName}_facePFfixation`,
|
|
4299
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4300
|
+
length: param.T1,
|
|
4301
|
+
rotate: [0, 0, 0],
|
|
4302
|
+
translate: [0, 0, posZ]
|
|
4303
|
+
};
|
|
4304
|
+
return rVol;
|
|
4305
|
+
}, extrudeBones2 = function(posZ, idx) {
|
|
4306
|
+
const rVol = {
|
|
4307
|
+
outName: `subpax_${designName}_bones${idx}`,
|
|
4308
|
+
face: `${designName}_faceBones`,
|
|
4309
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4310
|
+
length: param.T1,
|
|
4311
|
+
rotate: [0, 0, 0],
|
|
4312
|
+
translate: [0, 0, posZ]
|
|
4313
|
+
};
|
|
4314
|
+
return rVol;
|
|
4315
|
+
}, extrudeHandFixation2 = function(posZ, idx) {
|
|
4316
|
+
const rVol = {
|
|
4317
|
+
outName: `subpax_${designName}_handFixation${idx}`,
|
|
4318
|
+
face: `${designName}_faceHandFixation`,
|
|
4319
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4320
|
+
length: param.T1,
|
|
4321
|
+
rotate: [0, 0, 0],
|
|
4322
|
+
translate: [0, 0, posZ]
|
|
4323
|
+
};
|
|
4324
|
+
return rVol;
|
|
4325
|
+
}, extrudeHandPlate2 = function(posY, iRL, idx) {
|
|
4326
|
+
const rVol = {
|
|
4327
|
+
outName: `subpax_${designName}_handPlate${iRL}${idx}`,
|
|
4328
|
+
face: `${designName}_faceHandPlate${iRL}`,
|
|
4329
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4330
|
+
length: param.T1,
|
|
4331
|
+
rotate: [pi2, 0, 0],
|
|
4332
|
+
translate: [0, posY + param.T1, 0]
|
|
4333
|
+
};
|
|
4334
|
+
return rVol;
|
|
4335
|
+
}, extrudeHandBack2 = function(posY, iRL) {
|
|
4336
|
+
const rVol = {
|
|
4337
|
+
outName: `subpax_${designName}_handBack${iRL}`,
|
|
4338
|
+
face: `${designName}_faceHandBack${iRL}`,
|
|
4339
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4340
|
+
length: param.Z2,
|
|
4341
|
+
rotate: [pi2, 0, 0],
|
|
4342
|
+
translate: [0, posY + param.T1, 0]
|
|
4343
|
+
};
|
|
4344
|
+
return rVol;
|
|
4345
|
+
}, extrudeMotorBulk2 = function(posY, iRL) {
|
|
4346
|
+
const rVol = {
|
|
4347
|
+
outName: `subpax_${designName}_motorBulk${iRL}`,
|
|
4348
|
+
face: `${designName}_faceMotorBulk${iRL}`,
|
|
4349
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4350
|
+
length: motorHeight,
|
|
4351
|
+
rotate: [pi2, 0, 0],
|
|
4352
|
+
translate: [0, posY - param.E1, 0]
|
|
4353
|
+
};
|
|
4354
|
+
return rVol;
|
|
4355
|
+
}, extrudeMFoot2 = function(posX, posY, posZ, az, idx) {
|
|
4356
|
+
const tL = param.Lmotor - mFootWidth;
|
|
4357
|
+
const tCos = tL * Math.cos(az);
|
|
4358
|
+
const tSin = tL * Math.sin(az);
|
|
4359
|
+
const tm = transform3d().addRotation(0, pi2 - az, 0).addTranslation(posX + tCos, posY, posZ + tSin);
|
|
4360
|
+
const rVol = {
|
|
4361
|
+
outName: `subpax_${designName}_mFoot${idx}`,
|
|
4362
|
+
face: `${designName}_faceMFoot`,
|
|
4363
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4364
|
+
length: mFootWidth,
|
|
4365
|
+
rotate: tm.getRotation(),
|
|
4366
|
+
translate: tm.getTranslation()
|
|
4367
|
+
};
|
|
4368
|
+
return rVol;
|
|
4369
|
+
}, extrudeWheel2 = function(posX, posY, posZ, az, idx) {
|
|
4370
|
+
const tL = param.Lmotor - mFootWidth;
|
|
4371
|
+
const tCos = tL * Math.cos(az);
|
|
4372
|
+
const tSin = tL * Math.sin(az);
|
|
4373
|
+
const tm = transform3d().addRotation(0, pi2 - az, 0).addTranslation(posX + tCos, posY, posZ + tSin);
|
|
4374
|
+
const rVol = {
|
|
4375
|
+
outName: `subpax_${designName}_wheel${idx}`,
|
|
4376
|
+
face: `${designName}_faceWheel`,
|
|
4377
|
+
extrudeMethod: EExtrude10.eRotate,
|
|
4378
|
+
rotate: tm.getRotation(),
|
|
4379
|
+
translate: tm.getTranslation()
|
|
4380
|
+
};
|
|
4381
|
+
return rVol;
|
|
4382
|
+
};
|
|
4383
|
+
var calcPercent = calcPercent2, adjustWheelAngle = adjustWheelAngle2, makePFfixExt = makePFfixExt2, makeHandPlate = makeHandPlate2, makeMFoot = makeMFoot2, makeCtrWheel = makeCtrWheel2, makeTopWheel = makeTopWheel2, extrudeTriangle = extrudeTriangle2, extrudePFfixation = extrudePFfixation2, extrudeBones = extrudeBones2, extrudeHandFixation = extrudeHandFixation2, extrudeHandPlate = extrudeHandPlate2, extrudeHandBack = extrudeHandBack2, extrudeMotorBulk = extrudeMotorBulk2, extrudeMFoot = extrudeMFoot2, extrudeWheel = extrudeWheel2;
|
|
4384
|
+
const pi = Math.PI;
|
|
4385
|
+
const pi2 = pi / 2;
|
|
4165
4386
|
const W12 = param.W1 / 2;
|
|
4166
|
-
const
|
|
4167
|
-
|
|
4168
|
-
|
|
4387
|
+
const W22 = param.W2 / 2;
|
|
4388
|
+
const H1b = param.H1 - param.T1;
|
|
4389
|
+
const W22b = W12 - W22;
|
|
4390
|
+
const W2c = param.W2 - 2 * param.T1;
|
|
4391
|
+
const H1c = param.H1 - 2 * param.T1;
|
|
4392
|
+
const Ltotal = param.N1 * (param.L1 + param.T1) + param.T1;
|
|
4393
|
+
const platSurface = Ltotal * param.W1 / 10 ** 6;
|
|
4394
|
+
const R2 = param.D2 / 2;
|
|
4395
|
+
const R1 = param.D1 / 2;
|
|
4396
|
+
const F12 = param.F1 / 2;
|
|
4397
|
+
const LF2 = (param.L1 - param.F1) / 2;
|
|
4398
|
+
const LF2b = LF2 + param.T1 + param.E1;
|
|
4399
|
+
const LF23 = LF2 + 2 * (param.T1 + param.E1);
|
|
4400
|
+
const LF24 = LF23 + param.T1;
|
|
4401
|
+
const F1b = param.F1 - 6 * param.T1 - 4 * param.E1;
|
|
4402
|
+
const LF25 = LF24 + F1b;
|
|
4403
|
+
const LF25b = LF25 + param.T1 + param.E1;
|
|
4404
|
+
const LF28 = LF25 + 2 * (param.T1 + param.E1);
|
|
4405
|
+
const Rwheel = param.Dwheel / 2;
|
|
4406
|
+
const Raxis = param.Daxis / 2;
|
|
4407
|
+
const Rsteering = param.Dsteering / 2;
|
|
4408
|
+
const Z2b = param.Z2 - 4 * R2;
|
|
4409
|
+
const Z2c = param.Z2 - param.T1;
|
|
4410
|
+
const AbMin = degToRad6(param.aBoneMin);
|
|
4411
|
+
const AbMax = degToRad6(param.aBoneMax);
|
|
4412
|
+
const posZplatform = Rwheel + param.Z1 + param.L2 * Math.sin(AbMin);
|
|
4413
|
+
const Hplatform = posZplatform + param.H1;
|
|
4414
|
+
const W32 = param.W3 / 2;
|
|
4415
|
+
if (R2 < W32) {
|
|
4416
|
+
throw `err152: D2 ${ffix14(param.D2)} is too small compare to W3 ${ffix14(param.W3)} mm`;
|
|
4417
|
+
}
|
|
4418
|
+
const W32X = Math.sqrt(R2 ** 2 - W32 ** 2);
|
|
4419
|
+
const L2b = param.L2 - 2 * W32X;
|
|
4420
|
+
const aBR = AbMin + calcPercent2(param.aBoneRight) * (AbMax - AbMin);
|
|
4421
|
+
const aBL = pi - AbMin - calcPercent2(param.aBoneLeft) * (AbMax - AbMin);
|
|
4422
|
+
const boneTopxRs = param.L2 * Math.cos(aBR);
|
|
4423
|
+
const boneTopxLs = param.L2 * Math.cos(aBL);
|
|
4424
|
+
const boneTopxR = 2 * R2 + boneTopxRs;
|
|
4425
|
+
const boneTopxL = 2 * R2 - boneTopxLs;
|
|
4426
|
+
const boneSideyRs = param.L2 * Math.sin(aBR);
|
|
4427
|
+
const boneSideyLs = param.L2 * Math.sin(aBL);
|
|
4428
|
+
const boneSideyR = 2 * R2 * Math.sign(aBR) + boneSideyRs;
|
|
4429
|
+
const ra = degToRad6(param.ra);
|
|
4430
|
+
const rx10 = 10 * param.rx;
|
|
4431
|
+
const ry10 = 10 * param.ry;
|
|
4432
|
+
const hPlen = 2 * F12 + param.E2 + param.T1;
|
|
4433
|
+
const hFposR = W22 + param.E2 + R2 + boneTopxRs - R2;
|
|
4434
|
+
const hFposL = -W22 - param.E2 - R2 + boneTopxLs - R2 - param.E2;
|
|
4435
|
+
const hBposR = W22 + 2 * (param.E2 + R2) + boneTopxRs;
|
|
4436
|
+
const hBposL = -W22 - 2 * (param.E2 + R2) + boneTopxLs;
|
|
4437
|
+
const hPposR = W22 + 2 * (param.E2 + R2) + boneTopxRs + param.T1 + param.E2 + F12;
|
|
4438
|
+
const hPposL = -W22 - 2 * (param.E2 + R2) + boneTopxLs - param.T1 - param.E2 - F12;
|
|
4439
|
+
let wheelRA = new Array(param.N1).fill(ra);
|
|
4440
|
+
let wheelLA = new Array(param.N1).fill(pi + ra);
|
|
4441
|
+
if (param.wheel === 1) {
|
|
4442
|
+
const tWheelRA = [];
|
|
4443
|
+
const tWheelLA = [];
|
|
4444
|
+
const bTxs = param.L2 * Math.cos(AbMin);
|
|
4445
|
+
const XpR = W22 + 2 * (param.E2 + R2) + bTxs + param.T1 + param.E2 + F12;
|
|
4446
|
+
const XpL = -W22 - 2 * (param.E2 + R2) - bTxs - param.T1 - param.E2 - F12;
|
|
4447
|
+
for (let ii = 0; ii < param.N1; ii++) {
|
|
4448
|
+
const Yp = ii * (param.L1 + param.T1) + param.T1 + param.L1 / 2;
|
|
4449
|
+
tWheelRA.push(adjustWheelAngle2(Yp - ry10, XpR - rx10, 0));
|
|
4450
|
+
tWheelLA.push(adjustWheelAngle2(Yp - ry10, XpL - rx10, pi));
|
|
4451
|
+
}
|
|
4452
|
+
wheelRA = tWheelRA;
|
|
4453
|
+
wheelLA = tWheelLA;
|
|
4454
|
+
}
|
|
4455
|
+
const motorExtraL = param.Lmotor - F12;
|
|
4456
|
+
const motorHeight = param.Z2 - 2 * (param.T1 + param.E1);
|
|
4457
|
+
const motorLen = F12 + param.Lmotor;
|
|
4458
|
+
const mFootWidth = motorExtraL - param.E2;
|
|
4459
|
+
const mFootR = Raxis + param.E1 + param.T1;
|
|
4460
|
+
const mFootHeight = motorHeight + param.E1 + param.T1 + param.Z1 + mFootR;
|
|
4461
|
+
const dWheelAxis = Rwheel - Raxis;
|
|
4462
|
+
const roundedWheel = Math.min(param.Lwheel / 3, dWheelAxis / 2);
|
|
4463
|
+
if (LF2 < 0.1) {
|
|
4464
|
+
throw `err176: L1 ${ffix14(param.L1)} is too small compare to F1 ${ffix14(param.F1)} mm`;
|
|
4169
4465
|
}
|
|
4170
|
-
|
|
4466
|
+
if (param.H1 < param.Z2 + param.T1) {
|
|
4467
|
+
throw `err130: H1 ${ffix14(param.H1)} is too small compare to Z2 ${ffix14(param.Z2)} and T1 ${ffix14(param.T1)} mm`;
|
|
4468
|
+
}
|
|
4469
|
+
if (Z2b < 0.1) {
|
|
4470
|
+
throw `err149: Z2 ${ffix14(param.Z2)} is too small compare to D2 ${ffix14(param.D2)} mm`;
|
|
4471
|
+
}
|
|
4472
|
+
if (W2c < 0.1) {
|
|
4473
|
+
throw `err153: W2 ${ffix14(param.W2)} is too small compare to T1 ${ffix14(param.T1)} mm`;
|
|
4474
|
+
}
|
|
4475
|
+
if (H1c < 0.1) {
|
|
4476
|
+
throw `err156: H1c ${ffix14(param.H1)} is too small compare to T1 ${ffix14(param.T1)} mm`;
|
|
4477
|
+
}
|
|
4478
|
+
if (F1b < 0.1) {
|
|
4479
|
+
throw `err167: F1 ${ffix14(param.F1)} is too small compare to T1 ${ffix14(param.T1)} and E1 ${ffix14(param.E1)} mm`;
|
|
4480
|
+
}
|
|
4481
|
+
if (AbMax < AbMin) {
|
|
4482
|
+
throw `err181: aBoneMax ${ffix14(param.aBoneMax)} is too small compare to aBoneMin ${ffix14(param.BoneMin)} degree`;
|
|
4483
|
+
}
|
|
4484
|
+
if (mFootWidth < param.T1) {
|
|
4485
|
+
throw `err218: Lmotor ${ffix14(param.Lmotor)} is too small compare to F1 ${ffix14(param.F1)}`;
|
|
4486
|
+
}
|
|
4487
|
+
if (motorHeight < param.T1) {
|
|
4488
|
+
throw `err226: Z2 ${ffix14(param.Z2)} is too small compare to T1 ${ffix14(param.T1)} and E1 ${ffix14(param.E1)} mm`;
|
|
4489
|
+
}
|
|
4490
|
+
if (param.Z1 < mFootR) {
|
|
4491
|
+
throw `err256: Z1 ${ffix14(param.Z1)} is too small compare to mFootR ${ffix14(mFootR)} mm`;
|
|
4492
|
+
}
|
|
4493
|
+
if (Rwheel < mFootR) {
|
|
4494
|
+
throw `err259: Dwheel ${ffix14(param.Dwheel)} is too small compare to mFootR ${ffix14(mFootR)} mm`;
|
|
4495
|
+
}
|
|
4496
|
+
rGeome.logstr += `Platform Ltotal ${ffix14(Ltotal / 1e3)} m, surface ${ffix14(platSurface)} m2
|
|
4171
4497
|
`;
|
|
4172
|
-
|
|
4498
|
+
rGeome.logstr += `Hplatform ${ffix14(Hplatform)} mm
|
|
4499
|
+
`;
|
|
4500
|
+
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 = ctrRectangle6(-W22 + param.T1, param.T1, W2c, H1c);
|
|
4502
|
+
figPlatform.addMainOI([ctrPlatformMain, ctrPlatformInt]);
|
|
4503
|
+
const ctrTriangleL = contour14(-W22, 0).addSegStrokeR(param.T1, 0).addSegStrokeR(0, param.H1).addSegStrokeR(-W22b - param.T1, 0).addSegStrokeR(0, -param.T1).closeSegStroke();
|
|
4504
|
+
const ctrTriangleR = contour14(W22, 0).addSegStrokeR(W22b, H1b).addSegStrokeR(0, param.T1).addSegStrokeR(-W22b - param.T1, 0).addSegStrokeR(0, -param.H1).closeSegStroke();
|
|
4505
|
+
figTriangle.addMainO(ctrTriangleL);
|
|
4506
|
+
figTriangle.addMainO(ctrTriangleR);
|
|
4507
|
+
figPlatform.addSecond(ctrTriangleL);
|
|
4508
|
+
figPlatform.addSecond(ctrTriangleR);
|
|
4509
|
+
figPFfixation.addMainOI(makePFfixExt2(1, 0, 0));
|
|
4510
|
+
figPFfixation.addMainOI(makePFfixExt2(-1, 0, 0));
|
|
4511
|
+
figPlatform.mergeFigure(figPFfixation, true);
|
|
4512
|
+
const ctrBone = contour14(W32X, W32).addPointR(-W32X - R2, -W32).addPointR(0, -2 * W32).addSegArc2().addSegStrokeR(L2b, 0).addPointR(W32X + R2, W32).addPointR(0, 2 * W32).addSegArc2().closeSegStroke();
|
|
4513
|
+
const ctrBoneR = ctrBone.rotate(0, 0, aBR);
|
|
4514
|
+
const ctrBoneL = ctrBone.rotate(0, 0, aBL);
|
|
4515
|
+
const ptR1 = point7(W22 + param.E2 + R2, R2);
|
|
4516
|
+
const ptR1b = ptR1.translatePolar(aBR, param.L2);
|
|
4517
|
+
const ptR2 = point7(W22 + param.E2 + R2, Z2b + 3 * R2);
|
|
4518
|
+
const ptR2b = ptR2.translatePolar(aBR, param.L2);
|
|
4519
|
+
const ptL1 = point7(-W22 - param.E2 - R2, R2);
|
|
4520
|
+
const ptL1b = ptL1.translatePolar(aBL, param.L2);
|
|
4521
|
+
const ptL2 = point7(-W22 - param.E2 - R2, Z2b + 3 * R2);
|
|
4522
|
+
const ptL2b = ptL2.translatePolar(aBL, param.L2);
|
|
4523
|
+
figBones.addMainOI([
|
|
4524
|
+
ctrBoneR.translate(ptR1.cx, ptR1.cy),
|
|
4525
|
+
contourCircle11(ptR1.cx, ptR1.cy, R1),
|
|
4526
|
+
contourCircle11(ptR1b.cx, ptR1b.cy, R1)
|
|
4527
|
+
]);
|
|
4528
|
+
figBones.addMainOI([
|
|
4529
|
+
ctrBoneR.translate(ptR2.cx, ptR2.cy),
|
|
4530
|
+
contourCircle11(ptR2.cx, ptR2.cy, R1),
|
|
4531
|
+
contourCircle11(ptR2b.cx, ptR2b.cy, R1)
|
|
4532
|
+
]);
|
|
4533
|
+
figBones.addMainOI([
|
|
4534
|
+
ctrBoneL.translate(ptL1.cx, ptL1.cy),
|
|
4535
|
+
contourCircle11(ptL1.cx, ptL1.cy, R1),
|
|
4536
|
+
contourCircle11(ptL1b.cx, ptL1b.cy, R1)
|
|
4537
|
+
]);
|
|
4538
|
+
figBones.addMainOI([
|
|
4539
|
+
ctrBoneL.translate(ptL2.cx, ptL2.cy),
|
|
4540
|
+
contourCircle11(ptL2.cx, ptL2.cy, R1),
|
|
4541
|
+
contourCircle11(ptL2b.cx, ptL2b.cy, R1)
|
|
4542
|
+
]);
|
|
4543
|
+
figPlatform.mergeFigure(figBones, true);
|
|
4544
|
+
figHandFixation.addMainOI(makePFfixExt2(-1, aBR, param.L2));
|
|
4545
|
+
figHandFixation.addMainOI(makePFfixExt2(1, aBL, param.L2));
|
|
4546
|
+
figPlatform.mergeFigure(figHandFixation, true);
|
|
4547
|
+
for (let ii = 0; ii < param.N1; ii++) {
|
|
4548
|
+
const tPosY = ii * (param.L1 + param.T1) + param.T1 + param.L1 / 2;
|
|
4549
|
+
figHandPlateR.addMainOI(makeHandPlate2(pi, param.T1 + param.E2, hPposR, tPosY));
|
|
4550
|
+
figHandPlateL.addMainOI(makeHandPlate2(0, param.T1 + param.E2, hPposL, tPosY));
|
|
4551
|
+
}
|
|
4552
|
+
figPlatform.addSecond(ctrRectangle6(hBposR, boneSideyRs, hPlen, param.T1));
|
|
4553
|
+
figPlatform.addSecond(ctrRectangle6(hBposR, boneSideyRs + Z2c, hPlen, param.T1));
|
|
4554
|
+
figPlatform.addSecond(ctrRectangle6(hBposL - hPlen, boneSideyLs, hPlen, param.T1));
|
|
4555
|
+
figPlatform.addSecond(ctrRectangle6(hBposL - hPlen, boneSideyLs + Z2c, hPlen, param.T1));
|
|
4556
|
+
for (let ii = 0; ii < param.N1; ii++) {
|
|
4557
|
+
const tPosY = ii * (param.L1 + param.T1) + param.T1 + LF2;
|
|
4558
|
+
figHandBackR.addMainO(ctrRectangle6(hBposR, tPosY, param.T1, 2 * F12));
|
|
4559
|
+
figHandBackL.addMainO(ctrRectangle6(hBposL - param.T1, tPosY, param.T1, 2 * F12));
|
|
4560
|
+
}
|
|
4561
|
+
figPlatform.addSecond(ctrRectangle6(hBposR, boneSideyRs, param.T1, param.Z2));
|
|
4562
|
+
figPlatform.addSecond(ctrRectangle6(hBposL - param.T1, boneSideyLs, param.T1, param.Z2));
|
|
4563
|
+
for (let ii = 0; ii < param.N1; ii++) {
|
|
4564
|
+
const tPosY = ii * (param.L1 + param.T1) + param.T1 + param.L1 / 2;
|
|
4565
|
+
figMotorBulkR.addMainOI(makeHandPlate2(wheelRA[ii], motorExtraL, hPposR, tPosY));
|
|
4566
|
+
figMotorBulkL.addMainOI(makeHandPlate2(wheelLA[ii], motorExtraL, hPposL, tPosY));
|
|
4567
|
+
}
|
|
4568
|
+
const mBRpX = hBposR + param.T1 + param.E2;
|
|
4569
|
+
const mBRpY = boneSideyRs + param.T1 + param.E1;
|
|
4570
|
+
const mBLpX = hBposL - param.T1 - param.E2 - motorLen;
|
|
4571
|
+
const mBLpY = boneSideyLs + param.T1 + param.E1;
|
|
4572
|
+
figPlatform.addSecond(ctrRectangle6(mBRpX, mBRpY, motorLen, motorHeight));
|
|
4573
|
+
figPlatform.addSecond(ctrRectangle6(mBLpX, mBLpY, motorLen, motorHeight));
|
|
4574
|
+
const mFRpX = mBRpX + F12 + param.Lmotor - mFootWidth;
|
|
4575
|
+
const mFRpY = boneSideyRs - param.Z1 - mFootR;
|
|
4576
|
+
const mFLpX = mBLpX;
|
|
4577
|
+
const mFLpY = boneSideyLs - param.Z1 - mFootR;
|
|
4578
|
+
figPlatform.addSecond(ctrRectangle6(mFRpX, mFRpY, mFootWidth, mFootHeight));
|
|
4579
|
+
figPlatform.addSecond(ctrRectangle6(mFLpX, mFLpY, mFootWidth, mFootHeight));
|
|
4580
|
+
figMFoot.addMainOI(makeMFoot2(0, 0));
|
|
4581
|
+
figWheel.addMainO(makeCtrWheel2(1, 0, 0, 0));
|
|
4582
|
+
figWheel.addSecond(makeCtrWheel2(-1, 0, 0, 0));
|
|
4583
|
+
figPlatform.addSecond(makeCtrWheel2(1, -pi2, mFRpX, mFRpY + mFootR));
|
|
4584
|
+
figPlatform.addSecond(makeCtrWheel2(-1, -pi2, mFRpX, mFRpY + mFootR));
|
|
4585
|
+
figPlatform.addSecond(makeCtrWheel2(1, pi2, mFLpX + mFootWidth, mFLpY + mFootR));
|
|
4586
|
+
figPlatform.addSecond(makeCtrWheel2(-1, pi2, mFLpX + mFootWidth, mFLpY + mFootR));
|
|
4587
|
+
figTop.addMainOI([
|
|
4588
|
+
ctrRectangle6(-W12, 0, param.W1, Ltotal),
|
|
4589
|
+
ctrRectangle6(-W22 + param.T1, 0, W2c, Ltotal)
|
|
4590
|
+
]);
|
|
4591
|
+
figTop.addSecond(ctrRectangle6(-W22, 0, param.W2, Ltotal));
|
|
4592
|
+
if (param.triangleExt) {
|
|
4593
|
+
for (let ii = 0; ii < 2; ii++) {
|
|
4594
|
+
const tPosY = ii * (param.L1 + param.T1) * param.N1;
|
|
4595
|
+
figTop.addSecond(ctrRectangle6(-W12, tPosY, W22b, param.T1));
|
|
4596
|
+
figTop.addSecond(ctrRectangle6(W22, tPosY, W22b, param.T1));
|
|
4597
|
+
}
|
|
4598
|
+
}
|
|
4599
|
+
if (param.triangleInt) {
|
|
4600
|
+
for (let ii = 1; ii < param.N1; ii++) {
|
|
4601
|
+
const tPosY = ii * (param.L1 + param.T1);
|
|
4602
|
+
figTop.addSecond(ctrRectangle6(-W12, tPosY, W22b, param.T1));
|
|
4603
|
+
figTop.addSecond(ctrRectangle6(W22, tPosY, W22b, param.T1));
|
|
4604
|
+
}
|
|
4605
|
+
}
|
|
4606
|
+
const tL2 = param.E2 + 2 * R2;
|
|
4607
|
+
const tPosX2 = -W22 - tL2;
|
|
4608
|
+
for (let ii = 0; ii < param.N1; ii++) {
|
|
4609
|
+
const tPosY = param.T1 + ii * (param.L1 + param.T1);
|
|
4610
|
+
for (const tPosY2 of [LF2, LF23, LF25, LF28]) {
|
|
4611
|
+
const tPosY3 = tPosY + tPosY2;
|
|
4612
|
+
figTop.addSecond(ctrRectangle6(W22, tPosY3, tL2, param.T1));
|
|
4613
|
+
figTop.addSecond(ctrRectangle6(tPosX2, tPosY3, tL2, param.T1));
|
|
4614
|
+
}
|
|
4615
|
+
}
|
|
4616
|
+
const tPosX3 = -W22 - param.E2 - boneTopxL;
|
|
4617
|
+
for (let ii = 0; ii < param.N1; ii++) {
|
|
4618
|
+
const tPosY = param.T1 + ii * (param.L1 + param.T1);
|
|
4619
|
+
for (const tPosY2 of [LF2, LF25]) {
|
|
4620
|
+
const tPosY3 = tPosY + tPosY2 + param.T1 + param.E1;
|
|
4621
|
+
figTop.addSecond(ctrRectangle6(W22 + param.E2, tPosY3, boneTopxR, param.T1));
|
|
4622
|
+
figTop.addSecond(ctrRectangle6(tPosX3, tPosY3, boneTopxL, param.T1));
|
|
4623
|
+
}
|
|
4624
|
+
}
|
|
4625
|
+
for (let ii = 0; ii < param.N1; ii++) {
|
|
4626
|
+
const tPosY = param.T1 + ii * (param.L1 + param.T1);
|
|
4627
|
+
for (const tPosY2 of [LF2, LF23, LF25, LF28]) {
|
|
4628
|
+
const tPosY3 = tPosY + tPosY2;
|
|
4629
|
+
figTop.addSecond(ctrRectangle6(hFposR, tPosY3, tL2, param.T1));
|
|
4630
|
+
figTop.addSecond(ctrRectangle6(hFposL, tPosY3, tL2, param.T1));
|
|
4631
|
+
}
|
|
4632
|
+
}
|
|
4633
|
+
figTop.mergeFigure(figHandPlateR, true);
|
|
4634
|
+
figTop.mergeFigure(figHandPlateL, true);
|
|
4635
|
+
figTop.mergeFigure(figHandBackR, true);
|
|
4636
|
+
figTop.mergeFigure(figHandBackL, true);
|
|
4637
|
+
figTop.mergeFigure(figMotorBulkR, true);
|
|
4638
|
+
figTop.mergeFigure(figMotorBulkL, true);
|
|
4639
|
+
figTop.addPoint(point7(rx10, ry10, ShapePoint2.eBigSquare));
|
|
4640
|
+
for (let ii = 0; ii < param.N1; ii++) {
|
|
4641
|
+
const tPosY = ii * (param.L1 + param.T1) + param.T1 + param.L1 / 2;
|
|
4642
|
+
for (const iCtr of makeTopWheel2(hPposR, tPosY, wheelRA[ii])) {
|
|
4643
|
+
figTop.addSecond(iCtr);
|
|
4644
|
+
}
|
|
4645
|
+
for (const iCtr of makeTopWheel2(hPposL, tPosY, wheelLA[ii])) {
|
|
4646
|
+
figTop.addSecond(iCtr);
|
|
4647
|
+
}
|
|
4648
|
+
}
|
|
4649
|
+
figSide.addMainO(ctrRectangle6(0, 0, Ltotal, param.H1));
|
|
4650
|
+
figSide.addSecond(ctrRectangle6(0, H1b, Ltotal, param.T1));
|
|
4651
|
+
if (param.triangleExt) {
|
|
4652
|
+
for (let ii = 0; ii < 2; ii++) {
|
|
4653
|
+
const tPosY = ii * (param.L1 + param.T1) * param.N1;
|
|
4654
|
+
figSide.addSecond(ctrRectangle6(tPosY, 0, param.T1, H1b));
|
|
4655
|
+
}
|
|
4656
|
+
}
|
|
4657
|
+
if (param.triangleInt) {
|
|
4658
|
+
for (let ii = 1; ii < param.N1; ii++) {
|
|
4659
|
+
const tPosY = ii * (param.L1 + param.T1);
|
|
4660
|
+
figSide.addSecond(ctrRectangle6(tPosY, 0, param.T1, H1b));
|
|
4661
|
+
}
|
|
4662
|
+
}
|
|
4663
|
+
const tH2 = 2 * R2;
|
|
4664
|
+
for (let ii = 0; ii < param.N1; ii++) {
|
|
4665
|
+
const tPosY = param.T1 + ii * (param.L1 + param.T1);
|
|
4666
|
+
for (const tPosY2 of [LF2, LF23, LF25, LF28]) {
|
|
4667
|
+
const tPosY3 = tPosY + tPosY2;
|
|
4668
|
+
figSide.addSecond(ctrRectangle6(tPosY3, 0, param.T1, tH2));
|
|
4669
|
+
figSide.addSecond(ctrRectangle6(tPosY3, tH2 + Z2b, param.T1, tH2));
|
|
4670
|
+
}
|
|
4671
|
+
}
|
|
4672
|
+
for (let ii = 0; ii < param.N1; ii++) {
|
|
4673
|
+
const tPosY = param.T1 + ii * (param.L1 + param.T1);
|
|
4674
|
+
for (const tPosY2 of [LF2, LF25]) {
|
|
4675
|
+
const tPosY3 = tPosY + tPosY2 + param.T1 + param.E1;
|
|
4676
|
+
if (boneSideyR > 0) {
|
|
4677
|
+
figSide.addSecond(ctrRectangle6(tPosY3, 0, param.T1, boneSideyR));
|
|
4678
|
+
figSide.addSecond(ctrRectangle6(tPosY3, 2 * R2 + Z2b, param.T1, boneSideyR));
|
|
4679
|
+
} else {
|
|
4680
|
+
const tLy = -boneSideyR;
|
|
4681
|
+
figSide.addSecond(ctrRectangle6(tPosY3, 2 * R2 - tLy, param.T1, tLy));
|
|
4682
|
+
figSide.addSecond(ctrRectangle6(tPosY3, 4 * R2 + Z2b - tLy, param.T1, tLy));
|
|
4683
|
+
}
|
|
4684
|
+
}
|
|
4685
|
+
}
|
|
4686
|
+
for (let ii = 0; ii < param.N1; ii++) {
|
|
4687
|
+
const tPosY = param.T1 + ii * (param.L1 + param.T1);
|
|
4688
|
+
for (const tPosY2 of [LF2, LF23, LF25, LF28]) {
|
|
4689
|
+
const tPosY3 = tPosY + tPosY2;
|
|
4690
|
+
figSide.addSecond(ctrRectangle6(tPosY3, boneSideyRs, param.T1, tH2));
|
|
4691
|
+
figSide.addSecond(ctrRectangle6(tPosY3, boneSideyRs + tH2 + Z2b, param.T1, tH2));
|
|
4692
|
+
}
|
|
4693
|
+
}
|
|
4694
|
+
const ZhpR = [boneSideyRs, boneSideyRs + Z2c];
|
|
4695
|
+
const ZhpL = [boneSideyLs, boneSideyLs + Z2c];
|
|
4696
|
+
for (let ii = 0; ii < param.N1; ii++) {
|
|
4697
|
+
const tPosY = param.T1 + ii * (param.L1 + param.T1);
|
|
4698
|
+
const tPosY3 = tPosY + LF2;
|
|
4699
|
+
figSide.addSecond(ctrRectangle6(tPosY3, ZhpR[0], param.F1, param.T1));
|
|
4700
|
+
figSide.addSecond(ctrRectangle6(tPosY3, ZhpR[1], param.F1, param.T1));
|
|
4701
|
+
figSide.addSecond(ctrRectangle6(tPosY3, ZhpR[0], param.F1, param.Z2));
|
|
4702
|
+
figSide.addSecond(ctrRectangle6(tPosY3, mBRpY, param.F1, motorHeight));
|
|
4703
|
+
const axisX = tPosY + param.L1 / 2;
|
|
4704
|
+
const axisY = ZhpR[0] - param.Z1;
|
|
4705
|
+
for (const iCtr of makeMFoot2(axisX, axisY)) {
|
|
4706
|
+
figSide.addSecond(iCtr);
|
|
4707
|
+
}
|
|
4708
|
+
figSide.addSecond(contourCircle11(axisX, axisY, Raxis));
|
|
4709
|
+
figSide.addSecond(contourCircle11(axisX, axisY, Rwheel));
|
|
4710
|
+
}
|
|
4173
4711
|
rGeome.fig = {
|
|
4174
|
-
facePlatform: figPlatform
|
|
4712
|
+
facePlatform: figPlatform,
|
|
4713
|
+
faceTop: figTop,
|
|
4714
|
+
faceSide: figSide,
|
|
4715
|
+
faceTriangle: figTriangle,
|
|
4716
|
+
facePFfixation: figPFfixation,
|
|
4717
|
+
faceBones: figBones,
|
|
4718
|
+
faceHandFixation: figHandFixation,
|
|
4719
|
+
faceHandPlateR: figHandPlateR,
|
|
4720
|
+
faceHandPlateL: figHandPlateL,
|
|
4721
|
+
faceHandBackR: figHandBackR,
|
|
4722
|
+
faceHandBackL: figHandBackL,
|
|
4723
|
+
faceMotorBulkR: figMotorBulkR,
|
|
4724
|
+
faceMotorBulkL: figMotorBulkL,
|
|
4725
|
+
faceMFoot: figMFoot,
|
|
4726
|
+
faceWheel: figWheel
|
|
4175
4727
|
};
|
|
4176
4728
|
const designName = rGeome.partName;
|
|
4729
|
+
const list3D = [];
|
|
4730
|
+
const listPlatform = [];
|
|
4731
|
+
const volPlatformMain = {
|
|
4732
|
+
outName: `subpax_${designName}_platformMain`,
|
|
4733
|
+
face: `${designName}_facePlatform`,
|
|
4734
|
+
extrudeMethod: EExtrude10.eLinearOrtho,
|
|
4735
|
+
length: Ltotal,
|
|
4736
|
+
rotate: [0, 0, 0],
|
|
4737
|
+
translate: [0, 0, 0]
|
|
4738
|
+
};
|
|
4739
|
+
const volTriangle = [];
|
|
4740
|
+
for (let ii = 0; ii < param.N1; ii++) {
|
|
4741
|
+
const tPosY = param.T1 + ii * (param.L1 + param.T1);
|
|
4742
|
+
for (const [jj, tPosY2] of [LF2, LF23, LF25, LF28].entries()) {
|
|
4743
|
+
const tPosY3 = tPosY + tPosY2;
|
|
4744
|
+
const idx = 4 * ii + jj;
|
|
4745
|
+
volTriangle.push(extrudePFfixation2(tPosY3, idx));
|
|
4746
|
+
listPlatform.push(`subpax_${designName}_PFfixation${idx}`);
|
|
4747
|
+
}
|
|
4748
|
+
}
|
|
4749
|
+
listPlatform.push(`subpax_${designName}_platformMain`);
|
|
4750
|
+
if (param.triangleExt) {
|
|
4751
|
+
volTriangle.push(extrudeTriangle2(0, 0));
|
|
4752
|
+
volTriangle.push(extrudeTriangle2(Ltotal - param.T1, param.N1 + 1));
|
|
4753
|
+
listPlatform.push(`subpax_${designName}_platformTriangle${0}`);
|
|
4754
|
+
listPlatform.push(`subpax_${designName}_platformTriangle${param.N1 + 1}`);
|
|
4755
|
+
}
|
|
4756
|
+
if (param.triangleInt) {
|
|
4757
|
+
for (let ii = 1; ii < param.N1; ii++) {
|
|
4758
|
+
volTriangle.push(extrudeTriangle2(ii * (param.T1 + param.L1), ii + 1));
|
|
4759
|
+
listPlatform.push(`subpax_${designName}_platformTriangle${ii + 1}`);
|
|
4760
|
+
}
|
|
4761
|
+
}
|
|
4762
|
+
const listBones = [];
|
|
4763
|
+
const volBones = [];
|
|
4764
|
+
for (let ii = 0; ii < param.N1; ii++) {
|
|
4765
|
+
const tPosY = param.T1 + ii * (param.L1 + param.T1);
|
|
4766
|
+
for (const [jj, tPosY2] of [LF2b, LF25b].entries()) {
|
|
4767
|
+
const tPosY3 = tPosY + tPosY2;
|
|
4768
|
+
const idx = 2 * ii + jj;
|
|
4769
|
+
volBones.push(extrudeBones2(tPosY3, idx));
|
|
4770
|
+
listBones.push(`subpax_${designName}_bones${idx}`);
|
|
4771
|
+
}
|
|
4772
|
+
}
|
|
4773
|
+
const listHands = [];
|
|
4774
|
+
const volHands = [];
|
|
4775
|
+
for (let ii = 0; ii < param.N1; ii++) {
|
|
4776
|
+
const tPosY = param.T1 + ii * (param.L1 + param.T1);
|
|
4777
|
+
for (const [jj, tPosY2] of [LF2, LF23, LF25, LF28].entries()) {
|
|
4778
|
+
const tPosY3 = tPosY + tPosY2;
|
|
4779
|
+
const idx = 4 * ii + jj;
|
|
4780
|
+
volHands.push(extrudeHandFixation2(tPosY3, idx));
|
|
4781
|
+
listHands.push(`subpax_${designName}_handFixation${idx}`);
|
|
4782
|
+
}
|
|
4783
|
+
}
|
|
4784
|
+
volHands.push(extrudeHandPlate2(ZhpR[0], "R", 1));
|
|
4785
|
+
volHands.push(extrudeHandPlate2(ZhpR[1], "R", 2));
|
|
4786
|
+
volHands.push(extrudeHandPlate2(ZhpL[0], "L", 1));
|
|
4787
|
+
volHands.push(extrudeHandPlate2(ZhpL[1], "L", 2));
|
|
4788
|
+
listHands.push(`subpax_${designName}_handPlateR1`);
|
|
4789
|
+
listHands.push(`subpax_${designName}_handPlateR2`);
|
|
4790
|
+
listHands.push(`subpax_${designName}_handPlateL1`);
|
|
4791
|
+
listHands.push(`subpax_${designName}_handPlateL2`);
|
|
4792
|
+
volHands.push(extrudeHandBack2(ZhpR[1], "R"));
|
|
4793
|
+
volHands.push(extrudeHandBack2(ZhpL[1], "L"));
|
|
4794
|
+
listHands.push(`subpax_${designName}_handBackR`);
|
|
4795
|
+
listHands.push(`subpax_${designName}_handBackL`);
|
|
4796
|
+
const listMotors = [];
|
|
4797
|
+
const volMotors = [];
|
|
4798
|
+
volMotors.push(extrudeMotorBulk2(ZhpR[1], "R"));
|
|
4799
|
+
volMotors.push(extrudeMotorBulk2(ZhpL[1], "L"));
|
|
4800
|
+
listMotors.push(`subpax_${designName}_motorBulkR`);
|
|
4801
|
+
listMotors.push(`subpax_${designName}_motorBulkL`);
|
|
4802
|
+
for (let ii = 0; ii < param.N1; ii++) {
|
|
4803
|
+
const idx0 = (2 * ii).toString().padStart(2, "0");
|
|
4804
|
+
const idx1 = (2 * ii + 1).toString().padStart(2, "0");
|
|
4805
|
+
const tPosZ = ii * (param.L1 + param.T1) + param.T1 + param.L1 / 2;
|
|
4806
|
+
volMotors.push(extrudeMFoot2(hPposR, ZhpR[0] - param.Z1, tPosZ, wheelRA[ii], idx0));
|
|
4807
|
+
listMotors.push(`subpax_${designName}_mFoot${idx0}`);
|
|
4808
|
+
volMotors.push(extrudeMFoot2(hPposL, ZhpL[0] - param.Z1, tPosZ, wheelLA[ii], idx1));
|
|
4809
|
+
listMotors.push(`subpax_${designName}_mFoot${idx1}`);
|
|
4810
|
+
}
|
|
4811
|
+
const listWheels = [];
|
|
4812
|
+
const volWheels = [];
|
|
4813
|
+
for (let ii = 0; ii < param.N1; ii++) {
|
|
4814
|
+
const idx0 = (2 * ii).toString().padStart(2, "0");
|
|
4815
|
+
const idx1 = (2 * ii + 1).toString().padStart(2, "0");
|
|
4816
|
+
const tPosZ = ii * (param.L1 + param.T1) + param.T1 + param.L1 / 2;
|
|
4817
|
+
volWheels.push(extrudeWheel2(hPposR, ZhpR[0] - param.Z1, tPosZ, wheelRA[ii], idx0));
|
|
4818
|
+
listWheels.push(`subpax_${designName}_wheel${idx0}`);
|
|
4819
|
+
volWheels.push(extrudeWheel2(hPposL, ZhpL[0] - param.Z1, tPosZ, wheelLA[ii], idx1));
|
|
4820
|
+
listWheels.push(`subpax_${designName}_wheel${idx1}`);
|
|
4821
|
+
}
|
|
4822
|
+
if (param.gen3D === 0 || param.gen3D === 1) {
|
|
4823
|
+
list3D.push(...listPlatform);
|
|
4824
|
+
}
|
|
4825
|
+
if (param.gen3D === 0 || param.gen3D === 2) {
|
|
4826
|
+
list3D.push(...listBones);
|
|
4827
|
+
}
|
|
4828
|
+
if (param.gen3D === 0 || param.gen3D === 3) {
|
|
4829
|
+
list3D.push(...listHands);
|
|
4830
|
+
}
|
|
4831
|
+
if (param.gen3D === 0 || param.gen3D === 4) {
|
|
4832
|
+
list3D.push(...listMotors);
|
|
4833
|
+
}
|
|
4834
|
+
if (param.gen3D === 0 || param.gen3D === 5) {
|
|
4835
|
+
list3D.push(...listWheels);
|
|
4836
|
+
}
|
|
4177
4837
|
rGeome.vol = {
|
|
4178
4838
|
extrudes: [
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
translate: [0, 0, 0]
|
|
4186
|
-
}
|
|
4839
|
+
volPlatformMain,
|
|
4840
|
+
...volTriangle,
|
|
4841
|
+
...volBones,
|
|
4842
|
+
...volHands,
|
|
4843
|
+
...volMotors,
|
|
4844
|
+
...volWheels
|
|
4187
4845
|
],
|
|
4188
4846
|
volumes: [
|
|
4189
4847
|
{
|
|
4190
4848
|
outName: `pax_${designName}`,
|
|
4191
4849
|
boolMethod: EBVolume10.eUnion,
|
|
4192
|
-
inList:
|
|
4850
|
+
inList: list3D
|
|
4193
4851
|
}
|
|
4194
4852
|
]
|
|
4195
4853
|
};
|
|
@@ -4209,78 +4867,507 @@ var rccarDef = {
|
|
|
4209
4867
|
pGeom: pGeom13
|
|
4210
4868
|
};
|
|
4211
4869
|
|
|
4212
|
-
// src/
|
|
4870
|
+
// src/rccar/singleBone.ts
|
|
4213
4871
|
import {
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
contourCircle as contourCircle11,
|
|
4217
|
-
ctrRectangle as ctrRectangle7,
|
|
4872
|
+
contour as contour15,
|
|
4873
|
+
contourCircle as contourCircle12,
|
|
4218
4874
|
figure as figure12,
|
|
4219
4875
|
ffix as ffix15,
|
|
4220
4876
|
pNumber as pNumber14,
|
|
4221
|
-
pCheckbox as pCheckbox8,
|
|
4222
|
-
pDropdown as pDropdown7,
|
|
4223
4877
|
pSectionSeparator as pSectionSeparator14,
|
|
4224
4878
|
EExtrude as EExtrude11,
|
|
4225
4879
|
EBVolume as EBVolume11,
|
|
4226
4880
|
initGeom as initGeom14
|
|
4227
4881
|
} from "geometrix";
|
|
4228
4882
|
var pDef14 = {
|
|
4883
|
+
partName: "singleBone",
|
|
4884
|
+
params: [
|
|
4885
|
+
//pNumber(name, unit, init, min, max, step)
|
|
4886
|
+
pNumber14("D1", "mm", 30, 1, 500, 1),
|
|
4887
|
+
pNumber14("D2", "mm", 70, 1, 500, 1),
|
|
4888
|
+
pNumber14("L1", "mm", 200, 10, 1e3, 1),
|
|
4889
|
+
pSectionSeparator14("Details"),
|
|
4890
|
+
pNumber14("R3", "mm", 50, 0, 1e3, 1),
|
|
4891
|
+
pNumber14("W1", "mm", 30, 1, 500, 1),
|
|
4892
|
+
pNumber14("T1", "mm", 10, 1, 100, 1),
|
|
4893
|
+
pSectionSeparator14("Holes"),
|
|
4894
|
+
pNumber14("P2", "%", 50, 0, 99, 1),
|
|
4895
|
+
pNumber14("W2", "mm", 10, 1, 500, 1)
|
|
4896
|
+
],
|
|
4897
|
+
paramSvg: {
|
|
4898
|
+
D1: "singleBone_face.svg",
|
|
4899
|
+
D2: "singleBone_face.svg",
|
|
4900
|
+
L1: "singleBone_face.svg",
|
|
4901
|
+
R3: "singleBone_face.svg",
|
|
4902
|
+
W1: "singleBone_face.svg",
|
|
4903
|
+
T1: "singleBone_face.svg",
|
|
4904
|
+
P2: "singleBone_face.svg",
|
|
4905
|
+
W2: "singleBone_face.svg"
|
|
4906
|
+
},
|
|
4907
|
+
sim: {
|
|
4908
|
+
tMax: 200,
|
|
4909
|
+
tStep: 0.5,
|
|
4910
|
+
tUpdate: 500
|
|
4911
|
+
// every 0.5 second
|
|
4912
|
+
}
|
|
4913
|
+
};
|
|
4914
|
+
function pGeom14(t, param, suffix = "") {
|
|
4915
|
+
const rGeome = initGeom14(pDef14.partName + suffix);
|
|
4916
|
+
const figBone = figure12();
|
|
4917
|
+
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4918
|
+
`;
|
|
4919
|
+
try {
|
|
4920
|
+
const W12 = param.W1 / 2;
|
|
4921
|
+
const R12 = param.D1 / 2;
|
|
4922
|
+
const R22 = param.D2 / 2;
|
|
4923
|
+
const boneLen = param.L1 + 2 * R22;
|
|
4924
|
+
const dX2 = R22 ** 2 - W12 ** 2;
|
|
4925
|
+
if (dX2 < 0) {
|
|
4926
|
+
throw `err086: D2 ${ffix15(param.D2)} is too small compare to W1 ${ffix15(param.W1)} mm`;
|
|
4927
|
+
}
|
|
4928
|
+
const dX = Math.sqrt(dX2);
|
|
4929
|
+
const L1b = param.L1 - 2 * dX;
|
|
4930
|
+
const Rh = W12 * param.P2 / 100;
|
|
4931
|
+
const hX1 = param.W2 + 2 * Rh;
|
|
4932
|
+
const N2 = Math.max(Math.floor((param.L1 - 2 * R22 - param.W2) / hX1), 0);
|
|
4933
|
+
const W2b = (param.L1 - 2 * R22 - N2 * 2 * Rh) / (N2 + 1);
|
|
4934
|
+
const hX0b = R22 + W2b + Rh;
|
|
4935
|
+
const hX1b = W2b + 2 * Rh;
|
|
4936
|
+
if (R22 < R12) {
|
|
4937
|
+
throw `err085: D2 ${ffix15(param.D2)} is too small compare to D1 ${ffix15(param.D1)} mm`;
|
|
4938
|
+
}
|
|
4939
|
+
if (L1b < 0) {
|
|
4940
|
+
throw `err095: L1 ${ffix15(param.L1)} is too small compare to D2 ${ffix15(param.D2)} mm`;
|
|
4941
|
+
}
|
|
4942
|
+
rGeome.logstr += `Bone length ${ffix15(boneLen)} mm
|
|
4943
|
+
`;
|
|
4944
|
+
rGeome.logstr += `Bone with N2 ${N2} holes of diameter ${ffix15(2 * Rh)} mm
|
|
4945
|
+
`;
|
|
4946
|
+
rGeome.logstr += `Bone W2b ${ffix15(W2b)} mm
|
|
4947
|
+
`;
|
|
4948
|
+
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
|
+
const ctrAxis1 = contourCircle12(0, 0, R12);
|
|
4950
|
+
const ctrAxis2 = contourCircle12(param.L1, 0, R12);
|
|
4951
|
+
const ctrMinis = [];
|
|
4952
|
+
if (Rh > 0) {
|
|
4953
|
+
for (let ii = 0; ii < N2; ii++) {
|
|
4954
|
+
ctrMinis.push(contourCircle12(hX0b + ii * hX1b, 0, Rh));
|
|
4955
|
+
}
|
|
4956
|
+
}
|
|
4957
|
+
figBone.addMainOI([ctrBone, ctrAxis1, ctrAxis2, ...ctrMinis]);
|
|
4958
|
+
rGeome.fig = {
|
|
4959
|
+
faceBone: figBone
|
|
4960
|
+
};
|
|
4961
|
+
const designName = rGeome.partName;
|
|
4962
|
+
rGeome.vol = {
|
|
4963
|
+
extrudes: [
|
|
4964
|
+
{
|
|
4965
|
+
outName: `subpax_${designName}_bone`,
|
|
4966
|
+
face: `${designName}_faceBone`,
|
|
4967
|
+
extrudeMethod: EExtrude11.eLinearOrtho,
|
|
4968
|
+
length: param.T1,
|
|
4969
|
+
rotate: [0, 0, 0],
|
|
4970
|
+
translate: [0, 0, 0]
|
|
4971
|
+
}
|
|
4972
|
+
],
|
|
4973
|
+
volumes: [
|
|
4974
|
+
{
|
|
4975
|
+
outName: `pax_${designName}`,
|
|
4976
|
+
boolMethod: EBVolume11.eIdentity,
|
|
4977
|
+
inList: [`subpax_${designName}_bone`]
|
|
4978
|
+
}
|
|
4979
|
+
]
|
|
4980
|
+
};
|
|
4981
|
+
rGeome.sub = {};
|
|
4982
|
+
rGeome.logstr += "singleBone drawn successfully!\n";
|
|
4983
|
+
rGeome.calcErr = false;
|
|
4984
|
+
} catch (emsg) {
|
|
4985
|
+
rGeome.logstr += emsg;
|
|
4986
|
+
console.log(emsg);
|
|
4987
|
+
}
|
|
4988
|
+
return rGeome;
|
|
4989
|
+
}
|
|
4990
|
+
var singleBoneDef = {
|
|
4991
|
+
pTitle: "singleBone",
|
|
4992
|
+
pDescription: "detailed design of the suspension bone of the rccar",
|
|
4993
|
+
pDef: pDef14,
|
|
4994
|
+
pGeom: pGeom14
|
|
4995
|
+
};
|
|
4996
|
+
|
|
4997
|
+
// src/rccar/doubleBone.ts
|
|
4998
|
+
import {
|
|
4999
|
+
contourCircle as contourCircle13,
|
|
5000
|
+
degToRad as degToRad7,
|
|
5001
|
+
ffix as ffix16,
|
|
5002
|
+
pNumber as pNumber15,
|
|
5003
|
+
pSectionSeparator as pSectionSeparator15,
|
|
5004
|
+
initGeom as initGeom15
|
|
5005
|
+
} from "geometrix";
|
|
5006
|
+
import {
|
|
5007
|
+
tJDir as tJDir4,
|
|
5008
|
+
tJSide as tJSide4,
|
|
5009
|
+
contourJ as contourJ4,
|
|
5010
|
+
facet as facet4,
|
|
5011
|
+
sheetFold as sheetFold4
|
|
5012
|
+
} from "sheetfold";
|
|
5013
|
+
var pDef15 = {
|
|
5014
|
+
partName: "doubleBone",
|
|
5015
|
+
params: [
|
|
5016
|
+
//pNumber(name, unit, init, min, max, step)
|
|
5017
|
+
pNumber15("D1", "mm", 30, 1, 500, 1),
|
|
5018
|
+
pNumber15("D2", "mm", 70, 1, 500, 1),
|
|
5019
|
+
pNumber15("L1", "mm", 300, 10, 1e3, 1),
|
|
5020
|
+
pNumber15("L2", "mm", 200, 10, 1e3, 1),
|
|
5021
|
+
pNumber15("E1", "mm", 40, 1, 1e3, 1),
|
|
5022
|
+
pSectionSeparator15("Side"),
|
|
5023
|
+
pNumber15("W1", "mm", 30, 1, 500, 1),
|
|
5024
|
+
pNumber15("P2", "%", 50, 0, 99, 1),
|
|
5025
|
+
pNumber15("W2", "mm", 10, 1, 500, 1),
|
|
5026
|
+
pSectionSeparator15("Top"),
|
|
5027
|
+
pNumber15("S1", "mm", 20, 1, 100, 1),
|
|
5028
|
+
pNumber15("S2", "mm", 20, 1, 100, 1),
|
|
5029
|
+
pNumber15("S3", "mm", 20, 1, 100, 1),
|
|
5030
|
+
pNumber15("R3", "mm", 10, 0, 1e3, 1),
|
|
5031
|
+
pSectionSeparator15("Wing width"),
|
|
5032
|
+
pNumber15("P11", "%", 8, 0, 90, 1),
|
|
5033
|
+
pNumber15("P12", "%", 20, 0, 90, 1),
|
|
5034
|
+
pNumber15("P21", "%", 18, 0, 90, 1),
|
|
5035
|
+
pNumber15("P22", "%", 20, 0, 90, 1),
|
|
5036
|
+
pSectionSeparator15("Folding"),
|
|
5037
|
+
pNumber15("T1", "mm", 2, 0.5, 10, 0.1),
|
|
5038
|
+
pNumber15("Jangle", "degree", 90, 30, 120, 1),
|
|
5039
|
+
pNumber15("Jradius", "mm", 10, 0.1, 50, 0.1),
|
|
5040
|
+
pNumber15("Jneutral", "%", 50, 0, 100, 1),
|
|
5041
|
+
pNumber15("Jmark", "mm", 2, 0.1, 10, 0.1),
|
|
5042
|
+
pNumber15("Jradius2", "mm", 4, 0.1, 50, 0.1),
|
|
5043
|
+
pNumber15("Jmark2", "mm", 2, 0.1, 10, 0.1)
|
|
5044
|
+
],
|
|
5045
|
+
paramSvg: {
|
|
5046
|
+
D1: "doubleBone_face.svg",
|
|
5047
|
+
D2: "doubleBone_face.svg",
|
|
5048
|
+
L1: "doubleBone_face.svg",
|
|
5049
|
+
L2: "doubleBone_top.svg",
|
|
5050
|
+
E1: "doubleBone_top.svg",
|
|
5051
|
+
W1: "doubleBone_face.svg",
|
|
5052
|
+
P2: "doubleBone_side.svg",
|
|
5053
|
+
W2: "doubleBone_side.svg",
|
|
5054
|
+
S1: "doubleBone_top.svg",
|
|
5055
|
+
S2: "doubleBone_top.svg",
|
|
5056
|
+
S3: "doubleBone_top.svg",
|
|
5057
|
+
R3: "doubleBone_side.svg",
|
|
5058
|
+
P11: "doubleBone_top.svg",
|
|
5059
|
+
P12: "doubleBone_top.svg",
|
|
5060
|
+
P21: "doubleBone_top.svg",
|
|
5061
|
+
P22: "doubleBone_top.svg",
|
|
5062
|
+
T1: "doubleBone_folding.svg",
|
|
5063
|
+
Jangle: "doubleBone_folding.svg",
|
|
5064
|
+
Jradius: "doubleBone_folding.svg",
|
|
5065
|
+
Jneutral: "doubleBone_folding.svg",
|
|
5066
|
+
Jmark: "doubleBone_folding.svg",
|
|
5067
|
+
Jradius2: "doubleBone_folding.svg",
|
|
5068
|
+
Jmark2: "doubleBone_folding.svg"
|
|
5069
|
+
},
|
|
5070
|
+
sim: {
|
|
5071
|
+
tMax: 200,
|
|
5072
|
+
tStep: 0.5,
|
|
5073
|
+
tUpdate: 500
|
|
5074
|
+
// every 0.5 second
|
|
5075
|
+
}
|
|
5076
|
+
};
|
|
5077
|
+
function pGeom15(t, param, suffix = "") {
|
|
5078
|
+
const rGeome = initGeom15(pDef15.partName + suffix);
|
|
5079
|
+
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
5080
|
+
`;
|
|
5081
|
+
try {
|
|
5082
|
+
let calcInnerTri2 = function(iW, iH, iDW) {
|
|
5083
|
+
const rA = Math.atan2(iH, iW);
|
|
5084
|
+
const rInitDist = iDW / Math.sin(rA);
|
|
5085
|
+
return [rA, rInitDist];
|
|
5086
|
+
}, calcSplitTri2 = function(iL, iP) {
|
|
5087
|
+
if (iL < 0) {
|
|
5088
|
+
throw `err559: iL ${ffix16(iL)} is negative mm`;
|
|
5089
|
+
}
|
|
5090
|
+
let rLside = iL;
|
|
5091
|
+
let rLcenter = 0;
|
|
5092
|
+
if (iP > 0) {
|
|
5093
|
+
const pr = iP / 100;
|
|
5094
|
+
rLcenter = pr * iL;
|
|
5095
|
+
rLside = (iL - rLcenter) / 2;
|
|
5096
|
+
}
|
|
5097
|
+
return [rLside, rLcenter];
|
|
5098
|
+
}, makeCtrBone2 = function(iJ1, iJ2) {
|
|
5099
|
+
const rCtr = contourJ4(dX, W12).addPointR(-dX - R22, -W12).addPointR(0, -2 * W12).addSegArc2().startJunction(iJ1, tJDir4.eA, tJSide4.eABLeft).addSegStrokeR(L1b, 0).addPointR(dX + R22, W12).addPointR(0, 2 * W12).addSegArc2().startJunction(iJ2, tJDir4.eB, tJSide4.eABRight).closeSegStroke();
|
|
5100
|
+
return rCtr;
|
|
5101
|
+
}, makeCtrPlate2 = function(iJ1, iJ2, idx) {
|
|
5102
|
+
const tJ1 = `J${idx}1`;
|
|
5103
|
+
const tJ2 = `J${idx}2`;
|
|
5104
|
+
const rCtr = contourJ4(0, 0).addSegStrokeR(L2d, 0).startJunction(tJ1, tJDir4.eA, tJSide4.eABLeft).addSegStrokeR(L2c, 0).addSegStrokeR(L2d, 0);
|
|
5105
|
+
if (iJ2 !== "") {
|
|
5106
|
+
rCtr.startJunction(iJ2, tJDir4.eA, tJSide4.eABLeft);
|
|
5107
|
+
}
|
|
5108
|
+
rCtr.addSegStrokeR(0, L1b).addSegStrokeR(-L2d, 0).startJunction(tJ2, tJDir4.eA, tJSide4.eABLeft).addSegStrokeR(-L2c, 0).addSegStrokeR(-L2d, 0).startJunction(iJ1, tJDir4.eB, tJSide4.eABRight).closeSegStroke();
|
|
5109
|
+
return rCtr;
|
|
5110
|
+
}, makeCtrTri2 = function(jn, x0, y0, r0, ia, t1s, t1c, t2s, t2c) {
|
|
5111
|
+
const ctr = contourJ4(x0, y0).addCornerRounded(param.R3).addSegStrokeR(t1s, 0);
|
|
5112
|
+
if (t1c > 0) {
|
|
5113
|
+
ctr.startJunction(`${jn}1`, tJDir4.eA, tJSide4.eABRight).addSegStrokeR(t1c, 0).addSegStrokeR(t1s, 0);
|
|
5114
|
+
}
|
|
5115
|
+
const a2 = pi - ia;
|
|
5116
|
+
ctr.addCornerRounded(param.R3).addSegStrokeRP(a2, t2s);
|
|
5117
|
+
if (t2c > 0) {
|
|
5118
|
+
ctr.startJunction(`${jn}2`, tJDir4.eA, tJSide4.eABRight).addSegStrokeRP(a2, t2c).addSegStrokeRP(a2, t2s);
|
|
5119
|
+
}
|
|
5120
|
+
const a3 = pi + ia;
|
|
5121
|
+
ctr.addCornerRounded(param.R3).addSegStrokeRP(a3, t2s);
|
|
5122
|
+
if (t2c > 0) {
|
|
5123
|
+
ctr.startJunction(`${jn}3`, tJDir4.eA, tJSide4.eABRight).addSegStrokeRP(a3, t2c).addSegStrokeRP(a3, t2s);
|
|
5124
|
+
}
|
|
5125
|
+
const rCtr = ctr.rotate(x0, y0, r0);
|
|
5126
|
+
return rCtr;
|
|
5127
|
+
}, makeCtrSide2 = function(iJ1) {
|
|
5128
|
+
const rCtr = contourJ4(0, 0).addSegStrokeR(L2c, 0).addSegStrokeR(0, param.W1).startJunction(iJ1, tJDir4.eB, tJSide4.eABRight).addSegStrokeR(-L2c, 0).closeSegStroke();
|
|
5129
|
+
return rCtr;
|
|
5130
|
+
};
|
|
5131
|
+
var calcInnerTri = calcInnerTri2, calcSplitTri = calcSplitTri2, makeCtrBone = makeCtrBone2, makeCtrPlate = makeCtrPlate2, makeCtrTri = makeCtrTri2, makeCtrSide = makeCtrSide2;
|
|
5132
|
+
const pi = Math.PI;
|
|
5133
|
+
const pi2 = pi / 2;
|
|
5134
|
+
const W1 = param.W1;
|
|
5135
|
+
const W12 = W1 / 2;
|
|
5136
|
+
const R12 = param.D1 / 2;
|
|
5137
|
+
const R22 = param.D2 / 2;
|
|
5138
|
+
const boneLen = param.L1 + 2 * R22;
|
|
5139
|
+
const dX2 = R22 ** 2 - W12 ** 2;
|
|
5140
|
+
if (dX2 < 0) {
|
|
5141
|
+
throw `err086: D2 ${ffix16(param.D2)} is too small compare to W1 ${ffix16(param.W1)} mm`;
|
|
5142
|
+
}
|
|
5143
|
+
const dX = Math.sqrt(dX2);
|
|
5144
|
+
const L1b = param.L1 - 2 * dX;
|
|
5145
|
+
const Rh = W12 * param.P2 / 100;
|
|
5146
|
+
const hX1 = param.W2 + 2 * Rh;
|
|
5147
|
+
const N2 = Math.max(Math.floor((param.L1 - 2 * R22 - param.W2) / hX1), 0);
|
|
5148
|
+
const W2b = (param.L1 - 2 * R22 - N2 * 2 * Rh) / (N2 + 1);
|
|
5149
|
+
const hX0b = R22 + W2b + Rh;
|
|
5150
|
+
const hX1b = W2b + 2 * Rh;
|
|
5151
|
+
const aJa = degToRad7(param.Jangle);
|
|
5152
|
+
const aJn = param.Jneutral / 100;
|
|
5153
|
+
const aJr = param.Jradius;
|
|
5154
|
+
const aJm = param.Jmark;
|
|
5155
|
+
const aJr2 = param.Jradius2;
|
|
5156
|
+
const aJm2 = param.Jmark2;
|
|
5157
|
+
const cornerSizeExt = aJr + param.T1 * (1 - aJa);
|
|
5158
|
+
const cornerSizeInt = aJr - param.T1 * aJa;
|
|
5159
|
+
const cornerSizeInt2 = aJr2 - param.T1 * aJa;
|
|
5160
|
+
const L2b = param.L2 - 2 * cornerSizeExt;
|
|
5161
|
+
const L2c = L2b + 2 * cornerSizeInt - 2 * param.E1;
|
|
5162
|
+
const L2d = (L2b - L2c) / 2;
|
|
5163
|
+
const N2c = Math.max(Math.floor((L2c - param.W2) / hX1), 0);
|
|
5164
|
+
const W2c = (L2c - N2c * 2 * Rh) / (N2c + 1);
|
|
5165
|
+
const hX0c = W2c + Rh;
|
|
5166
|
+
const hX1c = W2c + 2 * Rh;
|
|
5167
|
+
const L1i = L1b - 2 * param.S2;
|
|
5168
|
+
const L2i = L2b - 2 * param.S1;
|
|
5169
|
+
const [tri1a, tri1d0] = calcInnerTri2(L2i, L1i, param.S3 / 2);
|
|
5170
|
+
const tri11L = L2i - 2 * tri1d0;
|
|
5171
|
+
const [tri2a, tri2d0] = calcInnerTri2(L1i, L2i, param.S3 / 2);
|
|
5172
|
+
const tri21L = L1i - 2 * tri2d0;
|
|
5173
|
+
const [tri11s, tri11c] = calcSplitTri2(tri11L, param.P11);
|
|
5174
|
+
const tri12L = tri11L / (2 * Math.cos(tri1a));
|
|
5175
|
+
const [tri12s, tri12c] = calcSplitTri2(tri12L, param.P12);
|
|
5176
|
+
const [tri21s, tri21c] = calcSplitTri2(tri21L, param.P21);
|
|
5177
|
+
const tri22L = tri21L / (2 * Math.cos(tri2a));
|
|
5178
|
+
const [tri22s, tri22c] = calcSplitTri2(tri22L, param.P22);
|
|
5179
|
+
const wingH = param.W1 / 2 + cornerSizeInt - cornerSizeInt2;
|
|
5180
|
+
if (R22 < R12) {
|
|
5181
|
+
throw `err085: D2 ${ffix16(param.D2)} is too small compare to D1 ${ffix16(param.D1)} mm`;
|
|
5182
|
+
}
|
|
5183
|
+
if (L1b < 0) {
|
|
5184
|
+
throw `err095: L1 ${ffix16(param.L1)} is too small compare to D2 ${ffix16(param.D2)} mm`;
|
|
5185
|
+
}
|
|
5186
|
+
if (param.E1 < cornerSizeInt) {
|
|
5187
|
+
throw `err151: E1 ${ffix16(param.E1)} is too small compare to Jradius ${ffix16(param.Jradius)} mm`;
|
|
5188
|
+
}
|
|
5189
|
+
if (L2c < 0) {
|
|
5190
|
+
throw `err150: L2 ${ffix16(param.L2)} is too small compare to E1 ${ffix16(param.E1)} mm`;
|
|
5191
|
+
}
|
|
5192
|
+
rGeome.logstr += `Bone length ${ffix16(boneLen)} mm
|
|
5193
|
+
`;
|
|
5194
|
+
rGeome.logstr += `Bone with N2 ${N2} holes of diameter ${ffix16(2 * Rh)} and W2b ${ffix16(W2b)} mm
|
|
5195
|
+
`;
|
|
5196
|
+
rGeome.logstr += `Side with N2c ${N2c} holes of diameter ${ffix16(2 * Rh)} and W2c ${ffix16(W2c)} mm
|
|
5197
|
+
`;
|
|
5198
|
+
const ctrAxis1 = contourCircle13(0, 0, R12);
|
|
5199
|
+
const ctrAxis2 = contourCircle13(param.L1, 0, R12);
|
|
5200
|
+
const ctrMinis = [];
|
|
5201
|
+
if (Rh > 0) {
|
|
5202
|
+
for (let ii = 0; ii < N2; ii++) {
|
|
5203
|
+
ctrMinis.push(contourCircle13(hX0b + ii * hX1b, 0, Rh));
|
|
5204
|
+
}
|
|
5205
|
+
}
|
|
5206
|
+
const ctrBone1 = makeCtrBone2("J1", "J2");
|
|
5207
|
+
const ctrBone2 = makeCtrBone2("J3", "J4");
|
|
5208
|
+
const faBone1 = facet4([ctrBone1, ctrAxis1, ctrAxis2, ...ctrMinis]);
|
|
5209
|
+
const faBone2 = facet4([ctrBone2, ctrAxis1, ctrAxis2, ...ctrMinis]);
|
|
5210
|
+
const ctrPlate1 = makeCtrPlate2("J1", "", 1);
|
|
5211
|
+
const ctrPlate2 = makeCtrPlate2("J3", "J2", 2);
|
|
5212
|
+
const x04 = param.S1 + tri1d0;
|
|
5213
|
+
const y04 = param.S2;
|
|
5214
|
+
const ctrTri14 = makeCtrTri2("J14", x04, y04, 0, tri1a, tri11s, tri11c, tri12s, tri12c);
|
|
5215
|
+
const ctrTri24 = makeCtrTri2("J24", x04, y04, 0, tri1a, tri11s, tri11c, tri12s, tri12c);
|
|
5216
|
+
const x02 = L2b - param.S1 - tri1d0;
|
|
5217
|
+
const y02 = L1b - param.S2;
|
|
5218
|
+
const ctrTri12 = makeCtrTri2("J12", x02, y02, pi, tri1a, tri11s, tri11c, tri12s, tri12c);
|
|
5219
|
+
const ctrTri22 = makeCtrTri2("J22", x02, y02, pi, tri1a, tri11s, tri11c, tri12s, tri12c);
|
|
5220
|
+
const x01 = L2b - param.S1;
|
|
5221
|
+
const y01 = param.S2 + tri2d0;
|
|
5222
|
+
const ctrTri11 = makeCtrTri2("J11", x01, y01, pi2, tri2a, tri21s, tri21c, tri22s, tri22c);
|
|
5223
|
+
const ctrTri21 = makeCtrTri2("J21", x01, y01, pi2, tri2a, tri21s, tri21c, tri22s, tri22c);
|
|
5224
|
+
const x03 = param.S1;
|
|
5225
|
+
const y03 = L1b - param.S2 - tri2d0;
|
|
5226
|
+
const ctrTri13 = makeCtrTri2("J13", x03, y03, -pi2, tri2a, tri21s, tri21c, tri22s, tri22c);
|
|
5227
|
+
const ctrTri23 = makeCtrTri2("J23", x03, y03, -pi2, tri2a, tri21s, tri21c, tri22s, tri22c);
|
|
5228
|
+
const faPlate1 = facet4([ctrPlate1, ctrTri14, ctrTri12, ctrTri11, ctrTri13]);
|
|
5229
|
+
const faPlate2 = facet4([ctrPlate2, ctrTri24, ctrTri22, ctrTri21, ctrTri23]);
|
|
5230
|
+
const ctrMinics = [];
|
|
5231
|
+
if (Rh > 0) {
|
|
5232
|
+
for (let ii = 0; ii < N2c; ii++) {
|
|
5233
|
+
ctrMinics.push(contourCircle13(hX0c + ii * hX1c, W12, Rh));
|
|
5234
|
+
}
|
|
5235
|
+
}
|
|
5236
|
+
const faSide1 = facet4([makeCtrSide2("J11"), ...ctrMinics]);
|
|
5237
|
+
const faSide2 = facet4([makeCtrSide2("J12"), ...ctrMinics]);
|
|
5238
|
+
const Jwings = [];
|
|
5239
|
+
const faWings = [];
|
|
5240
|
+
const tri13 = [tri21c, tri22c, tri22c];
|
|
5241
|
+
const tri24 = [tri11c, tri12c, tri12c];
|
|
5242
|
+
for (let i1 = 0; i1 < 2; i1++) {
|
|
5243
|
+
for (let i2 = 0; i2 < 4; i2++) {
|
|
5244
|
+
for (let i3 = 0; i3 < 3; i3++) {
|
|
5245
|
+
const jN = `J${i1 + 1}${i2 + 1}${i3 + 1}`;
|
|
5246
|
+
Jwings.push(jN);
|
|
5247
|
+
const triParity = i2 % 2;
|
|
5248
|
+
const triC = triParity === 1 ? tri24 : tri13;
|
|
5249
|
+
const lc = triC[i3];
|
|
5250
|
+
if (lc > 0) {
|
|
5251
|
+
const ctrJ = contourJ4(0, 0).addSegStrokeR(lc, 0).addSegStrokeR(0, wingH).startJunction(jN, tJDir4.eA, tJSide4.eABLeft).addSegStrokeR(-lc, 0).closeSegStroke();
|
|
5252
|
+
faWings.push(facet4([ctrJ]));
|
|
5253
|
+
}
|
|
5254
|
+
}
|
|
5255
|
+
}
|
|
5256
|
+
}
|
|
5257
|
+
const Jbase = ["J1", "J2", "J3", "J4", "J11", "J12", "J21", "J22"];
|
|
5258
|
+
const Jdef = { angle: aJa, radius: aJr, neutral: aJn, mark: aJm };
|
|
5259
|
+
const Jdef2 = { angle: aJa, radius: aJr2, neutral: aJn, mark: aJm2 };
|
|
5260
|
+
const juncs = {};
|
|
5261
|
+
for (const iJ of Jbase) {
|
|
5262
|
+
juncs[iJ] = Jdef;
|
|
5263
|
+
}
|
|
5264
|
+
for (const iJ of Jwings) {
|
|
5265
|
+
juncs[iJ] = Jdef2;
|
|
5266
|
+
}
|
|
5267
|
+
const half1A = ["J1", L2b, "J2", W1, "J3", L2b];
|
|
5268
|
+
const half2A = ["J11", W1, "J21", L1b];
|
|
5269
|
+
const half2P = ["J12", W1, "J22"];
|
|
5270
|
+
const sFold = sheetFold4(
|
|
5271
|
+
[faBone1, faPlate1, faPlate2, faBone2, faSide1, faSide2, ...faWings],
|
|
5272
|
+
juncs,
|
|
5273
|
+
[
|
|
5274
|
+
{ x1: 0, y1: 0, a1: 0, l1: W1, ante: half1A, post: ["J4"] },
|
|
5275
|
+
//{ x1: 2 * W1, y1: 0, a1: 0, l1: W1, ante: half3A, post: half3P },
|
|
5276
|
+
{ x1: 4 * W1, y1: 0, a1: 0, l1: L1b, ante: half2A, post: half2P }
|
|
5277
|
+
],
|
|
5278
|
+
param.T1,
|
|
5279
|
+
rGeome.partName
|
|
5280
|
+
);
|
|
5281
|
+
rGeome.fig = sFold.makeFigures();
|
|
5282
|
+
rGeome.vol = sFold.makeVolume();
|
|
5283
|
+
rGeome.sub = {};
|
|
5284
|
+
rGeome.logstr += "doubleBone drawn successfully!\n";
|
|
5285
|
+
rGeome.calcErr = false;
|
|
5286
|
+
} catch (emsg) {
|
|
5287
|
+
rGeome.logstr += emsg;
|
|
5288
|
+
console.log(emsg);
|
|
5289
|
+
}
|
|
5290
|
+
return rGeome;
|
|
5291
|
+
}
|
|
5292
|
+
var doubleBoneDef = {
|
|
5293
|
+
pTitle: "doubleBone",
|
|
5294
|
+
pDescription: "combined suspension bones of the rccar",
|
|
5295
|
+
pDef: pDef15,
|
|
5296
|
+
pGeom: pGeom15
|
|
5297
|
+
};
|
|
5298
|
+
|
|
5299
|
+
// src/capsule/capsule.ts
|
|
5300
|
+
import {
|
|
5301
|
+
point as point8,
|
|
5302
|
+
contour as contour16,
|
|
5303
|
+
contourCircle as contourCircle14,
|
|
5304
|
+
ctrRectangle as ctrRectangle7,
|
|
5305
|
+
figure as figure13,
|
|
5306
|
+
ffix as ffix17,
|
|
5307
|
+
pNumber as pNumber16,
|
|
5308
|
+
pCheckbox as pCheckbox9,
|
|
5309
|
+
pDropdown as pDropdown8,
|
|
5310
|
+
pSectionSeparator as pSectionSeparator16,
|
|
5311
|
+
EExtrude as EExtrude12,
|
|
5312
|
+
EBVolume as EBVolume12,
|
|
5313
|
+
initGeom as initGeom16
|
|
5314
|
+
} from "geometrix";
|
|
5315
|
+
var pDef16 = {
|
|
4229
5316
|
partName: "capsule",
|
|
4230
5317
|
params: [
|
|
4231
5318
|
//pNumber(name, unit, init, min, max, step)
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
5319
|
+
pNumber16("L1", "mm", 5e3, 1e3, 2e4, 1),
|
|
5320
|
+
pNumber16("WW1", "mm", 1800, 100, 4e3, 1),
|
|
5321
|
+
pNumber16("E1", "mm", 10, 1, 100, 1),
|
|
5322
|
+
pSectionSeparator16("Nose"),
|
|
5323
|
+
pNumber16("H1", "mm", 300, 10, 4e3, 1),
|
|
5324
|
+
pNumber16("H2", "mm", 500, 10, 4e3, 1),
|
|
5325
|
+
pNumber16("H3", "mm", 1200, 10, 4e3, 1),
|
|
5326
|
+
pNumber16("W1", "mm", 300, 10, 4e3, 1),
|
|
5327
|
+
pNumber16("W3", "mm", 1500, 10, 4e3, 1),
|
|
5328
|
+
pNumber16("C3", "mm", 200, 1, 1e3, 1),
|
|
5329
|
+
pNumber16("R1", "mm", 100, 0, 500, 1),
|
|
5330
|
+
pNumber16("R2", "mm", 100, 0, 500, 1),
|
|
5331
|
+
pNumber16("R3", "mm", 100, 0, 500, 1),
|
|
5332
|
+
pNumber16("R4", "mm", 100, 0, 500, 1),
|
|
5333
|
+
pSectionSeparator16("Wheels"),
|
|
5334
|
+
pNumber16("H0", "mm", 600, 100, 2e3, 1),
|
|
5335
|
+
pNumber16("D7", "mm", 500, 10, 2e3, 1),
|
|
5336
|
+
pNumber16("D8", "mm", 100, 10, 2e3, 1),
|
|
5337
|
+
pNumber16("WW2", "mm", 1e3, 100, 4e3, 1),
|
|
5338
|
+
pNumber16("WW3", "mm", 100, 1, 500, 1),
|
|
5339
|
+
pSectionSeparator16("Wheels details"),
|
|
5340
|
+
pNumber16("W6", "mm", 500, 10, 2e3, 1),
|
|
5341
|
+
pNumber16("W7", "mm", 600, 10, 2e3, 1),
|
|
5342
|
+
pNumber16("W8", "mm", 300, 10, 2e3, 1),
|
|
5343
|
+
pNumber16("H6", "mm", 300, 10, 2e3, 1),
|
|
5344
|
+
pSectionSeparator16("Front window"),
|
|
5345
|
+
pNumber16("FH1", "mm", 600, 10, 3e3, 1),
|
|
5346
|
+
pNumber16("FW1", "mm", 100, 10, 3e3, 1),
|
|
5347
|
+
pNumber16("FR1", "mm", 100, 0, 500, 1),
|
|
5348
|
+
pNumber16("FH3", "mm", 100, 10, 3e3, 1),
|
|
5349
|
+
pNumber16("FW3", "mm", 300, 10, 3e3, 1),
|
|
5350
|
+
pNumber16("FR3", "mm", 100, 0, 500, 1),
|
|
5351
|
+
pSectionSeparator16("Top"),
|
|
5352
|
+
pDropdown8("topStyle", ["mirador", "sky", "roof"]),
|
|
5353
|
+
pNumber16("H5", "mm", 300, 10, 2e3, 1),
|
|
5354
|
+
pNumber16("W4", "mm", 500, 10, 5e3, 1),
|
|
5355
|
+
pNumber16("W5", "mm", 1e3, 10, 5e3, 1),
|
|
5356
|
+
pNumber16("R5", "mm", 50, 1, 500, 1),
|
|
5357
|
+
pNumber16("S5", "mm", 200, 10, 500, 1),
|
|
5358
|
+
pSectionSeparator16("Wall"),
|
|
5359
|
+
pCheckbox9("sideWall", true),
|
|
5360
|
+
pNumber16("U1", "mm", 100, 10, 1e3, 1),
|
|
5361
|
+
pNumber16("U2", "mm", 500, 10, 3e3, 1),
|
|
5362
|
+
pNumber16("U3", "mm", 400, 10, 3e3, 1),
|
|
5363
|
+
pNumber16("V1", "mm", 600, 10, 3e3, 1),
|
|
5364
|
+
pNumber16("V2", "mm", 400, 10, 3e3, 1),
|
|
5365
|
+
pNumber16("JR1", "mm", 100, 0, 2e3, 1),
|
|
5366
|
+
pNumber16("JR2", "mm", 100, 0, 2e3, 1),
|
|
5367
|
+
pNumber16("JR3", "mm", 100, 0, 2e3, 1),
|
|
5368
|
+
pNumber16("JR4", "mm", 100, 0, 2e3, 1),
|
|
5369
|
+
pNumber16("JR5", "mm", 100, 0, 2e3, 1),
|
|
5370
|
+
pNumber16("JR6", "mm", 100, 0, 2e3, 1)
|
|
4284
5371
|
],
|
|
4285
5372
|
paramSvg: {
|
|
4286
5373
|
L1: "capsule_side.svg",
|
|
@@ -4337,21 +5424,21 @@ var pDef14 = {
|
|
|
4337
5424
|
// every 0.5 second
|
|
4338
5425
|
}
|
|
4339
5426
|
};
|
|
4340
|
-
function
|
|
4341
|
-
const rGeome =
|
|
4342
|
-
const figBody =
|
|
4343
|
-
const figWheels =
|
|
4344
|
-
const figFront =
|
|
4345
|
-
const figTop =
|
|
4346
|
-
const figTopInt =
|
|
4347
|
-
const figTopTop =
|
|
4348
|
-
const figTopLeg =
|
|
4349
|
-
const figWall =
|
|
5427
|
+
function pGeom16(t, param, suffix = "") {
|
|
5428
|
+
const rGeome = initGeom16(pDef16.partName + suffix);
|
|
5429
|
+
const figBody = figure13();
|
|
5430
|
+
const figWheels = figure13();
|
|
5431
|
+
const figFront = figure13();
|
|
5432
|
+
const figTop = figure13();
|
|
5433
|
+
const figTopInt = figure13();
|
|
5434
|
+
const figTopTop = figure13();
|
|
5435
|
+
const figTopLeg = figure13();
|
|
5436
|
+
const figWall = figure13();
|
|
4350
5437
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
4351
5438
|
`;
|
|
4352
5439
|
try {
|
|
4353
5440
|
let ctrBody2 = function(withBat) {
|
|
4354
|
-
const rCtr =
|
|
5441
|
+
const rCtr = contour16(-L12, param.H0);
|
|
4355
5442
|
if (withBat) {
|
|
4356
5443
|
rCtr.addSegStrokeR(Wwheels, 0).addSegStrokeR(0, -Hbatterie).addSegStrokeR(Lbatterie, 0).addSegStrokeR(0, Hbatterie).addSegStrokeR(Wwheels, 0);
|
|
4357
5444
|
} else {
|
|
@@ -4360,21 +5447,21 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4360
5447
|
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);
|
|
4361
5448
|
return rCtr;
|
|
4362
5449
|
}, ctrWheels2 = function(sign) {
|
|
4363
|
-
const rCtr =
|
|
5450
|
+
const rCtr = contour16(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();
|
|
4364
5451
|
return rCtr;
|
|
4365
5452
|
}, makeCtrTop2 = function(radius) {
|
|
4366
|
-
const rCtr =
|
|
5453
|
+
const rCtr = contour16(-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();
|
|
4367
5454
|
return rCtr;
|
|
4368
5455
|
}, ctrSideWindow2 = function(sign) {
|
|
4369
5456
|
const p0x = sign * (Ltotal / 2 - param.U1);
|
|
4370
5457
|
const p0y = param.H0 + param.H1 + param.H2 - UH2dy;
|
|
4371
|
-
const rCtr =
|
|
5458
|
+
const rCtr = contour16(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();
|
|
4372
5459
|
return rCtr;
|
|
4373
5460
|
}, volWheel2 = function(posX, idx) {
|
|
4374
5461
|
return {
|
|
4375
5462
|
outName: `subpax_${designName}_wheel${idx}`,
|
|
4376
5463
|
face: `${designName}_faceWheels`,
|
|
4377
|
-
extrudeMethod:
|
|
5464
|
+
extrudeMethod: EExtrude12.eRotate,
|
|
4378
5465
|
rotate: [0, 0, 0],
|
|
4379
5466
|
translate: [posX, R7, 0]
|
|
4380
5467
|
};
|
|
@@ -4382,7 +5469,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4382
5469
|
return {
|
|
4383
5470
|
outName: `subpax_${designName}_topLeg${idx}`,
|
|
4384
5471
|
face: `${designName}_faceTopLeg`,
|
|
4385
|
-
extrudeMethod:
|
|
5472
|
+
extrudeMethod: EExtrude12.eLinearOrtho,
|
|
4386
5473
|
length: E1,
|
|
4387
5474
|
rotate: [0, rotY, 0],
|
|
4388
5475
|
translate: [posX, 0, posZ]
|
|
@@ -4399,9 +5486,9 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4399
5486
|
const Lbatterie = param.L1 - 2 * Wwheels;
|
|
4400
5487
|
const Lroof = param.L1 + 2 * param.W1 - 2 * param.W3;
|
|
4401
5488
|
const aN1 = Math.atan2(param.H3, -param.W3);
|
|
4402
|
-
const p1 =
|
|
5489
|
+
const p1 = point8(0, 0).translate(-param.W3 / 2, param.H3 / 2).translatePolar(aN1 - pi2, param.C3);
|
|
4403
5490
|
const aN2 = Math.atan2(-param.H3, -param.W3);
|
|
4404
|
-
const p2 =
|
|
5491
|
+
const p2 = point8(0, 0).translate(-param.W3 / 2, -param.H3 / 2).translatePolar(aN2 - pi2, param.C3);
|
|
4405
5492
|
const aN3 = Math.atan2(param.H1, -param.W1);
|
|
4406
5493
|
const L1dx = E1 / Math.tan(aN3 / 2);
|
|
4407
5494
|
const H2dy = E1 / Math.tan((3 * pi2 - aN3) / 2);
|
|
@@ -4410,8 +5497,8 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4410
5497
|
const W3dx = E1 / Math.tan((3 * pi2 - aN4) / 2);
|
|
4411
5498
|
const W3b = param.W3 - E1 + W3dx;
|
|
4412
5499
|
const H3b = param.H3 - E1 + H3dy;
|
|
4413
|
-
const p1b =
|
|
4414
|
-
const p2b =
|
|
5500
|
+
const p1b = point8(0, 0).translate(-W3b / 2, H3b / 2).translatePolar(aN1 - pi2, param.C3);
|
|
5501
|
+
const p2b = point8(0, 0).translate(-W3b / 2, -H3b / 2).translatePolar(aN2 - pi2, param.C3);
|
|
4415
5502
|
const iR1 = Math.max(0, param.R1 - E1);
|
|
4416
5503
|
const iR2 = Math.max(0, param.R2 - E1);
|
|
4417
5504
|
const iR3 = Math.max(0, param.R3 - E1);
|
|
@@ -4419,7 +5506,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4419
5506
|
const UH2dy = param.U1 / Math.tan((3 * pi2 - aN3) / 2);
|
|
4420
5507
|
const UW3b = param.W3 - param.U1 + param.U1 / Math.tan((3 * pi2 - aN4) / 2);
|
|
4421
5508
|
const UH3b = param.H3 - param.U1 + param.U1 / Math.tan(aN4 / 2);
|
|
4422
|
-
const p1ub =
|
|
5509
|
+
const p1ub = point8(0, 0).translate(-UW3b / 2, UH3b / 2).translatePolar(aN1 - pi2, param.C3);
|
|
4423
5510
|
const Ltotal = param.L1 + 2 * param.W1;
|
|
4424
5511
|
const Htotal = param.H1 + param.H2 + param.H3;
|
|
4425
5512
|
const LwallDoor = Ltotal - 2 * (param.U1 + UW3b + param.U2 + param.U3);
|
|
@@ -4454,45 +5541,45 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4454
5541
|
const HfrontWin = Htotal - param.FH1 - param.FH3;
|
|
4455
5542
|
const Ltot2 = Ltotal + 200;
|
|
4456
5543
|
if (param.L1 - 2 * Wwheels < 2 * E1) {
|
|
4457
|
-
throw `err176: L1 ${
|
|
5544
|
+
throw `err176: L1 ${ffix17(param.L1)} is too small compare to W6 ${ffix17(param.W6)}, W7 ${ffix17(param.W7)} and W8 ${ffix17(param.W8)} mm`;
|
|
4458
5545
|
}
|
|
4459
5546
|
if (Hbatterie < E1) {
|
|
4460
|
-
throw `err114: Hbatterie ${
|
|
5547
|
+
throw `err114: Hbatterie ${ffix17(Hbatterie)} is too small compare to E1 ${ffix17(E1)} mm`;
|
|
4461
5548
|
}
|
|
4462
5549
|
if (Lbatterie < 2 * E1) {
|
|
4463
|
-
throw `err118: Lbatterie ${
|
|
5550
|
+
throw `err118: Lbatterie ${ffix17(Lbatterie)} is too small compare to E1 ${ffix17(E1)} mm`;
|
|
4464
5551
|
}
|
|
4465
5552
|
if (L5 < 3 * param.R5 + param.W5) {
|
|
4466
|
-
throw `err122: L5 ${
|
|
5553
|
+
throw `err122: L5 ${ffix17(L5)} is too small compare to W5 ${ffix17(param.W5)} and R5 ${ffix17(param.R5)} mm`;
|
|
4467
5554
|
}
|
|
4468
5555
|
if (H53 < 0.1) {
|
|
4469
|
-
throw `err220: H5 ${
|
|
5556
|
+
throw `err220: H5 ${ffix17(param.H5)} is too small compare to R5 ${ffix17(param.R5)} mm`;
|
|
4470
5557
|
}
|
|
4471
|
-
rGeome.logstr += `Platform surface: ${
|
|
5558
|
+
rGeome.logstr += `Platform surface: ${ffix17(platSurface)} m2, height: ${ffix17(heightTot / 1e3)} m
|
|
4472
5559
|
`;
|
|
4473
|
-
rGeome.logstr += `Lroof: ${
|
|
5560
|
+
rGeome.logstr += `Lroof: ${ffix17(Lroof)}, L5: ${ffix17(L5)} mm
|
|
4474
5561
|
`;
|
|
4475
|
-
rGeome.logstr += `Ltotal: ${
|
|
5562
|
+
rGeome.logstr += `Ltotal: ${ffix17(Ltotal / 1e3)}, Htotal: ${ffix17(Htotal / 1e3)} m
|
|
4476
5563
|
`;
|
|
4477
|
-
rGeome.logstr += `Batterie: LbatInt ${
|
|
5564
|
+
rGeome.logstr += `Batterie: LbatInt ${ffix17(LbatInt)}, HbatInt: ${ffix17(HbatInt)}, WW1 ${ffix17(param.WW1)} mm
|
|
4478
5565
|
`;
|
|
4479
5566
|
const ctrBodyExt = ctrBody2(true);
|
|
4480
|
-
const ctrBodyInt =
|
|
5567
|
+
const ctrBodyInt = contour16(-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);
|
|
4481
5568
|
const ctrBatterie = ctrRectangle7(-LbatInt2, posYbatterie, LbatInt, HbatInt);
|
|
4482
5569
|
figBody.addMainOI([ctrBodyExt, ctrBodyInt, ctrBatterie]);
|
|
4483
|
-
figBody.addSecond(
|
|
4484
|
-
figBody.addSecond(
|
|
4485
|
-
figBody.addSecond(
|
|
4486
|
-
figBody.addSecond(
|
|
4487
|
-
figBody.addSecond(
|
|
4488
|
-
figBody.addSecond(
|
|
4489
|
-
figBody.addSecond(
|
|
4490
|
-
figBody.addSecond(
|
|
5570
|
+
figBody.addSecond(contourCircle14(-posXwheel1, R7, R7));
|
|
5571
|
+
figBody.addSecond(contourCircle14(-posXwheel1, R7, R8));
|
|
5572
|
+
figBody.addSecond(contourCircle14(-posXwheel2, R7, R7));
|
|
5573
|
+
figBody.addSecond(contourCircle14(-posXwheel2, R7, R8));
|
|
5574
|
+
figBody.addSecond(contourCircle14(posXwheel1, R7, R7));
|
|
5575
|
+
figBody.addSecond(contourCircle14(posXwheel1, R7, R8));
|
|
5576
|
+
figBody.addSecond(contourCircle14(posXwheel2, R7, R7));
|
|
5577
|
+
figBody.addSecond(contourCircle14(posXwheel2, R7, R8));
|
|
4491
5578
|
figBody.addSecond(ctrRectangle7(-L52, posYtop, L5, param.H5));
|
|
4492
5579
|
figBody.addSecond(ctrRectangle7(-L52 - param.S5, posYtop2, L5 + 2 * param.S5, E1));
|
|
4493
5580
|
figWheels.addMainO(ctrWheels2(1));
|
|
4494
5581
|
figWheels.addSecond(ctrWheels2(-1));
|
|
4495
|
-
const ctrFront =
|
|
5582
|
+
const ctrFront = contour16(-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();
|
|
4496
5583
|
figFront.addMainO(ctrFront);
|
|
4497
5584
|
figFront.addSecond(ctrWheels2(1).rotate(0, 0, pi2).translate(WW12, R7));
|
|
4498
5585
|
figFront.addSecond(ctrWheels2(-1).rotate(0, 0, pi2).translate(WW12, R7));
|
|
@@ -4522,10 +5609,10 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4522
5609
|
figTopInt.mergeFigure(figTop, true);
|
|
4523
5610
|
figTopTop.addMainO(ctrTopTop);
|
|
4524
5611
|
figTopTop.mergeFigure(figTop, true);
|
|
4525
|
-
const ctrTopLeg =
|
|
5612
|
+
const ctrTopLeg = contour16(-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();
|
|
4526
5613
|
figTopLeg.addMainO(ctrTopLeg);
|
|
4527
5614
|
figFront.addSecond(ctrTopLeg);
|
|
4528
|
-
const ctrDoor =
|
|
5615
|
+
const ctrDoor = contour16(-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();
|
|
4529
5616
|
figWall.addMainOI([ctrBody2(false), ctrSideWindow2(1), ctrSideWindow2(-1), ctrDoor]);
|
|
4530
5617
|
figWall.mergeFigure(figBody, true);
|
|
4531
5618
|
rGeome.fig = {
|
|
@@ -4568,7 +5655,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4568
5655
|
{
|
|
4569
5656
|
outName: `subpax_${designName}_body`,
|
|
4570
5657
|
face: `${designName}_faceBody`,
|
|
4571
|
-
extrudeMethod:
|
|
5658
|
+
extrudeMethod: EExtrude12.eLinearOrtho,
|
|
4572
5659
|
length: param.WW1,
|
|
4573
5660
|
rotate: [0, 0, 0],
|
|
4574
5661
|
translate: [0, 0, 0]
|
|
@@ -4580,7 +5667,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4580
5667
|
{
|
|
4581
5668
|
outName: `subpax_${designName}_frontWin`,
|
|
4582
5669
|
face: `${designName}_faceFront`,
|
|
4583
|
-
extrudeMethod:
|
|
5670
|
+
extrudeMethod: EExtrude12.eLinearOrtho,
|
|
4584
5671
|
length: Ltot2,
|
|
4585
5672
|
rotate: [0, pi2, 0],
|
|
4586
5673
|
translate: [-Ltot2 / 2, 0, WW12]
|
|
@@ -4588,7 +5675,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4588
5675
|
{
|
|
4589
5676
|
outName: `subpax_${designName}_topInt`,
|
|
4590
5677
|
face: `${designName}_faceTopInt`,
|
|
4591
|
-
extrudeMethod:
|
|
5678
|
+
extrudeMethod: EExtrude12.eLinearOrtho,
|
|
4592
5679
|
length: 3 * E1,
|
|
4593
5680
|
rotate: [-pi2, 0, 0],
|
|
4594
5681
|
translate: [0, posYtop - 2 * E1, WW12]
|
|
@@ -4596,7 +5683,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4596
5683
|
{
|
|
4597
5684
|
outName: `subpax_${designName}_top1`,
|
|
4598
5685
|
face: `${designName}_faceTop`,
|
|
4599
|
-
extrudeMethod:
|
|
5686
|
+
extrudeMethod: EExtrude12.eLinearOrtho,
|
|
4600
5687
|
length: param.R5,
|
|
4601
5688
|
rotate: [-pi2, 0, 0],
|
|
4602
5689
|
translate: [0, posYtop, WW12]
|
|
@@ -4604,7 +5691,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4604
5691
|
{
|
|
4605
5692
|
outName: `subpax_${designName}_top2`,
|
|
4606
5693
|
face: `${designName}_faceTop`,
|
|
4607
|
-
extrudeMethod:
|
|
5694
|
+
extrudeMethod: EExtrude12.eLinearOrtho,
|
|
4608
5695
|
length: param.R5,
|
|
4609
5696
|
rotate: [-pi2, 0, 0],
|
|
4610
5697
|
translate: [0, posYtop2 - param.R5, WW12]
|
|
@@ -4612,7 +5699,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4612
5699
|
{
|
|
4613
5700
|
outName: `subpax_${designName}_topTop`,
|
|
4614
5701
|
face: `${designName}_faceTopTop`,
|
|
4615
|
-
extrudeMethod:
|
|
5702
|
+
extrudeMethod: EExtrude12.eLinearOrtho,
|
|
4616
5703
|
length: E1,
|
|
4617
5704
|
rotate: [-pi2, 0, 0],
|
|
4618
5705
|
translate: [0, posYtop2, WW12]
|
|
@@ -4626,7 +5713,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4626
5713
|
{
|
|
4627
5714
|
outName: `subpax_${designName}_wall1`,
|
|
4628
5715
|
face: `${designName}_faceWall`,
|
|
4629
|
-
extrudeMethod:
|
|
5716
|
+
extrudeMethod: EExtrude12.eLinearOrtho,
|
|
4630
5717
|
length: E1,
|
|
4631
5718
|
rotate: [0, 0, 0],
|
|
4632
5719
|
translate: [0, 0, 0]
|
|
@@ -4634,7 +5721,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4634
5721
|
{
|
|
4635
5722
|
outName: `subpax_${designName}_wall2`,
|
|
4636
5723
|
face: `${designName}_faceWall`,
|
|
4637
|
-
extrudeMethod:
|
|
5724
|
+
extrudeMethod: EExtrude12.eLinearOrtho,
|
|
4638
5725
|
length: E1,
|
|
4639
5726
|
rotate: [0, 0, 0],
|
|
4640
5727
|
translate: [0, 0, param.WW1 - E1]
|
|
@@ -4643,7 +5730,7 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4643
5730
|
volumes: [
|
|
4644
5731
|
{
|
|
4645
5732
|
outName: `ipax_${designName}_plus`,
|
|
4646
|
-
boolMethod:
|
|
5733
|
+
boolMethod: EBVolume12.eUnion,
|
|
4647
5734
|
inList: [
|
|
4648
5735
|
`subpax_${designName}_body`,
|
|
4649
5736
|
`subpax_${designName}_wheel1`,
|
|
@@ -4656,12 +5743,12 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4656
5743
|
},
|
|
4657
5744
|
{
|
|
4658
5745
|
outName: `ipax_${designName}_minus`,
|
|
4659
|
-
boolMethod:
|
|
5746
|
+
boolMethod: EBVolume12.eUnion,
|
|
4660
5747
|
inList: [`subpax_${designName}_frontWin`, ...roofHoleList]
|
|
4661
5748
|
},
|
|
4662
5749
|
{
|
|
4663
5750
|
outName: `pax_${designName}`,
|
|
4664
|
-
boolMethod:
|
|
5751
|
+
boolMethod: EBVolume12.eSubstraction,
|
|
4665
5752
|
inList: [`ipax_${designName}_plus`, `ipax_${designName}_minus`]
|
|
4666
5753
|
}
|
|
4667
5754
|
]
|
|
@@ -4678,16 +5765,18 @@ function pGeom14(t, param, suffix = "") {
|
|
|
4678
5765
|
var capsuleDef = {
|
|
4679
5766
|
pTitle: "capsule",
|
|
4680
5767
|
pDescription: "high-level concept of the train-capsule",
|
|
4681
|
-
pDef:
|
|
4682
|
-
pGeom:
|
|
5768
|
+
pDef: pDef16,
|
|
5769
|
+
pGeom: pGeom16
|
|
4683
5770
|
};
|
|
4684
5771
|
export {
|
|
4685
5772
|
capsuleDef,
|
|
4686
5773
|
door1arcDef,
|
|
5774
|
+
doubleBoneDef,
|
|
4687
5775
|
heliostatDef,
|
|
4688
5776
|
houseDef,
|
|
4689
5777
|
plugTorqueDef,
|
|
4690
5778
|
rccarDef,
|
|
5779
|
+
singleBoneDef,
|
|
4691
5780
|
springIntDef,
|
|
4692
5781
|
springOneDef,
|
|
4693
5782
|
springSideDef,
|