DXF Add Polygon
Regular shapes from hexagons to hundred-sided blobs
- dxf
- DXF
Sometimes you don't want a circle, you want something with corners. DXF Add Polygon stamps a regular polygon into a DXF document - center, radius, and a side count, and you get anything from a triangle to a hexagon to a 100-sided pseudo-circle. It's the primitive for hex grids, octagonal frames, and any "I want a shape, but not smooth" moment in a vector workflow.
It's part of orion4d/ComfyUI_DAO_master, the French-authored vector-and-image pack built on ezdxf. Non-destructive, like the rest of the family: input doc in, copy made, polygon added, fresh document out.
How it works
cx,cy- center of the polygon.radius- the circumradius: distance from center to each vertex.num_sides- side count, clamped 3–100. 3 is a triangle, 4 a square (though for rectangles the dedicated DXF Add Rectangle gives you width/height instead), 6 a hexagon, 100 basically a circle.
Output is a single DXF socket with the updated document.
What to do with it
Polygons are the workhorse of geometric design. Hexagons tessellate into honeycomb and game-board patterns; pentagons and octagons make badge and frame motifs; high side counts give you soft rounded-ish shapes with a technical feel. Chain them with the other primitives, preview with DXF Preview, or convert to SVG with DXF to SVG.
Installing
ComfyUI Manager (search ComfyUI_DAO_master) or:
cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/ComfyUI_DAO_master.git
pip install ezdxf
Restart and go.
Where people get burned
num_sides is clamped at 3 - setting 2 does nothing useful, and setting 100 makes a polygon so round it might as well be a circle (which is cheaper). And the usual family trap applies: without your previous dxf wired in, you're drawing on an empty document. Note there's no rotation input here - if you need a hexagon sitting on a flat side instead of a point, plan the rotation downstream in DXF Transform.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| dxf | DXF | — | |
| cx | FLOAT | 0.00 | — |
| cy | FLOAT | 0.00 | — |
| radius | FLOAT | 10.00 | — |
| num_sides | INT | 63–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DXF | DXF | — |