CADViewComponent/dist/Utils.js

24 lines
747 B
JavaScript
Raw Normal View History

2018-05-28 09:49:45 +08:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var _1 = require(".");
2018-05-28 09:49:45 +08:00
function LoadBoard(view, data) {
view.m_Scene.children.forEach(function (obj) {
var geo = obj["geometry"];
2018-05-28 09:49:45 +08:00
if (geo)
geo.dispose();
});
view.m_Scene.children.length = 0;
//加板
var _a = _1.createTemplateBoard(data), meshs = _a.meshs, edgesa = _a.edgesa;
2018-05-28 09:49:45 +08:00
//加标注
var dims = _1.DrawDimension(meshs);
(_b = view.m_Scene).add.apply(_b, meshs);
(_c = view.m_Scene).add.apply(_c, edgesa);
(_d = view.m_Scene).add.apply(_d, dims);
2018-05-28 09:49:45 +08:00
view.ViewToSwiso();
view.ZoomAll();
view.Zoom(1.1);
var _b, _c, _d;
2018-05-28 09:49:45 +08:00
}
exports.LoadBoard = LoadBoard;
//# sourceMappingURL=Utils.js.map