rm-graphical-computing-node 1.0.103 → 1.0.105
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 +69 -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,25 @@ 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 == 1) {
|
|
14596
|
+
const ret = checkWindowLocationIsTrue(windowData, line2.passageEntrance);
|
|
14597
|
+
windowLocationIsTrue = ret.windowLocationIsTrue;
|
|
14598
|
+
if (ret.delDoorAndBemaData) {
|
|
14599
|
+
line2.doorAndBeamData = [];
|
|
14600
|
+
}
|
|
14601
|
+
}
|
|
14602
|
+
if (!windowLocationIsTrue)
|
|
14603
|
+
continue;
|
|
14604
|
+
line2.drawWindow.push(windowData);
|
|
14587
14605
|
line2.isWindow = true;
|
|
14588
14606
|
pcd.isWindowDoor = true;
|
|
14589
14607
|
} else if (intersect1 != null || intersect2 != null) {
|
|
@@ -14618,14 +14636,25 @@ var getWindowPcdData = (lines, pcdData) => {
|
|
|
14618
14636
|
line2.drawWindow = [];
|
|
14619
14637
|
let p = getMid(ptWindowSt, ptWindowEd);
|
|
14620
14638
|
p.z = line2.start.z;
|
|
14621
|
-
|
|
14639
|
+
let windowData = {
|
|
14622
14640
|
p,
|
|
14623
14641
|
full: false,
|
|
14624
14642
|
groundClearance,
|
|
14625
14643
|
height,
|
|
14626
14644
|
width: ptWindowSt.distanceTo(ptWindowEd),
|
|
14627
14645
|
obj_id: pcd.obj_id
|
|
14628
|
-
}
|
|
14646
|
+
};
|
|
14647
|
+
let windowLocationIsTrue = true;
|
|
14648
|
+
if ((line2.isPassageEntrance || line2.inPassageEntranceDoor) && line2.passageEntrance && line2.passageEntrance.length == 1) {
|
|
14649
|
+
const ret = checkWindowLocationIsTrue(windowData, line2.passageEntrance);
|
|
14650
|
+
windowLocationIsTrue = ret.windowLocationIsTrue;
|
|
14651
|
+
if (ret.delDoorAndBemaData) {
|
|
14652
|
+
line2.doorAndBeamData = [];
|
|
14653
|
+
}
|
|
14654
|
+
}
|
|
14655
|
+
if (!windowLocationIsTrue)
|
|
14656
|
+
continue;
|
|
14657
|
+
line2.drawWindow.push(windowData);
|
|
14629
14658
|
line2.isWindow = true;
|
|
14630
14659
|
pcd.isWindowDoor = true;
|
|
14631
14660
|
} else {
|
|
@@ -14665,14 +14694,25 @@ var getWindowPcdData = (lines, pcdData) => {
|
|
|
14665
14694
|
line2.drawWindow = [];
|
|
14666
14695
|
let p = getMid(ptWindowSt, ptWindowEd);
|
|
14667
14696
|
p.z = line2.start.z;
|
|
14668
|
-
|
|
14697
|
+
let windowData = {
|
|
14669
14698
|
p,
|
|
14670
14699
|
full: false,
|
|
14671
14700
|
groundClearance,
|
|
14672
14701
|
height,
|
|
14673
14702
|
width: ptWindowSt.distanceTo(ptWindowEd),
|
|
14674
14703
|
obj_id: pcd.obj_id
|
|
14675
|
-
}
|
|
14704
|
+
};
|
|
14705
|
+
let windowLocationIsTrue = true;
|
|
14706
|
+
if ((line2.isPassageEntrance || line2.inPassageEntranceDoor) && line2.passageEntrance && line2.passageEntrance.length == 1) {
|
|
14707
|
+
const ret = checkWindowLocationIsTrue(windowData, line2.passageEntrance);
|
|
14708
|
+
windowLocationIsTrue = ret.windowLocationIsTrue;
|
|
14709
|
+
if (ret.delDoorAndBemaData) {
|
|
14710
|
+
line2.doorAndBeamData = [];
|
|
14711
|
+
}
|
|
14712
|
+
}
|
|
14713
|
+
if (!windowLocationIsTrue)
|
|
14714
|
+
continue;
|
|
14715
|
+
line2.drawWindow.push(windowData);
|
|
14676
14716
|
line2.isWindow = true;
|
|
14677
14717
|
pcd.isWindowDoor = true;
|
|
14678
14718
|
}
|
|
@@ -14680,6 +14720,26 @@ var getWindowPcdData = (lines, pcdData) => {
|
|
|
14680
14720
|
}
|
|
14681
14721
|
return lines;
|
|
14682
14722
|
};
|
|
14723
|
+
function checkWindowLocationIsTrue(windowData, passageEntrance) {
|
|
14724
|
+
let windowP = getPt3(windowData.p);
|
|
14725
|
+
let windowLocationIsTrue = true;
|
|
14726
|
+
let delDoorAndBemaData = false;
|
|
14727
|
+
for (let i = 0; i < passageEntrance.length; i++) {
|
|
14728
|
+
const passage = passageEntrance[i];
|
|
14729
|
+
let passP = getPt3(passage.p);
|
|
14730
|
+
let distance2 = windowP.distanceTo(passP);
|
|
14731
|
+
if (distance2 < passage.width / 2) {
|
|
14732
|
+
if (distance2 < 0.3 && Math.abs(windowData.width - passage.width) < 0.3) {
|
|
14733
|
+
delDoorAndBemaData = true;
|
|
14734
|
+
break;
|
|
14735
|
+
} else {
|
|
14736
|
+
windowLocationIsTrue = false;
|
|
14737
|
+
break;
|
|
14738
|
+
}
|
|
14739
|
+
}
|
|
14740
|
+
}
|
|
14741
|
+
return { windowLocationIsTrue, delDoorAndBemaData };
|
|
14742
|
+
}
|
|
14683
14743
|
|
|
14684
14744
|
// src/geometry/door.mjs
|
|
14685
14745
|
import * as THREE11 from "three";
|