JavaScript SDK版本3.6.162
2021-10-20
// 构造圆管
let pipe_line = new Glodon.Bimface.Plugins.Geometry.Pipe({
// 配置圆管颜色
"color": new Glodon.Web.Graphics.Color(180, 180, 180, 1.0),
// 配置横断面参数
"crossSection": {
// 配置断面圆的半径
"radius": 20,
// 断面圆离散的段数,段数越多越精细,对性能有一定影响
"segments": 10
},
// 配置轨道参数
"rail": {
// 配置构造圆管的直线对象,line为直线,arc为圆弧
"line": {
"startPoint": {
"x": 0,
"y": 0,
"z": 0
},
"endPoint": {
"x": 1500,
"y": 1500,
"z": 1500
}
},
// 轨道离散的段数,直线默认为1
"segments": 1
}
});
// 将圆管作为外部构件载入场景
viewer3D.addExternalObject("line", pipe_line);
//构造卷帘配置项
let swipeConfig = new Glodon.Bimface.Plugins.Viewport.SwipeConfig();
// 配置viewer、卷帘样式等参数
swipeConfig.viewer = viewerGIS;
//设置卷帘两视口内的图层
swipeConfig.layerContents = [['4299692','1'],['1']];
//构造卷帘对象
swipe = new Glodon.Bimface.Plugins.Viewport.Swipe(swipeConfig);
// 开启地形时自动调整相机高度,避免相机低于地面
let webAppConfig = new Glodon.Bimface.Application.WebApplicationGISConfig();
webAppConfig.enableAutoRaiseCamera = true;
// 图纸渲染
viewerDrawing.render();
// 图纸集渲染
viewerDrawingSet.render();
BIMFACE智能客服
7*24提供专业的BIMFACE使用支持与帮助