From d8c062d13ec28deaf4bdbd94a33a1ab4a247ef73 Mon Sep 17 00:00:00 2001 From: lixiang <504331699@qq.com> Date: Wed, 30 Jul 2025 17:20:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=8F=90=E4=BA=A4--=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=BC=80=E6=96=99=E9=A1=BA=E5=BA=8F=EF=BC=88=E6=96=B0=EF=BC=89?= =?UTF-8?q?=E5=A4=84=E7=90=86=E5=99=A8=E4=BD=BF=E7=94=A8=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=B1=BB=E5=9E=8B=EF=BC=8C=E5=B9=B6=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/index.ts | 3 +- src/models/processors/cutOrder.ts | 57 +++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 src/models/processors/cutOrder.ts diff --git a/package.json b/package.json index 1122a32..da1005c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cut-abstractions", - "version": "0.1.12", + "version": "0.1.13", "description": "", "files": [ "dist/**/*" diff --git a/src/index.ts b/src/index.ts index e2bdb36..10591e9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,4 +3,5 @@ export * from './parsers'; export * from './models/config'; export * from './models/knife'; export * from './models/file'; -export * from './models/processors/rectLayout'; \ No newline at end of file +export * from './models/processors/rectLayout'; +export * from './models/processors/cutOrder' \ No newline at end of file diff --git a/src/models/processors/cutOrder.ts b/src/models/processors/cutOrder.ts new file mode 100644 index 0000000..97f3964 --- /dev/null +++ b/src/models/processors/cutOrder.ts @@ -0,0 +1,57 @@ +/** + * 开料顺序(新)所使用的类型 + * + */ + +import { ConfigBase } from "../config"; + +/** 处理器入参 开料顺序(新) + * @author lx + * + * 注:20250730 暂无配置 留个位置 + */ +export class CutorderConfig extends ConfigBase { + // [key:string] : any +} + +/** + * 处理器输入数据源 开料顺序(新) + */ +export type CutOrderInput = { + /**开料大板 宽 */ + boardWidth: number, + /** 开料大板 高 */ + boardHeight: number, + /** 刀头大小(含修边) */ + gap: number, + /** 小板数据集合 */ + blocks: CutorderInputBlock[] +} + +/** + * 处理器输出数据 开料顺序(新) + */ +export type CutorderOutput = { + blocks: CutorderoutputBlock[] +} +/** + * 小板类型 输入 + */ +export type CutorderInputBlock = { + /** 小板唯一标识 */ + id: string | number, + /** 排版长 */ + length: number, + /** 排版宽 */ + width: number, + /** 板件坐标X */ + x: number, + /** 板件坐标y */ + y: number, +} +/** + * 小板类型 输出 + */ +export type CutorderoutputBlock = CutorderInputBlock & { + cutOrder: number +} \ No newline at end of file