BimModel

BimModel

BIM单模型相关操作

Constructor

new Glodon.Bimface.Model.BimModel()

Methods

activateAllComponents()

恢复所有构件处于激活状态

addBlinkComponentsById(objectIds, blinkDetails)

根据构件ID在强调状态集合中继续添加构件

Parameters:
Name Type Description
objectIds Array

多个构件ID的数组

blinkDetails Object

{color: 构件闪烁颜色, interval: 闪烁间隔时间(毫秒), 为空时使用默认时间, times: 闪烁次数, 为空时默认不限次数}.

addBlinkComponentsByObjectData(conditions, blinkDetails)

根据筛选条件在强调状态集合中继续添加构件

Parameters:
Name Type Description
conditions Array

筛选条件,从getObjectDataById(objectId)获取

blinkDetails Object

{color: 构件闪烁颜色, interval: 闪烁间隔时间(毫秒), 为空时使用默认时间, times: 闪烁次数, 为空时默认不限次数}.

addSelectedComponentsById(ids)

根据构件ID在选中集合中继续添加构件

Parameters:
Name Type Description
ids Array

多个构件ID的数组,如[“x1”, “x2”]

addSelectedComponentsByObjectData(conditions)

根据筛选条件在选中集合中继续添加构件

Parameters:
Name Type Description
conditions Array

多个筛选条件的数组,如[{familyType: xxx}, {category: xxx}]

bringAxisGridsToFront(isEnabled)

使得轴网浮在最上层

Parameters:
Name Type Description
isEnabled Boolean

是否将轴网提到最上层

clearAllBlinkComponents()

取消所有构件的强调状态

clearBlinkComponentsById(objectIds)

根据构件ID从强调状态集合中取消构件的强调状态

Parameters:
Name Type Description
objectIds Array

多个构件ID的数组

clearBlinkComponentsByObjectData(conditions)

根据筛选条件从强调状态集合中取消构件的强调状态

Parameters:
Name Type Description
conditions Array

筛选条件,从getObjectDataById(objectId)获取

clearFloorExplosion()

清空楼层爆炸效果

clearIsolation()

取消模型隔离

clearLocalClipping()

清空构件剖切列表

clearOverrideColorComponents()

恢复全部构件的原来颜色

clearSelectedComponents()

清除构件选中状态

createRoomByAxisGrids(fileId, gridIds, elevations, id, faceColor, frameColor)

根据轴网和标高创建房间

Parameters:
Name Type Description
fileId String

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

gridIds Array

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

elevations Array

底标高,顶标高,用以获取标高和高度

id String

房间ID,可自定义ID

faceColor Glodon.Web.Graphics.Color

房间颜色,可不填

frameColor Glodon.Web.Graphics.Color

房间线框颜色,可不填

deactivateComponentsById(ids)

根据构件ID将构件设置为未激活状态

Parameters:
Name Type Description
ids Array

构件的ID集合,如[“123”, “456”]

deactivateComponentsByObjectData(conditions)

See:

根据筛选条件将构件设置为未激活状态

Parameters:
Name Type Description
conditions Array

筛选条件,从getObjectDataById(objectId)获取

get3DViewStates(callback)

获取模型三维视图的状态,用于切换三维视图

Parameters:
Name Type Description
callback function

获取模型三维视图状态的回调函数

getAreaProperty(id, callback)

获取面积属性

Parameters:
Name Type Description
id String

要获取属性的面积ID

callback function

获取属性回调函数

getAreas(callback)

获取空间

Parameters:
Name Type Description
callback function

获取空间回调函数

getAxisGridsIntersection(fileId, floorId, axisNumber)

求多个轴线的交点

Parameters:
Name Type Description
fileId String

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

floorId String

楼层ID,如果是集成模型,则为单模型文件中的楼层ID(不是集成模型聚合后的楼层ID)

axisNumber Array

相交轴线的轴号数组,例如["9", "A-R", "A-S"]

Returns:
Type Description
Array

相交轴线的轴号及交点信息

getBlinkComponents()

获取强调状态集合中的构件ID数组

Returns:
Type Description
Array

构件ID数组

getBoundingBoxById(id)

根据构件、外部构件、房间ID获取其包围盒信息

Parameters:
Name Type Description
id String

构件、外部构件或房间ID

Returns:
Type Description
Object

包围盒对象

getBoundingBoxByModelId(modelId, callback)

根据modelID获取模型的包围盒

Parameters:
Name Type Description
modelId String

