Baltor Get started

Gallery / Mesh algorithms

Fillet polygon corners with arcs

In your harnessMesh algorithmMIT

Round the corners of a 2D polygon or polyline with circular arcs tangent to both edges, shrinking the radius where edges are too short. Use it for rounded outlines, toolpaths and soft UI shapes.

Render of Fillet polygon corners with arcs
The render its check recorded in Godot 4.7.2, 256 by 256 pixels.

What it takes and gives

Entry points
fillet, perimeter, build, main
Parameters
radius, arc_segments
Complexity
O(n * arc_segments)
Axes
+Y up, metres; 2D (x, y) maps to (x, 0, -y)

Limits. Each corner is filleted on its own: where a shrunk radius takes half of an edge from both ends, the arcs meet but the radius is no longer the requested one. Self-intersecting input is not repaired. Arcs are polylines with arc_segments chords.

Details

Kind
Mesh algorithm
Engine
Python 3.10 or later
Files
10 files, 166.7 KB
Licence
MIT
Declared effects
reads files, runs commands, writes files
Checked with
Godot 4.7.2, gl_compatibility, OpenGL 3 driver, Mesa llvmpipe under Xvfb
Checks
generator runs system python, generator runs verifier python, gltf strict structure, interpreters agree, example matches generator, godot headless gltf load, godot compatibility render
Techniques
Tangent arc construction: distance r / tan(angle / 2) from the corner, Corner bisector for the arc centre
Tags
fillet, rounded corners, polygon, 2d, arc, outline
Identity
library.supply.creative_originals.0923ab36ab038974e6cacee5.1a1fa0d14f90b3c2
Version
1a1fa0d14f90b3c26d98a5039521b039671c0f187070ff5a7a8783339f6574c2

The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.

Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.