mokee commited on
Commit
dcbbc03
·
verified ·
1 Parent(s): d7995e0

Update server.js

Browse files
Files changed (1) hide show
  1. server.js +2 -2
server.js CHANGED
@@ -88,14 +88,14 @@ app.post('/fill', (req, res) => {
88
  // 2. 复制一份 (此时有两层完全重合的对象)
89
  // 3. 将其中一层执行描边转路径 (此时是一层填充 + 一层轮廓)
90
  // 4. 再次全选并执行 union (将填充和轮廓融合成一个复杂路径)
91
- const actions = [
92
  `file-open:${inputFile}`,
93
  'select-all',
94
  'selection-duplicate',
95
- 'select-all',
96
  'object-stroke-to-path',
97
  'select-all',
98
  'path-union',
 
99
  `export-filename:${outputFile}`,
100
  'export-do',
101
  'file-close'
 
88
  // 2. 复制一份 (此时有两层完全重合的对象)
89
  // 3. 将其中一层执行描边转路径 (此时是一层填充 + 一层轮廓)
90
  // 4. 再次全选并执行 union (将填充和轮廓融合成一个复杂路径)
91
+ const actions = [
92
  `file-open:${inputFile}`,
93
  'select-all',
94
  'selection-duplicate',
 
95
  'object-stroke-to-path',
96
  'select-all',
97
  'path-union',
98
+ 'path-simplify', // 新增:简化路径,有助于闭合那些因为方向问题导致的镂空
99
  `export-filename:${outputFile}`,
100
  'export-do',
101
  'file-close'