模型的modelId,若为链接集成且存在坐标偏移,则需要输入该单模型在集成中生成的hashId

callback function

回调函数

getCategoryVisibility(success, failure)

获取图元类别的可见性

Parameters:
Name Type Description
success function

加载成功之后的回调函数

failure function

加载失败之后的回调函数

getComponentOverriddenProperty(elementId, success, failure)

获取修改后的构件属性

Parameters:
Name Type Description
elementId String

要获取属性的构件ID

success function

获取属性成功的回调函数

failure function

获取属性失败的回调函数

getComponentProperty(elementId, success, failure)

获取构件属性

Parameters:
Name Type Description
elementId String

要获取属性的构件ID

success function

获取属性成功的回调函数

failure function

获取属性失败的回调函数

getComponentsByConditions(conditions, success, failure)

See:

单模型根据构件类型ID、族和族类型获取构件列表

Parameters:
Name Type Description
conditions Array

条件

success function

加载成功之后的回调函数

failure function

加载失败之后的回调函数

getComponentsBySetId(id, callback)

根据集合ID获取集合中所有构件的ID

Parameters:
Name Type Description
id String

集合ID

callback function

获取集合中所有构件ID数组的回调函数

getComponentStatus(id)

获取构件显示状态 如显示隐藏、半透明、隔离、变色

Parameters:
Name Type Description
id String

构件ID

Returns:
Type Description
Object

构件显示状态

getCurrentAxisGridsState()

获取当前轴网的状态

Returns:
Type Description
Object

当前轴网状态

getDetailRatio()

获取模型显示精细度

Returns:
Type Description
Number

显示精细度

getDimensions(fileId, successCallback, failureCallback)

获取三维标注信息

Parameters:
Name Type Description
fileId String

文件id,集成模型时为必填项

successCallback function

获取成功回调函数

failureCallback function

获取失败回调函数

getDrawingListbyId(fileId, componentId, callback)

根据文件ID和构件ID获取图纸列表

Parameters:
Name Type Description
fileId String

集成模型或单模型的文件ID

componentId String

构件ID

callback function

获取图纸列表成功后的回调函数

getDrawingsheets(fileId, callback)

获取模型的图纸列表

Parameters:
Name Type Description
fileId String

单文件ID,集成模型必填

callback function

获取模型的图纸列表的回调函数

getExplosionExtent()

获取爆炸效果离散系数

Returns:
Type Description
Number

爆炸系数,取值范围[0, 3]

getFamilyProperty(familyTypeId, success, failure)

获取族属性

Parameters:
Name Type Description
familyTypeId String

要获取属性的族ID

success function

获取属性成功的回调函数

failure function

获取属性失败的回调函数

getFamilyTypes(callback)

获取族文件类型

Parameters:
Name Type Description
callback function

回调函数

Returns:
Type Description
Array

针对Rfa文件

getFiles(callback)

获取集成模型的文件列表

Parameters:
Name Type Description
callback function

获取集成模型的文件列表的回调函数

getFloorBoundingBoxById(floorId, callback)

根据楼层ID获取楼层包围盒

Parameters:
Name Type Description
floorId String

楼层ID

callback function

回调函数

getFloorExplosionDirection()

获取楼层爆炸离散方向

Returns:
Type Description
Object

爆炸方向

getFloorExplosionExtent()

获取楼层爆炸离散系数

Returns:
Type Description
Number

爆炸系数,取值范围[0, 30]

getFloorExplosionList()

获取参与楼层爆炸的楼层ID列表

Returns:
Type Description
Array

floorIds 参与楼层爆炸的楼层ID列表

getFloors(callback)

获取单模型、集成模型楼层列表

Parameters:
Name Type Description
callback function

获取楼层回调函数

getFloorsbyFileId(fileId, callback)

在集成模型中根据文件ID获取单模型的楼层信息

Parameters:
Name Type Description
fileId String

参与集成的单文件ID

callback function

回调函数

Returns:
Type Description
Object

楼层列表

getGridBubblesColor()

获取轴网轴号的颜色

Returns:
Type Description
Glodon.Web.Graphics.Color

颜色

getGridLinesColor()

获取轴网轴线的颜色

Returns:
Type Description
Glodon.Web.Graphics.Color

颜色

getInformation()

获取模型基本信息,如构件数、三角面、定点数

Returns:
Type Description
Object

模型基本信息

getIntegrateTranslation(callback)

获取模型集成的平移值

Parameters:
Name Type Description
callback function

模型集成的平移值的回调函数

getIsolatedComponentColor()

