Room

.SpatialRelation. Room

new Glodon.Bimface.Plugins.SpatialRelation.Room(config)

Parameters:
Name Type Description
config Glodon.Bimface.Plugins.SpatialRelation.RoomConfig

配置项

Methods

getAreaByRoomId(roomIds)

根据房间ID列表获取房间底面积

Parameters:
Name Type Description
roomIds Array

房间ID列表

Returns:
Type Description
Array

房间面积信息列表(单位为平方米)

getBoundaryByRoomId(roomId)

根据房间ID获取对应的房间边界

Parameters:
Name Type Description
roomId String

房间ID

Returns:
Type Description
Object

房间边界

getComponentsByRoomId(roomId, roomToleranceXY, roomToleranceZ, callback)

根据房间ID获取房间内构件

Parameters:
Name Type Description
roomId String

房间ID

roomToleranceXY String

XY方向的误差容许程度,默认值:“ORDINARY”

roomToleranceZ String

Z方向的误差容许程度,默认值:“STRICT”

callback function

回调函数

Returns:
Type Description
Array

房间内的构件列表

getRoomsByComponentId(objectId, roomToleranceXY, roomToleranceZ, callback)

根据构件ID获取所在房间(支持通过createRoom创建的房间体块)

Parameters:
Name Type Description
objectId String

构件ID

roomToleranceXY String

XY方向的误差容许程度,默认值:“ORDINARY”

roomToleranceZ String

Z方向的误差容许程度,默认值:“STRICT”

callback function

回调函数

Returns:
Type Description
Array

房间ID列表

setBoundaryByRoomId(roomId, newBoundary)

根据编辑后房间的Boundary生成房间

Parameters:
Name Type Description
roomId String

房间ID

newBoundary Object

新的房间边界