From c32f82b847103d33145d00dcd0f8f658657acfab Mon Sep 17 00:00:00 2001 From: "2817212736@qq.com" <2817212736@qq.com> Date: Wed, 13 Aug 2025 17:32:20 +0800 Subject: [PATCH] =?UTF-8?q?NcBuilder=20=E6=9B=B4=E6=96=B0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8D=EF=BC=8C=E8=BF=BD=E5=8A=A0=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/nc/{ncBuilder.ts => ncWriter.ts} | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) rename src/nc/{ncBuilder.ts => ncWriter.ts} (94%) diff --git a/src/nc/ncBuilder.ts b/src/nc/ncWriter.ts similarity index 94% rename from src/nc/ncBuilder.ts rename to src/nc/ncWriter.ts index 19682fd..420f7aa 100644 --- a/src/nc/ncBuilder.ts +++ b/src/nc/ncWriter.ts @@ -73,6 +73,13 @@ export class GCodeParams { f: number = 0; }; +/** 单次NC加工行为 */ +export interface NcAction { + readonly id: string; + readonly type: NcActionType; + readonly lineIndex: number; +} + export type NcActionType = string; /** @@ -81,7 +88,9 @@ export type NcActionType = string; * @since 0.3.0 * @version 0.1.0 */ -export interface INcBuilder { +export interface INcWriter { + get ncActions(): NcAction[]; + /** 添加G代码 */ gCode(code: keyof typeof GCode, params: Partial & { bul: number; }>): void;