获取隔离构件的颜色

Returns:
Type Description
Glodon.Web.Graphics.Color

颜色

getLinkGraph(callback)

获取集成模型的文件链接关系

Parameters:
Name Type Description
callback function

获取集成模型文件链接关系的回调函数

getMapInfo(callback)

获取模型的小地图信息

Parameters:
Name Type Description
callback function

获取模型的小地图信息的回调函数

getMaterialProperty(elementId, callback)

获取材质属性

Parameters:
Name Type Description
elementId String

要获取属性的材质ID

callback function

获取属性回调函数

getMaterialsById(id)

根据构件ID获取材质对象

Parameters:
Name Type Description
id String

构件ID

Returns:
Type Description
Array

materials 材质对象的数组

getMaxDetailLevel()

获取图层的最大请求层级

Returns:
Type Description
Number

图层的最大请求层级

getMepSystem(fileId, callback)

获取拓扑信息

Parameters:
Name Type Description
fileId function

获取拓扑信息

callback function

获取拓扑信息

getMinimumComponentDistanceById(componentId1, componentId2)

获取两个构件的最小距离

Parameters:
Name Type Description
componentId1 String

构件ID

componentId2 String

构件ID

Returns:
Type Description
Object

计算结果对象,包括两个构件的最小距离与拥有最小距离的两个点

getModelInfo()

获取模型基本信息

Returns:
Type Description
Object

模型基本信息

getModelSet(callback)

获取模型组属性

Parameters:
Name Type Description
callback function

获取属性回调函数

getModelTransformation()

获取指定模型的坐标变换状态

Returns:
Type Description
Array

描述模型坐标变换的对象

getModelTree(callback)

获取模型构件目录结构树

Parameters:
Name Type Description
callback function

获取目录树回调函数

getNearestAxisGrids(point3d, fileId, callback)

最近轴网交点的轴线信息及偏移值

Parameters:
Name Type Description
point3d Object

点对象

fileId String

单模型文件ID

callback function

回调函数

Returns:
Type Description
Array

返回最近轴网交点的轴线信息及偏移值

getNestedComponents(callback)

获取嵌套构件信息

Parameters:
Name Type Description
callback function

获取嵌套构件方法的回调函数

getObjectData()

获取图层的Object Data信息

Returns:
Type Description
Array

该图层的Object Data信息

getObjectDataById(objectId)

根据构件ID获取ObjectData,用于作为筛选条件

Parameters:
Name Type Description
objectId String

构件ID

Returns:
Type Description
Object

筛选条件ObjectData

getObjectMap(callback)

获取构件映射关系

Parameters:
Name Type Description
callback function

获取构件映射关系的回调函数

getOutlinerInfo(callback)

获取SKP文件模型层次关系

Parameters:
Name Type Description
callback function

回调函数

getRoomProperty(roomId, callback)

获取房间属性

Parameters:
Name Type Description
roomId String

要获取属性的房间ID

callback function

获取属性回调函数

getScheduleById(id, callback)

根据明细表ID获取明细表内容

Parameters:
Name Type Description
id String

明细表ID

callback function

明细表内容

getScheduleList(callback)

获取明细表列表

Parameters:
Name Type Description
callback function

获取目录树回调函数 注:模型转换时加参数"exportSchedule":"true"

getSelectedComponents()

获取选中集合中的构件ID数组

Returns:
Type Description
Array

构件ID列表

getSetByComponentId(componentId, callback)

根据构件ID获取所属集合的信息

Parameters:
Name Type Description
componentId String

构件ID

callback function

获取集合信息的回调函数,集合信息格式示例{id: "1234", name: "parent", type: "group", elements: ['1','2','3','4',...]}

getVisualRange()

获取图层的可视范围

Returns:
Type Description
Object

图层可视范围

hideAllComponents()

隐藏模型全部构件

hideComponentsById(ids)

根据构件ID隐藏构件

Parameters:
Name Type Description
ids Array

多个构件ID的数组,如[“x1”, “x2”]

hideComponentsByObjectData(conditions)

See:

根据筛选条件隐藏构件

Parameters:
Name Type Description
conditions Array

隐藏构件的条件集合,从getObjectDataById(objectId)获取

isolateComponentsById(ids, state)

根据构件ID隔离构件,其他全部隐藏或半透明

Parameters:
Name Type Description
ids Array

多个构件ID的数组,如[“x1”, “x2”]

state Glodon.Bimface.Viewer.IsolateOption

