SectionPlane

.Section. SectionPlane

类:绘制剖切面的管理器

Constructor

new Glodon.Bimface.Plugins.Section.SectionPlane(options)

Parameters:
Name Type Description
options Glodon.Bimface.Plugins.Section.SectionPlaneConfig

构造剖切面的配置项

Methods

clearFilter()

清除过滤器

getComponentContours(modelId, condition)

获取构件轮廓线

Parameters:
Name Type Description
modelId String

modelId 或 LayerId

condition Object

过滤条件,结构如 {ids: [1,2,3], userData: [{familyType: xxx, category: xxx}], all: true 全部构件,仅设置为true时有效}

getDirection()

获取剖切面方向

Returns:
Type Description
Glodon.Bimface.Plugins.Section.SectionPlaneDirection

剖切面方向

getPlane()

获取剖切面类型

Returns:
Type Description
Glodon.Bimface.Plugins.Section.SectionPlanePlane

剖切面类型

getProgress()

获取轴向剖切时的剖切进度

Returns:
Type Description
Number

轴向剖切时的剖切进度

getSectionPlane()

获取剖切面状态

Returns:
Type Description
Object

剖切面状态

getState()

获取剖切面状态

Returns:
Type Description
Object

剖切面状态

hidePlane()

隐藏剖切面

isIncluded(point)

判断某个坐标是否在剖切面内,即尚未被剖切到

Parameters:
Name Type Description
point Object

世界坐标的点

reset()

重置剖切面状态

resetSectionTool(state)

重置剖切工具

Parameters:
Name Type Description
state Object

剖切面状态

restoreObjects()

恢复默认的被剖切对象

restoreRotation(state)

恢复剖切面初始角度

Parameters:
Name Type Description
state Object

剖切面状态

rotateByAxis(axis, degree)

旋转剖切面

Parameters:
Name Type Description
axis String

旋转轴

degree Number

旋转角度

setBorder(width, height, isEnabled)

设置剖切面的边界. 设置边界后,开启边界约束时,仅在边界范围内剖切,关闭边界约束时,对全场景范围剖切

Parameters:
Name Type Description
width Number

剖切面的宽度,在viewer3D中,单位为mm,默认为20000,在viewerGIS中,单位为m,默认为20

height Number

剖切面的高度,在viewer3D中,单位为mm,默认为20000,在viewerGIS中,单位为m,默认为20

isEnabled Bealoon

是否受边界约束,默认为true

setDirection(direction)

设置剖切面方向

Parameters:
Name Type Description
direction Glodon.Bimface.Plugins.Section.SectionPlaneDirection

剖切面方向

setFilter(filter)

根据过滤器设置剖切对象

Parameters:
Name Type Description
filter Array

被剖切构件的条件 在viewer3D中如 [{"modelId":"151367034813"},{"modelId":"151367034816","objectIds":["11","22"]},{"modelId":"151367034816","objectData": [{"levelName":"F01"}]}] 在viewerGIS中如 [{"layerId":"151367034813"},{"layerId":"151367034816","objectIds":["11","22"]},{"layerId":"151367034816","objectData":[{"levelName":"F01"}]}]

setObjectsById(ids)

根据ID列表设置被剖切的构件、外部构件、房间对象

Parameters:
Name Type Description
ids Array

被剖切的构件、外部构件、房间对象ID列表

setObjectsByObjectData(conditions)

根据筛选条件设置被剖切的构件对象

Parameters:
Name Type Description
conditions Array

被剖切构件的筛选条件

setPlane(plane)

设置剖切面类型

Parameters:
Name Type Description
plane Glodon.Bimface.Plugins.Section.SectionPlanePlane

剖切面类型

setPositionByPlane(origin, direction, offset)

根据平面的位置、方向、偏移值设置剖切面位置

Parameters:
Name Type Description
origin Object

平面中心点

direction Object

平面法向量

offset Number

平面沿法线的偏移量

setProgress(progress)

设置轴向剖切时的剖切进度,取值范围为[0, 100]

Parameters:
Name Type Description
progress Number

轴向剖切时的剖切进度

setSectionPlane(sectionPlane)

设置剖切面状态

Parameters:
Name Type Description
sectionPlane Object

剖切面状态

setState(state)

设置剖切面状态

Parameters:
Name Type Description
state Object

剖切面状态

showPlane()

显示剖切面