designix 0.5.22 → 0.5.23
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.js +9 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4379,8 +4379,8 @@ var pDef14 = {
|
|
|
4379
4379
|
partName: "surface",
|
|
4380
4380
|
params: [
|
|
4381
4381
|
//pNumber(name, unit, init, min, max, step)
|
|
4382
|
-
pNumber14("LH", "mm", 1600,
|
|
4383
|
-
pNumber14("LV", "mm", 1e3,
|
|
4382
|
+
pNumber14("LH", "mm", 1600, 10, 4e3, 1),
|
|
4383
|
+
pNumber14("LV", "mm", 1e3, 10, 4e3, 1),
|
|
4384
4384
|
pNumber14("LZ", "mm", 40, 0, 100, 1),
|
|
4385
4385
|
pNumber14("nx", "", 9, 1, 40, 1),
|
|
4386
4386
|
pNumber14("ny", "", 9, 1, 40, 1),
|
|
@@ -4471,6 +4471,7 @@ function pGeom14(t, param) {
|
|
|
4471
4471
|
const ELateralCycle = param.main_direction === 0 ? param.EV_cycle : param.EH_cycle;
|
|
4472
4472
|
const ELateralStart = param.main_direction === 0 ? param.EV_start : param.EH_start;
|
|
4473
4473
|
const ELateralShape = param.main_direction === 0 ? param.EV_shape : param.EH_shape;
|
|
4474
|
+
const lenLateralMax = Math.max(lenLateral, param.first_row, param.second_row);
|
|
4474
4475
|
const lenRow = [];
|
|
4475
4476
|
for (let i = 0; i < lenMain; i++) {
|
|
4476
4477
|
const iEven = (i + 1) % 2;
|
|
@@ -4528,10 +4529,10 @@ function pGeom14(t, param) {
|
|
|
4528
4529
|
eMainCumul.push(eMainTotal);
|
|
4529
4530
|
});
|
|
4530
4531
|
const eLateral = [];
|
|
4531
|
-
for (let i = 0; i <
|
|
4532
|
+
for (let i = 0; i < lenLateralMax - 1; i++) {
|
|
4532
4533
|
let eSpace = ELateral;
|
|
4533
4534
|
if (ELateralGradient === 1) {
|
|
4534
|
-
const gapNb =
|
|
4535
|
+
const gapNb = lenLateralMax > 2 ? lenLateralMax - 2 : 1;
|
|
4535
4536
|
const phase = (ELateralStart + i * ELateralCycle / gapNb) % 1;
|
|
4536
4537
|
switch (ELateralShape) {
|
|
4537
4538
|
case 0:
|
|
@@ -4563,9 +4564,9 @@ function pGeom14(t, param) {
|
|
|
4563
4564
|
let gLenVertical = 0;
|
|
4564
4565
|
if (param.main_direction === 0) {
|
|
4565
4566
|
gLenHorizontal = lenMain * param.LH + eMainTotal;
|
|
4566
|
-
gLenVertical =
|
|
4567
|
+
gLenVertical = lenLateralMax * param.LV + eLateralTotal;
|
|
4567
4568
|
} else {
|
|
4568
|
-
gLenHorizontal =
|
|
4569
|
+
gLenHorizontal = lenLateralMax * param.LH + eLateralTotal;
|
|
4569
4570
|
gLenVertical = lenMain * param.LV + eMainTotal;
|
|
4570
4571
|
}
|
|
4571
4572
|
const gArea = gLenHorizontal * gLenVertical / 10 ** 6;
|
|
@@ -4585,8 +4586,8 @@ function pGeom14(t, param) {
|
|
|
4585
4586
|
};
|
|
4586
4587
|
const panelPositions = [];
|
|
4587
4588
|
lenRow.forEach((oneRow, rowIdx) => {
|
|
4588
|
-
const half = (
|
|
4589
|
-
const offset = Math.floor((
|
|
4589
|
+
const half = (lenLateralMax - oneRow) % 2;
|
|
4590
|
+
const offset = Math.floor((lenLateralMax - oneRow) / 2);
|
|
4590
4591
|
for (let pIdx = 0; pIdx < oneRow; pIdx++) {
|
|
4591
4592
|
let dx = 0;
|
|
4592
4593
|
let dy = 0;
|