Action:
|
Joins two splines end to end in a C1 join.
|
|
Prototype:
|
bs3_curve bs3_curve_connect (
|
|
|
bs3_curve bs1,
|
// first given curve
|
|
|
bs3_curve bs2
|
// second given curve
|
|
|
);
|
|
Includes:
|
#include "kernel/acis.hxx"
|
|
#include "kernel/spline/bs3_crv/bs3curve.hxx"
|
|
#include "kernel/spline/bs3_crv/sp3crtn.hxx"
|
|
Description:
|
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 will likely be reparameterized. It gets attached to either the start or end of the first spline, wherever it is coincident. 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.
|
|
Library:
|
kernel
|
|
Filename:
|
kern/kernel/spline/bs3_crv/sp3crtn.hxx
|
|
Effect:
|
Changes model
|