SubDComponentParameter

References
Identifies a point on the surface of a SubD.

SubDs have no global (u,v) parameterization. Instead a point on the surface is identified relative to a component of the SubD: a vertex, a point on an edge, or a point inside a face. A point inside a face is given by the index of the face corner it belongs to plus two parameters inside that corner, because a face with five or more sides has no single well behaved (u,v) domain.

Use SubD.ClosestPoint(Point3d, Point3d, SubDComponentParameter) to find a parameter and SubD.Evaluate(SubDComponentParameter, Point3d) and its overloads to evaluate one.

Properties

ActiveFaceId

#Since v9.0
Gets the id of the face this parameter uses to resolve which sector of a vertex or which side of an edge it means, or 0 if there is none. It is always 0 when IsFaceParameter is true; use ComponentId in that case.
[CLSCompliant(false)] public uint ActiveFaceId { get; }

ComponentId

#Since v9.0
Gets the id of the SubD component this parameter is relative to, or 0 if this parameter is not set.
[CLSCompliant(false)] public uint ComponentId { get; }

ComponentIndex

#Since v9.0
Gets the component index of the SubD component this parameter is relative to. It is ComponentIndex.Unset if this parameter is not set.
public ComponentIndex ComponentIndex { get; }

EdgeParameter

#Since v9.0
Gets a value between 0 and 1 identifying a point on the edge, or double.NaN if IsEdgeParameter is false.
public double EdgeParameter { get; }

FaceCornerIndex

#Since v9.0
Gets the index of the face corner the face parameters are measured in, or -1 if IsFaceParameter is false.
public int FaceCornerIndex { get; }

FaceCornerParameters

#Since v9.0
Gets the two parameters inside the face corner identified by FaceCornerIndex. Both run from 0 to 1/2: (0,0) is the corner vertex and (1/2,1/2) is the center of the face. X runs towards the midpoint of the edge leaving the corner and Y towards the midpoint of the edge entering it. The point is Point2d.Unset if IsFaceParameter is false.
public Point2d FaceCornerParameters { get; }

FaceEdgeCount

#Since v9.0
Gets the number of edges of the face, or 0 if IsFaceParameter is false.
public int FaceEdgeCount { get; }

IsEdgeParameter

#Since v9.0
Gets true if this parameter identifies a surface point on a SubD edge.
public bool IsEdgeParameter { get; }

IsFaceParameter

#Since v9.0
Gets true if this parameter identifies a surface point inside a SubD face.
public bool IsFaceParameter { get; }

IsSet

#Since v9.0
Gets true if this parameter identifies a point on a SubD.
public bool IsSet { get; }

IsVertexParameter

#Since v9.0
Gets true if this parameter identifies the surface point at a SubD vertex.
public bool IsVertexParameter { get; }

Unset

#Since v9.0
The unset parameter. It does not identify a point on any SubD.
public static SubDComponentParameter Unset { get; }

Methods

CreateEdgeParameter

#Since v9.0
Creates a parameter that identifies a surface point on a SubD edge.
[CLSCompliant(false)] public static SubDComponentParameter CreateEdgeParameter(
edgeId,
The id of a SubD edge.
edgeParameter,
A value between 0 and 1. 0 is the edge's start vertex and 1 is its end vertex.
activeFaceId
The id of a face attached to the edge, or 0 to let the SubD choose one. A crease edge has a different surface normal on each side.
)

CreateFaceParameter

#Since v9.0
Creates a parameter that identifies a surface point inside a SubD face.
[CLSCompliant(false)] public static SubDComponentParameter CreateFaceParameter(
faceId,
The id of a SubD face.
faceEdgeCount,
The number of edges of the face. Must be 3 or more.
cornerIndex,
The index of the face corner the parameters are measured in. Must be less than faceEdgeCount.
cornerS,
A value between 0 and 1/2 measured from the corner vertex towards the midpoint of the edge that leaves the corner.
cornerT
A value between 0 and 1/2 measured from the corner vertex towards the midpoint of the edge that enters the corner.
)
Remarks: (0,0) is the corner vertex and (1/2,1/2) is the center of the face.

CreateVertexParameter

#Since v9.0
Creates a parameter that identifies the surface point at a SubD vertex.
[CLSCompliant(false)] public static SubDComponentParameter CreateVertexParameter(
vertexId,
The id of a SubD vertex.
activeFaceId
The id of a face attached to the vertex, or 0 to let the SubD choose one. A vertex where several faces meet with a crease has a different surface normal in each sector, so evaluation needs to know which face is meant.
)

Equals

#
Indicates whether this instance and a specified object are equal.
public override bool Equals(
obj
The object to compare with the current instance.
)
true if obj and this instance are the same type and represent the same value; otherwise, false.
ValueType.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 the hash code for this instance.
public override int GetHashCode()
A 32-bit signed integer that is the hash code for this instance.

ToString

#
Returns the fully qualified type name of this instance.
public override string ToString()
The fully qualified type name.

Operators

OperationResultDescription
SubDComponentParameter==SubDComponentParameterboolDetermines whether two parameters are equal.
SubDComponentParameter!=SubDComponentParameterboolDetermines whether two parameters are different.