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