Skip to content
Projects

Tube

The equations of simgeometry.objects.tube, declared on the code that implements them and checked by the tests.

Tube

classsource

A hollow cylinder between inner_radius and outer_radius, from start to end.

inside
p∈S  ⟺  ∣s∣≤L,  ri2≤ρ2≤ro2(f=0),p∈S  ⟺  ϕ(p)≤0(f>0)p \in S \iff |s| \le L,\; r_i^2 \le \rho^2 \le r_o^2 \quad (f = 0), \qquad p \in S \iff \phi(p) \le 0 \quad (f > 0)
level set
ϕ=ϕrect ⁣(ρ−ri+ro2,s; ro−ri2−f,L−f)−f\phi = \phi_\mathrm{rect}\!\left(\rho - \tfrac{r_i + r_o}{2}, s;\ \tfrac{r_o - r_i}{2} - f, L - f\right) - f
Assumes
  • half length LL, 0<ri<ro0 < r_i < r_o, in the frame (s,ρ)(s, \rho) of AxisymmetricShape; ϕrect\phi_\mathrm{rect} the 2D box distance as for Cylinder
  • the fillet f≤min⁡(ro−ri2,L)f \le \min(\tfrac{r_o - r_i}{2}, L) rounds the four circular edges
  • ϕ\phi is the exact signed distance, negative inside
Built from