splinepy.helpme.create.torus#

splinepy.helpme.create.torus(torus_radius, section_outer_radius, section_inner_radius=None, torus_angle=None, section_angle=None, section_n_knot_spans=4, torus_n_knot_spans=4, degree=True)[source]#

Creates a volumetric NURBS spline describing a torus revolved around the x-axis. Possible cross-sections are plate, disk (yielding a tube) and section of a disk.

Parameters:
  • torus_radius (float) – Radius of the torus

  • section_outer_radius (float) – Radius of the section of the torus

  • section_inner_radius (float, optional) – Inner radius in case of hollow torus, by default 0.

  • torus_angle (float, optional) – Rotational angle of the torus, by default None, giving a complete revolution

  • section_angle (float, optional) – Rotational angle, by default None, yielding a complete revolution

  • section_n_knot_spans (float, optional) – Number of knot spans along the cross-section, by default 4

  • torus_n_knot_spans (float, optional) – Number of knot spans along the torus, by default 4

Returns:

torus – Volumetric spline in the shape of a torus with degrees (1,2,2)

Return type:

NURBS