Editor has no 'pull compensation' setting per path — pull compensation is a critical embroidery parameter (compensates for thread tension), but the editor doesn't expose it #318

Closed
opened 2026-10-04 03:51:23 +00:00 by Mark · 1 comment
Owner

Finding

grep -rn 'pullCompensation\|pullComp' src/components/editor/ returns 0. The editor has no pull compensation.

Pull compensation: embroidery thread "pulls" the fabric as it stitches, causing the design to shrink or distort. To compensate, the digitizer slightly enlarges the design (typically 0.2-0.5mm).

Most embroidery software has a pull compensation setting per path or per design.

A user designing a logo:

  • Knows the design will pull in 0.3mm
  • Wants to add 0.3mm to all path sizes
  • Currently: can't; would have to manually adjust each node

The fix is a pull compensation input.

Where

  • Path Properties: src/components/editor/EditorRightPanel.tsx
  • No pull comp: grep -rn 'pullComp' src/components/editor/ returns 0
  • The export: src/lib/easystitch-client.ts:exportPES (might have pull comp)

Suggested fix shape

  1. Type: add pullCompensation: number to the StitchPath type (default 0).

  2. UI: an input in the Path Properties section:

<NumberField
  label="Pull compensation"
  value={p.pullCompensation}
  onChange={(v) => onUpdatePullCompensation(p.id, v)}
  min={-1}
  max={1}
  step={0.05}
  unit="mm"
/>
  1. Behavior: at export time, the path's geometry is offset outward by pullCompensation mm.

  2. Default: 0 (no compensation). The user can set per-path or as a design-wide default.

  3. Design-wide default: a setting in Path Defaults (per #198) for "Default pull compensation."

Severity

Medium. Pull compensation is a critical parameter for production embroidery. Power users notice.

Discovered by

Gap analysis (2026-10-02) of editor path properties.

  • #314 (open) — Satin width. Same embroidery-specific parameters.
  • #316 (open) — Stitch spacing in mm. Same units concern.
  • Wilcom/Hatch have pull comp; the editor's gap is a parity issue.
## Finding `grep -rn 'pullCompensation\|pullComp' src/components/editor/` returns 0. The editor has no pull compensation. Pull compensation: embroidery thread "pulls" the fabric as it stitches, causing the design to shrink or distort. To compensate, the digitizer slightly enlarges the design (typically 0.2-0.5mm). Most embroidery software has a pull compensation setting per path or per design. A user designing a logo: - Knows the design will pull in 0.3mm - Wants to add 0.3mm to all path sizes - Currently: can't; would have to manually adjust each node The fix is a pull compensation input. ## Where - Path Properties: `src/components/editor/EditorRightPanel.tsx` - No pull comp: `grep -rn 'pullComp' src/components/editor/` returns 0 - The export: `src/lib/easystitch-client.ts:exportPES` (might have pull comp) ## Suggested fix shape 1. **Type**: add `pullCompensation: number` to the StitchPath type (default 0). 2. **UI**: an input in the Path Properties section: ```tsx <NumberField label="Pull compensation" value={p.pullCompensation} onChange={(v) => onUpdatePullCompensation(p.id, v)} min={-1} max={1} step={0.05} unit="mm" /> ``` 3. **Behavior**: at export time, the path's geometry is offset outward by `pullCompensation` mm. 4. **Default**: 0 (no compensation). The user can set per-path or as a design-wide default. 5. **Design-wide default**: a setting in Path Defaults (per #198) for "Default pull compensation." ## Severity Medium. Pull compensation is a critical parameter for production embroidery. Power users notice. ## Discovered by Gap analysis (2026-10-02) of editor path properties. ## Related - #314 (open) — Satin width. Same embroidery-specific parameters. - #316 (open) — Stitch spacing in mm. Same units concern. - Wilcom/Hatch have pull comp; the editor's gap is a parity issue.
Author
Owner

Closed retroactively after fix landed on main in 39d71dd ("fix(#318): editor pull-compensation input — right-panel mm offset per path"). That commit's diff: types.ts gained pullCompensation?: number on StitchPath; EditorRightPanel.tsx got the new NumberField in Path Properties (range −1..1 mm, 0.05 step) plus the apply-to-all button mirroring the #212 density / #314 satin-width pattern; Editor.tsx wired the selection-scoped handler and forwarded the value through pathsToStitchObjects into WorkspaceStitchObject.pullCompensation so exportPES sees the user's mm offset end-to-end. New test files: src/components/editor/issue-318.test.tsx (10 panel tests — render, live value, legacy fallback, apply-to-all, Mixed label, range clamp, conditional rendering) and an Editor.test.tsx block driving the panel callback and asserting the tc_workspace_snapshot's stitchObject carries the user-set pullCompensation. The kilo-gsd run for #318 hit push-rejected (fetch first) on the bugfix-recovery push and left a salvage marker; the fix had already landed via the earlier review-pass commit 39d71dd before the recovery push attempted the second 416 "Apply changes" commit. Watcher t_b85af413 closing #318 with this comment.

Closed retroactively after fix landed on main in 39d71dd ("fix(#318): editor pull-compensation input — right-panel mm offset per path"). That commit's diff: types.ts gained `pullCompensation?: number` on StitchPath; EditorRightPanel.tsx got the new NumberField in Path Properties (range −1..1 mm, 0.05 step) plus the apply-to-all button mirroring the #212 density / #314 satin-width pattern; Editor.tsx wired the selection-scoped handler and forwarded the value through pathsToStitchObjects into WorkspaceStitchObject.pullCompensation so exportPES sees the user's mm offset end-to-end. New test files: src/components/editor/issue-318.test.tsx (10 panel tests — render, live value, legacy fallback, apply-to-all, Mixed label, range clamp, conditional rendering) and an Editor.test.tsx block driving the panel callback and asserting the tc_workspace_snapshot's stitchObject carries the user-set pullCompensation. The kilo-gsd run for #318 hit push-rejected (`fetch first`) on the bugfix-recovery push and left a salvage marker; the fix had already landed via the earlier review-pass commit 39d71dd before the recovery push attempted the second 416 "Apply changes" commit. Watcher t_b85af413 closing #318 with this comment.
Mark closed this issue 2026-10-05 14:42:15 +00:00
Sign in to join this conversation.
No description provided.