Txt2plotter
True centerline vectors from Flux.2 for pen plotters
Details
- External ID
- 46685064
- Source
- HN
- Company
- —
- Product
- Txt2plotter
- Website domain
- github.com
- Launched
- Jan. 19, 2026
- Cohort
- —
- Upvotes
- 35
- Upvotes percentile
- 0.7371541501976284
- Tags
- —
- Fetched at
- Sept. 7, 2026, 9:25 p.m.
- Updated at
- Sept. 7, 2026, 9:25 p.m.
Description
I’ve been working on a project to bridge the gap between AI generation and my AxiDraw, and I think I finally have a workflow that avoids the usual headaches.If you’ve tried plotting AI-generated images, you probably know the struggle: generic tracing tools (like Potrace) trace the outline of a line, resulting in double-strokes that ruin the look and take twice as long to plot.What I tried previously:- Potrace / Inkscape Trace: Great for filled shapes, but results in "hollow" lines for line art.- Canny Edge Detection: Often too messy; it picks up noise and creates jittery paths.- Standard SDXL: Struggled with geometric coherence, often breaking lines or hallucinating perspective.- A bunch of projects that claimed to be txt2svg but which produced extremely poor results, at least for pen plotting. (Chat2SVG, StarVector, OmniSVG, DeepSVG, SVG-VAE, VectorFusion, DiffSketcher, SVGDreamer, SVGDreamer++, NeuralSVG, SVGFusion, VectorWeaver, SwiftSketch, CLIPasso, CLIPDraw, InternSVG)My Approach:I ended up writing a Python tool that combines a few specific technologies to get a true "centerline" vector:1. Prompt Engineering: An LLM rewrites the prompt to enforce a "Technical Drawing" style optimized for the generator.2. Generation: I'm using Flux.2-dev (4-bit). It seems significantly better than SDXL at maintaining straight lines and coherent geometry.3. Skeletonization: This is the key part. Instead of tracing contours, I use Lee’s Method (via scikit-image) to erode the image down to a 1-pixel wide skeleton. This recovers the actual stroke path.4. Graph Conversion: The pixel skeleton is converted into a graph to identify nodes and edges, pruning out small artifacts/noise.5. Optimization: Finally, I feed it into vpype to merge segments and sort the paths (TSP) so the plotter isn't jumping around constantly.You can see the results in the examples inside the Github repo.The project is currently quite barebones, but it produces better results than other options I've tested so I'm publishing it. I'm interested in implementing better pre/post processing, API-based generation, and identifying shapes for cross-hatching.
Enrichment
- Theme
- multimodal generative ai and developer tools
- Vertical
- —
- Function
- Dev tools
- Audience
- Prosumer
- AI stance
- AI feature
- Project type
- Hobby / open-source project
- Normalized one-liner
- vector conversion for pen plotters
- Manually corrected
- False
Could you build this?
Partial Calling Flux.2 for image generation is simple, but extracting true single-stroke centerline vectors (medial axis skeletonization / topological thinning) suitable for pen plotters requires non-trivial computational geometry algorithms.
What it would actually take: The stack uses Python, a diffusion model API or local Flux inference, combined with specialized vectorization pipelines like Voronoi-based medial axis transform or Zhang-Suen / Guo-Hall skeletonization followed by Bezier curve fitting and SVG path optimization. The hard part is generating clean continuous single-line pen paths without double outlines or junction artifacts. It requires expertise in computational geometry, raster-to-vector mathematics, and plotter hardware control (G-code/HP-GL).
Discussion
8 comments analyzed.
Competitors mentioned: autotrace (1999 GPL tool), potrace, FLUX.2, Nano Banana
Concerns raised: Requires NVIDIA GPU with 24GB VRAM (RTL 3090/4090) - too demanding for notebooks, Difficult to create one-size-fits-all prompt for varied inputs, AI-generated results sometimes poor for plotters or visually displeasing, High computational/token cost vs. existing lightweight solutions, No input examples shown - hard to evaluate output quality
Feature requests: Make compatible with Mac (non-NVIDIA) hardware, Support lower VRAM requirements for notebooks, Improve handling of edge cases and feature preservation
Competitors
Other products that read as similar to this one — 83 launches clear the similarity bar, closest 8 shown.
Attention rank: #36 of 84 (itself plus its competitors, highest first — normalized so YC and Product Hunt are compared fairly).
Launched 77 days after the earliest competitor.
- Kurvengefahr · hn · 2026-07-12 · 20 upvotes · similarity 0.47
- Extract diagrams from PDF to SVG · hn · 2025-12-22 · 11 upvotes · similarity 0.46
- LineSVG · ph · 2026-09-15 · 1 upvotes · similarity 0.46
- Limot · ph · 2026-09-24 · 1 upvotes · similarity 0.41
- Bevell · ph · 2026-09-30 · 77 upvotes · similarity 0.39
- Tracemap · hn · 2026-03-05 · 6 upvotes · similarity 0.39
- I was surprised by this interactive GPU line rasterization explanation · hn · 2026-05-08 · 6 upvotes · similarity 0.38
- High speed graphics rendering research with tinygrad/tinyJIT · hn · 2026-01-22 · 31 upvotes · similarity 0.38
Other launches for this product
- No other launches for this product.