Adds a torus-shaped revolved surface to the document.
rhinoscriptsyntax.AddTorus (base, major_radius, minor_radius, direction=None)
rhinoscript.surface.AddTorus (base, major_radius, minor_radius, direction=None)
base |
Required. The 3-D origin point of the torus or the base plane of the torus |
major_radius |
Required. Number. The major radius of the torus. The major radius must be larger than the minor radius. |
minor_radius |
Required. Number. The minor radius of the torus. The minor radius must be greater than zero. |
direction |
Optional. A point that defines the direction of the torus when base is a point. If omitted, a torus that is parallel to the world XY plane is created. |
Guid |
The identifier of the new object if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
major_radius = 5.0
minor_radius = major_radius - 2.0
base = rs.GetPoint("Base of torus")
if base:
direction = rs.GetPoint("Direction of torus", base)
if direction:
rs.AddTorus( base, major_radius, minor_radius, direction )
AddBox
AddCone
AddCylinder