Compare commits
12 Commits
e8977ac2f9
...
main
Author | SHA1 | Date | |
---|---|---|---|
5a0bfb51ac | |||
1d84eb0d35 | |||
0e107da21b | |||
edc1188a2b | |||
8df9f5d17a | |||
31ae0be530 | |||
ac1e32218b | |||
290bbf2b5e | |||
7cf184f4c3 | |||
e8cbdf0abc | |||
5872b91606 | |||
147df79e44 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cut-abstractions",
|
"name": "cut-abstractions",
|
||||||
"version": "0.3.2",
|
"version": "0.3.5",
|
||||||
"description": "",
|
"description": "",
|
||||||
"files": [
|
"files": [
|
||||||
"dist/**/*"
|
"dist/**/*"
|
||||||
|
@@ -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
|
||||||
}
|
}
|
@@ -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,
|
||||||
/** 未处理 说明 */
|
/** 未处理 说明 */
|
||||||
|
@@ -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加工行为 */
|
||||||
|
Reference in New Issue
Block a user