Curve Bevel Arc

examples/curve-bevel-arc/

A beveled Bezier semicircle authored on bpy.types.Curve — splines.new('BEZIER'), bezier_points, bevel_depth, use_fill_caps — so the curve renders as a solid tube without a prior mesh conversion.

Rendered headless by the example itself. Select it to enlarge.

witnesses Curve tubes are curve datablocks: eight Bezier points, bevel_depth == 0.15, filled caps, and the evaluated mesh has deterministic topology (1044 verts, 1028 faces) resting on the floor.

tags curves bevel

runs on 4.5 LTS · 5.1 · 5.2 LTS

blender --background --python examples/curve-bevel-arc/curve_bevel_arc.py --

falsify it Breaks the contract on purpose and must exit 7

blender --background --python examples/curve-bevel-arc/curve_bevel_arc.py -- --no-caps

A runnable example that builds a beveled Bezier semicircle entirely through the curve data API — splines.new('BEZIER'), per-point bezier_points, bevel_depth, and use_fill_caps — so the curve renders as a solid tube without a prior mesh conversion.

What it witnesses: renderable curve tubes are curve datablocks, not meshes. The check asserts eight Bezier points and bevel_depth == 0.15, then that the depsgraph-evaluated mesh has the deterministic topology (1044 verts, 1028 faces for these resolution settings, the use_fill_caps cap faces included) with a Z span that rests on the floor ([0, 2 × bevel]) and an X span of 2 × radius + 2 × bevel.

Staging: the checked curve is presented as what a capped, beveled Bezier semicircle is in the world — a round-bar horseshoe magnet lying on the floor, open end to the camera. The two filled caps (use_fill_caps, the witness) are its ground-steel pole faces, turned face-on; an uncapped build would show two hollow pipe ends exactly there. The red enamel / bare-steel split is one material keyed on object-space Y, so the magnet stays a single curve datablock. The paper clips are beveled Bezier curves too (explicit FREE handles: straight legs plus quarter-circle bends), each lying along the field line that leaves its pole; the iron filings trace those lines — for two opposite line poles they are exact circular arcs through both pole faces. The cap's 12-sided outline is the pinned tessellation (bevel_resolution 4, locked by the 1044-vertex gate), not a presentation choice. The render path rotates the object only; the check reads object-space evaluated geometry and runs before any staging.

Run#

# Cheap correctness check (no render) — the CI check:
blender --background --python curve_bevel_arc.py --

# Falsifier: uncapped tube. Must exit non-zero (cap faces missing from the evaluated mesh).
blender --background --python curve_bevel_arc.py -- --no-caps

# Also render a still (EEVEE on a GPU host; use --engine cycles on GPU-less hosts):
blender --background --python curve_bevel_arc.py -- --output arc.png
blender --background --python curve_bevel_arc.py -- --output arc.png --engine cycles

Exit codes#

Per-script sequential checks. 9 is a valid check code; there is no rule against it. 10 is also the shared framing helper.

CodeMeaning
0Success
1Uncaught exception (FATAL wrapper)
2argparse / usage
3Spline type is not BEZIER
4Bezier point count ≠ 8
5bevel_depth ≠ 0.15
7Evaluated vert/face count off measured tessellation (--no-caps lands here: the caps are faces)
8Tube does not rest on the floor
9Tube height ≠ 2 × bevel
10Gallery framing violation (render path)
11Asset-quality floor violation (gallery_asset_quality, render path)
12X span off closed form
13--output produced no file

The blender-smoke workflow runs the check on Blender 5.2 LTS and 4.5 LTS (5.1 on the weekly cron, the needs-5.1 PR label, or manual dispatch). Smoke does not pass --output. Its catalog falsifier is --no-caps (expects exit 7).

Source

examples/curve-bevel-arc/curve_bevel_arc.py View the script on GitHub →
A red horseshoe magnet made of one beveled Bezier curve on a dark floor, its filled end caps facing the camera as steel pole faces, iron filings arcing between them.