8.14.1 Curve class: Base class for curve type classes.

This is a virtual class intended to be subclassed. It defines the common definitions for all curve types. The subclasses should at least define the following: sub_points(t,j)

Curve objects have the following methods:

sub_points( t,j)
Return the points at values t in part j

t can be an array of parameter values, j is a single segment number.

sub_points_2( t,j)
Return the points at values,parts given by zip(t,j)

t and j can both be arrays, but should have the same length.

lengths( )

pointsAt( t)
Returns the points at parameter values t.

Parameter values are floating point values. Their integer part is interpreted as the curve segment number, and the decimal part goes from 0 to 1 over the segment.

subPoints( div=10,extend=[0.,0.])
Return a series of points on the PolyLine.

The parameter space of each segment is divided into ndiv parts. The coordinates of the points at these parameter values are returned as a Coords object. The extend parameter allows to extend the curve beyond the endpoints. The normal parameter space of each part is [0.0 .. 1.0]. The extend parameter will add a curve with parameter space [-extend[0] .. 0.0] for the first part, and a curve with parameter space [1.0 .. 1 + extend[0]] for the last part. The parameter step in the extensions will be adjusted slightly so that the specified extension is a multiple of the step size. If the curve is closed, the extend parameter is disregarded.

length( )
Return the total length of the curve.

This is only available for curves that implement the 'lengths' method.