โ† All examples

mesh algorithms

Profile sweep with scale and twist

Sweep a closed 2D profile along a 3D path with transported frames, linear scaling and twist, and cap both ends into a closed solid. Use it for mouldings, horns, handles, tentacles and extruded paths.

Recorded render of Profile sweep with scale and twist

What this component contains

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

How it works

Entry points
demo_profile, demo_path, sweep, build, main
Parameters
profile, path, end_scale, twist, steps
Complexity
O(path points * profile points)
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

The profile must be a simple polygon; tight bends with a large profile fold the walls through each other (not detected). Twisted walls are non-planar quads split along their shorter diagonal. Frames are transported by the turn between tangents (first order), so very coarse paths drift.