Nodes/comfyui-panels/Polygon Origin at Center
ComfyUI Node

Polygon Origin at Center

The default pivot — panel center, made explicit

By bmad4ever·Created 12 months ago·Updated 2 months ago· 41
Polygon Origin at Center
    • POLY_3O

    Polygon Origin at Center is the simplest of the four origin nodes in comfyui-panels, and its job is narrow: it emits the value "center" on a POLY_3O output, which you plug into the optional origin input of Rotate Polygon, Scale Polygon, or Skew Polygon to make them pivot around the panel's geometric center.

    No inputs, one output. That's the whole node.

    Why does a node that just says "center" exist? Because the transform nodes take an optional origin, and their default - if you leave the input unconnected - is already the center. So strictly, you never need this node. It exists for graph hygiene: it makes the pivot explicit, lets you switch pivots by re-wiring instead of remembering defaults, and it's the reference point for comparing against the other origin options. When you're troubleshooting why a scaled panel moved instead of staying put, having the center on screen beats assuming it.

    The center of a panel is the average of its bounding box's corners, not of its area. For a rectangle - which is what most panels are before you rotate or skew them - center and centroid are the same point, which is why the Center and Centroid origin nodes feel interchangeable at first. They diverge the moment a panel stops being a rectangle: a skewed or irregular panel has a centroid that drifts toward where most of its area lives, while the center stays put. If you never distort your panels, pick this one and don't look back.

    Practical use: keep it connected to all three transforms for consistency, and swap it for Polygon Origin at Vertex or at Point when you want a panel to grow or swing from a specific corner instead. It's also the honest "reset" answer when a rotation sent a panel flying to an unexpected place - if the pivot wasn't what you thought, the center usually was.

    Installing

    Part of comfyui-panels by bmad4ever. Via ComfyUI Manager (search "comfyui-panels") and restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/bmad4ever/comfyui_panels
    

    Deps: shapely, matplotlib, opencv-python - no models, no GPU. Shapely is pinned exactly; version clashes with other packs are the realistic import failure.

    CategoryBmad/Panels

    Inputs (0)

    No inputs

    Outputs (1)

    NameTypeDescription
    POLY_3OPOLY_3O