diff --git a/src/Add-on/showModal/ShowKnifeManageModal.ts b/src/Add-on/showModal/ShowKnifeManageModal.ts new file mode 100644 index 000000000..1a49f02d3 --- /dev/null +++ b/src/Add-on/showModal/ShowKnifeManageModal.ts @@ -0,0 +1,12 @@ +import { Command } from './../../Editor/CommandMachine'; +import { app } from './../../ApplicationServices/Application'; +import { KnifeManage } from '../../UI/Components/RightPanel/Modeling/KnifeManage'; + + +export class ShowKinfeManageModal implements Command +{ + async exec() + { + app.Editor.ModalManage.RenderModeless(KnifeManage); + } +} diff --git a/src/Common/Request.ts b/src/Common/Request.ts index e4cfddb22..7150e4c2e 100644 --- a/src/Common/Request.ts +++ b/src/Common/Request.ts @@ -14,6 +14,7 @@ export enum DirectoryId ToplineDir = "4", //材质根目录 TemplateDir = "5", //材质根目录 DrillingDir = "6", //排钻目录 + KnifePathDir = "7", //刀路目录 } export enum RequestStatus diff --git a/src/Editor/CommandRegister.ts b/src/Editor/CommandRegister.ts index 7d0d10ad7..94f310d19 100644 --- a/src/Editor/CommandRegister.ts +++ b/src/Editor/CommandRegister.ts @@ -163,6 +163,7 @@ import { Command_ShowProcessingGroupModal2 } from "../Add-on/ShowProcessingGroup import { Command_TestTape } from "../Add-on/test/TestTape"; import { KjlExport } from "../Add-on/KJL/KjlExport"; import { Command_SetBRXAxis } from "../Add-on/Command_SetBRXAxis"; +import { ShowKinfeManageModal } from './../Add-on/showModal/ShowKnifeManageModal'; export function registerCommand() { @@ -451,6 +452,7 @@ export function registerCommand() commandMachine.RegisterCommand("interfere", new Interfere()); commandMachine.RegisterCommand("testw", new Command_TestTape()); + commandMachine.RegisterCommand("showknifeMg", new ShowKinfeManageModal()); RegistCustomCommand(); } diff --git a/src/UI/Components/Board/BoardConfigModal.tsx b/src/UI/Components/Board/BoardConfigModal.tsx index 96c8644a5..4788ccdd5 100644 --- a/src/UI/Components/Board/BoardConfigModal.tsx +++ b/src/UI/Components/Board/BoardConfigModal.tsx @@ -6,7 +6,6 @@ import { Matrix4 } from "three"; import { ExtrudeApplyContour, SelectExtrudeContour, selectOutlinePosition } from "../../../Add-on/DrawBoard/DrawSpecialShapeBoardTool"; import { app } from "../../../ApplicationServices/Application"; import { CheckObjectType } from "../../../Common/CheckoutVaildValue"; -import { DataAdapter } from "../../../Common/DataAdapter"; import { Board } from "../../../DatabaseServices/Entity/Board"; import { Contour } from "../../../DatabaseServices/Contour"; import { ExtrudeSolid } from "../../../DatabaseServices/Entity/Extrude"; @@ -21,6 +20,7 @@ import { BoardTypeComponent, ItemName, SetBoardDataBlock } from "./BoardCommon"; import { RightTabId } from "../RightPanel/RightPanel"; import { Region } from "../../../DatabaseServices/Entity/Region"; import { FixedNotZero } from "../../../Common/Utils"; +import { TempEditor } from './../../../Editor/TempEditor'; interface BoardConfigProps { @@ -33,6 +33,13 @@ interface BoardConfigProps uiBoardConfig: IUiOption; } +enum EModelingType +{ + V1 = 1, + V2 = 2, + V3 = 3, +} + @observer export class BoardConfigModal extends React.Component{ private pars = [["height", "显示高"], ["width", "显示宽"], ["thickness", "显示厚"], @@ -46,10 +53,209 @@ export class BoardConfigModal extends React.Component{ private rotatePars = [ ["rotateX", "旋转X"], ["rotateY", "旋转Y"], ["rotateZ", "旋转Z"] ]; + private modeingType = EModelingType.V1; constructor(props) { super(props); } + componentWillUnmount() + { + if (TempEditor.EditorIng) + { + TempEditor.End(); + } + } + render() + { + const { + boardConfig, + boardProcess, + grooveOption, + canDrawSpeical, + canModeling, + } = this.props; + + return ( +
+ + + + + + +
+ canDrawSpeical.set(!canDrawSpeical.get())} + /> + canModeling.set(!canModeling.get())} + /> +
+ {/*
+
+
+
*/} +
+ ); + } + /** + * 提取 + */ + private PickUpModelingOutline = async () => + { + await app.Editor.ModalManage.EndExecingCmd(); + if (!commandMachine.CommandStart("_pick")) + return; + app.Editor.SelectCtrl.Cancel(); + app.Editor.ModalManage.ToggleShow(); + app.Editor.MaskManage.Clear(); + let br = this.props.br; + app.Viewer.CameraCtrl.LookAt(br.Normal.negate()); + app.Viewer.CameraCtrl.ZoomExtensBox3(br.BoundingBox.expandByScalar(1000)); + app.Editor.UCSMatrix = new Matrix4().extractRotation(br.OCS); + + let cu = JigUtils.Draw(br.ContourCurve.Clone().ApplyMatrix(br.OCS)); + let moveCus = [cu]; + + let store = RightPanelStore.GetInstance() as RightPanelStore; + + //初始化造型数据,提取出形状 + store.modelingStore.InitModelingItems(); + + let colorIndex = 1; + let dataMap = new Map(); + + for (let data of br.BoardModeling) + { + let str = [data.thickness, data.dir, data.knifeRadius, data.addLen].join("-"); + let color: number; + if (dataMap.has(str)) + color = dataMap.get(str); + else + { + color = colorIndex; + dataMap.set(str, color); + colorIndex++; + + store.modelingStore.ChangeModelingValue(color - 1, data); + } + + let cu = JigUtils.Draw(data.shape.Outline.Curve.Clone().ApplyMatrix(br.OCS)); + cu.ColorIndex = color; + moveCus.push(cu); + for (let c of data.shape.Holes) + { + cu = JigUtils.Draw(c.Curve.Clone().ApplyMatrix(br.OCS)); + cu.ColorIndex = color; + moveCus.push(cu); + } + } + + let isOk = await selectOutlinePosition(moveCus); + app.Editor.ModalManage.ToggleShow(); + app.Editor.MaskManage.ShowMask(); + if (isOk) + { + //显示右侧状态栏 + store.modelingStore.isUpdate = false; + store.modelingStore.configName = ""; + store.m_IsShow = true; + if (this.modeingType === EModelingType.V1) + store.m_TabId = RightTabId.Model; + else + { + store.m_TabId = RightTabId.Model2; + } + app.Editor.MaskManage.OnFocusEvent(); + store.modelingStore.isUpdate = true; + } + + commandMachine.CommandEnd(); + }; + PickUpModelingOutline2 = async () => + { + this.modeingType = EModelingType.V2; + await this.PickUpModelingOutline(); + }; + PickUpModelingOutline3 = async () => + { + this.modeingType = EModelingType.V3; + TempEditor.Start(); + app.Database.hm.lockIndex++;//禁止初始化动作被撤销 + let con = this.props.br.ContourCurve.Clone(); + let c2 = con.Clone(); + c2.Position = c2.Position.setZ(this.props.br.Thickness); + app.Database.ModelSpace.Append(con); + app.Database.ModelSpace.Append(c2); + app.Editor.MaskManage.OnFocusEvent(); + }; + private ApplyModeing = async () => + { + switch (this.modeingType) + { + case EModelingType.V1: + case EModelingType.V2: + await this.ChangeModeling(); + break; + case EModelingType.V3: + await this.ChangeModeling3(); + default: + break; + } + }; private ChangeModeling = async () => { await app.Editor.ModalManage.EndExecingCmd(); @@ -121,50 +327,11 @@ export class BoardConfigModal extends React.Component{ } } } - - if (contourMap.size > 0) - { - for (let [color, contours] of contourMap) - { - for (let con of contours) - { - con.Curve.ApplyMatrix(applyMatrix); - con.Curve.Position = con.Curve.Position.setZ(0); - } - - let cd = rightStore.modelingStore.modelingItems[color - 1]; - let shapes = Shape.pairHoleAndOutline(contours); - for (let shape of shapes) - { - let groove = new ExtrudeSolid(); - groove.Thickness = cd.height; - groove.ContourCurve = shape.Outline.Curve; - groove.KnifeRadius = cd.knifeRad; - groove.GroovesAddLength = cd.addLen; - for (let hole of shape.Holes) - { - let holeSolid = new ExtrudeSolid(); - holeSolid.Thickness = cd.height; - holeSolid.ContourCurve = hole.Curve; - groove.AppendGroove(holeSolid); - } - - groove.ApplyMatrix(br.OCS); - if (cd.dir === FaceDirection.Front) - groove.ApplyMatrix(MoveMatrix(br.Normal.multiplyScalar(br.Thickness - groove.Thickness))); - br.AppendGroove(groove); - } - } - - let splits: Board[] = []; - br.GrooveCheckAll(splits); - for (let br of splits) - app.Database.ModelSpace.Append(br); - - br.Update(); - } + if (this.modeingType === EModelingType.V1) + this.AddModeling(contourMap, applyMatrix); + else + this.AddModeling2(contourMap, applyMatrix); } - }; await exec(); @@ -183,146 +350,65 @@ export class BoardConfigModal extends React.Component{ commandMachine.CommandEnd(); return; }; - - /** - * 提取 - */ - private PickUpModelingOutline = async () => + private AddModeling = (contourMap: Map, applyMatrix: Matrix4) => { - await app.Editor.ModalManage.EndExecingCmd(); - if (!commandMachine.CommandStart("_pick")) - return; - app.Editor.SelectCtrl.Cancel(); - app.Editor.ModalManage.ToggleShow(); - app.Editor.MaskManage.Clear(); - let br = this.props.br; - app.Viewer.CameraCtrl.LookAt(br.Normal.negate()); - app.Viewer.CameraCtrl.ZoomExtensBox3(br.BoundingBox.expandByScalar(1000)); - app.Editor.UCSMatrix = new Matrix4().extractRotation(br.OCS); - - let cu = JigUtils.Draw(br.ContourCurve.Clone().ApplyMatrix(br.OCS)); - let moveCus = [cu]; - - let store = RightPanelStore.GetInstance() as RightPanelStore; - - //初始化造型数据,提取出形状 - store.modelingStore.InitModelingItems(); - - let colorIndex = 1; - let dataMap = new Map(); - - for (let data of br.BoardModeling) + if (contourMap.size > 0) { - let str = [data.thickness, data.dir, data.knifeRadius, data.addLen].join("-"); - let color: number; - if (dataMap.has(str)) - color = dataMap.get(str); - else + let br = this.props.br; + const rightStore = RightPanelStore.GetInstance() as RightPanelStore; + for (let [color, contours] of contourMap) { - color = colorIndex; - dataMap.set(str, color); - colorIndex++; + for (let con of contours) + { + con.Curve.ApplyMatrix(applyMatrix); + con.Curve.Position = con.Curve.Position.setZ(0); + } - store.modelingStore.ChangeModelingValue(color - 1, data); - } + let cd = rightStore.modelingStore.modelingItems[color - 1]; + let shapes = Shape.pairHoleAndOutline(contours); + for (let shape of shapes) + { + let groove = new ExtrudeSolid(); + groove.Thickness = cd.height; + groove.ContourCurve = shape.Outline.Curve; + groove.KnifeRadius = cd.knifeRad; + groove.GroovesAddLength = cd.addLen; + for (let hole of shape.Holes) + { + let holeSolid = new ExtrudeSolid(); + holeSolid.Thickness = cd.height; + holeSolid.ContourCurve = hole.Curve; + groove.AppendGroove(holeSolid); + } - let cu = JigUtils.Draw(data.shape.Outline.Curve.Clone().ApplyMatrix(br.OCS)); - cu.ColorIndex = color; - moveCus.push(cu); - for (let c of data.shape.Holes) - { - cu = JigUtils.Draw(c.Curve.Clone().ApplyMatrix(br.OCS)); - cu.ColorIndex = color; - moveCus.push(cu); + groove.ApplyMatrix(br.OCS); + if (cd.dir === FaceDirection.Front) + groove.ApplyMatrix(MoveMatrix(br.Normal.multiplyScalar(br.Thickness - groove.Thickness))); + br.AppendGroove(groove); + } } - } - let isOk = await selectOutlinePosition(moveCus); - app.Editor.ModalManage.ToggleShow(); - app.Editor.MaskManage.ShowMask(); - if (isOk) + let splits: Board[] = []; + br.GrooveCheckAll(splits); + for (let br of splits) + app.Database.ModelSpace.Append(br); + + br.Update(); + } + }; + private AddModeling2 = (contourMap: Map, applyMatrix: Matrix4) => + { + if (contourMap.size > 0) { - //显示右侧状态栏 - store.modelingStore.isUpdate = false; - store.modelingStore.configName = ""; - store.m_IsShow = true; - store.m_TabId = RightTabId.Model; - app.Editor.MaskManage.OnFocusEvent(); - store.modelingStore.isUpdate = true; + let br = this.props.br; + const rightStore = RightPanelStore.GetInstance() as RightPanelStore; + //TODO:造型2 写入板件 } - - commandMachine.CommandEnd(); }; - render() + private ChangeModeling3 = async () => { - const { - boardConfig, - boardProcess, - grooveOption, - canDrawSpeical, - canModeling, - } = this.props; - - return ( -
- - - - - - -
- canDrawSpeical.set(!canDrawSpeical.get())} - /> - canModeling.set(!canModeling.get())} - /> -
-
- ); - } + if (TempEditor.EditorIng) + TempEditor.End(); + this.modeingType = EModelingType.V1; + }; } diff --git a/src/UI/Components/Modal/ModalsManage.ts b/src/UI/Components/Modal/ModalsManage.ts index 8c6b72388..628dba8dc 100644 --- a/src/UI/Components/Modal/ModalsManage.ts +++ b/src/UI/Components/Modal/ModalsManage.ts @@ -120,7 +120,7 @@ export class ModalManage onKeyUp(e: KeyboardEvent) { } - RenderModeless(Component: any, props: { [key: string]: any; }, option: IModalProps = {}) + RenderModeless(Component: any, props: { [key: string]: any; } = {}, option: IModalProps = {}) { app.Editor.MaskManage.ShowMask(); this.RestoreZIndex(); diff --git a/src/UI/Components/RightPanel/Modeling.less b/src/UI/Components/RightPanel/Modeling.less index 767c97c82..5c55593c6 100644 --- a/src/UI/Components/RightPanel/Modeling.less +++ b/src/UI/Components/RightPanel/Modeling.less @@ -1,67 +1,100 @@ // #RightPanel .bp3-tabs{ // height: 90%; // } -#RightPanel .bp3-card{ +#RightPanel .bp3-card { padding: 0; border-radius: 0px; } -#RightPanel .bp3-tab-panel{ + +#RightPanel .bp3-tab-panel { width: 100%; overflow: auto; padding: 10px; } + #RightPanel .bp3-tab-panel.tab-unstyle { - .bp3-tab.tab-unstyle{ + .bp3-tab.tab-unstyle { width: calc(100% * 0.33333); // border-width: 0; outline: none; // background: #293742;//背景色待更改 且可随主题变化 } - &#bp3-tab-panel_undefined_scenes,&#bp3-tab-panel_undefined_modeling{ + + &#bp3-tab-panel_undefined_scenes, + &#bp3-tab-panel_undefined_modeling { padding: 10px; } -} -.modeling{ +} + +.modeling { margin-bottom: 2rem; width: 100%; - &>li>label{ + + &>li>label { text-align: center; - flex:1; - box-shadow: 0 0 0 0 rgba(19, 124, 189, 0), - 0 0 0 0 rgba(19, 124, 189, 0), - 0 0 0 0 rgba(19, 124, 189, 0), - inset 0 0 0 1px rgba(16, 22, 26, 0.3), - inset 0 1px 1px rgba(16, 22, 26, 0); + flex: 1; + box-shadow: 0 0 0 0 rgba(19, 124, 189, 0), + 0 0 0 0 rgba(19, 124, 189, 0), + 0 0 0 0 rgba(19, 124, 189, 0), + inset 0 0 0 1px rgba(16, 22, 26, 0.3), + inset 0 1px 1px rgba(16, 22, 26, 0); } - &>li{ + + &>li { display: flex; justify-content: space-between; - &:first-child>label{ + + &:first-child>label { padding: 5px 0; } - label,span,input,&>div { + + label, + span, + input, + &>div { width: 20%; margin: 0; } } } -.drilling{ - &>li{ - &>div{ + +.drilling { + &>li { + &>div { width: 50%; } } } + +.modeling2 { + &>li { + + label, + span, + input, + &>div { + width: 33.333333%; + } + } +} + /* 滚动条 */ ::-webkit-scrollbar-track-piece { - background-color: #fff; /*滚动条的背景颜色*/ - border-radius: 0; /*滚动条的圆角宽度*/ + background-color: #fff; + /*滚动条的背景颜色*/ + border-radius: 0; + /*滚动条的圆角宽度*/ } + ::-webkit-scrollbar { - width: 10px; /*滚动条的宽度*/ - height: 8px; /*滚动条的高度*/ + width: 10px; + /*滚动条的宽度*/ + height: 8px; + /*滚动条的高度*/ } -::-webkit-scrollbar-thumb:vertical { /*垂直滚动条的样式*/ + +::-webkit-scrollbar-thumb:vertical { + /*垂直滚动条的样式*/ height: 50px; background-color: #999; border-radius: 4px; @@ -69,7 +102,9 @@ outline-offset: -2px; border: 2px solid #fff; } -::-webkit-scrollbar-thumb:hover { /*滚动条的hover样式*/ + +::-webkit-scrollbar-thumb:hover { + /*滚动条的hover样式*/ height: 50px; background-color: #9f9f9f; border-radius: 4px; diff --git a/src/UI/Components/RightPanel/Modeling/KnifeList.tsx b/src/UI/Components/RightPanel/Modeling/KnifeList.tsx new file mode 100644 index 000000000..0d48ed17b --- /dev/null +++ b/src/UI/Components/RightPanel/Modeling/KnifeList.tsx @@ -0,0 +1,239 @@ +import { Button, Card, Checkbox, Classes, Intent, Popover, Position, ContextMenu, Menu, MenuItem } from '@blueprintjs/core'; +import { IObservableValue } from 'mobx'; +import { observer } from 'mobx-react'; +import * as React from 'react'; +import { TempEditor } from '../../../../Editor/TempEditor'; +import { app } from '../../../../ApplicationServices/Application'; +import { Polyline } from '../../../../DatabaseServices/Entity/Polyline'; +import { PostJson, RequestStatus } from '../../../../Common/Request'; +import { ToplineUrls } from '../../../../Common/HostUrl'; +import { inflate, toplineFileIn, getPolylineSVG, deflate } from '../../../../Common/SerializeMaterial'; +import { CADFiler } from '../../../../DatabaseServices/CADFiler'; +import { commandMachine } from '../../../../Editor/CommandMachine'; +import { AppToaster } from '../../Toaster'; +import { ModalPosition } from '../../Modal/ModalInterface'; +import { IDirectoryProps } from '../../SourceManage/CommonPanel'; +import { ZoomToEntity } from '../../../Store/RightPanelStore/BoardEdgesEditor'; +import { MouseKey } from '../../../../Common/KeyEnum'; +import { KnifeManage } from './KnifeManage'; + +export interface IKnifeListProps +{ + deleteFun?: (topline: { topline_id; }) => void; + dataList?: any[]; + select?: (e: React.FormEvent, data: any) => void; + draw: (id: string) => void; + isRename: IObservableValue; + updata: (name: string, dir: IDirectoryProps, call: Function) => void; + getData?: () => void; + info: { id: string, name: string; }; +} + +@observer +export class KnifeList extends React.Component { + private _cameraFiler: CADFiler; + constructor(props) + { + super(props); + this.state = { + isContextMenuOpen: false + }; + } + private handleDbClick = async (tpdata: { topline_id: string; }) => + { + this.props.draw(tpdata.topline_id); + }; + private handleMounseDown = (e: React.MouseEvent, tpline: any) => + { + this.props.info.id = tpline.topline_id; + this.props.info.name = tpline.name; + if (e.button === MouseKey.Right) + { + this.showContextMenu(e, tpline); + } + }; + private exitEditor = () => + { + if (!this._cameraFiler) return; + app.Viewer.CameraCtrl.ReadFile(this._cameraFiler); + TempEditor.End(); + this._cameraFiler = undefined; + app.Editor.SelectCtrl.Cancel(); + app.Editor.ModalManage.RenderModal(KnifeManage, {}, { position: ModalPosition.Old }); + }; + private renderToasterMessage = () => + { + return ( +
+ 正在编辑刀路 +
+
+
+ ); + }; + private startEditorTopline = async (tpline) => + { + TempEditor.Start(); + app.Editor.ModalManage.Destory(); + + let data = await PostJson(ToplineUrls.detail, { topline_id: tpline.topline_id }); + + if (data.err_code === RequestStatus.Ok) + { + let file = inflate(data.toplines.file); + let pl = toplineFileIn(file); + app.Database.ModelSpace.Append(pl); + app.Database.hm.lockIndex++;//禁止初始化动作被撤销 + this._cameraFiler = new CADFiler; + app.Viewer.CameraCtrl.WriteFile(this._cameraFiler); + ZoomToEntity(pl); + commandMachine.ExecCommand('fs'); + AppToaster.show({ + message: this.renderToasterMessage(), + intent: Intent.PRIMARY, + timeout: 0, + onDismiss: this.exitEditor + }); + } + }; + private handleUpdateTopline = async () => + { + await app.Editor.ModalManage.EndExecingCmd(); + + let pl = app.Viewer.VisibleEntitys.find(en => en instanceof Polyline) as Polyline; + if (pl) + { + let topline_id = this.props.info.id; + let vf = new CADFiler(); + pl.WriteFile(vf); + + let fileJson = JSON.stringify(vf.Data); + let logo = getPolylineSVG(pl); + let data = await PostJson(ToplineUrls.update, { + topline_id, + logo, + file: deflate(fileJson), + zip_type: "gzip", + }); + AppToaster.clear(); + if (data.err_code === RequestStatus.Ok) + { + this.props.getData(); + AppToaster.show({ + message: "刀路保存成功", + timeout: 1000, + intent: Intent.SUCCESS, + }); + } + } + else + { + AppToaster.clear(); + AppToaster.show({ + message: "顶线轮廓错误,保存失败", + timeout: 1000, + intent: Intent.DANGER, + }); + } + }; + //展示右键菜单 + private showContextMenu = (e: React.MouseEvent, tpline) => + { + ContextMenu.show( + + this.props.isRename.set(true)} + /> + this.startEditorTopline(tpline)} + /> + , + { left: e.clientX, top: e.clientY }, + () => this.setState({ isContextMenuOpen: false }), + ); + this.setState({ isContextMenuOpen: true }); + + e.stopPropagation(); + e.preventDefault(); + }; + public render() + { + return ( +
    + { + this.props.dataList.map(tpline => + { + return ( +
  • this.handleMounseDown(e, tpline)} + style={{ + background: this.props.info.id === tpline.topline_id && "rgba(162, 186, 197, 0.34)", + }} + > +
    this.handleDbClick(tpline)} + > + + + +
    +

    {tpline.name}

    + node.parentElement.parentElement.style.zIndex = "33"} + content={ + +

    确认删除文件

    +
    +
    +
    + } + target={
  • + ); + }) + } +
