Compare commits

...

12 Commits

Author SHA1 Message Date
5a0bfb51ac 更新版本号 2025-09-03 11:54:16 +08:00
1d84eb0d35 feat:提交 2025-08-22 18:20:45 +08:00
0e107da21b Merge branch 'main' of http://gitea.cf/MES-FE/cut-abstractions 2025-08-22 18:15:47 +08:00
edc1188a2b 更新版本号 2025-08-22 10:24:15 +08:00
8df9f5d17a 修改开料顺序入参字段boardHeight=》boardLength (#16)
Reviewed-on: #16
Co-authored-by: lixiang <504331699@qq.com>
Co-committed-by: lixiang <504331699@qq.com>
2025-08-22 10:20:56 +08:00
31ae0be530 Merge branch 'main' of http://gitea.cf/MES-FE/cut-abstractions 2025-08-22 09:45:49 +08:00
ac1e32218b feat: 提交--修改开料顺序入参字段 boardHeight =》 boardLength 2025-08-22 09:45:45 +08:00
290bbf2b5e 优化NCWriter参数格式和用法 2025-08-14 10:34:38 +08:00
7cf184f4c3 Merge branch 'main' of http://gitea.cf/MES-FE/cut-abstractions 2025-08-14 09:04:06 +08:00
e8cbdf0abc Merge branch 'dev_li' 2025-08-13 18:22:09 +08:00
5872b91606 feat: 提交-
1、移除关系转换类
2、移除多写的Ipoint类
2025-08-13 15:29:43 +08:00
147df79e44 公共类提交 2025-08-11 10:16:48 +08:00
4 changed files with 28 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "cut-abstractions", "name": "cut-abstractions",
"version": "0.3.2", "version": "0.3.5",
"description": "", "description": "",
"files": [ "files": [
"dist/**/*" "dist/**/*"

View File

@@ -10,7 +10,7 @@ import { ConfigBase } from "../config";
* *
* 注20250730 暂无配置 留个位置 * 注20250730 暂无配置 留个位置
*/ */
export class CutorderConfig extends ConfigBase { export class CutOrderConfig extends ConfigBase {
// [key:string] : any // [key:string] : any
} }
@@ -20,24 +20,24 @@ export class CutorderConfig extends ConfigBase {
export type CutOrderInput = { export type CutOrderInput = {
/**开料大板 宽 */ /**开料大板 宽 */
boardWidth: number, boardWidth: number,
/** 开料大板 */ /** 开料大板 */
boardHeight: number, boardLength: number,
/** 刀头大小(含修边) */ /** 刀头大小(含修边) */
gap: number, gap: number,
/** 小板数据集合 */ /** 小板数据集合 */
blocks: CutorderInputBlock[] blocks: CutOrderInputBlock[]
} }
/** /**
* 处理器输出数据 开料顺序(新) * 处理器输出数据 开料顺序(新)
*/ */
export type CutorderOutput = { export type CutOrderOutput = {
blocks: CutorderoutputBlock[] blocks: CutOrderoutputBlock[]
} }
/** /**
* 小板类型 输入 * 小板类型 输入
*/ */
export type CutorderInputBlock = { export type CutOrderInputBlock = {
/** 小板唯一标识 */ /** 小板唯一标识 */
id: string | number, id: string | number,
/** 排版长 */ /** 排版长 */
@@ -52,6 +52,6 @@ export type CutorderInputBlock = {
/** /**
* 小板类型 输出 * 小板类型 输出
*/ */
export type CutorderoutputBlock = CutorderInputBlock & { export type CutOrderoutputBlock = CutOrderInputBlock & {
cutOrder: number CutOrder: number
} }

View File

@@ -17,9 +17,10 @@ export type HoleToModelOutput = {
/** 孔转造型 后的 造型数据 */ /** 孔转造型 后的 造型数据 */
modelData: HoleToModelProcessingItem[], modelData: HoleToModelProcessingItem[],
/** 未处理的孔数据 以及信息 */ /** 未处理的孔数据 以及信息 */
noHandleItem: noHandleItemType[] noHandleItem: NoHandleItemType[]
} }
export type noHandleItemType = { /** 孔转造型 未处理的数据 */
export type NoHandleItemType = {
/** 未处理的孔信息 */ /** 未处理的孔信息 */
holeData: HoleToModelProcessingItem, holeData: HoleToModelProcessingItem,
/** 未处理 说明 */ /** 未处理 说明 */

View File

@@ -4,13 +4,18 @@ import { Knife } from "../models/knife";
* NC代码构建器接口实现该接口来定义一个处理器用的NC代码构建器 * NC代码构建器接口实现该接口来定义一个处理器用的NC代码构建器
* @author CZY * @author CZY
* @since 0.3.0 * @since 0.3.0
* @version 0.1.1 * @version 0.1.2
*/ */
export interface INcWriter { export interface INcWriter {
get ncActions(): NcAction[]; get ncActions(): NcAction[];
/** 添加G代码 */ /**
gCode<TCode extends keyof typeof GCode & keyof typeof CCode>(code: TCode, params: Partial<TCode extends keyof typeof GCode ? GCodeParams : CCodeParams>): void; * 写入G代码或解析一条自定义代码
* @example
* gCode('G0', { x: 0, y: 0, z: 0, f: 25000 });
* gCode('CArc', { x: 0, y: 0, z: 0, b: 1, f: 25000 });
*/
gCode<TCode extends (keyof typeof GCode | keyof typeof CCode)>(code: TCode, params: Partial<TCode extends keyof typeof GCode ? GCodeParams : CCodeParams>): void;
/** 基于刀具实体执行换刀操作 */ /** 基于刀具实体执行换刀操作 */
changeKnife(knife: Knife): void; changeKnife(knife: Knife): void;
@@ -106,9 +111,13 @@ export const CCode = {
* @param Y Y 坐标 * @param Y Y 坐标
* @param Z Z 坐标 * @param Z Z 坐标
* @param B Bulge圆弧凸度表示圆弧所包含角度的四分之一的正切值。当B=0时圆弧为直线当B>0时圆弧为顺时针圆弧当B<0时圆弧为逆时针圆弧 (所谓“顺时针”和“逆时针”是指从起始点到结束点的绘制角度) * @param B Bulge圆弧凸度表示圆弧所包含角度的四分之一的正切值。当B=0时圆弧为直线当B>0时圆弧为顺时针圆弧当B<0时圆弧为逆时针圆弧 (所谓“顺时针”和“逆时针”是指从起始点到结束点的绘制角度)
* @description 使用此命令时X, Y, Z作为圆弧的结束点当前刀具的位置作为起始点。
* @example
* FROM: CArc X0 Y10 Z0 B1
* TO: G2 X0 Y10 R5
*/ */
CArc: 'CArc', CArc: 'CArc',
}; } as const;
/** NC GCode 参数结构 */ /** NC GCode 参数结构 */
export class GCodeParams { export class GCodeParams {
@@ -138,6 +147,8 @@ export class CCodeParams {
z: number = 0; z: number = 0;
/** 使用自动圆弧(CArc)命令时,定义圆弧凸度 */ /** 使用自动圆弧(CArc)命令时,定义圆弧凸度 */
b: number = 0; b: number = 0;
/** 给进速度(Feed Rate) mm/min */
f: number = 0;
} }
/** 单次NC加工行为 */ /** 单次NC加工行为 */