新增NCBuilder接口 #11

Merged
xief merged 2 commits from feature/nc_builder into main 2025-08-13 17:57:59 +08:00
4 changed files with 135 additions and 9 deletions
Showing only changes of commit c32f82b847 - Show all commits

View File

@@ -73,6 +73,13 @@ export class GCodeParams {
f: number = 0; f: number = 0;
}; };
/** 单次NC加工行为 */
export interface NcAction {
readonly id: string;
readonly type: NcActionType;
readonly lineIndex: number;
}
export type NcActionType = string; export type NcActionType = string;
/** /**
@@ -81,7 +88,9 @@ export type NcActionType = string;
* @since 0.3.0 * @since 0.3.0
* @version 0.1.0 * @version 0.1.0
*/ */
export interface INcBuilder { export interface INcWriter {
get ncActions(): NcAction[];
/** 添加G代码 */ /** 添加G代码 */
gCode(code: keyof typeof GCode, params: Partial<Pick<GCodeParams, 'x' | 'y' | 'z' | 'f'> & { bul: number; }>): void; gCode(code: keyof typeof GCode, params: Partial<Pick<GCodeParams, 'x' | 'y' | 'z' | 'f'> & { bul: number; }>): void;