From 9de55c834402089a0d135732db23b27809958f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E8=AF=97=E6=B4=A5?= <2723065175@qq.com> Date: Wed, 8 May 2024 02:15:03 +0000 Subject: [PATCH] =?UTF-8?q?!2721=20=E6=96=B0=E5=A2=9E:=E5=9C=86=E5=BC=A7?= =?UTF-8?q?=E6=9D=BF=E5=9C=86=E5=BC=A7=E6=A7=BD=E9=80=9A=E7=94=A8=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Add-on/ArcBoard/ArcBoardFeeding.ts | 6 +- .../ArcBoardGeooveConfig/ArcBoardGroove.tsx | 107 ++++++++++ .../ArcBoardGrooveStore.ts | 28 +++ src/Add-on/ArcBoard/DrawArcBoard.ts | 195 ++++++++++++------ src/DatabaseServices/Entity/Board.ts | 28 ++- .../Template/Action/TemplateFilletAction.ts | 1 + src/Editor/DefaultConfig.ts | 13 +- src/UI/Components/Board/ArcBoardOption.tsx | 3 +- src/UI/Components/Board/BoardModalType.ts | 1 + .../Store/OptionInterface/IOptionInterface.ts | 10 + 10 files changed, 310 insertions(+), 82 deletions(-) create mode 100644 src/Add-on/ArcBoard/ArcBoardGeooveConfig/ArcBoardGroove.tsx create mode 100644 src/Add-on/ArcBoard/ArcBoardGeooveConfig/ArcBoardGrooveStore.ts diff --git a/src/Add-on/ArcBoard/ArcBoardFeeding.ts b/src/Add-on/ArcBoard/ArcBoardFeeding.ts index 4a0cf501a..3d6889008 100644 --- a/src/Add-on/ArcBoard/ArcBoardFeeding.ts +++ b/src/Add-on/ArcBoard/ArcBoardFeeding.ts @@ -17,7 +17,7 @@ export interface ArcBoardOptions grooveWidth: number; retainedThickness: number; knifeRadius: number; - grooveAddLengt: number; + grooveAddLength: number; grooveAddWidth: number; grooveAddDepth: number; arcExtension: number; @@ -30,7 +30,7 @@ export const defultArcBoardOption: ArcBoardOptions = { grooveWidth: 6, retainedThickness: 2, knifeRadius: 3, - grooveAddLengt: 0, + grooveAddLength: 0, grooveAddWidth: 0, grooveAddDepth: 0, arcExtension: 0, @@ -122,7 +122,7 @@ export function ParseBoardArcFeed(br: Board, path: Polyline, angle: number, dir: thickness: br.Thickness - arcBoardOption.retainedThickness, dir: dir === 0 ? FaceDirection.Back : FaceDirection.Front, knifeRadius: arcBoardOption.knifeRadius, - addLen: arcBoardOption.grooveAddLengt, + addLen: arcBoardOption.grooveAddLength, addWidth: arcBoardOption.grooveAddWidth, addDepth: arcBoardOption.grooveAddDepth, }); diff --git a/src/Add-on/ArcBoard/ArcBoardGeooveConfig/ArcBoardGroove.tsx b/src/Add-on/ArcBoard/ArcBoardGeooveConfig/ArcBoardGroove.tsx new file mode 100644 index 000000000..a0af49818 --- /dev/null +++ b/src/Add-on/ArcBoard/ArcBoardGeooveConfig/ArcBoardGroove.tsx @@ -0,0 +1,107 @@ +import { Button, Checkbox, Classes } from "@blueprintjs/core"; +import { observer } from "mobx-react"; +import React from "react"; +import { CheckObjectType } from "../../../Common/CheckoutVaildValue"; +import { SetBoardDataItem } from "../../../UI/Components/Board/BoardCommon"; +import { BoardModalType } from "../../../UI/Components/Board/BoardModalType"; +import { Config_ModalType } from "../../../UI/Components/Board/UserConfigComponent"; +import { CommonModal } from "../../../UI/Components/Modal/ModalContainer"; +import { ModalState } from "../../../UI/Components/Modal/ModalInterface"; +import { ArcBoardGrooveStore } from "./ArcBoardGrooveStore"; + +@observer +export class ArcBoardGroove extends React.Component<{ store: ArcBoardGrooveStore, type: BoardModalType; }, {}> +{ + curveBoardPars = [ + ["retainedThickness", "留底厚度"], + ["knifeRadius", "刀半径"], + ["grooveAddLength", "槽加长"], + ["grooveAddWidth", "槽加宽"], + ["grooveAddDepth", "槽加深"], + ]; + + render() + { + const { store, type } = this.props; + return ( + store.OnOk(ModalState.Cancel)} + configType={Config_ModalType.ConfigListModal} + store={store} + type={type} + footerChildren={ + <> +