!2132 新增:酷家乐导入刀半径

pull/2166/MERGE
黄诗津 1 year ago committed by ChenX
parent be136eb333
commit b81c9a6f7a

@ -315,6 +315,8 @@ async function ParseModel(model: KJL_ParamModel,
br.GroovesAddLength = safeEval(kjlConfig.grooveAddLength) || 0; br.GroovesAddLength = safeEval(kjlConfig.grooveAddLength) || 0;
br.GroovesAddWidth = safeEval(kjlConfig.grooveAddWidth) || 0; br.GroovesAddWidth = safeEval(kjlConfig.grooveAddWidth) || 0;
br.GroovesAddDepth = safeEval(kjlConfig.grooveAddDepth) || 0; br.GroovesAddDepth = safeEval(kjlConfig.grooveAddDepth) || 0;
br.KnifeRadius = safeEval(kjlConfig.knifeRadius) || 3;
br.Thickness = bmodel.thickness; br.Thickness = bmodel.thickness;
let kmfx = ParseKMFX(model.parameters) ?? ParseKMFX(model.ignoreParameters) ?? ParseKMFX(model.constParameters); let kmfx = ParseKMFX(model.parameters) ?? ParseKMFX(model.ignoreParameters) ?? ParseKMFX(model.constParameters);

@ -69,6 +69,7 @@ export class UserConfig implements IConfigStore
grooveAddLength: "0", grooveAddLength: "0",
grooveAddWidth: "0", grooveAddWidth: "0",
grooveAddDepth: "1", grooveAddDepth: "1",
knifeRadius: "3",
}; };
@observable SystemConfig: ISystemConfig = { @observable SystemConfig: ISystemConfig = {
maxHightightCount: 15000, maxHightightCount: 15000,
@ -206,7 +207,8 @@ export class UserConfig implements IConfigStore
Object.assign(this.kjlConfig, { Object.assign(this.kjlConfig, {
grooveAddLength: "0", grooveAddLength: "0",
grooveAddWidth: "0", grooveAddWidth: "0",
grooveAddDepth: "1" grooveAddDepth: "1",
knifeRadius: "3",
}); });
Object.assign(this.chaidanOption, { Object.assign(this.chaidanOption, {
changXiuBian: 6, changXiuBian: 6,

@ -150,17 +150,17 @@ export class DrawConfigPanel extends React.Component<IConfigProps, {}> {
<H5></H5> <H5></H5>
<div className="flex-wrap kjl-config"> <div className="flex-wrap kjl-config">
{ {
[["槽加长", "grooveAddLength"], ["槽加宽", "grooveAddWidth"], ["槽加深", "grooveAddDepth"]].map(([t, k]) => [["槽加长", "grooveAddLength"], ["槽加宽", "grooveAddWidth"], ["槽加深", "grooveAddDepth"], ["刀半径", "knifeRadius"]].map(([t, k], i) =>
<Label className={Classes.INLINE} key={k}> <Label className={Classes.INLINE} key={k}>
<span>{t}</span> <span>{t}</span>
<ToasterInput <ToasterInput
type={CheckObjectType.OnlyNumber} type={i === 3 ? CheckObjectType.GT0Num : CheckObjectType.OnlyNumber}
option={kjlConfig} option={kjlConfig}
optKey={k} optKey={k}
onBlur={(e, hasErr) => onBlur={(e, hasErr) =>
{ {
if (hasErr) if (hasErr)
kjlConfig[k] = "0"; kjlConfig[k] = i === 3 ? "3" : "0";
}} }}
/> />
</Label> </Label>

Loading…
Cancel
Save