被隔离构件显示状态,如Glodon.Bimface.Viewer.IsolateOption.MakeOthersTranslucent

isolateComponentsByObjectData(conditions, state)

See:

根据筛选条件隔离构件,其他全部隐藏或半透明

Parameters:
Name Type Description
conditions Array

模型隔离条件,从getObjectDataById(objectId)获取

state Glodon.Bimface.Viewer.IsolateOption

被隔离构件显示状态,如Glodon.Bimface.Viewer.IsolateOption.MakeOthersTranslucent

loadOnDemand(condition)

Bimtile模型按需加载

Parameters:
Name Type Description
condition Array

按需加载条件

localClippingComponentsById(ids)

根据ID列表设置需要剖切的构件

Parameters:
Name Type Description
ids Array

多个构件ID的数组,如[“x1”, “x2”]

localClippingComponentsByObjectData(conditions)

See:

根据筛选条件设置需要剖切的构件

Parameters:
Name Type Description
conditions Array

设置构件剖切条件,从getObjectDataById(objectId)获取

opaqueAllComponents()

取消所有构件半透明

opaqueComponentsById(ids)

根据构件ID取消构件半透明

Parameters:
Name Type Description
ids Array

多个构件ID的数组,如[“x1”, “x2”]

opaqueComponentsByObjectData(conditions)

See:

根据筛选条件取消构件半透明

Parameters:
Name Type Description
conditions Array

取消半透明构件的条件集合,从getObjectDataById(objectId)获取

overrideAllComponentsColor(color)

给所有构件着色

Parameters:
Name Type Description
color Glodon.Web.Graphics.Color

着色颜色

overrideComponentsColorById(ids, color)

按构件ID给构件着色

Parameters:
Name Type Description
ids Array

多个构件ID的数组,如[“x1”, “x2”]

color Glodon.Web.Graphics.Color

着色颜色

overrideComponentsColorByObjectData(conditions, color)

See:

根据筛选条件给构件着色

Parameters:
Name Type Description
conditions Array

着色条件,从getObjectDataById(objectId)获取

color Glodon.Web.Graphics.Color

颜色

overrideComponentsFrameColorById(ids, color)

根据构件ID给构件线框着色

Parameters:
Name Type Description
ids Array

多个构件ID的数组,如[“x1”, “x2”]

color Glodon.Web.Graphics.Color

线框颜色

overrideComponentsFrameColorByObjectData(conditions, color)

根据筛选条件给构件线框着色

Parameters:
Name Type Description
conditions Array

着色条件,从getObjectDataById(objectId)获取

color Glodon.Web.Graphics.Color

线框颜色

overrideComponentsMaterialById(componentIds, material)

按构件ID给构件替换材质

Parameters:
Name Type Description
componentIds Array

多个构件ID的数组,如[“x1”, “x2”]

material Object

材质对象

overrideComponentsOpacityById(ids, opacity)

按构件ID设置构件透明度

Parameters:
Name Type Description
ids Array

多个构件ID的数组,如[“x1”, “x2”]

opacity Number

透明度,取值范围[0, 1],默认值为1

overrideComponentsOpacityByObjectData(conditions, opacity)

See:

根据筛选条件给构件设置透明度

Parameters:
Name Type Description
conditions Array

设置透明度条件,从getObjectDataById(objectId)获取

opacity Number

透明度,取值范围[0, 1],默认值为1

removeAllAxisGrids()

隐藏模型中所有的轴网

removeAxisGridsByElevation(fileId, elevation)

按文件ID和给定高度移除轴网

Parameters:
Name Type Description
fileId String

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

elevation Number

高度

removeAxisGridsByFloor(fileId, levelName, callback)

按文件ID和楼层ID移除轴网

Parameters:
Name Type Description
fileId String

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

levelName String

楼层ID,如果是集成模型,则为单模型文件中的楼层ID(不是集成模型聚合后的楼层ID)

callback function

回调函数

removeGlowEffectById(ids)

根据ID移除发光效果

Parameters:
Name Type Description
ids Array

Object Ids.

removeSelectedId(ids)

根据构件ID从选中集合中移除

Parameters:
Name Type Description
ids Array

多个构件ID的数组,如[“x1”, “x2”]

restoreAllDefault()

恢复所有默认显示,包括着色、选择、隔离、半透明、空间等

restoreComponentsColorById(ids)

根据构件ID恢复构件的原来颜色

Parameters:
Name Type Description
ids Array

多个构件ID的数组,如[“x1”, “x2”]

restoreComponentsColorByObjectData(conditions)

