Nodes/ComfyUI_DAO_master/DXF Add Polygon
ComfyUI Node

DXF Add Polygon

Regular shapes from hexagons to hundred-sided blobs

By orion4d·Created about a year ago·Updated 12 months ago· 11
DXF Add Polygon
  • dxf
  • DXF
cx0.00
cy0.00
radius10.00
num_sides6

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.

CategoryDAO_master/DXF/Primitives

Inputs (5)

NameTypeDefaultDescription
dxfDXF
cxFLOAT0.00
cyFLOAT0.00
radiusFLOAT10.00
num_sidesINT63–100

Outputs (1)

NameTypeDescription
DXFDXF