From e8842e58e444c8d111af6490ff27aca5177da0ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AD=90=E6=B6=B5?= <2067519648@qq.com> Date: Tue, 9 Jan 2024 08:40:15 +0000 Subject: [PATCH] =?UTF-8?q?!2513=20=E4=BC=98=E5=8C=96:=20=E5=88=80?= =?UTF-8?q?=E8=B7=AF=E6=B7=B1=E5=BA=A6=E4=B8=8D=E8=83=BD=E4=B8=BA=E8=B4=9F?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Add-on/CommandFeeding.ts | 15 +++++++++++++-- .../RightPanel/Modeling/ModelingComponent2.tsx | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/Add-on/CommandFeeding.ts b/src/Add-on/CommandFeeding.ts index cc6d32cb2..c2c296f4c 100644 --- a/src/Add-on/CommandFeeding.ts +++ b/src/Add-on/CommandFeeding.ts @@ -32,8 +32,19 @@ export class FeedingCommand implements Command let distRes = await app.Editor.GetDistance({ Msg: "请点击或输入矩形槽走刀冗余值:", Default: redundancyKnif }); if (distRes.Status === PromptStatus.OK) { - redundancyKnif = distRes.Distance; - prompt.Msg = `选择板件,矩形槽刀冗余${redundancyKnif}:`; + if (distRes.Distance > 2 || distRes.Distance < 0) + { + AppToaster.show({ + message: "矩形槽刀路冗余值要在0-2之间", + timeout: 5000, + intent: Intent.DANGER, + }); + } + else + { + redundancyKnif = distRes.Distance; + prompt.Msg = `选择板件,矩形槽刀冗余${redundancyKnif}:`; + } } return true; } diff --git a/src/UI/Components/RightPanel/Modeling/ModelingComponent2.tsx b/src/UI/Components/RightPanel/Modeling/ModelingComponent2.tsx index 249b9a8ba..fb9946fe6 100644 --- a/src/UI/Components/RightPanel/Modeling/ModelingComponent2.tsx +++ b/src/UI/Components/RightPanel/Modeling/ModelingComponent2.tsx @@ -75,7 +75,7 @@ export class ModelingComponent2 extends React.Component<{ store?: Modeling2Store } { !is3D &&