Properties
ComponentDirection
True when this component is referenced with the reverse of its natural orientation. This is always false for vertices, and for edges and faces obtained directly from the parent SubD; it is only set on components reached through an oriented reference, such as the face on a given side of an oriented edge.
Line representing the control net end points.
Gets true if this edge is smooth and has a nonzero sharpness. A crease edge is not a sharp edge.
The face on the left of this edge, with respect to the direction this edge is referenced with. Null for a boundary edge with no face on that side, and for a nonmanifold edge.
The face on the right of this edge, with respect to the direction this edge is referenced with.
The vertex this edge starts at, taking SubDComponent.ComponentDirection into account. This is VertexFrom for an edge in its natural orientation and VertexTo for a reversed one.
The vertex this edge ends at, taking SubDComponent.ComponentDirection into account.
Gets or sets the sharpness of this edge.
The getter reports SubDEdgeSharpness.Crease for a crease edge; use GetSharpness(false) to get SubDEdgeSharpness.Smooth for creases instead.
Remarks: Setting this goes through the parent SubD so that the neighboring edges and vertices are updated too. Assign SubDEdgeSharpness.Smooth to make the edge smooth again.
Methods
Discards the cached subdivision and surface points for this edge, so they are recomputed on next use.
Parameters:
| clearNeighborhood (bool) | If true, the cached points of the neighboring components are discarded too. Moving a control net point changes the surface around it, not just at it, so pass true after an edit unless you know only this edge is affected. |
Gets the component index of this edge.
Returns: The component index.
Gets the sharpness of this edge at one of its ends.
Parameters:
| endIndex (int) | 0 for the VertexFrom end, 1 for the VertexTo end. |
| useCreaseSharpness (bool) | If this edge is a crease and useCreaseSharpness is true, then SubDEdgeSharpness.CreaseValue is returned. |
Returns: The sharpness at that end, or 0.0 if this edge is not sharp.
Equals
Determines whether an object is a SubDComponent referring to the same component, with the same orientation, in the same SubD.
Parameters:
| obj (object) | The object to compare with. |
Overrides: Object.Equals
Equals
Determines whether this component and another refer to the same component, with the same orientation, in the same SubD.
Parameters:
| other (SubDComponent) | The component to compare with. |
Retrieve a SubDFace from this edge.
Parameters:
| index (int) |
Gets the sharpness of this edge, reporting SubDEdgeSharpness.Crease for a crease edge.
Returns: The sharpness of this edge.
Gets the sharpness of this edge.
Parameters:
| useCreaseSharpness (bool) | If this edge is a crease and useCreaseSharpness is true, then SubDEdgeSharpness.Crease is returned. If it is a crease and useCreaseSharpness is false, then SubDEdgeSharpness.Smooth is returned. |
Returns: The sharpness of a smooth edge, SubDEdgeSharpness.Crease for a crease edge when useCreaseSharpness is true, and SubDEdgeSharpness.Smooth in every other case.
Gets the face on one side of this edge, relative to the direction this edge is referenced with.
Parameters:
| relativeFaceIndex (int) | 0 for the left side, 1 for the right side. |
Returns: The face, with its SubDComponent.ComponentDirection set so its boundary runs the same way as this edge. Null if there is no such face, or if the edge is nonmanifold.
Gets one of this edge's two vertices, relative to the direction this edge is referenced with.
Parameters:
| endIndex (int) | 0 for the start of the edge, 1 for the end. |
Returns: The vertex, or null if endIndex is out of range.
ReverseComponentDirection
Flips SubDComponent.ComponentDirection and returns this component, so it can be used inline where an oppositely oriented reference is wanted.
Returns: This component.
Get a cubic, uniform, non-rational, NURBS curve that is on the edge's limit curve.
Remarks: If some edges in your SubD are not able to be converted to NURBS, you might need to run SubD.UpdateSurfaceMeshCache(bool).
Parameters:
| clampEnds (bool) | If true, the end knots are clamped. Otherwise the end knots are(-2,-1,0,...., k1, k1+1, k1+2). |
Returns: The Nurbs form of this edge.
ToString
Returns a string of the form "SubDEdge(+12)", naming the component type, the orientation it is referenced with, and its id.
Overrides: Object.ToString