Decompose: Implement real auto-digitize engine — Phase 3: Satin Column Stitch Generation #8

Closed
opened 2026-06-22 15:28:15 +00:00 by Mark · 2 comments
Owner

⚠️ Re-scoped — blocked on #11

This work was originally framed as "implement from scratch." After auditing the
existing ~/Projects/easystitch/ project (a complete Python embroidery CAM with
5-stage pipeline, satin/fill/running generation, ΔE color matching, and PES/DST/
EXP/JEF output), the right shape is call the EasyStitch service rather than
re-implement the algorithms.

Blocked on #11 ("Stand up EasyStitch as an HTTP service for ThreadCraft").
Until that service exists, this work has no backend to call.

Donor code in EasyStitch (do not port — call it):

  • ~/Projects/easystitch/src/embroidery_converter/satin_stitch_generator.py
  • ~/Projects/easystitch/src/embroidery_converter/underlay_generator.py

New scope (post #11)

Satin stitch generation runs in the Python service. The TypeScript
side only renders the result.

  1. Receive stitchObjects[].type == 'satin' from the /v1/digitize
    response (introduced in #6).
  2. Render each satin object as a series of short line segments along
    the stitches[] point list. Color from threadColor.
  3. Add a src/lib/canvas/satinRenderer.ts that draws the segments to
    a Fabric.js Path or Polyline.
  4. Do not port the medial-axis / perpendicular-walk algorithm.
  5. Do not duplicate the underlay generation — that's also in the
    service response (separate stitch object type or a flag on the
    satin object).

Acceptance: a satin column in a test image renders on the canvas as
parallel stitch pairs that visually correspond to the source region,
and the rendering survives a canvas zoom to 400% without aliasing
into invisibility.

## ⚠️ Re-scoped — blocked on #11 > This work was originally framed as "implement from scratch." After auditing the > existing `~/Projects/easystitch/` project (a complete Python embroidery CAM with > 5-stage pipeline, satin/fill/running generation, ΔE color matching, and PES/DST/ > EXP/JEF output), the right shape is **call the EasyStitch service** rather than > re-implement the algorithms. > > **Blocked on #11** ("Stand up EasyStitch as an HTTP service for ThreadCraft"). > Until that service exists, this work has no backend to call. > > Donor code in EasyStitch (do not port — call it): - `~/Projects/easystitch/src/embroidery_converter/satin_stitch_generator.py` - `~/Projects/easystitch/src/embroidery_converter/underlay_generator.py` ## New scope (post #11) Satin stitch generation runs in the Python service. The TypeScript side only renders the result. 1. Receive `stitchObjects[].type == 'satin'` from the `/v1/digitize` response (introduced in #6). 2. Render each satin object as a series of short line segments along the `stitches[]` point list. Color from `threadColor`. 3. Add a `src/lib/canvas/satinRenderer.ts` that draws the segments to a Fabric.js `Path` or `Polyline`. 4. Do not port the medial-axis / perpendicular-walk algorithm. 5. Do not duplicate the underlay generation — that's also in the service response (separate stitch object type or a flag on the satin object). Acceptance: a satin column in a test image renders on the canvas as parallel stitch pairs that visually correspond to the source region, and the rendering survives a canvas zoom to 400% without aliasing into invisibility.
Author
Owner

Blocked on #11 (Stand up EasyStitch as an HTTP service for ThreadCraft).

This work has been re-scoped — see the updated body. The reframe replaces
"implement from scratch" with "call the EasyStitch service and render the
result." #11 must complete first; once the service exposes /v1/digitize and
/v1/export, this work becomes a thin client + canvas rendering job.

cc: #11

**Blocked on #11** (Stand up EasyStitch as an HTTP service for ThreadCraft). This work has been re-scoped — see the updated body. The reframe replaces "implement from scratch" with "call the EasyStitch service and render the result." #11 must complete first; once the service exposes `/v1/digitize` and `/v1/export`, this work becomes a thin client + canvas rendering job. cc: #11
Author
Owner

Blocked-on update

This issue is blocked on easystitch-service#1 ("FastAPI wrapper exposing easystitch pipeline as HTTP service").

Why: satin stitch generation runs in the service; rendering the response is the TS-side work.

The parent ticket [Kimi_Agent_Brother_10_Digitizing_App#11] is the integration contract. The actual implementation lives in Mark/easystitch-service. When easystitch-service#1 closes, this issue can move forward.

There is also a frontend-side wiring issue: [Mark/easystitch-service#3] ("TypeScript client wrapper + vite dev proxy") — that one will be mirrored into the ThreadCraft repo as a frontend sub-issue when it's ready to dispatch.

## Blocked-on update This issue is blocked on **easystitch-service#1** ("FastAPI wrapper exposing easystitch pipeline as HTTP service"). **Why:** satin stitch generation runs in the service; rendering the response is the TS-side work. The parent ticket [Kimi_Agent_Brother_10_Digitizing_App#11] is the integration contract. The actual implementation lives in [Mark/easystitch-service](https://forgejo.tail018ac4.ts.net/Mark/easystitch-service). When easystitch-service#1 closes, this issue can move forward. There is also a frontend-side wiring issue: [Mark/easystitch-service#3] ("TypeScript client wrapper + vite dev proxy") — that one will be mirrored into the ThreadCraft repo as a frontend sub-issue when it's ready to dispatch.
Mark 2026-06-27 08:48:46 +00:00
Sign in to join this conversation.
No description provided.