Click or drag to resize

SubDEdgeSharpness Structure

Sharpness values for the two ends of a SubD edge.

A sharp SubD edge is an edge where the limit surface makes a tighter "fillet radius" around the edge than a smooth edge would, while still staying smooth, unlike a crease edge. It is achieved by applying the crease edge subdivision rules for the number of subdivisions given by the sharpness value, and the smooth edge subdivision rules after that. Sharpness can differ at the two ends of an edge.

Namespace:  Rhino.Geometry
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
public struct SubDEdgeSharpness : IEquatable<SubDEdgeSharpness>

The SubDEdgeSharpness type exposes the following members.

Constructors
  NameDescription
Public methodSubDEdgeSharpness(Double)
Creates a sharpness with the same value at both ends.
Public methodSubDEdgeSharpness(Interval)
Creates a sharpness that varies from one end of the edge to the other.
Public methodSubDEdgeSharpness(Double, Double)
Creates a sharpness that varies from one end of the edge to the other.
Top
Properties
  NameDescription
Public propertyAverage
Gets the average of the two end sharpness values.
Public propertyStatic memberCrease
A sharpness of CreaseValue at both ends, used to indicate that an edge is a crease rather than a sharp edge. IsValid is false for this value; see IsValidOrCrease.
Public propertyDelta
Gets EndSharpness(1) - EndSharpness(0), or NaN if this is neither valid nor a crease.
Public propertyIsConstant
Gets true if both ends have the same valid sharpness value. Crease and Nan are both false; see IsConstantOrCrease.
Public propertyIsConstantOrCrease
Gets true if both ends have the same valid sharpness value, or if this is Crease.
Public propertyIsCrease
Gets true if this is Crease.
Public propertyIsCreaseOrSharp
Gets (IsCrease || IsSharp).
Public propertyIsDecreasing
Gets true if EndSharpness(0) is greater than EndSharpness(1).
Public propertyIsIncreasing
Gets true if EndSharpness(0) is less than EndSharpness(1).
Public propertyIsNotValid
Gets the opposite of IsValid. Crease and Nan are both true.
Public propertyIsNotValidNorCrease
Gets the opposite of IsValidOrCrease. Nan is true and Crease is false.
Public propertyIsSharp
Gets true if both ends are valid and at least one is greater than 0.0. Crease and Nan are both false: a crease edge is not a sharp edge.
Public propertyIsValid
Gets true if both ends are between 0.0 and MaximumValue. Crease and Nan are both false; see IsValidOrCrease.
Public propertyIsValidOrCrease
Gets true if both ends are between 0.0 and MaximumValue, or if this is Crease.
Public propertyIsVariable
Gets true if this is valid and the two ends differ. Crease and Nan are both false.
Public propertyIsZero
Gets true if both ends are 0.0, which is the sharpness of a smooth edge.
Public propertyItem
Gets the sharpness at the start or the end of the edge.
Public propertyStatic memberMaximum
A sharpness of MaximumValue at both ends. This is the sharpest an edge can be without being a crease.
Public propertyMaximumEndSharpness
Gets the larger of the two end sharpness values.
Public propertyMinimumEndSharpness
Gets the smaller of the two end sharpness values.
Public propertyStatic memberNan
A sharpness whose ends are both NaN. This is what the factory methods return when their input is not valid.
Public propertyStatic memberSmooth
A sharpness of 0.0 at both ends, which is what a smooth edge has. This is also the default value of a SubDEdgeSharpness.
Public propertyTrend
Gets +1 if the sharpness increases along the edge, -1 if it decreases, and 0 if it is constant. Returns UnsetIntIndex if this is not valid.
Top
Methods
  NameDescription
Public methodStatic memberCreateEdgeChainSharpness
Builds a sequence of evenly changing sharpnesses for the edges of a chain.
Public methodEndSharpness
Gets the sharpness at the start or the end of the edge.
Public methodStatic memberEqualDelta
Determines whether two sharpnesses have the same Delta and meet with the same value.
Public methodStatic memberEqualEndSharpness
Determines whether two sharpnesses meet with the same value, that is, whether s0.EndSharpness(1) equals s1.EndSharpness(0).
Public methodEquals(Object)
Determines whether an object is a sharpness with the same end values as this one.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(SubDEdgeSharpness)
Determines whether this sharpness has the same end values as another one.
Public methodStatic memberEqualTrend
Determines whether two sharpnesses have the same Trend and meet with the same value.
Public methodStatic memberFromConstantPercentage
Creates a sharpness with the same value at both ends, from a percentage. This is useful in user interface code that expresses sharpness as a percentage.
Public methodStatic memberFromIntervalPercentage(Interval)
Creates a sharpness that varies from one end of the edge to the other, from percentages. This is useful in user interface code that expresses sharpness as a percentage.
Public methodStatic memberFromIntervalPercentage(Double, Double)
Creates a sharpness that varies from one end of the edge to the other, from percentages. This is useful in user interface code that expresses sharpness as a percentage.
Public methodGetHashCode
Gets a hash code for this sharpness.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberIsValidValue
Determines whether a value can be used as an edge end sharpness.
Public methodReversed
Gets this sharpness with its two end values swapped.
Public methodStatic memberSanitize(Double)
Verifies that sharpness is between 0.0 and MaximumValue, and snaps it to an integer when it is within Tolerance of one.
Public methodStatic memberSanitize(Double, Double)
Verifies that sharpness is between 0.0 and MaximumValue, and snaps it to an integer when it is within Tolerance of one.
Public methodStatic memberSharpnessFromNormalizedValue
Converts a normalized slider value to an edge end sharpness value.
Public methodStatic memberSharpnessFromSliderValue
Converts a user facing slider value to an edge end sharpness value.
Public methodSubdivided
Gets the sharpness this edge would have after one subdivision.
Public methodStatic memberToPercentage
Converts a sharpness value to a percentage between 0.0 and 100.0.
Public methodToPercentageText(Boolean)
Describes this sharpness as a percentage, for user interface code. A constant sharpness gives a single percentage, a variable one gives a range, and an invalid one gives a warning sign.
Public methodStatic memberToPercentageText(Double)
Describes a single end sharpness value as a percentage, for user interface code.
Public methodToString
Returns a string that represents this sharpness as a percentage.
(Overrides ValueTypeToString.)
Public methodStatic memberUnion
Gets the union of two sharpness ranges, ignoring the ones that are zero, a crease, or not valid.
Public methodStatic memberVertexSharpness
Calculates the sharpness of a vertex from the sharp edges attached to it. Vertices tagged as corners always have a sharpness of 0.0.
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Determines whether two sharpnesses have the same end values.
Public operatorStatic memberInequality
Determines whether two sharpnesses have different end values.
Top
Fields
  NameDescription
Public fieldStatic memberCreaseValue
The value used to indicate that an edge is a crease, MaximumValue + 1.0. This is deliberately not a valid sharpness value: a crease edge is not a sharp edge. It exists because it is often convenient to use a single value to describe both.
Public fieldStatic memberMaximumValue
The largest valid sharpness value, 4.0. Valid SubD edge sharpness values are between 0.0 and MaximumValue.
Public fieldStatic memberSmoothValue
The sharpness value of a smooth edge, 0.0.
Public fieldStatic memberTolerance
If a sharpness is within Tolerance of an integer value, it is snapped to that integer value. See Sanitize(Double).
Top
Remarks
This is a value type wrapping two floats, and the default value is Smooth. It is passed to and from the unmanaged library by value.
See Also