排钻显示改成实体显示.
This commit is contained in:
9
dist/createBoard.js
vendored
9
dist/createBoard.js
vendored
@@ -2,6 +2,7 @@
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const THREE = require("three");
|
||||
const three_1 = require("three");
|
||||
const ColorPalette_1 = require("./ColorPalette");
|
||||
const GeUtils_1 = require("./GeUtils");
|
||||
const Material_1 = require("./Material");
|
||||
const RotateUV_1 = require("./RotateUV");
|
||||
@@ -123,14 +124,18 @@ function createBoard(boardData) {
|
||||
if (boardData["Drillings"]) {
|
||||
let dris = boardData["Drillings"];
|
||||
for (let dri of dris) {
|
||||
let geo = new three_1.CylinderGeometry(dri.r, dri.r, dri.h, 32);
|
||||
let geo = new three_1.CylinderGeometry(dri.r, dri.r, dri.h, 8);
|
||||
geo.rotateX(Math.PI * 0.5);
|
||||
if (dri.f === 0) //0正
|
||||
geo.translate(dri.x, dri.y, -dri.h * 0.5);
|
||||
else //1反
|
||||
geo.translate(dri.x, dri.y, dri.h * 0.5 - boardData["H"]);
|
||||
geo.applyMatrix(boardMat);
|
||||
edges.push(createEdge(geo));
|
||||
let mesh = new three_1.Mesh(geo, ColorPalette_1.ColorMaterial.GetLineMaterial(1));
|
||||
edges.push(mesh);
|
||||
// let edge = createEdge(geo);
|
||||
// edge.material = new LineBasicMaterial({ color: new Color(1, 0, 0) });
|
||||
// edges.push(edge);
|
||||
// let subCsg = new ThreeBSP(geo);
|
||||
// thisCsg = thisCsg.subtract(subCsg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user