AddCylinder

Adds a cylinder-shaped polysurface to the document.

Syntax

rhinoscriptsyntax.AddCylinder (base, height, radius, cap=True)

rhinoscript.surface.AddCylinder (base, height, radius, cap=True)

Parameters

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).

Returns

Guid

The identifier of the new object if successful.

None

If not successful, or on error.

Example

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 )

Also See

AddBox

AddCone

AddSphere

AddTorus