[Bf-python] NURBS and python

Stephen Swaney sswaney at swbell.net
Sat Apr 3 18:34:07 CEST 2004


Francesco Tamagni wrote:
> 
> I thought that a NURBS surface was a NURBS Curve with both U and V
> control points, isnt'it? 

True.  

> if it's such way, is it conceptually wrong to
> gain access directly to the matrix of control points?

I suspect we are starting to talk at cross purposes here.
Let's be clear about how blender organizes Curves
and Surfaces:

1. Curves
	a. bezier
	b. nurb
	c. path
2. Surfaces
	a. nurb curve - also known as surface curves
	b. nurb surface

Surface curves and Surface surfaces are the same type
of object, differing only in the dimension of their
sets of control points.  It is reasonable to expect
them to have a similar interface, even to the point
of being interchangeable.  It is possible via the
GUI to create a Surface object that consists of both 
surface curves and surfaces, for example.

Curves, whether of the bezier, nurb or path flavor,
are different creatures with different properties.
In Blender, a nurb Curve is not interchangable with
a Surface nurb curve.  Because of this, I would
expect a Curve to have a different interface than
a Surface.  They certainly do in Blender's Editing
window.

While it may be programatically possible to reach
inside a Curve and manipulate the second dimension
of its control point array, I would be surprised
if these changes showed up in Blender's GUI.  Allowing
changes that have no effect violates the Principle
of Least Astonishment.

> - it could be used
> for both Curves and surfaces using the same calls...

As I said, since both Surfaces and Curves share the
underlying Nurb data structure, there would be 
substantial code sharing between the two object types.
However, I would still expect them to appear as different
types to the user.

-- 
Stephen Swaney			
sswaney at swbell.net



More information about the Bf-python mailing list