โ† All examples

mesh algorithms

Fillet polygon corners with arcs

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.

Recorded render of Fillet polygon corners with arcs

What this component contains

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • component.json
  • example.gltf
  • fillet_polyline_2d.py
  • meshkit.py
  • preview.png
  • test_package.py
  • verification/native.json

How it works

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)

Recorded checks

godot 4.7.2.stable.official.ed1daf0bf

  • generator_runs_system_python
  • generator_runs_verifier_python
  • gltf_strict_structure
  • interpreters_agree
  • example_matches_generator
  • godot_headless_gltf_load
  • godot_compatibility_render

Limits to consider

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.