All Frameworks  Class Hierarchy  This Framework  Indexes

SPAkern Global Function bs3_curve_connect


bs3_curve bs3_curve_connect(bs3_curve bs1,
bs3_curve bs2,
logical joinC1= TRUE,
logical joinC0= FALSE )
Joins two splines end to end in a (possibly) C1 join.

Role: This routine takes care of compatibility of the curves, and of cleaning up. first_part and last_part are gone after the call, and the resulting spline is the return value. However, it's dangerous to say

s1 = bs3_curve_connect ( s1, s2 );

because if it fails, it returns a NULL pointer and leaves s1 and s2 alone. Thus s1 still exists but the caller has just zeroed its pointer. So always say

s3 = bs3_curve_connect ( s1, s2 );

then either s3 is valid and s1 and s2 are gone, or vice versa.

The resulting spline has the same direction and parameterization as the first spline, s1. The second one might be reversed, and if instructed to join C1 will likely be reparameterized. It gets attached to either the start or end of the first spline, wherever it is coincident. If instructed to join C1 its parameterization is adjusted so that its tangent magnitude matches that of the first spline, where they meet. This gives a C1 join, if the input splines were G1.

Errors: If there's a problem, the return value is NULL and the inputs are unchanged. The only problems might be if the splines have no common end points, or if either spline is null or corrupted somehow.

Limitations: Both splines must have the normal knot multiplicity of knots at the ends. This is not generalized to do both bs2_curves and bs3_curves; the dimension is 3.

Effect: Changes model

Parameters:
bs1
first given curve.
bs2
second given curve.
joinC1
logical (default TRUE) that instructs the function to join the spline curves in a C1 manner.

This object is included in the file: sp3crtn.hxx

Copyright (c) 1989-2007 by Spatial Corp. All rights reserved.