[frames | no frames]

# The SurfNurb Object

This object provides access to the control points of the surfaces that make up a Blender Curve.

The SurfNurb supports the Python iterator and sequence protocols which means you can use a python for statement or [] operator to access the points in a surface. Points are accessed linearly; for a N-by-M UV surface, the first N control points correspond to V=0, then second N to V=1, and so on.
Method Summary
List of 5 floats [x, y, z, w, t] for Poly or Nurbs `__getitem__(n)`
Get the Nth control point in the surface.
None ```__setitem__(n, point)```
Set the Nth control point in the surface.

Instance Variable Summary
boolean `cyclicU`: The cyclic setting for the U direction (True = cyclic).
boolean `cyclicV`: The cyclic setting for the V direction (True = cyclic).
int `flagU`: The knot flag U.
int `flagV`: The knot flag V.
int `orderU`: The order setting for the U direction.
int `orderV`: The order setting for the V direction.
int `pointsU`: The number of control points in the U direction (read only).
int `pointsV`: The number of control points in the V direction (read only).

Method Details

### __getitem__(n)(Indexing operator)

Get the Nth control point in the surface.
Parameters:
`n` - the index of the point to return
(type=integer)
Returns:
The Nth point in the curve
(type=List of 5 floats [x, y, z, w, t] for Poly or Nurbs)

Notes:

• This returned value is independent on the curve; modifying it will not affect the curve.
• Each successive call returns a new object.

### __setitem__(n, point)(Index assignment operator)

Set the Nth control point in the surface.
Parameters:
`n` - the index of the point to replace
(type=integer)
`point` - the point that will replace the one in the curve. The point is list of 4 floats in x,y,z,w (optionally tilt in radians as 5th value) format.
(type=list of 4 floats (optional 5th float is the tilt value in radians))
Returns:
None
(type=None)

Instance Variable Details

### cyclicU

The cyclic setting for the U direction (True = cyclic).
Type:
boolean

### cyclicV

The cyclic setting for the V direction (True = cyclic).
Type:
boolean

### flagU

The knot flag U. Changing the knot type automatically recalculates the knots. The flag can be one of three values:
• 0 : uniform knots
• 1 : endpoints knots
• 2 : bezier knots
Type:
int

### flagV

The knot flag V. See `flagU` for description.
Type:
int

### orderU

The order setting for the U direction. Values are clamped to the range [2:6] and not greater than the U dimension.
Type:
int

### orderV

The order setting for the V direction. Values are clamped to the range [2:6] and not greater than the V dimension.
Type:
int

### pointsU

The number of control points in the U direction (read only).
Type:
int

### pointsV

The number of control points in the V direction (read only).
Type:
int

 Generated by Epydoc 2.1 on Thu May 10 20:32:00 2007 http://epydoc.sf.net