+ ); + } +} diff --git a/src/UI/Components/RightPanel/Modeling/KnifeManage.tsx b/src/UI/Components/RightPanel/Modeling/KnifeManage.tsx new file mode 100644 index 000000000..4de2bb63f --- /dev/null +++ b/src/UI/Components/RightPanel/Modeling/KnifeManage.tsx @@ -0,0 +1,266 @@ +import React, { Component } from 'react'; +import { CommonModal } from '../../Modal/ModalContainer'; +import { app } from '../../../../ApplicationServices/Application'; +import { CommonPanel } from '../../SourceManage/CommonPanel'; +import { DirectoryId, PostJson, RequestStatus } from '../../../../Common/Request'; +import { ToplineUrls } from '../../../../Common/HostUrl'; +import { KnifeList } from './KnifeList'; +import { Button } from '@blueprintjs/core'; +import { Intent } from '@blueprintjs/core'; +import { observable } from 'mobx'; +import { HandleDirComponent } from '../../SourceManage/HandleDirComponent'; +import { AppToaster } from '../../Toaster'; +import { IDirectoryProps } from '../../SourceManage/CommonPanel'; +import { PromptStatus } from '../../../../Editor/PromptResult'; +import { Polyline } from '../../../../DatabaseServices/Entity/Polyline'; +import { inflate, toplineFileIn, deflate, getPolylineSVG } from '../../../../Common/SerializeMaterial'; +import { commandMachine, CommandWrap } from '../../../../Editor/CommandMachine'; +import { buildTopline } from '../../../../Add-on/DrawTopline'; +import { CADFiler } from '../../../../DatabaseServices/CADFiler'; +import { observer } from 'mobx-react'; +import { hot } from 'react-hot-loader/root'; +import { GetCloseContour } from '../../../../Add-on/Sweep'; +import { MoveMatrix } from '../../../../Geometry/GeUtils'; +import { Matrix4 } from 'three'; + +interface IKnifeManageProps +{ + +} +interface IKnifeManageState +{ + +} + +@hot +@observer +export class KnifeManage extends Component { + private canAddPath = observable.box(false); + @observable private currentInfo = { id: "", name: "" }; + renderNav = () => + { + return ( +