mokee commited on
Commit
950b522
·
verified ·
1 Parent(s): 389beed

Update server.js

Browse files
Files changed (1) hide show
  1. server.js +8 -6
server.js CHANGED
@@ -31,12 +31,14 @@ const runInkscape = (svg, mode) => {
31
  coreActions.push('object-set-property:fill,#000000', 'path-union');
32
  } else if (mode === 'stroke-fill') {
33
  coreActions.push(
34
- 'selection-duplicate', // 复制
35
- 'object-stroke-to-path', // 转轮廓
36
- 'select-all', // 选中原填充 + 新轮廓
37
- 'path-union', // 第一次合并
38
- 'path-simplify' // 第二次平滑,闭合微小缝隙
39
- );
 
 
40
  }
41
 
42
  const actions = [
 
31
  coreActions.push('object-set-property:fill,#000000', 'path-union');
32
  } else if (mode === 'stroke-fill') {
33
  coreActions.push(
34
+ 'selection-duplicate', // 1. 复制一份
35
+ 'object-stroke-to-path', // 2. 将其中一份转为描边轮廓
36
+ 'select-next', // 3. 切换到原始填充层
37
+ 'path-outset', // 4. 【关键】执行一次外扩,消除边界缝隙
38
+ 'select-all', // 5. 选中外扩后的填充 + 描边轮廓
39
+ 'path-union', // 6. 合并
40
+ 'path-simplify' // 7. 最终平滑
41
+ );
42
  }
43
 
44
  const actions = [