feat: initial commit - massive-cloud point cloud processing system

This commit is contained in:
2026-05-27 09:51:42 +00:00
commit 16811100d1
391 changed files with 78338 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
/**
* 子进程入口:装配检测(STEP + 最近零件 + 统计 / 可选顶点热力)
*/
import 'dotenv/config';
import { runAssemblyInspectionJob, type AssemblyInspectionOptions } from './assemblyInspectionJob.js';
const resultId = Number(process.argv[2]);
const taskId = Number(process.argv[3]);
const raw = process.argv[4] ?? '{}';
if (!Number.isFinite(resultId) || !Number.isFinite(taskId) || resultId <= 0 || taskId <= 0) {
console.error('[AssemblyInspectionJobRunner] 参数: <resultId> <taskId> <jsonOptions>');
process.exit(1);
}
let options: AssemblyInspectionOptions;
try {
options = JSON.parse(raw) as AssemblyInspectionOptions;
} catch {
options = {
samplePoints: 100_000,
toleranceMm: 0.3,
includeVertexHeatmap: false,
};
}
if (options.samplePoints == null) options.samplePoints = 100_000;
if (options.toleranceMm == null) options.toleranceMm = 0.3;
if (options.includeVertexHeatmap == null) options.includeVertexHeatmap = false;
runAssemblyInspectionJob(resultId, taskId, options)
.then(() => process.exit(0))
.catch((e) => {
console.error('[AssemblyInspectionJobRunner]', e);
process.exit(1);
});