See:

根据筛选条件恢复构件的原来颜色

Parameters:
Name Type Description
conditions Array

着色条件,从getObjectDataById(objectId)获取

restoreComponentsFrameColorById(ids)

根据构件ID清除构件线框着色

Parameters:
Name Type Description
ids Array

多个构件ID的数组,如[“x1”, “x2”]

restoreComponentsFrameColorByObjectData(conditions)

根据筛选条件清除构件线框着色

Parameters:
Name Type Description
conditions Array

着色条件,从getObjectDataById(objectId)获取

restoreComponentsMaterialById(componentIds)

根据构件ID恢复构件的原来材质

Parameters:
Name Type Description
componentIds Array

多个构件ID的数组,如[“x1”, “x2”]

restoreDefault()

恢复默认显示(不含着色),包括选择、隔离、半透明、空间等

restoreIsolatedComponentColor()

恢复隔离状态下其他构件的颜色

restoreWireframeColor()

恢复线框默认颜色

searchText(text, callback)

对3dm格式的文本进行搜索

Parameters:
Name Type Description
text String

搜索的文字

callback function

搜索之后的回调函数

setAxisGridsState(轴网状态)

设置当前轴网的状态

Parameters:
Name Type Description
轴网状态 Object

setBlinkColor(color)

设置强调状态的构件颜色

Parameters:
Name Type Description
color Glodon.Web.Graphics.Color

强调颜色,当参数为空时,恢复为默认颜色

setBlinkComponentsById(objectIds, blinkDetails)

根据构件ID设置多个构件为强调状态集合

Parameters:
Name Type Description
objectIds Array

多个构件ID的数组

blinkDetails Object

{color: 构件闪烁颜色, interval: 闪烁间隔时间(毫秒), 为空时使用默认时间, times: 闪烁次数, 为空时默认不限次数}.

setBlinkIntervalTime(time)

设置强调状态颜色变化的间隔时间

Parameters:
Name Type Description
time Number

间隔时间(毫秒),参数为空时恢复为默认,参数 time <= 0 时无效

setComponentsOpacity(ids, state)

根据构件ID设置构件半透明,或取消构件半透明

Parameters:
Name Type Description
ids Array

多个构件ID的数组,如[“x1”, “x2”]

state Glodon.Bimface.Viewer.OpacityOption

半透明,或取消半透明,如Glodon.Bimface.Viewer.OpacityOption.Translucent

setDetailRatio(ratio)

设置模型显示精细度

Parameters:
Name Type Description
ratio Number

显示精细度

setExplosionExtent(extent)

设置爆炸效果离散系数

Parameters:
Name Type Description
extent Number

爆炸系数,取值范围[0, 3]

setFloorExplosion(extent, floorIds, direction)

设置楼层爆炸效果

Parameters:
Name Type Description
extent Number

楼层爆炸离散系数,范围为[0, 30]

floorIds Array

参与楼层爆炸的楼层ID列表,默认全部楼层参与,floorIds=[]时所有楼层不参与楼层爆炸

direction Object

楼层爆炸的方向,缺省值为{x: 0, y: 0, z: 1}

setGlowEffectById(ids, opt)

根据ID列表设置构件、房间、外部构件的发光效果

Parameters:
Name Type Description
ids Array

构件、房间、外部构件ID列表

opt Object

发光效果参数

Properties
Name Type Description
type String

发光效果类型,“body”为整体发光,“outline”为轮廓线发光,默认为“body”

color Glodon.Web.Graphics.Color

发光效果颜色

intensity Number

发光强度,取值范围[0,1],默认值为0.3

spread Number

扩散程度,取值范围[1,5],默认值为3

setGridBubblesColor(color)

设置轴网轴号的颜色

Parameters:
Name Type Description
color Glodon.Web.Graphics.Color

颜色

setGridLinesColor(color)

设置轴网轴线的颜色

Parameters:
Name Type Description
color Glodon.Web.Graphics.Color

颜色

setIsolatedComponentColor(color)

设置被隔离构件的颜色

Parameters:
Name Type Description
color Glodon.Web.Graphics.Color

颜色

setMaxDetailLevel(图层的最大请求层级)

设置图层的最大请求层级

Parameters:
Name Type Description
图层的最大请求层级 Number

setModelRotationX(basePoint, rotation)

设置模型绕X轴旋转

Parameters:
Name Type Description
basePoint Object

模型旋转的基点

rotation Number

模型旋转的弧度值

setModelRotationY(basePoint, rotation)

