New Curve method Curve.appendPoint( numcurve, newpoint ) to add

points to a Curve.

New supporting module CurNurb to provide access to the curves in a Curve
and their associated points.

Curve module now supports Python iterator and sequence protocols.
This allows typical python programming idioms using 'for' statement
and the [] operator.

# example 1
for curve in a_curve:
	for point in curve:
		print point

#example 2

curnurb = a_curve[0]
curnurb.append( [1,1,1,1] )

Still under construction.  Epydoc will follow.
This commit is contained in:
Stephen Swaney
2004-07-21 21:01:15 +00:00
parent 1c5302e68b
commit bce2c02fdd
9 changed files with 1691 additions and 715 deletions

View File

@@ -186,6 +186,12 @@ int Lattice_CheckPyObject (PyObject *pyobj);
/* Noise */
PyObject * Noise_Init (void);
/* CurNurb */
PyObject * CurNurb_Init (void);
PyObject * CurNurb_CreatePyObject (Nurb *bzt);
int CurNurb_CheckPyObject (PyObject *pyobj);
Nurb * CurNurb_FromPyObject (PyObject *pyobj);
/* Init functions for other modules */
PyObject * Window_Init (void);
PyObject * Draw_Init (void);