Adds a cylinder-shaped polysurface to the document.
rhinoscriptsyntax.AddCylinder (base, height, radius, cap=True)
rhinoscript.surface.AddCylinder (base, height, radius, cap=True)
base |
Required. Point or Plane. The 3-D base point of the cylinder or the base plane of the cylinder. |
height |
Required. If base is a point, then height is a 3-D height point of the cylinder. The height point defines the height and direction of the cylinder. If base is a plane, then height is the numeric height value of the cylinder. |
radius |
Required. Number. The radius of the cylinder. |
cap |
Optional. Boolean. Cap the ends of the cylinder. If omitted, the ends of the cylinder will be capped (True). |
Guid |
The identifier of the new object if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
radius = 5.0
base = rs.GetPoint("Base of cylinder")
if base:
height = rs.GetPoint("Height of cylinder", base)
if height: rs.AddCylinder( base, height, radius )