RoomConfig

类:房间应用配置项

Constructor

new Glodon.Bimface.Plugins.Rooms.RoomConfig(viewer, roomId, modelId, geometry, roomColor, frameColor, enableSelected)

构造房间应用的配置项

Parameters:
NameTypeDescription
viewerGlodon.Bimface.Viewer.Viewer3D

Viewer对象,必填

roomIdString

房间的ID,选填

modelIdString

房间关联的模型ID,选填

geometryObject

房间的几何信息,必填。

typeString

可选,房间生成类型,目前支持extrusion(拉伸体),默认extrusion

boundaryObject

type=extrusion使用,用于表述房间底面边界信息,必选,与gridIds选填一个。

gridObject

type=extrusion使用,用于表述房间底面边界信息,必选,与boundary选填一个。需要在模型中先加载对应轴网,轴网信息可通过viewer3D.showAllAxisGrids()获取。

fileIdString

集成模型的子文件ID,如果是单文件,可不填;如果是集成模型,则为必填项。

idsArray

轴线ID,用以获取房间边界。

heightNumber

type=extrusion使用。用于表述房间拉伸高度,必选,与offset选填一个。

offsetArray

type=extrusion使用。用于表述房间底标高与顶标高,必选,与height选填一个。格式为[bottom,top], 例如:["500","3500"]。

unitString

可选:mm,m。不填写默认与场景单位保持一致。

roomColorGlodon.Web.Graphics.Color

房间颜色,选填

frameColorGlodon.Web.Graphics.Color

房间线框颜色,选填

enableSelectedBoolean

是否支持房间被选中,默认为true

Example

geometry设置的几种方式:

// 方式1:
{
  "type": "extrusion",
  "boundary": {
    "outer": [
      {"x": "0","y": "0","z": "0"},
      {"x": "1000","y": "0","z": "0"},
      {"x": "0","y": "1000","z": "0"}
    ],
    "inner": [
      [
        {"x": "0","y": "0","z": "0"},
        {"x": "100","y": "0","z": "0"},
        {"x": "0","y": "100","z": "0"}
      ]
    ]
  },
  "height": 3000,
  "unit": "mm"
}
// 方式2:
{
  "type": "extrusion",
  "boundary": {
    "outer": [
      {"x": "0","y": "0","z": "0"},
      {"x": "1000","y": "0","z": "0"},
      {"x": "0","y": "1000","z": "0"}
    ],
    "inner": [
      [
        {"x": "0","y": "0","z": "0"},
        {"x": "100","y": "0","z": "0"},
        {"x": "0","y": "100","z": "0"}
      ]
    ]
  },
  "offset": ["500","3500"],
  "unit": "mm"
}
// 方式3:
{
  "type": "extrusion",
  "grid": {
    "fileId":10000016830464,
    "ids":['A', 'E', '1', '3']
  },
  "offset": ["500","3500"],
  "unit": "mm"
}
// 方式4:
{
  "type": "extrusion",
  "grid": {
    "fileId":10000016830464,
    "ids":['A', 'E', '1', '3']
  },
  "height": 3000,
  "unit": "mm"
}