!1672 修复:绘制立板时,不勾选总深,设置前缩时,会变成向后移动,不勾选总高,设置位高时,会变成向上运动

pull/1673/MERGE
黄诗津 3 years ago committed by ChenX
parent cd0696b1c6
commit a5ce930469

@ -96,14 +96,14 @@ export function BuildVerticalBoards(opt: VerticalBoardOption, space: ISpaceParse
let frontShrink = safeEval(opt.calcFrontShrink, params); let frontShrink = safeEval(opt.calcFrontShrink, params);
let bottomShink = safeEval(opt.calcBottomShrink, params); let bottomShink = safeEval(opt.calcBottomShrink, params);
let width: number; let width: number;
if (opt.isTotalWidth) if (opt.isTotalWidth)
width = size.y - frontShrink; width = size.y;
else else
{ {
width = safeEval(opt.calcWidth, params); width = safeEval(opt.calcWidth, params);
} }
width -= frontShrink;
if (width <= 0) if (width <= 0)
{ {
@ -113,11 +113,12 @@ export function BuildVerticalBoards(opt: VerticalBoardOption, space: ISpaceParse
let length: number; let length: number;
if (opt.isTotalLength) if (opt.isTotalLength)
length = size.z - bottomShink; length = size.z;
else else
{ {
length = safeEval(opt.calcHeight, params); length = safeEval(opt.calcHeight, params);
} }
length -= bottomShink;
let count = opt.count; let count = opt.count;
let type = opt.boardRelative; let type = opt.boardRelative;

@ -13,7 +13,7 @@ export const VerticalBoardModal =
const scalePars = [["calcFrontShrink", "前缩"], ["calcBottomShrink", "位高"], ["calcWidth", "板深"], ["calcHeight", "板高"]]; const scalePars = [["calcFrontShrink", "前缩"], ["calcBottomShrink", "位高"], ["calcWidth", "板深"], ["calcHeight", "板高"]];
const m_ScaleParameter = [["knifeRadius", "刀半径"], ["grooveAddLength", "槽加长"], ["grooveAddWidth", "槽加宽"], ["grooveAddDepth", "槽加深"]]; const m_ScaleParameter = [["knifeRadius", "刀半径"], ["grooveAddLength", "槽加长"], ["grooveAddWidth", "槽加宽"], ["grooveAddDepth", "槽加深"]];
const brOpt = store.m_Option; const brOpt = store.m_Option;
const uiOption = props.store.UIOption; const uiOption = store.UIOption;
return ( return (
<> <>
@ -47,8 +47,8 @@ export const VerticalBoardModal =
type={CheckObjectType.BR} type={CheckObjectType.BR}
key={k} key={k}
optKey={k} optKey={k}
option={brOpt}
uiOption={uiOption} uiOption={uiOption}
option={store.m_Option}
title={v} title={v}
isDisabled={(k === "calcWidth" && store.m_Option.isTotalWidth) isDisabled={(k === "calcWidth" && store.m_Option.isTotalWidth)
|| (k === "calcHeight" && store.m_Option.isTotalLength) || (k === "calcHeight" && store.m_Option.isTotalLength)

Loading…
Cancel
Save