SurfaceDegree

Returns the degree of a  surface object in the specified direction.

Syntax

rhinoscriptsyntax.SurfaceDegree (surface_id, direction=2)

rhinoscript.surface.SurfaceDegree (surface_id, direction=2)

Parameters

surface_id

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

direction

Optional.  Number.  The direction, either 0 = U, or 1 = V, or 2 = Both.  Of omitted, both the degrees in the U and V directions are returned (2 = Both).

Returns

Tuple

If direction is not specified, or direction is set to 2, then the degree in both the U and V directions is returned.

Number

If direction is specified, and direction is set to either 0 or 1, then the degree in either the U or V direction is returned.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

obj = rs.GetObject("Select a surface", rs.filter.surface)

if rs.IsSurface(obj):

    print "Degree in U direction: ", rs.SurfaceDegree(obj, 0)

    print "Degree in V direction: ", rs.SurfaceDegree(obj, 1)

Also See

IsSurface

SurfaceDomain