|
|
|
@ -1,10 +1,10 @@
|
|
|
|
|
import { Singleton } from "../../Common/Singleton";
|
|
|
|
|
import { ISpaceParse } from "../../Geometry/SpaceParse/ISpaceParse";
|
|
|
|
|
import { EWRackArrayType, EFullType, EFullDir, IWineRackOption } from "../../UI/Store/WineRackInterface";
|
|
|
|
|
import { Vector3 } from "three";
|
|
|
|
|
import { operationExpReg } from "../../Common/Utils";
|
|
|
|
|
import { safeEval } from "../../Common/eval";
|
|
|
|
|
import { Singleton } from "../../Common/Singleton";
|
|
|
|
|
import { Board, BoardType } from "../../DatabaseServices/Entity/Board";
|
|
|
|
|
import { IHighSealedItem, DrillType, FaceDirection } from "../../UI/Store/BoardInterface";
|
|
|
|
|
import { ISpaceParse } from "../../Geometry/SpaceParse/ISpaceParse";
|
|
|
|
|
import { DrillType, FaceDirection, IHighSealedItem } from "../../UI/Store/BoardInterface";
|
|
|
|
|
import { EFullDir, EFullType, EWRackArrayType, IWineRackOption } from "../../UI/Store/WineRackInterface";
|
|
|
|
|
|
|
|
|
|
export const SIN45 = Math.sin(Math.PI / 4);
|
|
|
|
|
|
|
|
|
@ -25,16 +25,12 @@ export class DrawWineRackTool extends Singleton
|
|
|
|
|
//处理格子深
|
|
|
|
|
if (!config.isTotalDepth)
|
|
|
|
|
{
|
|
|
|
|
let calcDepth = config.calcDepth.replace("L", space.Size.y.toString());
|
|
|
|
|
if (operationExpReg.test(calcDepth))
|
|
|
|
|
{
|
|
|
|
|
let depth = eval(calcDepth);
|
|
|
|
|
if (depth)
|
|
|
|
|
let depth = safeEval(config.calcDepth, { L: space.Size.x, W: space.Size.y, H: space.Size.z });;
|
|
|
|
|
if (!isNaN(depth))
|
|
|
|
|
{
|
|
|
|
|
space.m_SpaceBox.max.setY(space.m_SpaceBox.min.y + depth);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//处理前缩
|
|
|
|
|
space.m_SpaceBox.min.add(new Vector3(0, config.frontCut));
|
|
|
|
|
//左右缩
|
|
|
|
@ -159,4 +155,3 @@ export class DrawWineRackTool extends Singleton
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|