SurfaceTorus

Returns the definition of a torus surface.

Syntax

rhinoscriptsyntax.SurfaceTorus(surface_id)

rhinoscript.surface.SurfaceTorus(surface_id)

Parameters

surface_id

Required.  String or Guid.  The surface object's identifier.

Returns

Tuple

A tuple containing the definition of the torus if successful.  The elements of the tuple are as follows:

Element

Type

Description

0

Plane

The base plane of the torus.

1

Number

The major radius of the torus.

2

Number

The minor radius of the torus.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

torus = rs.AddTorus(rs.WorldXYPlane(), 6, 2)

if rs.IsTorus(torus):

    torus_def = rs.SurfaceTorus(torus)

    rs.AddTorus( torus_def[0], torus_def[1], torus_def[2] )

Example

SurfaceCone

SurfaceCylinder

SurfaceSphere