rm-graphical-computing-node 1.0.139 → 1.0.140
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 +311 -7
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4091,7 +4091,10 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
4091
4091
|
isFind: false,
|
|
4092
4092
|
inWall: false,
|
|
4093
4093
|
//是否在墙内
|
|
4094
|
-
category: door.category
|
|
4094
|
+
category: door.category,
|
|
4095
|
+
length: length2,
|
|
4096
|
+
width,
|
|
4097
|
+
rectPts: door.coordinatesByArea.coordinates
|
|
4095
4098
|
});
|
|
4096
4099
|
}
|
|
4097
4100
|
if (door.category == "door frame") {
|
|
@@ -4103,7 +4106,9 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
4103
4106
|
index: i,
|
|
4104
4107
|
minZ: door.coordinatesByArea.heightData.minZ,
|
|
4105
4108
|
maxZ: door.coordinatesByArea.heightData.maxZ,
|
|
4106
|
-
category: door.category
|
|
4109
|
+
category: door.category,
|
|
4110
|
+
length: length2,
|
|
4111
|
+
width
|
|
4107
4112
|
});
|
|
4108
4113
|
}
|
|
4109
4114
|
}
|
|
@@ -4288,6 +4293,20 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
4288
4293
|
let isExtendBeam = false;
|
|
4289
4294
|
let findDoorDataIndex = -1;
|
|
4290
4295
|
let doorSill = 0.3;
|
|
4296
|
+
let checkResultInWindow = false;
|
|
4297
|
+
if (line2.isWindow && line2.drawWindow && line2.drawWindow.length > 0) {
|
|
4298
|
+
for (let v2 = 0; v2 < line2.drawWindow.length; v2++) {
|
|
4299
|
+
const drawWindow = line2.drawWindow[v2];
|
|
4300
|
+
let p = getPt3(drawWindow.p);
|
|
4301
|
+
p.z = beamTmpEd.z;
|
|
4302
|
+
let ptMidBeam = getMid(beamTmpSt, beamTmpEd);
|
|
4303
|
+
let distToMid = p.distanceTo(ptMidBeam);
|
|
4304
|
+
if (distToMid < drawWindow.width / 2) {
|
|
4305
|
+
checkResultInWindow = true;
|
|
4306
|
+
break;
|
|
4307
|
+
}
|
|
4308
|
+
}
|
|
4309
|
+
}
|
|
4291
4310
|
if (Math.abs(tmpRegion.facePoints[0].z - line2.start.z) < doorSill) {
|
|
4292
4311
|
let isInsert = false;
|
|
4293
4312
|
for (let k = 0; k < runDataList.length; k++) {
|
|
@@ -4676,7 +4695,7 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
4676
4695
|
}
|
|
4677
4696
|
if (
|
|
4678
4697
|
/**!isPullOutDoor && */
|
|
4679
|
-
length2 < 1.6
|
|
4698
|
+
length2 < 1.6 || checkResultInWindow
|
|
4680
4699
|
) {
|
|
4681
4700
|
for (let n = 0; n < doorAndDoorFrameDatas.length; n++) {
|
|
4682
4701
|
if (doorAndDoorFrameDatas[n].inWall) continue;
|
|
@@ -4771,7 +4790,7 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
4771
4790
|
let isOverlap = false;
|
|
4772
4791
|
for (let m = 0; m < allDoorLines1.length; m++) {
|
|
4773
4792
|
let result = classifySegments(allDoorLines1[m].start, allDoorLines1[m].end, doorTmpSt, doorTmpEd);
|
|
4774
|
-
if (result && result.type == "collinear_overlap" && result.maxPerpendicularDistance < 0.
|
|
4793
|
+
if (result && result.type == "collinear_overlap" && result.maxPerpendicularDistance < 0.06) {
|
|
4775
4794
|
isOverlap = true;
|
|
4776
4795
|
}
|
|
4777
4796
|
}
|
|
@@ -4920,7 +4939,7 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
4920
4939
|
}
|
|
4921
4940
|
}
|
|
4922
4941
|
if (isOverlap) {
|
|
4923
|
-
if (length2 < 1.5 || nearWallDist < 0.
|
|
4942
|
+
if ((length2 < 1.5 || nearWallDist < 0.06) && !checkResultInWindow)
|
|
4924
4943
|
continue;
|
|
4925
4944
|
nearWall = true;
|
|
4926
4945
|
}
|
|
@@ -4945,7 +4964,7 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
4945
4964
|
const lineLength = doorAndBeamDataObj.doorStart.distanceTo(doorAndBeamDataObj.doorEnd);
|
|
4946
4965
|
let Z = getPointsMinAndMax(line2.originalPoints);
|
|
4947
4966
|
doorAndBeamDataObj.lineIsOnlyBeam = Z.minZ > line2.start.z && Z.minZ - line2.start.z > 1;
|
|
4948
|
-
if (isDoor && nearWall && !isPullOutDoor) {
|
|
4967
|
+
if (isDoor && nearWall && !isPullOutDoor && !checkResultInWindow) {
|
|
4949
4968
|
if (findDoorDataIndex != -1) {
|
|
4950
4969
|
if (!beforePcdDoorIsFindBeam) {
|
|
4951
4970
|
pcdData[doorDatas[findDoorDataIndex].index].isFindBeam = false;
|
|
@@ -5238,6 +5257,116 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
5238
5257
|
if (isBreak) break;
|
|
5239
5258
|
}
|
|
5240
5259
|
}
|
|
5260
|
+
if (checkResultInWindow) {
|
|
5261
|
+
if (doorAndBeamDataObj.nearId == -1 && doorAndBeamDataObj.type == "door") {
|
|
5262
|
+
let ptDoorSt = doorAndBeamDataObj.doorStart.clone();
|
|
5263
|
+
let ptDoorEd = doorAndBeamDataObj.doorEnd.clone();
|
|
5264
|
+
const doorLength = ptDoorSt.distanceTo(ptDoorEd);
|
|
5265
|
+
const doorPcd = doorDatas[findDoorDataIndex];
|
|
5266
|
+
const ptDoorPcdSt = doorPcd.doorStartPt.clone();
|
|
5267
|
+
const ptDoorPcdEd = doorPcd.doorEndPt.clone();
|
|
5268
|
+
let pcdLength = doorPcd.length;
|
|
5269
|
+
if (doorLength > pcdLength * 2) {
|
|
5270
|
+
const doorLine = new THREE5.Line3(ptDoorSt, ptDoorEd);
|
|
5271
|
+
let rectPts = doorPcd.rectPts.map((p) => new THREE5.Vector3(p.x, p.y, p.z));
|
|
5272
|
+
rectPts = setPointsSameZ(rectPts, ptDoorSt.z);
|
|
5273
|
+
let ptClose = new THREE5.Vector3();
|
|
5274
|
+
let vec2 = new THREE5.Vector3();
|
|
5275
|
+
if (rectPts.length == 5)
|
|
5276
|
+
rectPts.splice(4, 1);
|
|
5277
|
+
let shortLinePt1 = rectPts[0];
|
|
5278
|
+
let shortLinePt2 = rectPts[1];
|
|
5279
|
+
let shortLinePt3 = rectPts[2];
|
|
5280
|
+
let shortLinePt4 = rectPts[3];
|
|
5281
|
+
if (rectPts[0].distanceTo(rectPts[1]) > rectPts[1].distanceTo(rectPts[2])) {
|
|
5282
|
+
shortLinePt1 = rectPts[1];
|
|
5283
|
+
shortLinePt2 = rectPts[2];
|
|
5284
|
+
shortLinePt3 = rectPts[3];
|
|
5285
|
+
shortLinePt4 = rectPts[0];
|
|
5286
|
+
}
|
|
5287
|
+
let addShortLen = 0.2;
|
|
5288
|
+
let vecShort1 = new THREE5.Vector3().subVectors(shortLinePt2, shortLinePt1).normalize();
|
|
5289
|
+
let vecShort2 = new THREE5.Vector3().subVectors(shortLinePt4, shortLinePt3).normalize();
|
|
5290
|
+
shortLinePt1 = shortLinePt1.addScaledVector(vecShort1, -addShortLen);
|
|
5291
|
+
shortLinePt2 = shortLinePt2.addScaledVector(vecShort1, addShortLen);
|
|
5292
|
+
shortLinePt3 = shortLinePt3.addScaledVector(vecShort2, -addShortLen);
|
|
5293
|
+
shortLinePt4 = shortLinePt4.addScaledVector(vecShort2, addShortLen);
|
|
5294
|
+
let tmpVec = new THREE5.Vector3().subVectors(ptDoorEd, ptDoorSt).normalize();
|
|
5295
|
+
let tmpDoorTmpSt = ptDoorSt.clone().addScaledVector(tmpVec, -addShortLen);
|
|
5296
|
+
let tmpDoorTmpEd = ptDoorEd.clone().addScaledVector(tmpVec, addShortLen);
|
|
5297
|
+
let intersect1 = segmentsIntersect2D(shortLinePt1, shortLinePt2, tmpDoorTmpSt, tmpDoorTmpEd);
|
|
5298
|
+
let intersect2 = segmentsIntersect2D(shortLinePt3, shortLinePt4, tmpDoorTmpSt, tmpDoorTmpEd);
|
|
5299
|
+
let distIntersect1 = 99999;
|
|
5300
|
+
let distIntersect2 = 99999;
|
|
5301
|
+
let near1St = false;
|
|
5302
|
+
let near2St = false;
|
|
5303
|
+
if (intersect1 != null) {
|
|
5304
|
+
let dist55 = intersect1.point.distanceTo(ptDoorSt);
|
|
5305
|
+
let dist66 = intersect1.point.distanceTo(ptDoorEd);
|
|
5306
|
+
if (dist55 < 0.1 || dist66 < 0.1) {
|
|
5307
|
+
if (dist55 < dist66) {
|
|
5308
|
+
near1St = true;
|
|
5309
|
+
distIntersect1 = dist55;
|
|
5310
|
+
} else
|
|
5311
|
+
distIntersect1 = dist66;
|
|
5312
|
+
}
|
|
5313
|
+
}
|
|
5314
|
+
if (intersect2 != null) {
|
|
5315
|
+
let dist55 = intersect2.point.distanceTo(ptDoorSt);
|
|
5316
|
+
let dist66 = intersect2.point.distanceTo(ptDoorEd);
|
|
5317
|
+
if (dist55 < 0.1 || dist66 < 0.1) {
|
|
5318
|
+
if (dist55 < dist66) {
|
|
5319
|
+
near2St = true;
|
|
5320
|
+
distIntersect2 = dist55;
|
|
5321
|
+
} else
|
|
5322
|
+
distIntersect2 = dist66;
|
|
5323
|
+
}
|
|
5324
|
+
}
|
|
5325
|
+
if (distIntersect1 == 99999 && distIntersect2 == 99999) {
|
|
5326
|
+
ptDoorPcdSt.z = ptDoorPcdEd.z = ptDoorSt.z;
|
|
5327
|
+
let dist11 = ptDoorSt.distanceTo(ptDoorPcdSt);
|
|
5328
|
+
let dist22 = ptDoorSt.distanceTo(ptDoorPcdEd);
|
|
5329
|
+
let dist33 = ptDoorEd.distanceTo(ptDoorPcdSt);
|
|
5330
|
+
let dist44 = ptDoorEd.distanceTo(ptDoorPcdEd);
|
|
5331
|
+
let minDist = Math.min(dist11, dist22, dist33, dist44);
|
|
5332
|
+
let wZ = ptDoorSt.z;
|
|
5333
|
+
if (dist11 == minDist) {
|
|
5334
|
+
ptClose = doorLine.closestPointToPoint(ptDoorPcdSt, false, new THREE5.Vector3());
|
|
5335
|
+
vec2 = new THREE5.Vector3().subVectors(ptDoorEd, ptDoorSt).normalize();
|
|
5336
|
+
} else if (dist22 == minDist) {
|
|
5337
|
+
ptClose = doorLine.closestPointToPoint(ptDoorPcdEd, false, new THREE5.Vector3());
|
|
5338
|
+
vec2 = new THREE5.Vector3().subVectors(ptDoorEd, ptDoorSt).normalize();
|
|
5339
|
+
} else if (dist33 == minDist) {
|
|
5340
|
+
ptClose = doorLine.closestPointToPoint(ptDoorPcdSt, false, new THREE5.Vector3());
|
|
5341
|
+
vec2 = new THREE5.Vector3().subVectors(ptDoorSt, ptDoorEd).normalize();
|
|
5342
|
+
} else if (dist44 == minDist) {
|
|
5343
|
+
ptClose = doorLine.closestPointToPoint(ptDoorPcdEd, false, new THREE5.Vector3());
|
|
5344
|
+
vec2 = new THREE5.Vector3().subVectors(ptDoorSt, ptDoorEd).normalize();
|
|
5345
|
+
}
|
|
5346
|
+
} else {
|
|
5347
|
+
if (distIntersect1 < distIntersect2) {
|
|
5348
|
+
ptClose = intersect1.point.clone();
|
|
5349
|
+
vec2 = near1St ? new THREE5.Vector3().subVectors(ptDoorEd, ptDoorSt).normalize() : new THREE5.Vector3().subVectors(ptDoorSt, ptDoorEd).normalize();
|
|
5350
|
+
} else {
|
|
5351
|
+
ptClose = intersect2.point.clone();
|
|
5352
|
+
vec2 = near2St ? new THREE5.Vector3().subVectors(ptDoorEd, ptDoorSt).normalize() : new THREE5.Vector3().subVectors(ptDoorSt, ptDoorEd).normalize();
|
|
5353
|
+
}
|
|
5354
|
+
}
|
|
5355
|
+
ptDoorSt = ptClose.clone();
|
|
5356
|
+
ptDoorEd = ptDoorSt.clone().addScaledVector(vec2, pcdLength);
|
|
5357
|
+
ptDoorSt.z = ptDoorEd.z = doorAndBeamDataObj.doorStart.z;
|
|
5358
|
+
let ptBeamSt = ptDoorSt.clone();
|
|
5359
|
+
let ptBeamEd = ptDoorEd.clone();
|
|
5360
|
+
ptBeamSt.z = ptBeamEd.z = doorAndBeamDataObj.beamStart.z;
|
|
5361
|
+
doorAndBeamDataObj.doorStart = ptDoorSt;
|
|
5362
|
+
doorAndBeamDataObj.doorEnd = ptDoorEd;
|
|
5363
|
+
doorAndBeamDataObj.beamStart = ptBeamSt;
|
|
5364
|
+
doorAndBeamDataObj.beamEnd = ptBeamEd;
|
|
5365
|
+
}
|
|
5366
|
+
} else if (doorAndBeamDataObj.type != "door") {
|
|
5367
|
+
continue;
|
|
5368
|
+
}
|
|
5369
|
+
}
|
|
5241
5370
|
line2.doorAndBeamIdToCheckResults.push([region.index, id]);
|
|
5242
5371
|
line2.doorAndBeamData.push(doorAndBeamDataObj);
|
|
5243
5372
|
doorBeamDataIndex.push({
|
|
@@ -6054,6 +6183,176 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
|
|
|
6054
6183
|
lines[i].doorAndBeamData = lines[i].doorAndBeamData.filter((d) => !d.isDel);
|
|
6055
6184
|
}
|
|
6056
6185
|
lines = lines.filter((l) => !l.isRebuild);
|
|
6186
|
+
for (let l = 0; l < lines.length; l++) {
|
|
6187
|
+
const line2 = lines[l];
|
|
6188
|
+
if (!line2.isWindow || line2.doorAndBeamData.length == 0)
|
|
6189
|
+
continue;
|
|
6190
|
+
let ptStart = getPt3(line2.start);
|
|
6191
|
+
let ptEnd = getPt3(line2.end);
|
|
6192
|
+
line2.originalPoints = lineReader.getOriginalPointsById(line2.id);
|
|
6193
|
+
line2.checkResults = lineReader.getLineCheckReultsById(line2.id);
|
|
6194
|
+
for (let i = 0; i < line2.doorAndBeamData.length; i++) {
|
|
6195
|
+
const doorAndBeamObj = line2.doorAndBeamData[i];
|
|
6196
|
+
if (doorAndBeamObj.type != "door")
|
|
6197
|
+
continue;
|
|
6198
|
+
let ptDoorSt = doorAndBeamObj.doorStart.clone();
|
|
6199
|
+
let ptDoorEd = doorAndBeamObj.doorEnd.clone();
|
|
6200
|
+
if (ptStart.distanceTo(ptDoorSt) > ptStart.distanceTo(ptDoorEd))
|
|
6201
|
+
[ptDoorSt, ptDoorEd] = [ptDoorEd, ptDoorSt];
|
|
6202
|
+
const newOriginPts1 = getProjectedPointOnLine(ptStart, ptDoorSt, line2.originalPoints);
|
|
6203
|
+
const newOriginPts2 = getProjectedPointOnLine(ptDoorSt, ptDoorEd, line2.originalPoints);
|
|
6204
|
+
const newOriginPts3 = getProjectedPointOnLine(ptDoorEd, ptEnd, line2.originalPoints);
|
|
6205
|
+
const newDoorAndBeamData1 = [];
|
|
6206
|
+
const newDoorAndBeamData2 = [];
|
|
6207
|
+
const newDoorAndBeamData3 = [];
|
|
6208
|
+
if (line2.doorAndBeamData) {
|
|
6209
|
+
for (let a = 0; a < line2.doorAndBeamData.length; a++) {
|
|
6210
|
+
let doorStart = line2.doorAndBeamData[a].doorStart;
|
|
6211
|
+
let doorEnd = line2.doorAndBeamData[a].doorEnd;
|
|
6212
|
+
if (isPointOnLine2(ptStart, ptDoorSt, doorStart, 1e-3, true) && isPointOnLine2(ptStart, ptDoorSt, doorEnd, 1e-3, true))
|
|
6213
|
+
newDoorAndBeamData1.push(line2.doorAndBeamData[a]);
|
|
6214
|
+
else if (isPointOnLine2(ptDoorEd, ptEnd, doorStart, 1e-3, true) && isPointOnLine2(ptDoorEd, ptEnd, doorEnd, 1e-3, true))
|
|
6215
|
+
newDoorAndBeamData3.push(line2.doorAndBeamData[a]);
|
|
6216
|
+
else if (a == i)
|
|
6217
|
+
newDoorAndBeamData2.push(line2.doorAndBeamData[a]);
|
|
6218
|
+
}
|
|
6219
|
+
}
|
|
6220
|
+
const newDrawWindowData1 = [];
|
|
6221
|
+
const newDrawWindowData2 = [];
|
|
6222
|
+
const newDrawWindowData3 = [];
|
|
6223
|
+
if (line2.drawWindow) {
|
|
6224
|
+
for (let j = 0; j < line2.drawWindow.length; j++) {
|
|
6225
|
+
let p = getPt3(line2.drawWindow[j].p);
|
|
6226
|
+
p.z = line2.start.z;
|
|
6227
|
+
if (isPointOnLine2(ptStart, ptDoorSt, p, 1e-3, true))
|
|
6228
|
+
newDrawWindowData1.push(line2.drawWindow[j]);
|
|
6229
|
+
else if (isPointOnLine2(ptDoorSt, ptDoorEd, p, 1e-3, true))
|
|
6230
|
+
newDrawWindowData2.push(line2.drawWindow[j]);
|
|
6231
|
+
else if (isPointOnLine2(ptDoorEd, ptEnd, p, 1e-3, true))
|
|
6232
|
+
newDrawWindowData3.push(line2.drawWindow[j]);
|
|
6233
|
+
}
|
|
6234
|
+
}
|
|
6235
|
+
const newCheckResults1 = [];
|
|
6236
|
+
const newCheckResults2 = [];
|
|
6237
|
+
const newCheckResults3 = [];
|
|
6238
|
+
for (let j = 0; j < line2.checkResults.length; j++) {
|
|
6239
|
+
if (line2.checkResults[j].allCenterPoints.length > 0) {
|
|
6240
|
+
let p = getPt3(line2.checkResults[j].allCenterPoints[0]);
|
|
6241
|
+
p.z = line2.start.z;
|
|
6242
|
+
if (isPointOnLine2(ptStart, ptDoorSt, p, 1e-3, true)) {
|
|
6243
|
+
newCheckResults1.push(line2.checkResults[j]);
|
|
6244
|
+
} else if (isPointOnLine2(ptDoorSt, ptDoorEd, p, 1e-3, true)) {
|
|
6245
|
+
newCheckResults2.push(line2.checkResults[j]);
|
|
6246
|
+
} else if (isPointOnLine2(ptDoorEd, ptEnd, p, 1e-3, true)) {
|
|
6247
|
+
newCheckResults3.push(line2.checkResults[j]);
|
|
6248
|
+
}
|
|
6249
|
+
}
|
|
6250
|
+
}
|
|
6251
|
+
const newDoorAndBeamIdToCheckResults1 = [];
|
|
6252
|
+
const newDoorAndBeamIdToCheckResults3 = [];
|
|
6253
|
+
for (let j = 0; j < newDoorAndBeamData1.length; j++) {
|
|
6254
|
+
let ptDoorSt2 = getPt3(newDoorAndBeamData1[j].doorStart);
|
|
6255
|
+
;
|
|
6256
|
+
let ptDoorEd2 = getPt3(newDoorAndBeamData1[j].doorEnd);
|
|
6257
|
+
;
|
|
6258
|
+
for (let k = 0; k < newCheckResults1.length; k++) {
|
|
6259
|
+
let p = getPt3(newCheckResults1[k].allCenterPoints[0]);
|
|
6260
|
+
p.z = ptDoorSt2.z;
|
|
6261
|
+
if (isPointOnLine2(ptDoorSt2, ptDoorEd2, p, 1e-3, true)) {
|
|
6262
|
+
newDoorAndBeamIdToCheckResults1.push([k, newDoorAndBeamData1[j].id]);
|
|
6263
|
+
break;
|
|
6264
|
+
}
|
|
6265
|
+
}
|
|
6266
|
+
}
|
|
6267
|
+
for (let j = 0; j < newDoorAndBeamData3.length; j++) {
|
|
6268
|
+
let ptDoorSt2 = getPt3(newDoorAndBeamData3[j].doorStart);
|
|
6269
|
+
;
|
|
6270
|
+
let ptDoorEd2 = getPt3(newDoorAndBeamData3[j].doorEnd);
|
|
6271
|
+
;
|
|
6272
|
+
for (let k = 0; k < newCheckResults3.length; k++) {
|
|
6273
|
+
let p = getPt3(newCheckResults3[k].allCenterPoints[0]);
|
|
6274
|
+
p.z = ptDoorSt2.z;
|
|
6275
|
+
if (isPointOnLine2(ptDoorSt2, ptDoorEd2, p, 1e-3, true)) {
|
|
6276
|
+
newDoorAndBeamIdToCheckResults3.push([k, newDoorAndBeamData3[j].id]);
|
|
6277
|
+
break;
|
|
6278
|
+
}
|
|
6279
|
+
}
|
|
6280
|
+
}
|
|
6281
|
+
let newLine1 = {
|
|
6282
|
+
start: ptStart,
|
|
6283
|
+
end: ptDoorSt,
|
|
6284
|
+
length: ptStart.distanceTo(ptDoorSt),
|
|
6285
|
+
originalPoints: pointsUtils.vector3ArrToFloat32Array(newOriginPts1.newOriginalPoints),
|
|
6286
|
+
doorAndBeamData: newDoorAndBeamData1,
|
|
6287
|
+
id: randomUUID2(),
|
|
6288
|
+
rooftopPz: line2.rooftopPz,
|
|
6289
|
+
isRebuild: false,
|
|
6290
|
+
direction: line2.direction,
|
|
6291
|
+
drawWindow: newDrawWindowData1,
|
|
6292
|
+
isWindow: newDrawWindowData1.length > 0,
|
|
6293
|
+
doorAndBeamIdToCheckResults: newDoorAndBeamIdToCheckResults1,
|
|
6294
|
+
checkResults: newCheckResults1
|
|
6295
|
+
};
|
|
6296
|
+
let newLine2 = {
|
|
6297
|
+
start: ptDoorSt,
|
|
6298
|
+
end: ptDoorEd,
|
|
6299
|
+
length: ptDoorSt.distanceTo(ptDoorEd),
|
|
6300
|
+
originalPoints: pointsUtils.vector3ArrToFloat32Array(newOriginPts2.newOriginalPoints),
|
|
6301
|
+
doorAndBeamData: newDoorAndBeamData2,
|
|
6302
|
+
id: randomUUID2(),
|
|
6303
|
+
rooftopPz: line2.rooftopPz,
|
|
6304
|
+
isRebuild: false,
|
|
6305
|
+
direction: line2.direction,
|
|
6306
|
+
drawWindow: newDrawWindowData2,
|
|
6307
|
+
isWindow: newDrawWindowData2.length > 0,
|
|
6308
|
+
doorAndBeamIdToCheckResults: [[0, doorAndBeamObj.id]],
|
|
6309
|
+
checkResults: newCheckResults2
|
|
6310
|
+
};
|
|
6311
|
+
let newLine3 = {
|
|
6312
|
+
start: ptDoorEd,
|
|
6313
|
+
end: ptEnd,
|
|
6314
|
+
length: ptDoorEd.distanceTo(ptEnd),
|
|
6315
|
+
originalPoints: pointsUtils.vector3ArrToFloat32Array(newOriginPts3.newOriginalPoints),
|
|
6316
|
+
doorAndBeamData: newDoorAndBeamData3,
|
|
6317
|
+
id: randomUUID2(),
|
|
6318
|
+
rooftopPz: line2.rooftopPz,
|
|
6319
|
+
isRebuild: false,
|
|
6320
|
+
direction: line2.direction,
|
|
6321
|
+
drawWindow: newDrawWindowData3,
|
|
6322
|
+
isWindow: newDrawWindowData3.length > 0,
|
|
6323
|
+
doorAndBeamIdToCheckResults: newDoorAndBeamIdToCheckResults3,
|
|
6324
|
+
checkResults: newCheckResults3
|
|
6325
|
+
};
|
|
6326
|
+
if (newLine1.originalPoints.length > 10 && newLine1.length > 0.01) {
|
|
6327
|
+
lineReader.appendLine(newLine1);
|
|
6328
|
+
newLine1.checkResults = null;
|
|
6329
|
+
newLine1.originalPoints = null;
|
|
6330
|
+
lines.push(newLine1);
|
|
6331
|
+
}
|
|
6332
|
+
if (newLine2.originalPoints.length > 10 && newLine2.length > 0.01) {
|
|
6333
|
+
lineReader.appendLine(newLine2);
|
|
6334
|
+
newLine2.checkResults = null;
|
|
6335
|
+
newLine2.originalPoints = null;
|
|
6336
|
+
lines.push(newLine2);
|
|
6337
|
+
}
|
|
6338
|
+
if (newLine3.originalPoints.length > 10 && newLine3.length > 0.01) {
|
|
6339
|
+
lineReader.appendLine(newLine3);
|
|
6340
|
+
newLine3.checkResults = null;
|
|
6341
|
+
newLine3.originalPoints = null;
|
|
6342
|
+
lines.push(newLine3);
|
|
6343
|
+
}
|
|
6344
|
+
line2.isRebuild = true;
|
|
6345
|
+
break;
|
|
6346
|
+
}
|
|
6347
|
+
line2.originalPoints = null;
|
|
6348
|
+
line2.checkResults = null;
|
|
6349
|
+
}
|
|
6350
|
+
lines = lines.filter((l) => !l.isRebuild);
|
|
6351
|
+
for (let i = 0; i < lines.length; i++) {
|
|
6352
|
+
const line2 = lines[i];
|
|
6353
|
+
line2.originalPoints = lineReader.getOriginalPointsById(line2.id);
|
|
6354
|
+
line2.checkResults = lineReader.getLineCheckReultsById(line2.id);
|
|
6355
|
+
}
|
|
6057
6356
|
return { lines, beamGroup, pcdData };
|
|
6058
6357
|
};
|
|
6059
6358
|
var checkBeamIsReasonable = async (lines, lineReader) => {
|
|
@@ -15403,7 +15702,12 @@ var getWindowData = (lines, pcdData, lineReader) => {
|
|
|
15403
15702
|
}
|
|
15404
15703
|
let isOverlap = false;
|
|
15405
15704
|
for (let m = 0; m < allDoorLines1.length; m++) {
|
|
15406
|
-
let
|
|
15705
|
+
let p1 = allDoorLines1[m].start.clone();
|
|
15706
|
+
let p2 = allDoorLines1[m].end.clone();
|
|
15707
|
+
let p3 = doorTmpSt.clone();
|
|
15708
|
+
let p4 = doorTmpEd.clone();
|
|
15709
|
+
p1.z = p2.z = p3.z = p4.z = 0;
|
|
15710
|
+
let result = classifySegments(p1, p2, p3, p4);
|
|
15407
15711
|
if (result && result.type == "collinear_overlap" && result.maxPerpendicularDistance < 0.07) {
|
|
15408
15712
|
isOverlap = true;
|
|
15409
15713
|
}
|