Rhino C++ API  7.18
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ON_SubDExpandEdgesParameters Class Reference

#include <opennurbs_subd.h>

Public Types

enum  Style : unsigned char {
  Style::Unset = 0, Style::Single = 1, Style::Double = 2, Style::HalfLeft = 3,
  Style::HalfRight = 4
}
 ON_SubDExpandEdgesParameters::Style specifies options for how faces are inserted along input edges. More...
 

Public Member Functions

 ON_SubDExpandEdgesParameters ()=default
 
 ON_SubDExpandEdgesParameters (const ON_SubDExpandEdgesParameters &)=default
 
 ~ON_SubDExpandEdgesParameters ()=default
 
void ClearVariableOffset ()
 
double ConstantOffset () const
 Normalized constant offset parameter for inserting edges parallel to an input edge. Smaller values create narrower offsets. More...
 
const ON_Color FaceColor () const
 
Returns
Per face color for new faces.
More...
 
const ON_ComponentStatus FaceStatus () const
 
Returns
Status for new faces.
More...
 
ON_SubDExpandEdgesParameters::Style FaceStyle () const
 
const ON_SHA1_Hash Hash () const
 This SHA1 hash can be used to determine if sets of parameters are the same. More...
 
bool IsHalfFaceStyle () const
 
Returns
True if the FaceStyle() is HalfLeft of HalfRight.
More...
 
bool IsVariableOffset () const
 
ON_SubDExpandEdgesParametersoperator= (const ON_SubDExpandEdgesParameters &)=default
 
void SetConstantOffset (double offset)
 Set the constant offset value. Values within OffsetTolerance of a predefined offset value are set to the predefined offset value. More...
 
void SetFaceColor (ON_Color face_color)
 Set the perf face color for new faces. More...
 
void SetFaceStatus (ON_ComponentStatus face_status)
 Set the Mark(), MarkBits(), Selected(), and Highlighted() status for new faces. More...
 
void SetFaceStyle (ON_SubDExpandEdgesParameters::Style face_style)
 Set the style for new faces. More...
 
void SetVariableOffset (ON_Interval variable_offsets)
 
const ON_Interval VariableOffset () const
 

Static Public Member Functions

static double CleanupOffset (double x)
 
static bool IsValidConstantOffset (double constant_offset_candidate)
 
static bool IsValidForHalfOffset (const ON_SimpleArray< ON_SubDEdgePtr > &edges)
 Determine if the set of ON_SubDEdgePtrs can be sorted into a single edge chain that supports half side offsets. More...
 
static bool IsValidForVariableOffset (const ON_SimpleArray< ON_SubDEdgePtr > &edges)
 Determine if the set of ON_SubDEdgePtrs can be sorted into a single open edge chain supports variable offsets. More...
 
static bool IsValidVariableOffset (ON_Interval variable_offset_candidate)
 

Static Public Attributes

static const ON_SubDExpandEdgesParameters Default
 
static const double LargeOffset
 Large offset value (0.5) More...
 
static const double MaximumOffset
 Maximum permitted offset value (0.95) More...
 
static const double MediumOffset
 Medium offset value (0.25) More...
 
static const double MinimumOffset
 Minimum permitted offset value (0.05) More...
 
static const double OffsetTolerance
 OffsetTolerance = 0.001. More...
 
static const double SmallOffset
 Small offset value (0.125) More...
 

Detailed Description

ON_SubD

Member Enumeration Documentation

◆ Style

enum ON_SubDExpandEdgesParameters::Style : unsigned char
strong

ON_SubDExpandEdgesParameters::Style specifies options for how faces are inserted along input edges.

Enumerator
Unset 

Indicates the variable has not be initialized.

Single 

One quad replaces each input manifold edge. Corner cases where three or more edges meet receive special handling.

Double 

Two quads are added for each input manifold edge. Corner cases where three or more edges meet receive special handling.

HalfLeft 

This option applies only when the the input is an array of ON_SubDEdgePtrs that form a single oriented edge chain of manifold interior edges. A single quad is added to the left of the input edges. (The left side of of an oriented interior manifold edge is the face whose natural boundary orientation is the same as with the ON_SubDEdgePtr direction.)

HalfRight 

This option applies only when the the input is an array of ON_SubDEdgePtrs that form a single oriented edge chain of manifold interior edges. A single quad is added to the right of the input edges. (The right side of of an oriented interior manifold edge is the face whose natural boundary orientation is opposite the ON_SubDEdgePtr direction.)

Constructor & Destructor Documentation

◆ ON_SubDExpandEdgesParameters() [1/2]

ON_SubDExpandEdgesParameters::ON_SubDExpandEdgesParameters ( )
default

◆ ~ON_SubDExpandEdgesParameters()

ON_SubDExpandEdgesParameters::~ON_SubDExpandEdgesParameters ( )
default

◆ ON_SubDExpandEdgesParameters() [2/2]

ON_SubDExpandEdgesParameters::ON_SubDExpandEdgesParameters ( const ON_SubDExpandEdgesParameters )
default

Member Function Documentation

◆ CleanupOffset()

static double ON_SubDExpandEdgesParameters::CleanupOffset ( double  x)
static

◆ ClearVariableOffset()

void ON_SubDExpandEdgesParameters::ClearVariableOffset ( )

◆ ConstantOffset()

double ON_SubDExpandEdgesParameters::ConstantOffset ( ) const

Normalized constant offset parameter for inserting edges parallel to an input edge. Smaller values create narrower offsets.

Returns
Offset value in the range ON_SubDExpandEdgesParameters::MinimumOffset to ON_SubDExpandEdgesParameters::MaximumOffset.

