SurfaceCurvature

References
Maintains computed information for principal surface curvature evaluation.

Constructors

SurfaceCurvature

#Since v9.0
Default constructs a new surface curvature object. Both kappa1 and kappa2 are zero.
public SurfaceCurvature()

Finalizer

~SurfaceCurvature

#
Passively releases the unmanaged pointer.
~SurfaceCurvature()

Properties

Gaussian

#Since v5.0
The Gaussian curvature is kappa1*kappa2.
public double Gaussian { get; }
Remarks: If this is set, the Gausian curvature is returned. Otherwise, the quiet NaN is returned.

IsNaN

#Since v9.0
True if either of kappa1 or kappa2 is NaN.
public bool IsNaN { get; }

IsSet

#Since v9.0
True if kappa1 and kappa2 are both valid finite values.
public bool IsSet { get; }

IsUnset

#Since v9.0
True if either of kappa1 or kappa2 is not a valid finite value.
public bool IsUnset { get; }

IsZero

#Since v9.0
True if both kappa1 and kappa2 are zero.
public bool IsZero { get; }

MaximumPrincipalCurvature

#Since v9.0
If set, the maximum of kapp1 and kappa2 returned. Otherwise, the quiet NaN is returned.
public double MaximumPrincipalCurvature { get; }

MaximumRadius

#Since v9.0
If a principal curvature value is zero or the principal curvatures have opposite signs, then the maximum radius of curvature is infinite RhinoMath.InfiniteRadius is returned. Otherwise the maximum radius of curvature is 1/min(fabs(kappa1),fabs(kappa2)).
public double MaximumRadius { get; }

Mean

#Since v5.0
The mean curvature is (kappa1+kappa2)/2.
public double Mean { get; }
Remarks: If this is set, the signed mean curvature is returned. Otherwise, the quiet NaN is returned.

MinimumPrincipalCurvature

#Since v9.0
If set, the minimum of kappa1 and kappa2 returned. Otherwise, the quiet NaN is returned.
public double MinimumPrincipalCurvature { get; }

MinimumRadius

#Since v9.0
The minimum radius of curvature is 1/max(fabs(kappa1),fabs(kappa2)). Infinite radius values are returned as RhinoMath.InfiniteRadius.
public double MinimumRadius { get; }

Normal

#Since v5.0
Gets the normal direction of the surface at the u,v parameter where the surface curvature was evaluated.
public Vector3d Normal { get; }

Point

#Since v5.0
Gets the point at the u,v parameter where the surface curvature was evaluated.
public Point3d Point { get; }

UVPoint

#Since v5.0
Gets the u,v parameter where the surface curvature was evaluated.
public Point2d UVPoint { get; }

Methods

CompareTo

#Since v9.0
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public int CompareTo(
other
An object to compare with this instance.
)
A value that indicates the relative order of the objects being compared. The return value has these meanings: Less than zero - this instance precedes other in the sort order. Zero - this instance occurs in the same position in the sort order as other. Greater than zero - this instance follows other in the sort order.

Create

#Since v9.0
Create a SurfaceCurvature from explicit principal curvatures and the geometric frame at the evaluation point. Use this when you have already computed curvature data from a non-RhinoCommon surface representation (planes, spheres, cylinders, cones, etc.).
public static SurfaceCurvature Create(
kappa1,
Principal curvature with maximum absolute value. Must be a finite number.
kappa2,
Principal curvature with minimum absolute value. Must be a finite number.
uv,
The (u,v) parameter where the curvature was evaluated.
frame
Orthonormal frame at the evaluation point. The origin is the surface point, the X axis is the principal direction associated with kappa1, the Y axis is the principal direction associated with kappa2, and the Z axis is the surface normal.
)
A SurfaceCurvature instance.
ArgumentExceptionThrown when a curvature value is not finite, the uv parameter is invalid, or the frame is not a valid plane.

CreateFromGaussianAndMeanCurvatures

#Since v9.0
Create a SurfaceCurvature from a gaussian and mean curvature values using the relationship between the principal curvatures, gaussian and mean: kappa1 = mean + sqrt(mean*mean - gaussian) kappa2 = mean - sqrt(mean*mean - gaussian) If the radicand is negative, we assume we're dealing with a bit of numerical noise or estimates and set the principal curvatures: kappa1 = kappa2 = sign(mean)*sqrt(gaussian)
public static SurfaceCurvature CreateFromGaussianAndMeanCurvatures(
gaussianCurvature,
Gaussian curvature = kappa1*kappa2 (product of principal curvatures).
meanCurvature
Mean curvature = (kappa1+kappa2)/2 (average of principal curvatures).
)
A SurfaceCurvature if successful, null otherwise.

