IfcLoader.getSubset
简介: 该方法用于获取指定IFC文件及指定类型及条件的实体子集。
方法原型: getSubset(ifcFile: File, type: string, conditions: object): Array<object>
参数介绍:
示例代码:
const ifcFile = new File("myIfc.ifc");
const type = "IfcWall";
const conditions = {
"PredefinedType": "ELEMENTEDWALL",
"GlobalId": "2t09h49t-kfj5-5c5f-3q49-gtw498dg48he",
}
const wallSubset = getSubset(ifcFile, type, conditions);
console.log(wallSubset);
以上代码会查询 myIfc.ifc 文件中所有类型为 IfcWall,拥有 PredefinedType 为 ELEMENTEDWALL 和 GlobalId 为 2t09h49t-kfj5-5c5f-3q49-gtw498dg48he 的实体,并将其作为一个数组返回。