ON_TemplatedCurveRebuilder rebuilds a curve (the "source" curve) so that it takes on the degree, knot vector, and control point count of a "template" NURBS curve.
More...
#include <opennurbs_plus_rebuild.h>
ON_TemplatedCurveRebuilder rebuilds a curve (the "source" curve) so that it takes on the degree, knot vector, and control point count of a "template" NURBS curve.
The template curve is analyzed once with SetTemplateCurve(); the rebuilder can then be applied to many source curves with RebuildCurve().
◆ ON_TemplatedCurveRebuilder() [1/2]
| ON_TemplatedCurveRebuilder::ON_TemplatedCurveRebuilder |
( |
| ) |
|
|
default |
◆ ~ON_TemplatedCurveRebuilder()
| ON_TemplatedCurveRebuilder::~ON_TemplatedCurveRebuilder |
( |
| ) |
|
|
default |
◆ ON_TemplatedCurveRebuilder() [2/2]
◆ IsSet()
| bool ON_TemplatedCurveRebuilder::IsSet |
( |
| ) |
const |
◆ operator=()
◆ RebuildCurve()
| bool ON_TemplatedCurveRebuilder::RebuildCurve |
( |
const ON_Curve & |
source_curve, |
|
|
bool |
bFlipSourceDirection, |
|
|
bool |
bPreserveEndTangents, |
|
|
bool |
bMakeSubDFriendly, |
|
|
ON_NurbsCurve & |
destination |
|
) |
| const |
Rebuild one source curve so it matches the template curve's degree, knot vector, and control point count.
- Parameters
-
| source_curve | The curve to rebuild. |
| bFlipSourceDirection | If true and the source curve is open, its direction is flipped (reversed) before sampling. Set this when the source runs opposite the template. |
| bPreserveEndTangents | If true and the rebuilt curve is open with at least 4 control points, the interior end control points are adjusted so the rebuilt curve's end tangents match the source's. |
| bMakeSubDFriendly | If true, the rebuilt curve is converted to a SubD friendly curve. |
| destination | The rebuilt curve is returned here. |
- Returns
- True if a valid curve was created.
◆ SetTemplateCurve()
| bool ON_TemplatedCurveRebuilder::SetTemplateCurve |
( |
const ON_Curve & |
template_curve | ) |
|
Analyze the template curve. Computes and stores the template's NURBS form (clamped for open/simple-closed templates), its Greville abscissae, its closed/periodic state, and the control point range to interpolate.
- Parameters
-
| template_curve | The curve whose degree, knots, and control point count the rebuilt source curves will match. |
- Returns
- True if the template curve is usable. If false is returned, the rebuilder is left unset.
◆ TemplateCurve()
| const ON_NurbsCurve& ON_TemplatedCurveRebuilder::TemplateCurve |
( |
| ) |
const |
- Returns
- The template curve's stored NURBS form, or an empty curve when the rebuilder is not set.