修正排钻孔洞没有在正确的位置

This commit is contained in:
ChenX
2018-05-31 11:24:37 +08:00
parent 128b1bcf70
commit ffd1404d12
4 changed files with 12 additions and 4 deletions

View File

@@ -163,7 +163,12 @@ export function createBoard(boardData: object)
{
let geo = new CylinderGeometry(dri.r, dri.r, dri.h, 32);
geo.rotateX(Math.PI * 0.5);
geo.translate(dri.x, dri.y, 0);
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));