rm-graphical-computing-node 1.0.103 → 1.0.104
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 +51 -9
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5002,7 +5002,9 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
5002
5002
|
let ptCenterOther = ptCenter.clone().addScaledVector(vecNegate, dist2 + 0.1);
|
|
5003
5003
|
let isInsert = segmentsIntersect2D(line3.start, line3.end, ptCenter, ptCenterOther);
|
|
5004
5004
|
let isTrue = !isDoor && !tmpDoorBeamData.isDoor && (length1 > length22 * 2.5 || length22 > length1 * 2.5);
|
|
5005
|
-
|
|
5005
|
+
let ptClose1 = line3.closestPointToPoint(ptCenter, false, targetVector);
|
|
5006
|
+
let minDist = ptClose1.distanceTo(ptCenter);
|
|
5007
|
+
if (minDist > 0.01 && dist2 < 0.5 && isInsert != null && !isTrue) {
|
|
5006
5008
|
let isSameLine = false;
|
|
5007
5009
|
for (let v2 = 0; v2 < line2.doorAndBeamData.length; v2++) {
|
|
5008
5010
|
if (line2.doorAndBeamData[v2].id == tmpDoorBeamData.id) {
|
|
@@ -6067,7 +6069,11 @@ var getColLine = async (lines, runDataList, collectDataPath, pointCloudCluster =
|
|
|
6067
6069
|
endPt4 = endPt5.clone();
|
|
6068
6070
|
} else if (isEq12) {
|
|
6069
6071
|
endPt4 = startPt5.clone();
|
|
6070
|
-
} else
|
|
6072
|
+
} else {
|
|
6073
|
+
unreasonable = true;
|
|
6074
|
+
break;
|
|
6075
|
+
}
|
|
6076
|
+
;
|
|
6071
6077
|
isEq5 = ptIsEqual(startPt4, startPt1);
|
|
6072
6078
|
isEq6 = ptIsEqual(startPt4, endPt1);
|
|
6073
6079
|
isEq7 = ptIsEqual(endPt4, startPt1);
|
|
@@ -6092,8 +6098,9 @@ var getColLine = async (lines, runDataList, collectDataPath, pointCloudCluster =
|
|
|
6092
6098
|
if (unreasonable)
|
|
6093
6099
|
break;
|
|
6094
6100
|
}
|
|
6095
|
-
if (isRect)
|
|
6101
|
+
if (isRect) {
|
|
6096
6102
|
colDatas.rectangles.push(result[i].uuids);
|
|
6103
|
+
}
|
|
6097
6104
|
}
|
|
6098
6105
|
for (let i = 0; i < lines.length; i++) {
|
|
6099
6106
|
let length1 = lines[i].length;
|
|
@@ -14576,14 +14583,21 @@ var getWindowPcdData = (lines, pcdData) => {
|
|
|
14576
14583
|
line2.drawWindow = [];
|
|
14577
14584
|
let p = getMid(ptWindowSt, ptWindowEd);
|
|
14578
14585
|
p.z = line2.start.z;
|
|
14579
|
-
|
|
14586
|
+
let windowData = {
|
|
14580
14587
|
p,
|
|
14581
14588
|
full: false,
|
|
14582
14589
|
groundClearance,
|
|
14583
14590
|
height,
|
|
14584
14591
|
width: ptWindowSt.distanceTo(ptWindowEd),
|
|
14585
14592
|
obj_id: pcd.obj_id
|
|
14586
|
-
}
|
|
14593
|
+
};
|
|
14594
|
+
let windowLocationIsTrue = true;
|
|
14595
|
+
if ((line2.isPassageEntrance || line2.inPassageEntranceDoor) && line2.passageEntrance && line2.passageEntrance.length) {
|
|
14596
|
+
windowLocationIsTrue = checkWindowLocationIsTrue(windowData, line2.passageEntrance);
|
|
14597
|
+
}
|
|
14598
|
+
if (!windowLocationIsTrue)
|
|
14599
|
+
continue;
|
|
14600
|
+
line2.drawWindow.push(windowData);
|
|
14587
14601
|
line2.isWindow = true;
|
|
14588
14602
|
pcd.isWindowDoor = true;
|
|
14589
14603
|
} else if (intersect1 != null || intersect2 != null) {
|
|
@@ -14618,14 +14632,21 @@ var getWindowPcdData = (lines, pcdData) => {
|
|
|
14618
14632
|
line2.drawWindow = [];
|
|
14619
14633
|
let p = getMid(ptWindowSt, ptWindowEd);
|
|
14620
14634
|
p.z = line2.start.z;
|
|
14621
|
-
|
|
14635
|
+
let windowData = {
|
|
14622
14636
|
p,
|
|
14623
14637
|
full: false,
|
|
14624
14638
|
groundClearance,
|
|
14625
14639
|
height,
|
|
14626
14640
|
width: ptWindowSt.distanceTo(ptWindowEd),
|
|
14627
14641
|
obj_id: pcd.obj_id
|
|
14628
|
-
}
|
|
14642
|
+
};
|
|
14643
|
+
let windowLocationIsTrue = true;
|
|
14644
|
+
if ((line2.isPassageEntrance || line2.inPassageEntranceDoor) && line2.passageEntrance && line2.passageEntrance.length) {
|
|
14645
|
+
windowLocationIsTrue = checkWindowLocationIsTrue(windowData, line2.passageEntrance);
|
|
14646
|
+
}
|
|
14647
|
+
if (!windowLocationIsTrue)
|
|
14648
|
+
continue;
|
|
14649
|
+
line2.drawWindow.push(windowData);
|
|
14629
14650
|
line2.isWindow = true;
|
|
14630
14651
|
pcd.isWindowDoor = true;
|
|
14631
14652
|
} else {
|
|
@@ -14665,14 +14686,21 @@ var getWindowPcdData = (lines, pcdData) => {
|
|
|
14665
14686
|
line2.drawWindow = [];
|
|
14666
14687
|
let p = getMid(ptWindowSt, ptWindowEd);
|
|
14667
14688
|
p.z = line2.start.z;
|
|
14668
|
-
|
|
14689
|
+
let windowData = {
|
|
14669
14690
|
p,
|
|
14670
14691
|
full: false,
|
|
14671
14692
|
groundClearance,
|
|
14672
14693
|
height,
|
|
14673
14694
|
width: ptWindowSt.distanceTo(ptWindowEd),
|
|
14674
14695
|
obj_id: pcd.obj_id
|
|
14675
|
-
}
|
|
14696
|
+
};
|
|
14697
|
+
let windowLocationIsTrue = true;
|
|
14698
|
+
if ((line2.isPassageEntrance || line2.inPassageEntranceDoor) && line2.passageEntrance && line2.passageEntrance.length) {
|
|
14699
|
+
windowLocationIsTrue = checkWindowLocationIsTrue(windowData, line2.passageEntrance);
|
|
14700
|
+
}
|
|
14701
|
+
if (!windowLocationIsTrue)
|
|
14702
|
+
continue;
|
|
14703
|
+
line2.drawWindow.push(windowData);
|
|
14676
14704
|
line2.isWindow = true;
|
|
14677
14705
|
pcd.isWindowDoor = true;
|
|
14678
14706
|
}
|
|
@@ -14680,6 +14708,20 @@ var getWindowPcdData = (lines, pcdData) => {
|
|
|
14680
14708
|
}
|
|
14681
14709
|
return lines;
|
|
14682
14710
|
};
|
|
14711
|
+
function checkWindowLocationIsTrue(windowData, passageEntrance) {
|
|
14712
|
+
let windowP = getPt3(windowData.p);
|
|
14713
|
+
let windowLocationIsTrue = true;
|
|
14714
|
+
for (let i = 0; i < passageEntrance.length; i++) {
|
|
14715
|
+
const passage = passageEntrance[i];
|
|
14716
|
+
let passP = getPt3(passage.p);
|
|
14717
|
+
let distance2 = windowP.distanceTo(passP);
|
|
14718
|
+
if (distance2 < passage.width / 2) {
|
|
14719
|
+
windowLocationIsTrue = false;
|
|
14720
|
+
break;
|
|
14721
|
+
}
|
|
14722
|
+
}
|
|
14723
|
+
return windowLocationIsTrue;
|
|
14724
|
+
}
|
|
14683
14725
|
|
|
14684
14726
|
// src/geometry/door.mjs
|
|
14685
14727
|
import * as THREE11 from "three";
|