|
Rhino C++ API
9.0
|
The NURBS curve fit tool creates a NURBS curve that approximates an existing curve. The ON_NurbsCurveFitParameters class contains the paramters that determine NURBS curve properties (degree, point count, ...) and other fitting contstraints. More...
#include <opennurbs_plus_rebuild.h>
Public Types | |
| enum | : int { MinimumDegree = 1, MaximumDegree = 11, DefaultDegree = 3, MinimumClampedPointCount = 2, MinimumClosedPointCount = 3, MaximumPointCount = 3000, DefaultSampleCount = ON_PointPairing::DefaultPointCount, MinimumSampleCount = (ON_NurbsCurveFitParameters::DefaultSampleCount / 10), MaximumSampleCount = (10 * ON_NurbsCurveFitParameters::DefaultSampleCount) } |
| enum | Intensity : unsigned char { Intensity::None = 0, Intensity::Low = 1, Intensity::Moderate = 2, Intensity::Medium = 3, Intensity::High = 4, Intensity::Extreme = 5, Intensity::Custom = 6 } |
| The Intensity enum is used to select a predefined or a custom value for the smoothing, uniformity, and curvature bias coefficients. More... | |
| enum | KinkSplit : unsigned char { KinkSplit::None = 0, KinkSplit::AtG1Changes = 1, KinkSplit::AtLargeG2Changes = 2, KinkSplit::AtMediumG2Changes = 3, KinkSplit::AtSmallG2Changes = 4 } |
| The KinkSplit enum is used to determine how target curve kinks (abrupt changes in target or curvature) are handled during rebuilding. More... | |
| enum | TangentMatch : unsigned char { TangentMatch::None = 0, TangentMatch::AtStart = 1, TangentMatch::AtEnd = 2, TangentMatch::AtStartAndEnd = 3 } |
| The TangentMatch enum is used to constrain the tangents of the rebuilt curve to match those of the target curve. More... | |
Public Member Functions | |
| ON_NurbsCurveFitParameters ()=default | |
| ON_NurbsCurveFitParameters (const ON_NurbsCurveFitParameters &)=default | |
| ~ON_NurbsCurveFitParameters ()=default | |
| bool | ApplyTangentMatchingAtKinks () const |
| Control when tangent matching is applied at kinks. Note that this setting does somthing only when some tangent matching option is true and the input curve has kinks. More... | |
| int | ClampedControlPointCount () const |
| bool | Closed () const |
| int | ConstrainedPointCount () const |
| If Closed() is true, the number of constrained points is (TangentMatchStart() || TangentMatchEnd() ? 1 : 0) More... | |
| double | CurvatureBiasCoefficient () const |
| ON_NurbsCurveFitParameters::Intensity | CurvatureBiasIntensity () const |
| Curvature bias adds a bias to fit target points with relatively higher curvatures more closely. Use CurvatureBiasCoefficient() to get the numerical coefficient used in the objective function. Use SetCurvatureBiasCoefficient() to set a custom curvature bias coefficient. More... | |
| int | Degree () const |
| void | GetPointCountRange (int &minimum_point_count, int &maximum_point_count, double &tolerance) const |
| const ON_SHA1_Hash | Hash (bool bHashTangentMatching, bool bHashKinkSplitting) const |
| Returns a hash of the options that control the output curve geometry. These options are: degree (degree of the output curves), point_count (number of user control points in the output curves), sample_point_count (number of points sampled from the input curves). smoothing When bShowTangentOptions is true, end tangent matching settings are hashed. When bShowSplitAtKinksOption is true, kink parameters are hashed. This hash is useful for determing when previously calculated output curves need to be updated by comparing the hash current options and the hash of options used to calculate the output curves. More... | |
| double | KinkAngleDegrees () const |
| double | KinkAngleRadians () const |
| const ON_CurveKinkDefinition | KinkDefinition () const |
| When kink splitting is enabled, the kink definition determines what type of target curve tangent of curvature change is considered to be a kink. More... | |
| ON_NurbsCurveFitParameters::KinkSplit | KinkSplitting () const |
| ON_NurbsCurveFitParameters & | operator= (const ON_NurbsCurveFitParameters &)=default |
| bool | OptimizeCurve () const |
| int | PeriodicControlPointCount () const |
| int | PointCount () const |
| Number of distinct control points in the NURBS curve fit. If a range of point counts is possible, this is the minimum number. More... | |
| const ON_2dex | PointCountRange () const |
| Get the point count range as an ON_2dex. More... | |
| int | PointCountRangeMaximum () const |
| int | PointCountRangeMinimum () const |
| double | PointCountRangeTolerance () const |
| When a range of point counts is permitted and PointCountRangeTolerance() > 0, then searching for the NURBS curve fit terminates if the separation is <= PointCountRangeTolerance(). More... | |
| class ON_ProgressReporter * | ProgressReporter () const |
| int | SampleCount () const |
| void | SetApplyTangentMatchingAtKinks (bool bApplyTangentMatchingAtKinks) |
| Control when tangent matching is applied at kinks. Note that this setting does somthing only when some tangent matching option is true and the input curve has kinks. More... | |
| void | SetClosed (bool bClosed) |
| Generally, it is best to call SetClosed() once before setting any other options and to leave it unchanged while the other options are adjusted. This is because the relationship betweem the point count and degree options are different for periodic and non-periodic NURBS curves. If every curve created with these options will be closed, then call SetClosed(true). Otherwise call SetClosed(false). More... | |
| void | SetCurvatureBiasCoefficient (double curvature_bias_coefficient) |
| Specify a curvature bias coefficient. Positive curvature bias coefficients make the fit curve relatively closer to the target curve in regions where the target curve has relatively higher curvature. In general, use the smallest value that gives the desired result. More... | |
| void | SetCurvatureBiasIntensity (ON_NurbsCurveFitParameters::Intensity curvature_bias_intensity) |
| Use one of ON_NurbsCurveFitParameters::Intensity enum values to specify a curvature bias. This method is provided to make it easier to provide an interface that lets a user select reasonable values for the curvature bias coefficient without having to understand the objective function. Positive curvature bias coefficients make the fit curve closer to regions in the target curve with relatively higher curvature. In general, use the smallest value that gives the desired result. More... | |
| void | SetDegree (int degree) |
| void | SetKinkAngleDegrees (double kink_angle_degrees) |
| void | SetKinkAngleRadians (double kink_angle_radians) |
| void | SetKinkSplitting (ON_NurbsCurveFitParameters::KinkSplit kink_splitting) |
| void | SetOptimizeCurve (bool bOptimizeCurve) |
| void | SetPointCount (int point_count) |
| Sets the point count and, if necessary, reduces the degree so that degree that degree <= ON_NurbsCurveFitParameters::MaximumDegree(point_count, Closed()). More... | |
| void | SetPointCountRange (int minimum_point_count, int maximum_point_count) |
| Use SetPointCountRange() if you want the NURBS curve fit with the smallest separation having the point count in the specified range. More... | |
| void | SetPointCountRange (int minimum_point_count, int maximum_point_count, double tolerance) |
| Use SetPointCountRange() if you want the NURBS curve fit with the smallest separation having the point count in the specified range. This version of SetPointCountRange() lets you also specify a tolerance. More... | |
| void | SetProgressReporter (class ON_ProgressReporter *progress_reporter) |
| void | SetSampleCount (int sample_count) |
| void | SetSmoothingCoefficient (double smoothing_coefficient) |
| Specify a smoothing coefficient. More... | |
| void | SetSmoothingIntensity (ON_NurbsCurveFitParameters::Intensity smoothing_intensity) |
| Use one of the one of ON_NurbsCurveFitParameters::Intensity enum values to specify a smoothing coefficient. This method is provided to make it easier to provide an interface that lets a user select reasonable values for the smoothing penalty without having to understand the objective fuction calculation. More... | |
| void | SetSubDFriendly (bool bSubDFriendly) |
| void | SetTangentMatching (ON_NurbsCurveFitParameters::TangentMatch tangent_matching) |
| void | SetTerminator (class ON_Terminator *terminator) |
| void | SetUniformityCoefficient (double uniformity_coefficient) |
| Specify a uniformity coefficient. Positive uniformity coefficients make the distances between control points more uniform. In general, use the smallest value that gives the desired result. More... | |
| void | SetUniformityIntensity (ON_NurbsCurveFitParameters::Intensity uniformity_intensity) |
| Use one of ON_NurbsCurveFitParameters::Intensity enum values to specify a uniformity coefficient. This method is provided to make it easier to provide an interface that lets a user select reasonable values for the uniformity coefficient without having to understand the optimization calculation. Positive uniformity coefficients make the distances between control points more uniform. In general, use the smallest value that gives the desired result. More... | |
| double | SmoothingCoefficient () const |
| ON_NurbsCurveFitParameters::Intensity | SmoothingIntensity () const |
| The smoothing penalty in the objective function penalizes triplets of contiguous control points that are not colinear and equally spaced. Use SmoothingCoefficient() to get the numerical coefficient used in the objective function. Use SetSmoothingCoefficient() to set a custom smoothing coefficient. More... | |
| bool | SubDFriendly () const |
| ON_NurbsCurveFitParameters::TangentMatch | TangentMatching () const |
| bool | TerminationRequested () const |
| class ON_Terminator * | Terminator () const |
| double | UniformityCoefficient () const |
| ON_NurbsCurveFitParameters::Intensity | UniformityIntensity () const |
| The uniformity penalty in the objective function penalizes variation in the distances between control points. Use UniformityCoefficient() to get the numerical coefficient used in the objective function. Use SetUniformityCoefficient() to set a custom uniformity penalty coefficient. More... | |
| bool | VariablePointCount () const |
Static Public Member Functions | |
| static ON_NurbsCurveFitParameters::Intensity | IntensityFromInt (int intensity_as_int, ON_NurbsCurveFitParameters::Intensity invalid_input_result) |
| static ON_NurbsCurveFitParameters::KinkSplit | KinkSplitFromInt (int kink_split_as_int, ON_NurbsCurveFitParameters::KinkSplit invalid_input_result) |
| Convert an integer value to the ON_NurbsCurveFitParameters::KinkSplit enum with the same value. More... | |
| static int | MaximumDegreeForPointCount (int point_count, bool bClosed, bool bSubDFreiendly) |
| Given a point count and periodic setting, determine the maximum degree. More... | |
| static int | MinimumPointCountForDegree (int degree, bool bClosed, bool bSubDFreiendly) |
| Give a degree and periodic setting, determine the minimum point count. More... | |
| static ON_NurbsCurveFitParameters::TangentMatch | TangentMatchFromInt (int tangent_match_as_int, ON_NurbsCurveFitParameters::TangentMatch invalid_input_result) |
| Convert an integer value to the ON_NurbsCurveFitParameters::TangentMatch enum with the same value. More... | |
| static bool | ValidInput (size_t sample_point_count, unsigned degree, unsigned control_point_count, bool bClosed, ON_Interval curve_domain) |
Static Public Attributes | |
| static constexpr double | ExtremeCurvatureBiasCoefficient = 10.0 |
| Curvature bias coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::High. More... | |
| static constexpr double | ExtremeSmoothingCoefficient = 10.0 |
| Smoothing coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::Extreme. More... | |
| static constexpr double | ExtremeUniformityCoefficient = 10.0 |
| Uniformity coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::High. More... | |
| static constexpr double | HighCurvatureBiasCoefficient = 1.0 |
| Curvature bias coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::High. More... | |
| static constexpr double | HighSmoothingCoefficient = 1.0 |
| Smoothing coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::High. More... | |
| static constexpr double | HighUniformityCoefficient = 1.0 |
| Uniformity coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::High. More... | |
| static constexpr double | LowCurvatureBiasCoefficient = 0.001 |
| Curvature bias coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::Low. More... | |
| static constexpr double | LowSmoothingCoefficient = 0.001 |
| Smoothing coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::Low. More... | |
| static constexpr double | LowUniformityCoefficient = 0.001 |
| static constexpr double | MaximumCurvatureBiasCoefficient = 10.0 |
| Maximum permitted curvature bias coefficient. More... | |
| static constexpr double | MaximumSmoothingCoefficient = 10.0 |
| Maximum permitted smoothing coefficient. More... | |
| static constexpr double | MaximumUniformityCoefficient = 10.0 |
| Maximum permitted uniformity coefficient. More... | |
| static constexpr double | MediumCurvatureBiasCoefficient = 0.1 |
| Curvature bias coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::Medium. More... | |
| static constexpr double | MediumSmoothingCoefficient = 0.1 |
| Smoothing coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::Medium. More... | |
| static constexpr double | MediumUniformityCoefficient = 0.1 |
| Uniformity coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::Medium. More... | |
| static constexpr double | ModerateCurvatureBiasCoefficient = 0.01 |
| Curvature bias coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::Moderate. More... | |
| static constexpr double | ModerateSmoothingCoefficient = 0.01 |
| Smoothing coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::Moderate. More... | |
| static constexpr double | ModerateUniformityCoefficient = 0.01 |
The NURBS curve fit tool creates a NURBS curve that approximates an existing curve. The ON_NurbsCurveFitParameters class contains the paramters that determine NURBS curve properties (degree, point count, ...) and other fitting contstraints.
Copyright (c) 1993-2025 Robert McNeel & Associates. All rights reserved. OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert McNeel & Associates.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
For complete openNURBS copyright information see http://www.opennurbs.org.
| anonymous enum : int |
|
strong |
|
strong |
The KinkSplit enum is used to determine how target curve kinks (abrupt changes in target or curvature) are handled during rebuilding.
|
strong |
The TangentMatch enum is used to constrain the tangents of the rebuilt curve to match those of the target curve.
|
default |
|
default |
|
default |
| bool ON_NurbsCurveFitParameters::ApplyTangentMatchingAtKinks | ( | ) | const |
Control when tangent matching is applied at kinks. Note that this setting does somthing only when some tangent matching option is true and the input curve has kinks.
| int ON_NurbsCurveFitParameters::ClampedControlPointCount | ( | ) | const |
Number of control points if the NURBS curve will be clamped. Number of total control points if the NURBS curve will be periodic. This number is >= PointCount() Includes SubDFriendly constrained points and the duplicated point for a clamped closed curve.
| bool ON_NurbsCurveFitParameters::Closed | ( | ) | const |
| int ON_NurbsCurveFitParameters::ConstrainedPointCount | ( | ) | const |
If Closed() is true, the number of constrained points is (TangentMatchStart() || TangentMatchEnd() ? 1 : 0)
| double ON_NurbsCurveFitParameters::CurvatureBiasCoefficient | ( | ) | const |
| ON_NurbsCurveFitParameters::Intensity ON_NurbsCurveFitParameters::CurvatureBiasIntensity | ( | ) | const |
Curvature bias adds a bias to fit target points with relatively higher curvatures more closely. Use CurvatureBiasCoefficient() to get the numerical coefficient used in the objective function. Use SetCurvatureBiasCoefficient() to set a custom curvature bias coefficient.
| int ON_NurbsCurveFitParameters::Degree | ( | ) | const |
| void ON_NurbsCurveFitParameters::GetPointCountRange | ( | int & | minimum_point_count, |
| int & | maximum_point_count, | ||
| double & | tolerance | ||
| ) | const |
| const ON_SHA1_Hash ON_NurbsCurveFitParameters::Hash | ( | bool | bHashTangentMatching, |
| bool | bHashKinkSplitting | ||
| ) | const |
Returns a hash of the options that control the output curve geometry. These options are: degree (degree of the output curves), point_count (number of user control points in the output curves), sample_point_count (number of points sampled from the input curves). smoothing When bShowTangentOptions is true, end tangent matching settings are hashed. When bShowSplitAtKinksOption is true, kink parameters are hashed. This hash is useful for determing when previously calculated output curves need to be updated by comparing the hash current options and the hash of options used to calculate the output curves.
| bHashTangentMatching | If the set of input curves contain at least one that is open, then pass true to include end tangent matching settings in the hash. |
| bHashKinkSplitting | If the set of input curves have kinks, then pass true to include kink splitting settings in the hash. |
|
static |
| double ON_NurbsCurveFitParameters::KinkAngleDegrees | ( | ) | const |
| double ON_NurbsCurveFitParameters::KinkAngleRadians | ( | ) | const |
| const ON_CurveKinkDefinition ON_NurbsCurveFitParameters::KinkDefinition | ( | ) | const |
When kink splitting is enabled, the kink definition determines what type of target curve tangent of curvature change is considered to be a kink.
|
static |
Convert an integer value to the ON_NurbsCurveFitParameters::KinkSplit enum with the same value.
| kink_split_as_int | |
| invalid_input_result | If kink_split_as_int does not match an KinkSplit enum value, then this value is returned. |
| ON_NurbsCurveFitParameters::KinkSplit ON_NurbsCurveFitParameters::KinkSplitting | ( | ) | const |
|
static |
Given a point count and periodic setting, determine the maximum degree.
| point_count | Number of indpendent control points in the output NURBS curve. |
| bClosed | True if the output NURBS curve will be periodic. |
|
static |
Give a degree and periodic setting, determine the minimum point count.
| degree | Degree of output NURBS curve. |
| bClosed | True if the output NURBS curve will be closed. |
|
default |
| bool ON_NurbsCurveFitParameters::OptimizeCurve | ( | ) | const |
| int ON_NurbsCurveFitParameters::PeriodicControlPointCount | ( | ) | const |
Number of total control points if the NURBS curve will be periodic. This number is >= PointCount() and includes periodic duplicates.
| int ON_NurbsCurveFitParameters::PointCount | ( | ) | const |
Number of distinct control points in the NURBS curve fit. If a range of point counts is possible, this is the minimum number.
| const ON_2dex ON_NurbsCurveFitParameters::PointCountRange | ( | ) | const |
Get the point count range as an ON_2dex.
| int ON_NurbsCurveFitParameters::PointCountRangeMaximum | ( | ) | const |
| int ON_NurbsCurveFitParameters::PointCountRangeMinimum | ( | ) | const |
| double ON_NurbsCurveFitParameters::PointCountRangeTolerance | ( | ) | const |
When a range of point counts is permitted and PointCountRangeTolerance() > 0, then searching for the NURBS curve fit terminates if the separation is <= PointCountRangeTolerance().
| class ON_ProgressReporter* ON_NurbsCurveFitParameters::ProgressReporter | ( | ) | const |
| int ON_NurbsCurveFitParameters::SampleCount | ( | ) | const |
| void ON_NurbsCurveFitParameters::SetApplyTangentMatchingAtKinks | ( | bool | bApplyTangentMatchingAtKinks | ) |
Control when tangent matching is applied at kinks. Note that this setting does somthing only when some tangent matching option is true and the input curve has kinks.
| bApplyTangentMatchAtKinks | If true, the TangentMatchStart() and TangentMatchEnd() settings are applied at kinks. Otherwise, the tangent matching applies only to the ends of curves. |
| void ON_NurbsCurveFitParameters::SetClosed | ( | bool | bClosed | ) |
Generally, it is best to call SetClosed() once before setting any other options and to leave it unchanged while the other options are adjusted. This is because the relationship betweem the point count and degree options are different for periodic and non-periodic NURBS curves. If every curve created with these options will be closed, then call SetClosed(true). Otherwise call SetClosed(false).
| bClosed | Pass true if every curve created with these options will be closed. Otherwise, pass false. |
| void ON_NurbsCurveFitParameters::SetCurvatureBiasCoefficient | ( | double | curvature_bias_coefficient | ) |
Specify a curvature bias coefficient. Positive curvature bias coefficients make the fit curve relatively closer to the target curve in regions where the target curve has relatively higher curvature. In general, use the smallest value that gives the desired result.
| uniformity_coefficient | Valid values are in the range 0 <= uniformity_coefficient <= ON_NurbsCurveFitParameters::MaximumCurvatuerBiasCoefficient. If curvature_bias_coefficient is not valid, then curvature bias is set to ON_NurbsCurveFitParameters::Uniformity::None. |
| void ON_NurbsCurveFitParameters::SetCurvatureBiasIntensity | ( | ON_NurbsCurveFitParameters::Intensity | curvature_bias_intensity | ) |
Use one of ON_NurbsCurveFitParameters::Intensity enum values to specify a curvature bias. This method is provided to make it easier to provide an interface that lets a user select reasonable values for the curvature bias coefficient without having to understand the objective function. Positive curvature bias coefficients make the fit curve closer to regions in the target curve with relatively higher curvature. In general, use the smallest value that gives the desired result.
| curvature_bias_intensity | One of ON_NurbsCurveFitParameters::Intensity enum values. If ON_NurbsCurveFitParameters::Intensity::Custom is passed in and a preexisting custom curvature bias has not been specified using SetCurvatureBiasCoefficient(), then CurvatureBiasIntensity() is set to none. If you want to set a custom uniformity coefficient, use SetCurvatureBiasCoefficient(x). |
| void ON_NurbsCurveFitParameters::SetDegree | ( | int | degree | ) |
| void ON_NurbsCurveFitParameters::SetKinkAngleDegrees | ( | double | kink_angle_degrees | ) |
| void ON_NurbsCurveFitParameters::SetKinkAngleRadians | ( | double | kink_angle_radians | ) |
| void ON_NurbsCurveFitParameters::SetKinkSplitting | ( | ON_NurbsCurveFitParameters::KinkSplit | kink_splitting | ) |
| kink_splitting | Specifies what type of target curve kinks get separate rebuilding on either side of the kink. |
| void ON_NurbsCurveFitParameters::SetOptimizeCurve | ( | bool | bOptimizeCurve | ) |
| void ON_NurbsCurveFitParameters::SetPointCount | ( | int | point_count | ) |
Sets the point count and, if necessary, reduces the degree so that degree that degree <= ON_NurbsCurveFitParameters::MaximumDegree(point_count, Closed()).
| point_count |
| void ON_NurbsCurveFitParameters::SetPointCountRange | ( | int | minimum_point_count, |
| int | maximum_point_count | ||
| ) |
Use SetPointCountRange() if you want the NURBS curve fit with the smallest separation having the point count in the specified range.
| minimum_point_count | |
| maximum_point_count |
| void ON_NurbsCurveFitParameters::SetPointCountRange | ( | int | minimum_point_count, |
| int | maximum_point_count, | ||
| double | tolerance | ||
| ) |
Use SetPointCountRange() if you want the NURBS curve fit with the smallest separation having the point count in the specified range. This version of SetPointCountRange() lets you also specify a tolerance.
| minimum_point_count | |
| maximum_point_count | |
| tolerance | tolerance >= 0. If you are willing to accept any separation below a certain value, pass that value as tolerance. Otherwise pass 0.0. |
| void ON_NurbsCurveFitParameters::SetProgressReporter | ( | class ON_ProgressReporter * | progress_reporter | ) |
| void ON_NurbsCurveFitParameters::SetSampleCount | ( | int | sample_count | ) |
| void ON_NurbsCurveFitParameters::SetSmoothingCoefficient | ( | double | smoothing_coefficient | ) |
Specify a smoothing coefficient.
| smoothing_coefficient | Valid values are in the range 0 <= smoothing_coefficient <= ON_NurbsCurveFitParameters::MaximumCustomSmoothingCoefficient. If smoothing_coefficient is not valid, then smoothing intensity is set to ON_NurbsCurveFitParameters::Smoothing::None. |
| void ON_NurbsCurveFitParameters::SetSmoothingIntensity | ( | ON_NurbsCurveFitParameters::Intensity | smoothing_intensity | ) |
Use one of the one of ON_NurbsCurveFitParameters::Intensity enum values to specify a smoothing coefficient. This method is provided to make it easier to provide an interface that lets a user select reasonable values for the smoothing penalty without having to understand the objective fuction calculation.
| smoothing_intensity | One of ON_NurbsCurveFitParameters::Intensity enum values. If ON_NurbsCurveFitParameters::Intensity::Custom is passed in and a preexisting custom smoothing penalty has not been specified using SetSmoothingCoefficient(), then SmothingIntensity() is set to none. If you want to set a custom smoothing coefficient, use SetSmoothingCoefficient(smoothing_coefficient). |
| void ON_NurbsCurveFitParameters::SetSubDFriendly | ( | bool | bSubDFriendly | ) |
| void ON_NurbsCurveFitParameters::SetTangentMatching | ( | ON_NurbsCurveFitParameters::TangentMatch | tangent_matching | ) |
| void ON_NurbsCurveFitParameters::SetTerminator | ( | class ON_Terminator * | terminator | ) |
| void ON_NurbsCurveFitParameters::SetUniformityCoefficient | ( | double | uniformity_coefficient | ) |
Specify a uniformity coefficient. Positive uniformity coefficients make the distances between control points more uniform. In general, use the smallest value that gives the desired result.
| uniformity_coefficient | Valid values are in the range 0 <= uniformity_coefficient <= ON_NurbsCurveFitParameters::MaximumUniformityCoefficient. If uniformity_coefficient is not valid, then uniformity is set to ON_NurbsCurveFitParameters::Uniformity::None. |
| void ON_NurbsCurveFitParameters::SetUniformityIntensity | ( | ON_NurbsCurveFitParameters::Intensity | uniformity_intensity | ) |
Use one of ON_NurbsCurveFitParameters::Intensity enum values to specify a uniformity coefficient. This method is provided to make it easier to provide an interface that lets a user select reasonable values for the uniformity coefficient without having to understand the optimization calculation. Positive uniformity coefficients make the distances between control points more uniform. In general, use the smallest value that gives the desired result.
| uniformity_intensity | One of ON_NurbsCurveFitParameters::Intensity enum values. If ON_NurbsCurveFitParameters::Intensity::Custom is passed in and a preexisting custom uniformity penalty has not been specified using SetUniformityCoefficient(), then UniformityIntensity() is set to none. If you want to set a custom uniformity coefficient, use SetUniformityCoefficient(x). |
| double ON_NurbsCurveFitParameters::SmoothingCoefficient | ( | ) | const |
| ON_NurbsCurveFitParameters::Intensity ON_NurbsCurveFitParameters::SmoothingIntensity | ( | ) | const |
The smoothing penalty in the objective function penalizes triplets of contiguous control points that are not colinear and equally spaced. Use SmoothingCoefficient() to get the numerical coefficient used in the objective function. Use SetSmoothingCoefficient() to set a custom smoothing coefficient.
| bool ON_NurbsCurveFitParameters::SubDFriendly | ( | ) | const |
|
static |
Convert an integer value to the ON_NurbsCurveFitParameters::TangentMatch enum with the same value.
| tangent_match_as_int | |
| invalid_input_result | If tangent_match_as_int does not match an TangentMatch enum value, then this value is returned. |
| ON_NurbsCurveFitParameters::TangentMatch ON_NurbsCurveFitParameters::TangentMatching | ( | ) | const |
| bool ON_NurbsCurveFitParameters::TerminationRequested | ( | ) | const |
| class ON_Terminator* ON_NurbsCurveFitParameters::Terminator | ( | ) | const |
| double ON_NurbsCurveFitParameters::UniformityCoefficient | ( | ) | const |
| ON_NurbsCurveFitParameters::Intensity ON_NurbsCurveFitParameters::UniformityIntensity | ( | ) | const |
The uniformity penalty in the objective function penalizes variation in the distances between control points. Use UniformityCoefficient() to get the numerical coefficient used in the objective function. Use SetUniformityCoefficient() to set a custom uniformity penalty coefficient.
|
static |
| bool ON_NurbsCurveFitParameters::VariablePointCount | ( | ) | const |
|
staticconstexpr |
Curvature bias coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::High.
|
staticconstexpr |
Smoothing coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::Extreme.
|
staticconstexpr |
Uniformity coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::High.
|
staticconstexpr |
Curvature bias coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::High.
|
staticconstexpr |
Smoothing coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::High.
|
staticconstexpr |
Uniformity coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::High.
|
staticconstexpr |
Curvature bias coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::Low.
|
staticconstexpr |
Smoothing coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::Low.
|
staticconstexpr |
<summary<coefficient> Uniformity coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::Low.
|
staticconstexpr |
Maximum permitted curvature bias coefficient.
|
staticconstexpr |
Maximum permitted smoothing coefficient.
|
staticconstexpr |
Maximum permitted uniformity coefficient.
|
staticconstexpr |
Curvature bias coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::Medium.
|
staticconstexpr |
Smoothing coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::Medium.
|
staticconstexpr |
Uniformity coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::Medium.
|
staticconstexpr |
Curvature bias coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::Moderate.
|
staticconstexpr |
Smoothing coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::Moderate.
|
staticconstexpr |
<summary<coefficient> Uniformity coefficient that corresponds to ON_NurbsCurveFitParameters::Intensity::Moderate.
1.8.17