|
Rhino C++ API
9.0
|
#include <rhinoSdkGetString.h>
Public Types | |
| enum | DebugOptions { DebugOff = 0, DebugDraw = 1, DebugDrawAndBake = 2 } |
Public Member Functions | |
| CRhinoRebuildCurveOptions ()=default | |
| CRhinoRebuildCurveOptions (const CRhinoRebuildCurveOptions &)=default | |
| ~CRhinoRebuildCurveOptions ()=default | |
| void | ClearCurrentOutputProperties () const |
| void | ClearKinkAngle () |
| double | ContextAngleToleranceRadians () const |
| double | ContextDistanceTolerance () const |
| double | CurrentOutputMaximumDeviation () const |
| const ON_2dex | CurrentOutputPointCountRange () const |
| const ON_2dex | CurrentOutputSpanCountRange () const |
| const ON_wString | CurrentOutputSummary () const |
| bool | DebugDisplayBake () const |
| bool | DebugDisplayDraw () const |
| enum CRhinoRebuildCurveOptions::DebugOptions | DebugOption () const |
| int | Degree () const |
| The degree the rebuit curves will have. More... | |
| bool | DeleteInputCurves () const |
| const ON_SHA1_Hash | DocumentOptionsHash () const |
| The value of DocumentOptionsHash() chages whenever any option that controls the document management like which layer the rebuilt curves will be added to and if the input curves should be deleted. The value of DocumentOptionsHash() does not change when options that control the geometry of the rebuilt curves change. More... | |
| CRhinoCommand::result | GetOptions (CRhinoCommandContext::COMMAND_STYLE ui_style, ON__UINT_PTR callback_context, void(*Callback)(ON__UINT_PTR callback_context, bool bRebuildOptionsChanged, bool bDisplayOptionsChanged, const CRhinoRebuildCurveOptions &options)) |
| After calling SetContext, call GetOptions() to interactively get curve rebuilding options. More... | |
| int | InputCurveCount () const |
| When input curves are being rebuilt, InputCurveCount() reports the number of input curves. More... | |
| const ON_2dex | InputDegreeRange () const |
| When input curves are being rebuilt, InputDegreeRange() reports the range of input curve degrees. More... | |
| const ON_2dex | InputPointCountRange () const |
| When input curves are being rebuilt, InputPointCountRange() reports the range of input curve point counts. More... | |
| const ON_2dex | InputSpanCountRange () const |
| When input curves are being rebuilt, InputSpanCountRange() reports the range of input curve span counts. More... | |
| const ON_wString | InputSummary () const |
| double | KinkAngleDegrees () const |
| double | KinkAngleRadians () const |
| const ON_CurveKinkDefinition | KinkDefinition () const |
| If KinkSplitting() is on, then, then KinkDefinition() specifies how target curve kinks are identified. The default value is ON_CurveKinkDefinition::DefaultTangentKink. More... | |
| ON_NurbsCurveFitParameters::KinkSplit | KinkSplitting () const |
| bool | KinkSplittingPermitted () const |
| const int | MaximumDegreeLimit () const |
| int | MaximumPointCount () const |
| const int | MaximumPointCountLimit () const |
| const int | MinimumDegreeLimit () const |
| int | MinimumPointCount () const |
| const int | MinimumPointCountLimit () const |
| const ON_NurbsCurveFitParameters | NurbsCurveFitParameters () const |
| |
| CRhinoRebuildCurveOptions & | operator= (const CRhinoRebuildCurveOptions &)=default |
| bool | OutputToCurrentLayer () const |
| int | PointCount () const |
| If the minimum and maximum point counts are equal, that value is returned. Otherwise 0 is returned. NOTE WELL: The dialog code should use this value only when it is > 0. More... | |
| const ON_2dex | PointCountLimits () const |
| The minimum and maximum values a user interface may specify as a point count value. More... | |
| const ON_2dex | PointCountLimitsForDegree (int degree, bool bSubDFriendly) const |
| The minimum and maximum values a user interface may specify as a point count value when degree is fixed. If the degree can be changed, use PointCountLimits() instead. More... | |
| const ON_2dex | PointCountRange () const |
| bool | PointCountRangeIsVariable () const |
| bool | PointCountRangesPermitted () const |
| double | PointCountRangeTolerance () const |
| When a range of point counts is permitted, the rebuild caclulation will stop searching for better matches using more points when the deviation between the target curve and current rebuild candidate is <= PointCountRangeTolerance(). More... | |
| const ON_SHA1_Hash | RebuildOptionsHash () const |
| The value of RebuildOptionsHash() changes whenever any option that controls the geometry of the rebuilt curves changes. These options include things like point count and degree. The value of RebuldOptionsHash() does not change when document management options change. More... | |
| unsigned | RhinoDocumentSerialNumber () const |
| void | SetContext (const CRhinoRebuildCurveOptions &default_options, unsigned int rhino_doc_sn, double context_distance_tolerance, double context_angle_tolerance_radians, int input_curve_count, ON_2dex input_degree_range, ON_2dex input_point_count_range, ON_2dex input_span_count_range, bool bOpenTargetCurves, bool bClosedG0TargetCurves, bool bClosedG1TargetCurves, bool bTangentMatchingPermitted, bool bKinkSplittingPermitted, bool bPointCountRangesPermitted) |
| Interface to use to get and update options used in curve rebuilding. More... | |
| void | SetCurrentOutputProperties (ON_2dex current_output_point_count_range, ON_2dex current_output_span_count_range, double current_output_maximum_deviation) const |
| If the output rebuilt curves have been calculated, the code performing the calculation can call SetCurrentOutputProperties() to update the values of CurrentOutputSpanCount(), CurrentOutputSpanCount(), and CurrentOutputMaximumDeviation(). User interface code that is getting and setting values, should never call this function. More... | |
| void | SetDebugOption (enum CRhinoRebuildCurveOptions::DebugOptions debug_option) |
| void | SetDegree (int degree) |
| Sets the degree used to rebuild curves. NOTE WELL: User interface code should not attempt to validate the value. All validation and implied adjustments are handled in one place in opennurbs. After changing any option value, the user interface should update all controls using the Degree(), MinimumPointCount(), MaximumPiontCount() etc., member functions. More... | |
| void | SetDeleteInputCurves (bool bDeleteInputCurves) |
| void | SetKinkAngleDegrees (double kink_angle_degrees) |
| void | SetKinkAngleRadians (double kink_angle_radians) |
| void | SetKinkSplitting (ON_NurbsCurveFitParameters::KinkSplit kink_splitting) |
| void | SetNurbsCurveFitParametersForExperts (const ON_NurbsCurveFitParameters &fit_parameters) |
| User interface code should NEVER call this function. This is a low level function used by the code that calculates the fits when a fit parameter needs to be adjusted. One situation is where a user has specified kink splitting and a point count that is not large enough to accomodate splitting and the kinks. More... | |
| void | SetOutputToCurrentLayer (bool bOutputToCurrentLayer) |
| void | SetPointCount (int point_count) |
| Set the minimum and maximum point count to the value of the point_count parameter. NOTE WELL: User interface code should not attempt to validate the value. All validation and implied adjustments are handled in one place in opennurbs. After changing any option value, the user interface should update all controls using the Degree(), PointCount(), etc., member functions. on this class. More... | |
| void | SetPointCountRange (int minimum_point_count, int maximum_point_count, double tolerance) |
| Use variable point counts to get a rebuilt curve with the fewest possible points that has a deviation <= tolerance. More... | |
| void | SetShowControlPoints (bool bShowControlPoints) |
| void | SetSmoothingCoefficient (double smoothing_coefficient) |
| void | SetSmoothingIntensity (ON_NurbsCurveFitParameters::Intensity smoothing_intensity) |
| void | SetSubDFriendly (bool bCreateSubDFriendlyCurves) |
| void | SetTangentMatching (ON_NurbsCurveFitParameters::TangentMatch tangent_matching) |
| Specifies if the tangents of the rebuilt curve match the tangents of the target curve. More... | |
| void | SetTargetSampleCount (int target_sample_count) |
| NOTE WELL: Ordinary user interfaces should not expose this setting. This is an advanced debugging option that sets the number of points sampled from the target curve. More... | |
| void | SetUniformityCoefficient (double uniformity_coefficient) |
| void | SetUniformityIntensity (ON_NurbsCurveFitParameters::Intensity uniformity_intensity) |
| bool | ShowControlPoints () const |
| double | SmoothingCoefficient () const |
| ON_NurbsCurveFitParameters::Intensity | SmoothingIntensity () const |
| bool | SmoothingPermitted () const |
| bool | SubDFriendly () const |
| ON_NurbsCurveFitParameters::TangentMatch | TangentMatching () const |
| bool | TangentMatchingPermitted () const |
| int | TargetSampleCount () const |
| NOTE WELL: Ordinary user interfaces should not expose this setting. This is an advanced debugging option that reports the number of points sampled from the target curve. More... | |
| double | UniformityCoefficient () const |
| ON_NurbsCurveFitParameters::Intensity | UniformityIntensity () const |
| bool | UniformityPermitted () const |
Static Public Attributes | |
| static const CRhinoRebuildCurveOptions | Defaults |
|
default |
|
default |
|
default |
| void CRhinoRebuildCurveOptions::ClearCurrentOutputProperties | ( | ) | const |
| void CRhinoRebuildCurveOptions::ClearKinkAngle | ( | ) |
| double CRhinoRebuildCurveOptions::ContextAngleToleranceRadians | ( | ) | const |
| double CRhinoRebuildCurveOptions::ContextDistanceTolerance | ( | ) | const |
| double CRhinoRebuildCurveOptions::CurrentOutputMaximumDeviation | ( | ) | const |
| const ON_2dex CRhinoRebuildCurveOptions::CurrentOutputPointCountRange | ( | ) | const |
| const ON_2dex CRhinoRebuildCurveOptions::CurrentOutputSpanCountRange | ( | ) | const |
| const ON_wString CRhinoRebuildCurveOptions::CurrentOutputSummary | ( | ) | const |
| bool CRhinoRebuildCurveOptions::DebugDisplayBake | ( | ) | const |
| bool CRhinoRebuildCurveOptions::DebugDisplayDraw | ( | ) | const |
| enum CRhinoRebuildCurveOptions::DebugOptions CRhinoRebuildCurveOptions::DebugOption | ( | ) | const |
| int CRhinoRebuildCurveOptions::Degree | ( | ) | const |
The degree the rebuit curves will have.
| bool CRhinoRebuildCurveOptions::DeleteInputCurves | ( | ) | const |
| const ON_SHA1_Hash CRhinoRebuildCurveOptions::DocumentOptionsHash | ( | ) | const |
The value of DocumentOptionsHash() chages whenever any option that controls the document management like which layer the rebuilt curves will be added to and if the input curves should be deleted. The value of DocumentOptionsHash() does not change when options that control the geometry of the rebuilt curves change.
| CRhinoCommand::result CRhinoRebuildCurveOptions::GetOptions | ( | CRhinoCommandContext::COMMAND_STYLE | ui_style, |
| ON__UINT_PTR | callback_context, | ||
| void(*)(ON__UINT_PTR callback_context, bool bRebuildOptionsChanged, bool bDisplayOptionsChanged, const CRhinoRebuildCurveOptions &options) | Callback | ||
| ) |
After calling SetContext, call GetOptions() to interactively get curve rebuilding options.
| ui_style | Command UI style |
| callback_context | First parameter passed to the Callback() function. |
| Callback | The option getting code calls Callback() everytime and option value changes. Typically Callback() handles calculating the rebuilt curves and dynamically displaying them. callback_context is the value passed to GetOptions(). bRebuildOptionsChanged will be true if an option that controls the rebuilt curve geometry changes. bDisplayOptionsChanged will be true if an option that could effect dynamic display changes. options is the updated option values. |
| int CRhinoRebuildCurveOptions::InputCurveCount | ( | ) | const |
When input curves are being rebuilt, InputCurveCount() reports the number of input curves.
| const ON_2dex CRhinoRebuildCurveOptions::InputDegreeRange | ( | ) | const |
When input curves are being rebuilt, InputDegreeRange() reports the range of input curve degrees.
| const ON_2dex CRhinoRebuildCurveOptions::InputPointCountRange | ( | ) | const |
When input curves are being rebuilt, InputPointCountRange() reports the range of input curve point counts.
| const ON_2dex CRhinoRebuildCurveOptions::InputSpanCountRange | ( | ) | const |
When input curves are being rebuilt, InputSpanCountRange() reports the range of input curve span counts.
| const ON_wString CRhinoRebuildCurveOptions::InputSummary | ( | ) | const |
| double CRhinoRebuildCurveOptions::KinkAngleDegrees | ( | ) | const |
| double CRhinoRebuildCurveOptions::KinkAngleRadians | ( | ) | const |
| const ON_CurveKinkDefinition CRhinoRebuildCurveOptions::KinkDefinition | ( | ) | const |
If KinkSplitting() is on, then, then KinkDefinition() specifies how target curve kinks are identified. The default value is ON_CurveKinkDefinition::DefaultTangentKink.
| ON_NurbsCurveFitParameters::KinkSplit CRhinoRebuildCurveOptions::KinkSplitting | ( | ) | const |
| bool CRhinoRebuildCurveOptions::KinkSplittingPermitted | ( | ) | const |
| const int CRhinoRebuildCurveOptions::MaximumDegreeLimit | ( | ) | const |
| int CRhinoRebuildCurveOptions::MaximumPointCount | ( | ) | const |
| const int CRhinoRebuildCurveOptions::MaximumPointCountLimit | ( | ) | const |
| const int CRhinoRebuildCurveOptions::MinimumDegreeLimit | ( | ) | const |
| int CRhinoRebuildCurveOptions::MinimumPointCount | ( | ) | const |
| const int CRhinoRebuildCurveOptions::MinimumPointCountLimit | ( | ) | const |
| const ON_NurbsCurveFitParameters CRhinoRebuildCurveOptions::NurbsCurveFitParameters | ( | ) | const |
|
default |
| bool CRhinoRebuildCurveOptions::OutputToCurrentLayer | ( | ) | const |
| int CRhinoRebuildCurveOptions::PointCount | ( | ) | const |
If the minimum and maximum point counts are equal, that value is returned. Otherwise 0 is returned. NOTE WELL: The dialog code should use this value only when it is > 0.
| const ON_2dex CRhinoRebuildCurveOptions::PointCountLimits | ( | ) | const |
The minimum and maximum values a user interface may specify as a point count value.
| const ON_2dex CRhinoRebuildCurveOptions::PointCountLimitsForDegree | ( | int | degree, |
| bool | bSubDFriendly | ||
| ) | const |
The minimum and maximum values a user interface may specify as a point count value when degree is fixed. If the degree can be changed, use PointCountLimits() instead.
| degree | The degree in the current context. |
| const ON_2dex CRhinoRebuildCurveOptions::PointCountRange | ( | ) | const |
| bool CRhinoRebuildCurveOptions::PointCountRangeIsVariable | ( | ) | const |
| bool CRhinoRebuildCurveOptions::PointCountRangesPermitted | ( | ) | const |
| double CRhinoRebuildCurveOptions::PointCountRangeTolerance | ( | ) | const |
When a range of point counts is permitted, the rebuild caclulation will stop searching for better matches using more points when the deviation between the target curve and current rebuild candidate is <= PointCountRangeTolerance().
| const ON_SHA1_Hash CRhinoRebuildCurveOptions::RebuildOptionsHash | ( | ) | const |
The value of RebuildOptionsHash() changes whenever any option that controls the geometry of the rebuilt curves changes. These options include things like point count and degree. The value of RebuldOptionsHash() does not change when document management options change.
| unsigned CRhinoRebuildCurveOptions::RhinoDocumentSerialNumber | ( | ) | const |
| void CRhinoRebuildCurveOptions::SetContext | ( | const CRhinoRebuildCurveOptions & | default_options, |
| unsigned int | rhino_doc_sn, | ||
| double | context_distance_tolerance, | ||
| double | context_angle_tolerance_radians, | ||
| int | input_curve_count, | ||
| ON_2dex | input_degree_range, | ||
| ON_2dex | input_point_count_range, | ||
| ON_2dex | input_span_count_range, | ||
| bool | bOpenTargetCurves, | ||
| bool | bClosedG0TargetCurves, | ||
| bool | bClosedG1TargetCurves, | ||
| bool | bTangentMatchingPermitted, | ||
| bool | bKinkSplittingPermitted, | ||
| bool | bPointCountRangesPermitted | ||
| ) |
Interface to use to get and update options used in curve rebuilding.
Specify the context where the rebuild calculation is occuring. This is done one time by the code or command performing that is managing the calculation. User interface code should never call this function.
| default_options | These are the default values to begin and are typically the values from the most recent calculation in the same context. If you don't have context specific defaults, then pass CRhinoRebuildCurveOptions::Defaults; |
| rhino_doc_sn | If the rebuild calculation is running in a Rhino command, pass the serial number of the Rhino document. |
| context_distance_tolerance | 0 < context_distance_tolerance |
| context_distance_tolerance | 0 < context_distance_tolerance |
| input_curve_count | If existing curves are being rebuilt, then pass the number of input curves. Otherwise pass 0. |
| input_degree_range | If existing curves are being rebuilt, then pass (minimum input degree, maximum input degree). Otherwise, pass(0,0). |
| input_point_count_range | If existing curves are being rebuilt, then pass (minimum input point count, maximum input point count). Otherwise, pass(0,0). |
| input_span_count_range | If existing curves are being rebuilt, then pass (minimum input span count, maximum input span count). Otherwise, pass(0,0). |
| context_angle_tolerance_radians | 0 <= context_angle_tolerance_radians <= pi. |
| bOpenTargetCurves | Pass true if at least one of the target curves is open (different start and end points). |
| bClosedG0TargetCurves | Pass true if at least one of the target curves is closed (equal start and end points) and has distinct tangents at the start and end. |
| bClosedG1TargetCurves | Pass true if at least one of the target curves is closed (equal start and end points) and has equal tangents at the start and end. |
| bTangentMatchingPermitted | Pass true if the user interface should offer start/end tangent matching options when they are appropriate. |
| bKinkSplittingPermitted | Pass true if at least one of the target curves has a kink of some sort and the user interface is permitted to offer kink splitting options. |
| bPointCountRangesPermitted | Pass true if the user interface is permitted to offer a range of point counts and the rebuild will automatically choose the one with the smalles deviation. |
| void CRhinoRebuildCurveOptions::SetCurrentOutputProperties | ( | ON_2dex | current_output_point_count_range, |
| ON_2dex | current_output_span_count_range, | ||
| double | current_output_maximum_deviation | ||
| ) | const |
If the output rebuilt curves have been calculated, the code performing the calculation can call SetCurrentOutputProperties() to update the values of CurrentOutputSpanCount(), CurrentOutputSpanCount(), and CurrentOutputMaximumDeviation(). User interface code that is getting and setting values, should never call this function.
| current_output_point_count_range | |
| current_output_span_count_range | |
| current_output_maximum_deviation |
| void CRhinoRebuildCurveOptions::SetDebugOption | ( | enum CRhinoRebuildCurveOptions::DebugOptions | debug_option | ) |
| void CRhinoRebuildCurveOptions::SetDegree | ( | int | degree | ) |
Sets the degree used to rebuild curves. NOTE WELL: User interface code should not attempt to validate the value. All validation and implied adjustments are handled in one place in opennurbs. After changing any option value, the user interface should update all controls using the Degree(), MinimumPointCount(), MaximumPiontCount() etc., member functions.
| degree | Desired degree. This input will be ignored if it is outside the limits specified by MinimumDegreeLimit() and MaximumDegreeLimit(). |
| void CRhinoRebuildCurveOptions::SetDeleteInputCurves | ( | bool | bDeleteInputCurves | ) |
| void CRhinoRebuildCurveOptions::SetKinkAngleDegrees | ( | double | kink_angle_degrees | ) |
| void CRhinoRebuildCurveOptions::SetKinkAngleRadians | ( | double | kink_angle_radians | ) |
| void CRhinoRebuildCurveOptions::SetKinkSplitting | ( | ON_NurbsCurveFitParameters::KinkSplit | kink_splitting | ) |
| void CRhinoRebuildCurveOptions::SetNurbsCurveFitParametersForExperts | ( | const ON_NurbsCurveFitParameters & | fit_parameters | ) |
User interface code should NEVER call this function. This is a low level function used by the code that calculates the fits when a fit parameter needs to be adjusted. One situation is where a user has specified kink splitting and a point count that is not large enough to accomodate splitting and the kinks.
| fit_parameters |
| void CRhinoRebuildCurveOptions::SetOutputToCurrentLayer | ( | bool | bOutputToCurrentLayer | ) |
| void CRhinoRebuildCurveOptions::SetPointCount | ( | int | point_count | ) |
Set the minimum and maximum point count to the value of the point_count parameter. NOTE WELL: User interface code should not attempt to validate the value. All validation and implied adjustments are handled in one place in opennurbs. After changing any option value, the user interface should update all controls using the Degree(), PointCount(), etc., member functions. on this class.
| point_count |
| void CRhinoRebuildCurveOptions::SetPointCountRange | ( | int | minimum_point_count, |
| int | maximum_point_count, | ||
| double | tolerance | ||
| ) |
Use variable point counts to get a rebuilt curve with the fewest possible points that has a deviation <= tolerance.
| minimum_point_count | Maximum number of points permitted in a rebuilt curve. |
| maximum_point_count | Maximum number of points permitted in a rebuilt curve. |
| tolerance | The rebuild caclulation will stop searching for better matches using more points when the deviation between the target curve and current rebuild candidate is <= tolerance. To get the best possible fit in the range of point counts, pass 0. |
| void CRhinoRebuildCurveOptions::SetShowControlPoints | ( | bool | bShowControlPoints | ) |
| void CRhinoRebuildCurveOptions::SetSmoothingCoefficient | ( | double | smoothing_coefficient | ) |
| void CRhinoRebuildCurveOptions::SetSmoothingIntensity | ( | ON_NurbsCurveFitParameters::Intensity | smoothing_intensity | ) |
| void CRhinoRebuildCurveOptions::SetSubDFriendly | ( | bool | bCreateSubDFriendlyCurves | ) |
| void CRhinoRebuildCurveOptions::SetTangentMatching | ( | ON_NurbsCurveFitParameters::TangentMatch | tangent_matching | ) |
Specifies if the tangents of the rebuilt curve match the tangents of the target curve.
| tangent_matching |
| void CRhinoRebuildCurveOptions::SetTargetSampleCount | ( | int | target_sample_count | ) |
NOTE WELL: Ordinary user interfaces should not expose this setting. This is an advanced debugging option that sets the number of points sampled from the target curve.
| target_sample_count | Advanced debugging option that users should never see. |
| void CRhinoRebuildCurveOptions::SetUniformityCoefficient | ( | double | uniformity_coefficient | ) |
| void CRhinoRebuildCurveOptions::SetUniformityIntensity | ( | ON_NurbsCurveFitParameters::Intensity | uniformity_intensity | ) |
| bool CRhinoRebuildCurveOptions::ShowControlPoints | ( | ) | const |
| double CRhinoRebuildCurveOptions::SmoothingCoefficient | ( | ) | const |
| ON_NurbsCurveFitParameters::Intensity CRhinoRebuildCurveOptions::SmoothingIntensity | ( | ) | const |
| bool CRhinoRebuildCurveOptions::SmoothingPermitted | ( | ) | const |
| bool CRhinoRebuildCurveOptions::SubDFriendly | ( | ) | const |
| ON_NurbsCurveFitParameters::TangentMatch CRhinoRebuildCurveOptions::TangentMatching | ( | ) | const |
| bool CRhinoRebuildCurveOptions::TangentMatchingPermitted | ( | ) | const |
| int CRhinoRebuildCurveOptions::TargetSampleCount | ( | ) | const |
NOTE WELL: Ordinary user interfaces should not expose this setting. This is an advanced debugging option that reports the number of points sampled from the target curve.
| double CRhinoRebuildCurveOptions::UniformityCoefficient | ( | ) | const |
| ON_NurbsCurveFitParameters::Intensity CRhinoRebuildCurveOptions::UniformityIntensity | ( | ) | const |
| bool CRhinoRebuildCurveOptions::UniformityPermitted | ( | ) | const |
|
static |
1.8.17