|
|
|
@ -46,12 +46,7 @@ export class DrawDrawrer implements Command
|
|
|
|
|
store.totalDepth = safeEval(FixedNotZero(size.y, 2));
|
|
|
|
|
|
|
|
|
|
if (store.m_Option.isAuto)
|
|
|
|
|
{
|
|
|
|
|
let totalDepth = store.m_Option.drawerTotalDepth || store.totalDepth;
|
|
|
|
|
let val = Math.floor((totalDepth - store.m_Option.offset) / 50) * 50;
|
|
|
|
|
store.m_Option.depth = val;
|
|
|
|
|
store.UIOption.depth = val.toString();
|
|
|
|
|
}
|
|
|
|
|
store.SetDrawerDepth();
|
|
|
|
|
|
|
|
|
|
app.Editor.ModalManage.RenderModal(DoorModal, { store, type: BoardModalType.Ct });
|
|
|
|
|
let res = await app.Editor.ModalManage.Wait();
|
|
|
|
@ -264,12 +259,11 @@ export class DrawDrawrer implements Command
|
|
|
|
|
templateSpace.HParam.expr = isLock ? spaceParse.Size.z - option.topOffset - option.bottomOffset : "_DIV";
|
|
|
|
|
templateSpace.PYParam.expr = "MBH";
|
|
|
|
|
|
|
|
|
|
let depth = (option.drawerTotalDepth > 0 && option.depth > option.drawerTotalDepth) ? option.drawerTotalDepth : option.depth;
|
|
|
|
|
let depth = option.depth;
|
|
|
|
|
|
|
|
|
|
templateSpace.GetParam("BH").value = option.thickness;
|
|
|
|
|
|
|
|
|
|
this.AppendTemplateParam("DWDEEPTH", depth, "抽屉深度", templateSpace);
|
|
|
|
|
templateSpace.GetParam("DWDEEPTH").expr = `(_W>0&&_W<=${depth})?_W:${depth}`;
|
|
|
|
|
|
|
|
|
|
this.AppendTemplateParam("MBH", option.offset, "抽屉内缩", templateSpace);
|
|
|
|
|
|
|
|
|
@ -338,7 +332,7 @@ export class DrawDrawrer implements Command
|
|
|
|
|
colTemp.LParam.expr = lValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
colTemp.WParam.expr = "_W-_MBH";
|
|
|
|
|
colTemp.WParam.expr = "_W-_MBH-5";
|
|
|
|
|
colTemp.HParam.expr = "_H";
|
|
|
|
|
colTemp.PXParam.expr = "_POS";
|
|
|
|
|
colTemp.GetParam("BH").value = 18;
|
|
|
|
@ -468,7 +462,11 @@ export class DrawDrawrer implements Command
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rowTemplate.LParam.expr = "_L";
|
|
|
|
|
rowTemplate.WParam.expr = (opt.isAuto && opt.drawerTotalDepth === 0) ? "floor((_W-5)/50)*50" : "floor((__DWDEEPTH-__MBH)/50)*50";
|
|
|
|
|
//输入的深度也按50倍数 6.30
|
|
|
|
|
let wExpr = opt.isAuto ? "floor(_W/50)*50" : "floor(__DWDEEPTH/50)*50";
|
|
|
|
|
if (opt.drawerTotalDepth > 0)
|
|
|
|
|
wExpr = `${wExpr}>${opt.drawerTotalDepth}?${opt.drawerTotalDepth}:${wExpr}`;
|
|
|
|
|
rowTemplate.WParam.expr = wExpr;
|
|
|
|
|
rowTemplate.PZParam.expr = "_POS";
|
|
|
|
|
|
|
|
|
|
let bhPar = rowTemplate.GetParam("BH");
|
|
|
|
|