|
|
@ -15,7 +15,7 @@ import { ArcRotateCameraData } from "../../model/data/camera-data"; |
|
|
|
import { BuildingData, BuildingData_ChemicalPlant, BuildingData_Environment, BuildingData_Normal, BuildingType } from "../../model/data/institution/building/building-data"; |
|
|
|
import { BuildingData, BuildingData_ChemicalPlant, BuildingData_Environment, BuildingData_Normal, BuildingType } from "../../model/data/institution/building/building-data"; |
|
|
|
import { JYZInfoMoudleType, JYZShowData } from "../../model/data/institution/jyz-show-data"; |
|
|
|
import { JYZInfoMoudleType, JYZShowData } from "../../model/data/institution/jyz-show-data"; |
|
|
|
import { ModelType } from "../../model/data/model-data/model-data"; |
|
|
|
import { ModelType } from "../../model/data/model-data/model-data"; |
|
|
|
import { FacilityPosType, FacilityType } from "../../model/data/model-data/model-data-facility"; |
|
|
|
import { FacilityPosType, FacilityType, ModelData_facility } from "../../model/data/model-data/model-data-facility"; |
|
|
|
import { ModelEditData } from "../../model/data/model-data/model-edit-data"; |
|
|
|
import { ModelEditData } from "../../model/data/model-data/model-edit-data"; |
|
|
|
import { BuildingInfo } from "../../model/info/building/building-info"; |
|
|
|
import { BuildingInfo } from "../../model/info/building/building-info"; |
|
|
|
import { BuildingInfo_ChemicalPlant } from "../../model/info/building/building-info-chemicalplant"; |
|
|
|
import { BuildingInfo_ChemicalPlant } from "../../model/info/building/building-info-chemicalplant"; |
|
|
@ -688,7 +688,30 @@ export class BuildingWindow extends UIBase { |
|
|
|
public clearHomeLessFacilityData() { |
|
|
|
public clearHomeLessFacilityData() { |
|
|
|
if (this.currentBuidngItem != null) { |
|
|
|
if (this.currentBuidngItem != null) { |
|
|
|
|
|
|
|
|
|
|
|
this.currentBuidngItem.clearFacilityFromMesh(); |
|
|
|
let allFacilities = this.currentBuidngItem.buildingInfo.buildingData.outdoorData.facilities; |
|
|
|
|
|
|
|
let needClear: ModelData_facility[] = []; |
|
|
|
|
|
|
|
for (let i = 0; i < allFacilities.length; i++) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let facilityByType = allFacilities[i]; |
|
|
|
|
|
|
|
for (let j = 0; j < facilityByType.facilities.length; j++) { |
|
|
|
|
|
|
|
let info = FacilityInfoInSceneWindow.instance.getFacilityInfo(facilityByType.facilities[j]); |
|
|
|
|
|
|
|
if (info == null |
|
|
|
|
|
|
|
|| TsTool.stringContain(info._modelBox.id, "(Box)")) { |
|
|
|
|
|
|
|
needClear.push(facilityByType.facilities[j]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (let k = 0; k < needClear.length; k++) { |
|
|
|
|
|
|
|
for (let i = 0; i < allFacilities.length; i++) { |
|
|
|
|
|
|
|
let facilityByType = allFacilities[i]; |
|
|
|
|
|
|
|
TsTool.arrayRemove(facilityByType.facilities, needClear[k]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -708,7 +731,7 @@ export class BuildingWindow extends UIBase { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public getModelAndCreateFacilityData() { |
|
|
|
public getModelAndCreateFacilityData() { |
|
|
|
|
|
|
|
|
|
|
|
//this.clearHomeLessFacilityData();
|
|
|
|
this.clearHomeLessFacilityData(); |
|
|
|
|
|
|
|
|
|
|
|
if (this.currentBuidngItem != null) { |
|
|
|
if (this.currentBuidngItem != null) { |
|
|
|
//获取所有transformNodes
|
|
|
|
//获取所有transformNodes
|
|
|
|