rm-graphical-computing-node 1.0.159 → 1.0.161
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.mjs +24 -16
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8274,6 +8274,9 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
8274
8274
|
let findDoorIndexs = [];
|
|
8275
8275
|
let allDoorLines1 = [];
|
|
8276
8276
|
let nearDist = 0.15;
|
|
8277
|
+
const doorAndDoorFrameDatas = [...doorDatas];
|
|
8278
|
+
doorAndDoorFrameDatas.push(...doorFrame);
|
|
8279
|
+
doorAndDoorFrameDatas.push(...metalFraming);
|
|
8277
8280
|
for (let index = 0; index < lines.length; index++) {
|
|
8278
8281
|
if (onProgress != null)
|
|
8279
8282
|
onProgress((index + 1) / lines.length * 60);
|
|
@@ -8685,9 +8688,6 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
8685
8688
|
length2 = beamTmpEd.distanceTo(beamTmpSt);
|
|
8686
8689
|
}
|
|
8687
8690
|
if (lengthPercentage < 85 && length2 > 0.3 || length2 > 0.7 && height > floorHeightTmp - floorHeightTmp / 2) {
|
|
8688
|
-
const doorAndDoorFrameDatas = [...doorDatas];
|
|
8689
|
-
doorAndDoorFrameDatas.push(...doorFrame);
|
|
8690
|
-
doorAndDoorFrameDatas.push(...metalFraming);
|
|
8691
8691
|
if (!line2.isLine2) {
|
|
8692
8692
|
if (length2 < 2.5) {
|
|
8693
8693
|
for (let n = 0; n < doorAndDoorFrameDatas.length; n++) {
|
|
@@ -8779,6 +8779,7 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
8779
8779
|
}
|
|
8780
8780
|
if (doorAndDoorFrameDatas[n].category == "metal framing of interior glass partitions") {
|
|
8781
8781
|
findMetalFraming = true;
|
|
8782
|
+
findDoorDataIndex = n;
|
|
8782
8783
|
continue;
|
|
8783
8784
|
}
|
|
8784
8785
|
obj_id = doorAndDoorFrameDatas[n].obj_id;
|
|
@@ -8827,6 +8828,9 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
8827
8828
|
findDoorFrame = true;
|
|
8828
8829
|
continue;
|
|
8829
8830
|
}
|
|
8831
|
+
if (doorAndDoorFrameDatas[n].category == "metal framing of interior glass partitions") {
|
|
8832
|
+
continue;
|
|
8833
|
+
}
|
|
8830
8834
|
let tmppLine3 = new THREE5.Line3(beamSt, beamEd);
|
|
8831
8835
|
if (dist11 < nearDist || dist33 < nearDist) {
|
|
8832
8836
|
doorOpenEndPoint = beamSt.clone();
|
|
@@ -8900,8 +8904,8 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
8900
8904
|
if (isOverlap) {
|
|
8901
8905
|
if (findDoorDataIndex != -1) {
|
|
8902
8906
|
if (!beforePcdDoorIsFindBeam) {
|
|
8903
|
-
pcdData[
|
|
8904
|
-
|
|
8907
|
+
pcdData[doorAndDoorFrameDatas[findDoorDataIndex].index].isFindBeam = false;
|
|
8908
|
+
doorAndDoorFrameDatas[findDoorDataIndex].isFind = false;
|
|
8905
8909
|
}
|
|
8906
8910
|
}
|
|
8907
8911
|
continue;
|
|
@@ -9022,8 +9026,8 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
9022
9026
|
isOverlap = true;
|
|
9023
9027
|
if (findDoorDataIndex != -1) {
|
|
9024
9028
|
if (!beforePcdDoorIsFindBeam) {
|
|
9025
|
-
pcdData[
|
|
9026
|
-
|
|
9029
|
+
pcdData[doorAndDoorFrameDatas[findDoorDataIndex].index].isFindBeam = false;
|
|
9030
|
+
doorAndDoorFrameDatas[findDoorDataIndex].isFind = false;
|
|
9027
9031
|
}
|
|
9028
9032
|
}
|
|
9029
9033
|
if (nearLineIndex != -1 && nearDoorIndex != -1) {
|
|
@@ -9069,8 +9073,8 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
9069
9073
|
if (isDoor && nearWall && !isPullOutDoor && !checkResultInWindow) {
|
|
9070
9074
|
if (findDoorDataIndex != -1) {
|
|
9071
9075
|
if (!beforePcdDoorIsFindBeam) {
|
|
9072
|
-
pcdData[
|
|
9073
|
-
|
|
9076
|
+
pcdData[doorAndDoorFrameDatas[findDoorDataIndex].index].isFindBeam = false;
|
|
9077
|
+
doorAndDoorFrameDatas[findDoorDataIndex].isFind = false;
|
|
9074
9078
|
}
|
|
9075
9079
|
}
|
|
9076
9080
|
continue;
|
|
@@ -9190,13 +9194,13 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
9190
9194
|
let targetVector = new THREE5.Vector3();
|
|
9191
9195
|
let ptClose = line3.closestPointToPoint(ptCenter, true, targetVector);
|
|
9192
9196
|
let dist2 = ptClose.distanceTo(ptCenter);
|
|
9193
|
-
let
|
|
9197
|
+
let ptClose1 = line3.closestPointToPoint(ptCenter, false, targetVector);
|
|
9198
|
+
let minDist = ptClose1.distanceTo(ptCenter);
|
|
9199
|
+
let vec2 = new THREE5.Vector3().subVectors(ptCenter, ptClose1).normalize();
|
|
9194
9200
|
let vecNegate = vec2.clone().negate();
|
|
9195
9201
|
let ptCenterOther = ptCenter.clone().addScaledVector(vecNegate, dist2 + 0.1);
|
|
9196
9202
|
let isInsert = segmentsIntersect2D(line3.start, line3.end, ptCenter, ptCenterOther);
|
|
9197
9203
|
let isTrue = !isDoor && !tmpDoorBeamData.isDoor && (length1 > length22 * 2.5 || length22 > length1 * 2.5);
|
|
9198
|
-
let ptClose1 = line3.closestPointToPoint(ptCenter, false, targetVector);
|
|
9199
|
-
let minDist = ptClose1.distanceTo(ptCenter);
|
|
9200
9204
|
if (minDist > 0.01 && dist2 < 0.65 && isInsert != null && !isTrue) {
|
|
9201
9205
|
let isSameLine = false;
|
|
9202
9206
|
for (let v2 = 0; v2 < line2.doorAndBeamData.length; v2++) {
|
|
@@ -9375,7 +9379,7 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
9375
9379
|
let ptDoorSt = doorAndBeamDataObj.doorStart.clone();
|
|
9376
9380
|
let ptDoorEd = doorAndBeamDataObj.doorEnd.clone();
|
|
9377
9381
|
const doorLength = ptDoorSt.distanceTo(ptDoorEd);
|
|
9378
|
-
const doorPcd =
|
|
9382
|
+
const doorPcd = doorAndDoorFrameDatas[findDoorDataIndex];
|
|
9379
9383
|
const ptDoorPcdSt = doorPcd.doorStartPt.clone();
|
|
9380
9384
|
const ptDoorPcdEd = doorPcd.doorEndPt.clone();
|
|
9381
9385
|
let pcdLength = doorPcd.length;
|
|
@@ -10365,7 +10369,7 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
10365
10369
|
}
|
|
10366
10370
|
newDrawWindowData1.push(line2.drawWindow[j]);
|
|
10367
10371
|
} else if (isPointOnLine2(ptDoorSt, ptDoorEd, p, 1e-3, true))
|
|
10368
|
-
|
|
10372
|
+
continue;
|
|
10369
10373
|
else if (isPointOnLine2(ptDoorEd, ptEnd, p, 1e-3, true)) {
|
|
10370
10374
|
let ptW1 = p.clone().addScaledVector(direction, line2.drawWindow[j].width / 2);
|
|
10371
10375
|
let ptW2 = p.clone().addScaledVector(direction, -line2.drawWindow[j].width / 2);
|
|
@@ -14540,8 +14544,10 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
|
|
|
14540
14544
|
for (let k = 0; k < array.length; k++) {
|
|
14541
14545
|
if (array[k].obb == null || delData.has(k) || j == k)
|
|
14542
14546
|
continue;
|
|
14547
|
+
let obbPointsClone = getOBBPoints(arrayJ.obb);
|
|
14543
14548
|
let polygonK = array[k].path.map((point2) => new THREE8.Vector3(point2[0], point2[1], 0));
|
|
14544
|
-
let polygonJ =
|
|
14549
|
+
let polygonJ = [obbPointsClone[0], obbPointsClone[1], obbPointsClone[2], obbPointsClone[3]];
|
|
14550
|
+
polygonJ = setPointsSameZ(polygonJ, 0);
|
|
14545
14551
|
let f = getPolygonIntersectionRatio(polygonK, polygonJ);
|
|
14546
14552
|
if (f > 80) {
|
|
14547
14553
|
delData.add(k);
|
|
@@ -17432,7 +17438,6 @@ var getWindowData = (lines, pcdData, lineReader) => {
|
|
|
17432
17438
|
let isPPP = getParallelism(doorStExtended, doorEdExtended, beamStExtended, beamEdExtended);
|
|
17433
17439
|
if (isPPP.isParallel)
|
|
17434
17440
|
continue;
|
|
17435
|
-
windowToWallAngle = isPPP.angleDeg;
|
|
17436
17441
|
let insertPt = segmentsIntersect2D(doorStExtended, doorEdExtended, beamStExtended, beamEdExtended);
|
|
17437
17442
|
let bIsTrue = true;
|
|
17438
17443
|
let dist11 = doorSt.distanceTo(beamSt);
|
|
@@ -17441,6 +17446,7 @@ var getWindowData = (lines, pcdData, lineReader) => {
|
|
|
17441
17446
|
let dist44 = doorEd.distanceTo(beamEd);
|
|
17442
17447
|
let isNear = dist11 < nearDist || dist22 < nearDist || dist33 < nearDist || dist44 < nearDist;
|
|
17443
17448
|
if ((isNear || insertPt) && bIsTrue) {
|
|
17449
|
+
windowToWallAngle = isPPP.angleDeg;
|
|
17444
17450
|
beforePcdDoorisFindWindow = pcdData[windowDatas[n].index].isFindWindow;
|
|
17445
17451
|
pcdData[windowDatas[n].index].isFindWindow = true;
|
|
17446
17452
|
isWindow = true;
|
|
@@ -18002,6 +18008,8 @@ var getWindowPcdData = (lines, pcdData) => {
|
|
|
18002
18008
|
for (let j = 0; j < lines.length; j++) {
|
|
18003
18009
|
const line3 = lines[j];
|
|
18004
18010
|
if (line3.isRebuild) continue;
|
|
18011
|
+
if (line3.findWindowObjId && line3.findWindowObjId != pcd.obj_id)
|
|
18012
|
+
continue;
|
|
18005
18013
|
let ptStart2 = getPt3(line3.start);
|
|
18006
18014
|
let ptEnd2 = getPt3(line3.end);
|
|
18007
18015
|
ptStart2.z = ptEnd2.z = ptMid1.z;
|