ComfyUI Node
kubakub regions to svg / pdf / dxf
Save regions (or a mask) as vector files for Illustrator, After Effects, a plotter or a laser cutter. outline: filled paths per region, straight edges stay straight, curves become Beziers; SVG with groups = region groups and ids = region names, PDF with one layer per group, DXF. centerline: the skeleton as open lines ordered for short travel (plotter, laser, engraving). width_mm > 0 writes real millimetres; kerf_mm offsets outlines for cutting.
kubakub regions to svg / pdf / dxf
- regions
- mask
- matrix
- preview
- files
- report
◄modeoutline►
◄width_mm0.0►
◄simplify_px1.0►
◄corner_deg35►
◄min_area_px16►
◄spur_px6.0►
◄kerf_mm0.00►
◄svgtrue►
◄pdftrue►
◄dxftrue►
◄filename_prefixregions►
◄select►
◄folder►
Categorykubakub/2d/regions
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | outline | outline: filled shapes per region (Illustrator, After Effects). centerline: single lines through the middle (plotter, laser, engraving). |
| width_mm | FLOAT | 0.00–1000000 | Real width of the whole image in mm (one uniform scale); 0 = pixels. |
| simplify_px | FLOAT | 1.00–50 | Largest deviation from the pixel outline when simplifying. |
| corner_deg | FLOAT | 350–180 | outline: vertices turning more than this stay corners; 180 = no curves. |
| min_area_px | FLOAT | 160–1000000 | Drop specks and holes smaller than this. |
| spur_px | FLOAT | 6.00–1000 | centerline: drop side branches shorter than this. |
| kerf_mm | FLOAT | 0.00-100–100 | outline in mm: grow (+) or shrink (-) every outline by kerf / 2. Ignored when width_mm is 0 (pixels have no millimetres). |
| svg | BOOLEAN | true | Write an .svg (groups = region groups, ids = region names). |
| BOOLEAN | true | Write a .pdf with one layer per region group. | |
| dxf | BOOLEAN | true | Write a .dxf for CAD, CNC and laser software. |
| filename_prefix | STRING | regions | Start of the file names (a number is added, earlier files are kept); 'sub/name' writes into a subfolder. |
| regionsopt | KUBA_REGIONS | The regions to vectorise (from any kubakub regions node). | |
| maskopt | MASK | Vectorise a mask instead (e.g. a painted line layer). | |
| selectopt | STRING | Which regions, in plan syntax as in regions to mask: names with wildcards, group:, tag:; comma = or, space = and, '!' = not. Empty = all. Not used when a mask is connected. | |
| folderopt | STRING | Where to write; empty = ComfyUI output/kuba_vector. | |
| matrixopt | IMAGE | Preview background. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| preview | IMAGE | The vector paths drawn over the matrix. |
| files | STRING | The written files, one per line. |
| report | STRING | Regions, paths, size in px or mm, line length for centerlines, and the written files. |