设置模型绕Y轴旋转

Parameters:
Name Type Description
basePoint Object

模型旋转的基点

rotation Number

模型旋转的弧度值

setModelRotationZ(basePoint, rotation)

设置模型绕Z轴旋转

Parameters:
Name Type Description
basePoint Object

模型旋转的基点

rotation Number

模型旋转的弧度值

setModelScale(basePoint, scale)

设置模型缩放

Parameters:
Name Type Description
basePoint Object

模型缩放的基点

scale Number

模型缩放系数

setModelTransformation(modelTransformation)

设置指定模型的坐标变换状态

Parameters:
Name Type Description
modelTransformation Array

描述模型坐标变换的对象

setModelTranslation(translation)

设置模型平移

Parameters:
Name Type Description
translation Object

模型平移的距离

setSelectedComponentsById(ids)

根据构件ID设置多个构件为选中集合

Parameters:
Name Type Description
ids Array

多个构件ID的数组,如[“x1”, “x2”]

setSelectedComponentsByObjectData(conditions)

根据筛选条件设置多个构件为选中集合

Parameters:
Name Type Description
conditions Array

多个筛选条件的数组,如[{familyType: xxx}, {category: xxx}]

setShellVisibility(模型可见与否)

设置模型外壳是否可见,默认外壳和模型本身可见性为互斥

Parameters:
Name Type Description
模型可见与否 bool

setVisualRange(图层可视范围,包括最近距离与最远距离,可仅设置单个值,单位为m。例{min:0,max:500})

设置图层的可视范围

Parameters:
Name Type Description
图层可视范围,包括最近距离与最远距离,可仅设置单个值,单位为m。例{min:0,max:500} Object

setWireframeColor(color)

设置线框颜色

Parameters:
Name Type Description
color Glodon.Web.Graphics.Color

线框颜色

showAllAxisGrids()

显示所有轴网

showAllComponents(progressCallback, finishCallback)

显示模型全部构件

Parameters:
Name Type Description
progressCallback function

加载进度回调函数,可不写

finishCallback function

加载完成回调函数,可不写

showAxisGridsByElevation(fileId, elevation, callback)

按文件ID和高度显示轴网

Parameters:
Name Type Description
fileId String

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

elevation String

高度

callback function

回调函数

showAxisGridsByFloor(fileId, floorId, callback)

按文件ID和楼层ID显示轴网

Parameters:
Name Type Description
fileId String

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

floorId String

楼层ID,如果是集成模型,则为单模型文件中的楼层ID(不是集成模型聚合后的楼层ID)

callback function

回调函数

showComponentsById(ids)

根据构件ID显示构件

Parameters:
Name Type Description
ids Array

多个构件ID的数组,如[“x1”, “x2”]

showComponentsByObjectData(conditions)

See:

根据筛选条件显示构件

Parameters:
Name Type Description
conditions Array

显示构件的条件集合,从getObjectDataById(objectId)获取

showExclusiveComponentsByObjectData(conditions, progressCallback, finishCallback)

See:

根据筛选条件显示构件,其余全部隐藏

Parameters:
Name Type Description
conditions Array

只显示符合条件的构件,从getObjectDataById(objectId)获取

progressCallback function

加载进度回调函数,可不写

finishCallback function

加载完成回调函数,可不写

showFamilyTypeById(id)

切换族类型

Parameters:
Name Type Description
id String

根据族类型ID显示族文件 针对Rfa文件

splitComponentByPlane(id, plane)

根据平面拆分构件

Parameters:
Name Type Description
id String

被拆分的构件ID

plane Object

拆分用的平面对象,如{point, normal}

Returns:
Type Description
Array

构件被拆分后的mesh对象列表

transparentAllComponents()

所有构件半透明

transparentComponentsById(ids)

根据构件ID设置构件为半透明

Parameters:
Name Type Description
ids Array

多个构件ID的数组,如[“x1”, “x2”]

transparentComponentsByObjectData(conditions)

See:

根据筛选条件设置构件为半透明

Parameters:
Name Type Description
conditions Array

半透明构件的条件集合,从getObjectDataById(objectId)获取

zoomToSelectedComponents(margin, callback, duration)

缩放到加入选中集合的构件

Parameters:
Name Type Description
margin Number

包围盒缩放比例, 缺省值: 1, margin > 0 模型缩小(包围盒变大),margin < 0 模型放大(包围盒变小)

callback function

缩放完成时的回调函数,可不写

duration Number

动画持续时间,单位为毫秒, 默认值为1000ms