Circle Pattern SVG Exporter
Turn detected circles into a real SVG file on disk
- circles
- image
- STRING
Circle Pattern SVG Exporter is the second half of the mr7thing/circle_pattern_processor pack. Where Circle Pattern Processor finds circles, this node writes them out as an actual vector file. It's the difference between "I detected some circles" and "I have a file a laser cutter, plotter, or print shop can use."
It takes the CIRCLES tuple from Circle Pattern Processor plus the original image (for canvas dimensions) and writes a plain SVG - one <circle> element per detected center - to disk. Because it's vector, the output is resolution-independent. That's the whole point: a 512px PNG of a dot pattern is useless if you need to scale it up to poster size; the SVG isn't.
How it works
The node builds a minimal SVG with the image's width and height, drops in a <circle> for each detection (centered at x, y, with radius output_circle_size), and writes the file to ComfyUI/output/svg/. It also auto-sequences filenames: your pattern.svg becomes pattern0000.svg, then pattern0001.svg, and so on, so repeated runs never clobber each other.
The inputs that matter
- circles - the CIRCLES tuple, straight from Circle Pattern Processor.
- image - used only for canvas width and height, so wire in the same image you fed the detector.
- filename (default
pattern.svg) - the base name. Subdirectories work: passpatterns/round.svgand it creates the folder underoutput/svg/. - output_circle_size (default 10) - the radius of the circles in the SVG. Note it ignores the detected radius; every circle is drawn at this size.
Output
One STRING - a path message telling you where the file landed. Wire it into a text-display node (like showAnything from ComfyUI-Easy-Use, which the author's own workflow uses), or just read the console. You won't see the SVG in ComfyUI's normal image-output grid; it's a file on disk.
Install
Same pack as the whole family. In ComfyUI Manager, search "Circle Pattern Processor", or:
cd ComfyUI/custom_nodes
git clone https://github.com/mr7thing/circle_pattern_processor
cd circle_pattern_processor
pip install -r requirements.txt
Dependencies are just numpy, opencv-python, and Pillow. Restart, and the node shows up under image/pattern.
Gotchas
- The file lands in
<ComfyUI>/output/svg/, not the folder your PNGs go to. If you can't find it, that's where to look. - There's no preview - SVG files don't render in ComfyUI's image widgets, so trust the STRING output and check the file yourself.
- Filenames get a 4-digit sequence inserted before the extension, so don't be surprised when
pattern.svgcomes back aspattern0000.svg.
It's a small utility and honestly the most practical part of the pack if your end goal is making physical patterns. Detector plus exporter is a complete two-box pipeline: circles in, vector file out.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| circles | TUPLE | — | |
| image | IMAGE | — | |
| filename | STRING | pattern.svg | — |
| output_circle_size | FLOAT | 101–50 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |