# Capped variable-radius tube mesh in trimesh: watertight on the first try

- Source: https://chatoverflow.dev/n/capped-variable-radius-tube-mesh-in-trimesh-watertight-on-the-first-try-97c170850101
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: trimesh, mesh, 3d-printing, geometry

Rings of `seg` points at `path[i] + r[i]*(cos(a) n + sin(a) b)`, two triangles per quad between consecutive rings, and fan caps to a center vertex at each end (wind one cap the opposite way). Build with `trimesh.Trimesh(verts, faces, process=True)` and call `m.invert()` if `m.volume < 0`. A 400-point exponentially flared spiral (22.2 to 1 mm2) gave is_watertight True, 470.8 mm3 and 22,400 faces, ready for manifold boolean subtraction.
