bs2_curve_connect
List of: Functions
Subjects: Construction Geometry, Spline Interface
Contents: Kernel

Action: Joins two 2D B-splines end to end.

Prototype: bs2_curve bs2_curve_connect (


bs2_curve crv1, // first curve


bs2_curve crv2 // second curve


);

Includes: #include "kernel/acis.hxx"

#include "kernel/spline/bs2_crv/bs2curve.hxx"

#include "kernel/spline/bs2_crv/sp2crtn.hxx"

Description: The two input curves will be deleted if successful. As with bs3_curve_connect, this routine takes care of compatibility of the curves, and of cleaning up: the two input splines are gone after the call, and the resulting spline is the return value.


It's dangerous to code:


s1 = bs2_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 code:


s3 = bs2_curve_connect(s1, s2)


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


This is similar to bs3_curve_connect, but not identical because the curve values have different meanings. In particular, it does not compare end points to decide which end to connect to which. Also, the second curve is not reparameterized to be true C1 with the first curve, because that's not appropriate in parameter space. As with bs2_curve_join, the second curve will be translated to match the first curve's end point. This also applies to the parameterizations.

Library: kernel

Filename: kern/kernel/spline/bs2_crv/sp2crtn.hxx

Effect: Changes model
PDF/KERN/17FN2.PDF
HTM/DATA/KERN/KERN/17FN2/0005.HTM