CreateFromPrincipalCurvatures

#Since v9.0
Create a SurfaceCurvature from the principal curvature values. The principal curvature values are the most fundamental curvature properties of a surface. Other curvatures are calculated from them.
public static SurfaceCurvature CreateFromPrincipalCurvatures(
kappa1,
kappa2
)
A SurfaceCurvature if successful, null otherwise.

CreateFromSubD

#Since v9.0
Create a SurfaceCurvature by evaluating a SubD's surface (its limit surface) at a surface parameter, choosing what to report exactly on an extraordinary vertex.
public static SurfaceCurvature CreateFromSubD(
subd,
The SubD to evaluate.
parameter,
The surface parameter to evaluate.
extraordinaryVertexCurvature
What to report when the parameter is exactly on an extraordinary vertex, where the limit surface has no curvature of its own. This changes nothing anywhere else, including inside such a vertex's corner quad.
)
Remarks: With SubD.ExtraordinaryVertexCurvature.SectorAverage the result at an extraordinary vertex is an average of the curvature around it, so Direction(int) is unset: an average has no single principal direction. Point and Normal are the vertex's own and are exact.
A SurfaceCurvature if successful, null otherwise.

CreateFromSubD

#Since v9.0
Create a SurfaceCurvature by evaluating a SubD's surface (its limit surface) at a surface parameter.
public static SurfaceCurvature CreateFromSubD(
subd,
The SubD to evaluate.
parameter
The surface parameter to evaluate.
)
Remarks: A SubD limit surface is C1 but generally not C2 exactly on an extraordinary vertex, so it has no curvature there and this returns null. Everywhere else, including throughout the corner quad of an extraordinary vertex, the curvature exists. Use the overload that takes a SubD.ExtraordinaryVertexCurvature to get an estimate at those vertices instead of nothing. UVPoint is the face corner parameter, since that is what parameterizes a SubD surface. See SubDComponentParameter.FaceCornerParameters.
A SurfaceCurvature if successful, null otherwise.

CreateFromSurface

#Since v9.0
Create a SurfaceCurvature from by evaluating surface and a u,v parameter.
public static SurfaceCurvature CreateFromSurface(
surface,
The surface to evaluate.
u,
A U parameter.
v
A V parameter.
)
A SurfaceCurvature if successful, null otherwise.

Direction

#Since v5.0
Gets the principal curvature direction vector at the u,v parameter where the surface curvature was evaluated..
public Vector3d Direction(
direction
Direction index, valid values are 0 and 1.
)
The specified direction vector.

Dispose

#Since v9.0
Actively releases the unmanaged pointer.
public void Dispose()

Equals

#Since v9.0
Indicates whether the current object is equal to another object of the same type.
public override bool Equals(
other
An object to compare with this object.
)
true if the current object is equal to the other parameter; otherwise, false.
Object.Equals

Equals

#Since v9.0
Indicates whether the current object is equal to another object of the same type.
public bool Equals(
other
An object to compare with this object.
)
true if the current object is equal to the other parameter; otherwise, false.

GetHashCode

#
Returns a runtime-stable hash code for this object.
public override int GetHashCode()
A non-unique integer that represents this SurfaceCurvature.

Kappa

#Since v5.0
Gets the principal curvature values: kappa1 - Principal curvature with maximum absolute value. kappa2 - Principal curvature with minimum absolute value.
public double Kappa(
direction
Kappa index, valid values are 0 (kappa1) and 1 (kappa2).
)

KappaValue

#Since v9.0
Calculate one of the four typical curvature values associated with the two principal curvatures and frequently used in false color curvature analysis.
[ConstOperation] public double KappaValue(
CurvatureStyle
curvatureStyle
Specifies which type curvature value to calculate from the principal curvatures. The Gausian curvature can be positive or negative. The other curvatures are unsigned.
)
If curvature style and the principal curvatures are valid, the specified type of curvature value is returned. Infinite radii are returned as RhinoMath.InfiniteRadius. Otherwise, the quiet NaN is returned.

OsculatingCircle

#Since v5.0
Computes the osculating circle along the given direction.
[ConstOperation] public Circle OsculatingCircle(
direction
Direction index, valid values are 0 and 1.
)
The osculating circle in the given direction or Circle.Unset on failure.