Show HN: My $300 embroidery machine needed a subscription, so I built my own app
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
ZigZag Visit zigzag.diy ZigZag is a visual embroidery editor built in Rust for performance, with built-in MCP (Model Context Protocol) support so AI agents can create and edit designs alongside you. Turn SVG artwork into stitches, fine-tune it in the editor, and export PES, DST, EXP, JEF, or VP3 for broad compatibility with embroidery machines—or send designs directly to a Brother Skitch (PP1) over Bluetooth.
ZigZag 是一个使用 Rust 构建的视觉刺绣编辑器,旨在提供高性能,并内置了 MCP(模型上下文协议)支持,以便 AI 代理可以与您一起创建和编辑设计。您可以将 SVG 艺术作品转换为针迹,在编辑器中进行微调,并导出为 PES、DST、EXP、JEF 或 VP3 格式,以实现与刺绣机的广泛兼容,或者通过蓝牙直接将设计发送到 Brother Skitch (PP1)。
Draw in Illustrator, draw in ZigZag, or let an agent draw. The Rust engine and zigzag command-line tool power the same workflow outside the editor. See ZigZag in action zigzag-demo.mp4 Stitching on a Brother Skitch (PP1) Download the video (MP4, 1080p) · Original post on X.
您可以在 Illustrator 中绘图,在 ZigZag 中绘图,或者让 AI 代理来绘图。Rust 引擎和 zigzag 命令行工具在编辑器之外也支持相同的工作流程。查看 ZigZag 的实际操作演示 zigzag-demo.mp4,观看在 Brother Skitch (PP1) 上的刺绣过程。下载视频 (MP4, 1080p) · X 上的原始帖子。
Download for Mac Download ZigZag.dmg For Apple Silicon and Intel Macs, macOS 11 or later. Open the DMG, then drag ZigZag into Applications. The release is signed and notarized by Apple. No Rust installation is needed. Or with Homebrew: brew install —cask simpsoka/zigzag/zigzag To update a Homebrew installation: brew upgrade —cask —greedy simpsoka/zigzag/zigzag Starting with version 0.1.3, ZigZag also offers an in-app updater: it tells you when there’s a newer release and installs it when you say (ZigZag › Check for Updates…).
Mac 版下载:下载 ZigZag.dmg,适用于 Apple Silicon 和 Intel Mac,macOS 11 或更高版本。打开 DMG 文件,然后将 ZigZag 拖入“应用程序”文件夹。该版本已由 Apple 签名和公证。无需安装 Rust。或者使用 Homebrew:brew install --cask simpsoka/zigzag/zigzag。更新 Homebrew 安装:brew upgrade --cask --greedy simpsoka/zigzag/zigzag。从 0.1.3 版本开始,ZigZag 还提供应用内更新程序:它会在有新版本时通知您,并在您确认后进行安装(ZigZag › Check for Updates…)。
Download for Windows Download ZigZag for Windows — the ZigZag-
Windows 版下载:下载 Windows 版 ZigZag — 在最新发布页面获取 ZigZag-
Download for Linux Download ZigZag for Linux — the ZigZag-
Linux 版下载:下载 Linux 版 ZigZag — 在最新发布页面获取 ZigZag-
Release notes and checksums · Changelog · Publishing a release.
发布说明和校验和 · 更新日志 · 发布版本。
src/svg.rs SVG import (usvg): fill and stroke parts, transforms, text. src/document/ editable document; settings saved back into SVG ids, layout edits as SVG transforms, lettering. src/params.rs stitch settings tokens + fabric presets. src/stitch/fill.rs tatami fill (scanline sections, staggered rows). src/stitch/satin.rs satin columns: two rails, auto-satin, underlays, short stitches, lean. src/stitch/columns.rs shapes that branch or have holes, cut into satin columns. src/stitch/stroke.rs running / triple-run stitch. src/boolean.rs polygon booleans and offsets (i_overlay). src/design.rs planner: overlap removal, cap order, routing, trims. src/route.rs travel out of sight: a way through fills and under what covers. src/checks.rs digitizing checks (sizes, widths, lettering, hoop). src/machine/profile.rs machine profiles: hoops and file format, built in (profiles.json) or your own. src/formats/ PES (+PEC), DST, EXP, JEF, VP3, Skitch PEN writers; PES/PEC/DST/EXP/JEF readers; preview; worksheet. src/machine/ Skitch Bluetooth protocol (+ btleplug client, ble feature). src/studio/ editor (egui on OpenGL via glow) + MCP server (gui feature). src/mcp_bridge.rs stdio ↔ HTTP bridge for MCP clients that launch a command.
src/svg.rs SVG 导入 (usvg):填充和描边部分、变换、文本。src/document/ 可编辑文档;设置保存回 SVG ID,布局编辑作为 SVG 变换,刻字。src/params.rs 针迹设置标记 + 面料预设。src/stitch/fill.rs 榻榻米填充(扫描线部分,交错行)。src/stitch/satin.rs 缎纹列:两条轨道、自动缎纹、底线、短针迹、倾斜。src/stitch/columns.rs 具有分支或孔洞的形状,切割成缎纹列。src/stitch/stroke.rs 运行/三倍运行针迹。src/boolean.rs 多边形布尔运算和偏移 (i_overlay)。src/design.rs 规划器:重叠移除、封盖顺序、路由、修剪。src/route.rs 隐藏路径:穿过填充物和覆盖物下的路径。src/checks.rs 数字化检查(尺寸、宽度、刻字、绣花绷)。src/machine/profile.rs 机器配置文件:绣花绷和文件格式,内置 (profiles.json) 或自定义。src/formats/ PES (+PEC)、DST、EXP、JEF、VP3、Skitch PEN 写入器;PES/PEC/DST/EXP/JEF 读取器;预览;工作表。src/machine/ Skitch 蓝牙协议(+ btleplug 客户端,ble 功能)。src/studio/ 编辑器(通过 glow 在 OpenGL 上使用 egui)+ MCP 服务器(gui 功能)。src/mcp_bridge.rs 用于启动命令的 MCP 客户端的 stdio ↔ HTTP 网桥。
Build cargo build —release # CLI + MCP bridge, no system deps cargo build —release —features gui,ble # + the studio editor and Skitch upload Linux needs the usual X11/Wayland and OpenGL dev libraries for gui. libdbus is vendored for ble.
构建:cargo build --release # CLI + MCP 网桥,无系统依赖;cargo build --release --features gui,ble # + 工作室编辑器和 Skitch 上传。Linux 需要常规的 X11/Wayland 和 OpenGL 开发库以支持 gui。libdbus 已为 ble 捆绑。
Stitch types: Fill (tatami) - Staggered rows, any angle, with underlay (edge walk + rows) and pull compensation. Satin - Zigzag column between two rails, with center/contour/zigzag underlay, pull compensation and short stitches on tight curves; plain, S-stitch or zig-zag top stitching; stitches square across or leaning (lean=8); several threads across the column (multicolor satin). Strokes - (any width); Ink/Stitch-style two-rail paths with rungs; filled shapes: rings use inner/outer outline, bars and crescents split at their tips, letters and other shapes that branch or have a counter are cut into columns where the branches part (a P into its stem and bowl, a T into bar and stem), or border follows the outline. Run - Running stitch, single or triple (bean). Contour - Rows that follow the outline inward, or one spiral out from the center (Ink/Stitch’s circular fill). Blanket - E-stitch: a line with prongs into the shape. Appliqué - Placement line → stop → tack-down → stop → satin cover. Manual - Every path point is a needle point. Meander - One wandering line through the shape, quilting style: light and soft. Ripple - Open running-stitch rows following the outline, or one spiral. Cross-stitch - A grid of X’s, sewn as rows of half-crosses out and back. Tartan - Woven stripes in several threads (a mirrored sett you edit in the panel), each thread its own color block.
针迹类型:填充(榻榻米)- 交错行,任意角度,带有底线(边缘走线 + 行)和拉伸补偿。缎纹 - 两条轨道之间的之字形列,带有中心/轮廓/之字形底线,拉伸补偿和紧密曲线上的短针迹;平针、S 型针迹或之字形顶针;针迹横向方形或倾斜(lean=8);列间多根线(多色缎纹)。描边 - (任意宽度);Ink/Stitch 风格的两轨路径及横档;填充形状:环使用内外轮廓,条形和新月形在尖端处分割,字母和其他有分支或有孔的形状被切割成列(P 分割为茎和碗,T 分割为横杠和茎),或者边界跟随轮廓。运行 - 运行针迹,单线或三线(豆针)。轮廓 - 沿轮廓向内排列的行,或从中心向外螺旋(Ink/Stitch 的圆形填充)。毯边 - E 型针迹:带有刺入形状的叉齿的线。贴布绣 - 放置线 → 停止 → 固定 → 停止 → 缎纹覆盖。手动 - 每个路径点都是一个针点。蜿蜒 - 穿过形状的一条游走线,绗缝风格:轻盈柔软。波纹 - 沿轮廓的开放式运行针迹行,或单螺旋。十字绣 - X 网格,缝制为半十字绣的往返行。格子 - 多种线编织的条纹(您在面板中编辑的镜像设置),每根线都有自己的色块。
Satins wider than 7 mm are auto-split (shorter, staggered stitches) and use auto spacing (narrow columns more open, wide ones denser). Planner features: Remove overlaps: fill hidden under later objects isn’t sewn (keeps 0.5 mm of overlap). Cap order: center-out, bottom-up, grouped by color, still respecting layering. Routing: travel stitches stay out of sight: straight across where a straight line stays inside the fill, otherwise round the inside of its outline (Ink/Stitch’s underpath), otherwise any way through the fill (round its holes, through its necks), under a satin that’s about to be sewn, or under whatever is sewn later on top. An object’s last piece is sewn toward the end the next object can be reached from. So satin lettering sewn stroke by stroke needs cuts only between letters when each stroke is followed by one that covers the way to it.
宽度超过 7 毫米的缎纹会自动分割(更短、交错的针迹)并使用自动间距(窄列更稀疏,宽列更密集)。规划器功能:移除重叠:隐藏在后续对象下的填充物不会被缝制(保留 0.5 毫米的重叠)。封盖顺序:从中心向外、从下向上、按颜色分组,同时尊重分层。路由:旅行针迹保持不可见:在直线保持在填充物内部的地方直接穿过,否则绕过其轮廓内部(Ink/Stitch 的底路径),否则通过填充物的任何方式(绕过其孔洞,穿过其颈部),在即将缝制的缎纹下方,或在稍后缝制在顶部的任何东西下方。对象的最后一部分被缝制到可以到达下一个对象的末端。因此,逐笔缝制的缎纹字母仅在字母之间需要剪断,前提是每一笔后面都跟着一个覆盖其路径的笔画。