我们在浏览模型的过程中,有时候我们想对模型进行剖切,我们提供了两种方式进行剖切,分别是轴向剖切和剖切盒剖切
下面代码是在View3D选中一个构件实现剖切的具体实现方法。
- 第一步正常加载模型
- 第二步在模型加载完毕的监听事件写具体实现代码
轴向剖切
代码示例
function SectionPlaneTest(){
//剖切配置
var SectionPlaneConfig = new Glodon.Bimface.Plugins.Section.SectionPlaneConfig();
//三维模型对象
SectionPlaneConfig.viewer = viewer3D;
//剖切的进度
SectionPlaneConfig.progress=0;
//设置剖切面
SectionPlaneConfig.plane=Glodon.Bimface.Plugins.Section.SectionPlanePlane.Y;
//设置轴向剖切时模型显示的部分
SectionPlaneConfig.direction= Glodon.Bimface.Plugins.Section.SectionPlaneDirection.Reverse;
var SectionPlane = new Glodon.Bimface.Plugins.Section.SectionPlane(SectionPlaneConfig);
}
剖切盒剖切
!()[./img/he.png]
代码示例
function SectionBoxTest(){
//剖切配置
var sectionBoxConfig = new Glodon.Bimface.Plugins.Section.SectionBoxConfig();
//三维模型对象
sectionBoxConfig.viewer = viewer3D;
var sectionBox = new Glodon.Bimface.Plugins.Section.SectionBox(sectionBoxConfig);
}