Compare commits
2 Commits
imes-cutOr
...
cutOrder-0
Author | SHA1 | Date | |
---|---|---|---|
61e47e24b7 | |||
8c00def696 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
*.tgz
|
*.tgz
|
||||||
node_modules/*
|
node_modules/*
|
||||||
*.yaml
|
*.yaml
|
||||||
|
dist/*
|
16
.vscode/launch.json
vendored
16
.vscode/launch.json
vendored
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
// 使用 IntelliSense 了解相关属性。
|
|
||||||
// 悬停以查看现有属性的描述。
|
|
||||||
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
|
|
||||||
"version": "0.2.0",
|
|
||||||
"configurations": [
|
|
||||||
|
|
||||||
{
|
|
||||||
"type": "chrome",
|
|
||||||
"request": "launch",
|
|
||||||
"name": "针对 localhost 启动 Chrome",
|
|
||||||
"url": "http://localhost:8080",
|
|
||||||
"webRoot": "${workspaceFolder}"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
// libs工作区必须使用相对路径进行导入!
|
|
||||||
"typescript.preferences.importModuleSpecifier": "relative",
|
|
||||||
"javascript.preferences.importModuleSpecifier": "relative"
|
|
||||||
}
|
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@imes-procesor/libs",
|
"name": "@imes-procesor/libs",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
"./utils": "./src/utils/index.ts"
|
"./utils": "./src/utils/index.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cut-abstractions": "http://gitea.cf/MES-FE/cut-abstractions/releases/download/0.2/cut-abstractions-0.2.0.tgz"
|
"cut-abstractions": "http://gitea.cf/MES-FE/cut-abstractions/releases/download/0.2/cut-abstractions-0.2.1.tgz"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^24.0.10",
|
"@types/node": "^24.0.10",
|
||||||
|
@@ -28,7 +28,7 @@ export class CutOrderProc extends ProcessorBase<CutOrderInput, CutorderOutput, C
|
|||||||
let beginId = 0;
|
let beginId = 0;
|
||||||
let dt = context.input?.gap || 6;
|
let dt = context.input?.gap || 6;
|
||||||
let k = context.input?.boardWidth || 0;
|
let k = context.input?.boardWidth || 0;
|
||||||
let g = context.input?.boardHeight || 0;
|
let g = context.input?.boardLength || 0;
|
||||||
|
|
||||||
for (let i = 0; i < length; i++) {
|
for (let i = 0; i < length; i++) {
|
||||||
let block = context.input?.blocks[i];
|
let block = context.input?.blocks[i];
|
||||||
@@ -110,9 +110,9 @@ export class CutOrderProc extends ProcessorBase<CutOrderInput, CutorderOutput, C
|
|||||||
} else if (input.boardWidth == undefined) {
|
} else if (input.boardWidth == undefined) {
|
||||||
info.isOk = false
|
info.isOk = false
|
||||||
info.msg = 'context.input.boardWidth is undefind'
|
info.msg = 'context.input.boardWidth is undefind'
|
||||||
} else if (input.boardHeight == undefined) {
|
} else if (input.boardLength == undefined) {
|
||||||
info.isOk = false
|
info.isOk = false
|
||||||
info.msg = 'context.input.boardHeight is undefind'
|
info.msg = 'context.input.boardLength is undefind'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -47,7 +47,7 @@ test('cutOrderTest', async () => {
|
|||||||
|
|
||||||
let input: CutOrderInput = {
|
let input: CutOrderInput = {
|
||||||
boardWidth: 1220,
|
boardWidth: 1220,
|
||||||
boardHeight: 2440,
|
boardLength: 2440,
|
||||||
gap: 6,
|
gap: 6,
|
||||||
blocks
|
blocks
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user