◆ FaceColor()

const ON_Color ON_SubDExpandEdgesParameters::FaceColor ( ) const

Returns
Per face color for new faces.

◆ FaceStatus()

const ON_ComponentStatus ON_SubDExpandEdgesParameters::FaceStatus ( ) const

Returns
Status for new faces.

◆ FaceStyle()

ON_SubDExpandEdgesParameters::Style ON_SubDExpandEdgesParameters::FaceStyle ( ) const

◆ Hash()

const ON_SHA1_Hash ON_SubDExpandEdgesParameters::Hash ( ) const

This SHA1 hash can be used to determine if sets of parameters are the same.

Returns
A SHA1 hash of all parameter values.

◆ IsHalfFaceStyle()

bool ON_SubDExpandEdgesParameters::IsHalfFaceStyle ( ) const

Returns
True if the FaceStyle() is HalfLeft of HalfRight.

◆ IsValidConstantOffset()

static bool ON_SubDExpandEdgesParameters::IsValidConstantOffset ( double  constant_offset_candidate)
static

◆ IsValidForHalfOffset()

static bool ON_SubDExpandEdgesParameters::IsValidForHalfOffset ( const ON_SimpleArray< ON_SubDEdgePtr > &  edges)
static

Determine if the set of ON_SubDEdgePtrs can be sorted into a single edge chain that supports half side offsets.

Parameters
edge_chain
Returns
True if variable offsets can be applied to edge_chain.

◆ IsValidForVariableOffset()

static bool ON_SubDExpandEdgesParameters::IsValidForVariableOffset ( const ON_SimpleArray< ON_SubDEdgePtr > &  edges)
static

Determine if the set of ON_SubDEdgePtrs can be sorted into a single open edge chain supports variable offsets.

Parameters
edge_chain
Returns
True if variable offsets can be applied to edge_chain.

◆ IsValidVariableOffset()

static bool ON_SubDExpandEdgesParameters::IsValidVariableOffset ( ON_Interval  variable_offset_candidate)
static

◆ IsVariableOffset()

bool ON_SubDExpandEdgesParameters::IsVariableOffset ( ) const

Returns: True if variable offsets are set.

◆ operator=()

ON_SubDExpandEdgesParameters& ON_SubDExpandEdgesParameters::operator= ( const ON_SubDExpandEdgesParameters )
default

◆ SetConstantOffset()

void ON_SubDExpandEdgesParameters::SetConstantOffset ( double  offset)

Set the constant offset value. Values within OffsetTolerance of a predefined offset value are set to the predefined offset value.

Parameters
offsetON_SubDExpandEdgesParameters::MinimumOffset <= offset <= ON_SubDExpandEdgesParameters::MaximumOffset;
Returns

◆ SetFaceColor()

void ON_SubDExpandEdgesParameters::SetFaceColor ( ON_Color  face_color)

Set the perf face color for new faces.

Parameters
face_colorColor for new face. Pass ON_Color::Unset for no per face color.

◆ SetFaceStatus()

void ON_SubDExpandEdgesParameters::SetFaceStatus ( ON_ComponentStatus  face_status)

Set the Mark(), MarkBits(), Selected(), and Highlighted() status for new faces.

Parameters
face_statusStatus for new faces.

◆ SetFaceStyle()

void ON_SubDExpandEdgesParameters::SetFaceStyle ( ON_SubDExpandEdgesParameters::Style  face_style)

Set the style for new faces.

Parameters
face_style
Returns
Style for new faces.

◆ SetVariableOffset()

void ON_SubDExpandEdgesParameters::SetVariableOffset ( ON_Interval  variable_offsets)

Description: This option applies only when the the input is an array of ON_SubDEdgePtrs that form a single oriented edge chain. You may use ON_SubDExpandEdgesParameters::IsValidForVariableOffset() to determine if an array of ON_SubDEdgePtrs meets the variable offset requirements. In all other cases, the constant Offset() is used. To apply variable offsets to several edge chains, expand them one at a time.

Parameters: variable_offsets - [in] The two values must be between 0 and 1 and differ by more than ON_SubDExpandEdgesParameters::OffsetTolerance.

◆ VariableOffset()

const ON_Interval ON_SubDExpandEdgesParameters::VariableOffset ( ) const

This option applies only when the the input is an array of ON_SubDEdgePtrs that form a single oriented edge chain. You may use ON_SubDExpandEdgesParameters::IsValidForVariableOffset() to determine if an array of ON_SubDEdgePtrs meets the variable offset requirements. In all other cases, the constant Offset() is used. To apply variable offsets to several edge chains, expand them one at a time.

Member Data Documentation

◆ Default

const ON_SubDExpandEdgesParameters ON_SubDExpandEdgesParameters::Default
static

◆ LargeOffset

const double ON_SubDExpandEdgesParameters::LargeOffset
static

Large offset value (0.5)

◆ MaximumOffset

const double ON_SubDExpandEdgesParameters::MaximumOffset
static

Maximum permitted offset value (0.95)

◆ MediumOffset

const double ON_SubDExpandEdgesParameters::MediumOffset
static

Medium offset value (0.25)

◆ MinimumOffset

const double ON_SubDExpandEdgesParameters::MinimumOffset
static

Minimum permitted offset value (0.05)

◆ OffsetTolerance

const double ON_SubDExpandEdgesParameters::OffsetTolerance
static

OffsetTolerance = 0.001.

◆ SmallOffset

const double ON_SubDExpandEdgesParameters::SmallOffset
static

Small offset value (0.125)