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
[CLSCompliant(false)] public uint ActiveFaceId { get; }
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.

ComponentId

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

ComponentIndex

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

EdgeParameter

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

FaceCornerIndex

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

FaceCornerParameters

#Since v9.0
public Point2d FaceCornerParameters { get; }
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.

FaceEdgeCount

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

IsEdgeParameter

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

IsFaceParameter

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

IsSet

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

IsVertexParameter

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

Unset

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

Methods

CreateEdgeParameter

#Since v9.0
[CLSCompliant(false)] public static SubDComponentParameter CreateEdgeParameter(uint edgeId, double edgeParameter, uint activeFaceId)
Creates a parameter that identifies a surface point on a SubD edge.
edgeId (uint)The id of a SubD edge.
edgeParameter (double)A value between 0 and 1. 0 is the edge's start vertex and 1 is its end vertex.
activeFaceId (uint)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
[CLSCompliant(false)] public static SubDComponentParameter CreateFaceParameter(uint faceId, int faceEdgeCount, int cornerIndex, double cornerS, double cornerT)
Creates a parameter that identifies a surface point inside a SubD face.
Remarks: (0,0) is the corner vertex and (1/2,1/2) is the center of the face.
faceId (uint)The id of a SubD face.
faceEdgeCount (int)The number of edges of the face. Must be 3 or more.
cornerIndex (int)The index of the face corner the parameters are measured in. Must be less than faceEdgeCount.
cornerS (double)A value between 0 and 1/2 measured from the corner vertex towards the midpoint of the edge that leaves the corner.
cornerT (double)A value between 0 and 1/2 measured from the corner vertex towards the midpoint of the edge that enters the corner.

CreateVertexParameter

#Since v9.0
[CLSCompliant(false)] public static SubDComponentParameter CreateVertexParameter(uint vertexId, uint activeFaceId)
Creates a parameter that identifies the surface point at a SubD vertex.
vertexId (uint)The id of a SubD vertex.
activeFaceId (uint)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

#
public override bool Equals(object obj)
Indicates whether this instance and a specified object are equal.
obj (object)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
public bool Equals(SubDComponentParameter other)
Indicates whether the current object is equal to another object of the same type.
other (SubDComponentParameter)An object to compare with this object.
true if the current object is equal to the other parameter; otherwise, false.

GetHashCode

#
public override int GetHashCode()
Returns the hash code for this instance.
A 32-bit signed integer that is the hash code for this instance.

ToString

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

Operators

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