diff --git a/src/plotcutter/plotter.ts b/src/plotcutter/plotter.ts index 809f56d..413326a 100644 --- a/src/plotcutter/plotter.ts +++ b/src/plotcutter/plotter.ts @@ -29,6 +29,7 @@ export function pts2plotter( if (sorted.length > 0) { const firstPath = sorted[0]; str += ` U${plu(start[0] * px2mm)},${plu((height - start[1]) * px2mm)}`; + str += ` U${plu(firstPath[0][0] * px2mm)},${plu((height - firstPath[0][1]) * px2mm)}`; str += ` D${plu(firstPath[0][0] * px2mm)},${plu((height - firstPath[0][1]) * px2mm)}`; // 切割第一个路径 @@ -66,6 +67,8 @@ export function pts2plotter( // 返回终点 str += ` U${plu(end[0] * px2mm)},${plu((height - end[1]) * px2mm)}`; + str += ` D${plu(end[0] * px2mm)},${plu((height - end[1]) * px2mm)}`; + str += ` U${plu(end[0] * px2mm)},${plu((height - end[1]) * px2mm)}`; str += endCommand(); return str;