โ† All examples

mesh algorithms

Extrude a polygon with holes

Extrude a 2D polygon with any number of holes into a closed solid with optional taper, triangulating the caps with bridged holes. Use it for plates, signs, floor plans, gaskets and logos.

Recorded render of Extrude a polygon with holes

What this component contains

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

How it works

Entry points
extrude, polygon_area, build, main
Parameters
height, taper
Complexity
O(n^2) for the cap triangulation, n the total ring size
Axes
+Y up, metres

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

Rings must be simple and the holes must lie inside the outer ring without touching each other; this is not checked. Taper scales about the origin, so off-centre shapes lean. No bevel or rounded edges.