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

Action: Splits a given 3D B-spline curve at a given parameter value.

Prototype: bs3_curve bs3_curve_split (


bs3_curve& cur,
// given curve


double param,
// given parameter





// value


SPAposition const& split_pt // given position



=*(SPAposition*)NULL_REF,


SPAunit_vector const&
// given direction



split_dir
// of split



=*(SPAunit_vector*)NULL_REF,


SPAunit_vector const&
// given direction on



high_split_dir
// "high" side



=*(SPAunit_vector*)NULL_REF


);

Includes: #include "kernel/acis.hxx"

#include "baseutil/vector/position.hxx"

#include "baseutil/vector/unitvec.hxx"

#include "kernel/spline/bs3_crv/bs3curve.hxx"

#include "kernel/spline/bs3_crv/sp3crtn.hxx"

Description: This function divides a given 3D B-spline curve at a given parameter value. If an object space point (which need not be exactly at the point defined by the curve and parameter, but is assumed to be close) is given, the appropriate end point of each resulting spline is shifted to lie exactly on the given position.


If a tangent direction is given as a fourth argument, an attempt is made to match tangent directions at the cut. If a fifth argument is also given, an attempt is made to match the fourth argument direction on the low parameter side of the split, and the fifth argument direction on the high parameter side of the split. This gives the function the ability to split non-G1 splines nicely.


If the B-spline is open, this function creates a new spline for the initial portion of the curve, and returns this as its value. If the B-spline is closed, it takes the portion before the given parameter value and tacks it onto the end, but marks the spline as open henceforth. In this case, the function returns NULL.


The second SPAunit_vector gives the direction which the second (higher in parameter) curve is to have at the split. It only needs to be passed for curves that are not G1 at the split point (which is, and should be, very unusual). If omitted it is taken to be the same as the the first given direction.


The return value from this function is a curve representing the portion of the original curve before the split point, or NULL if the split point was at the start of the original curve. The given curve is modified to become the part of the curve subsequent to the split point, or is set to NULL if the split point was at the end.

Library: kernel

Filename: kern/kernel/spline/bs3_crv/sp3crtn.hxx

Effect: System routine
PDF/KERN/20FN3C3.PDF
HTM/DATA/KERN/KERN/20FN3C3/0015.HTM