Click or drag to resize
SoShapeHintswindingType Property

Indicates the winding rule used to define holes in a polygon.

Namespace: OIV.Inventor.Nodes
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2023.1.3.0 (2023.1.3)
Syntax
public SoSFEnum<SoShapeHintsWindingTypes> windingType { get; }

Property Value

Type: SoSFEnumSoShapeHintsWindingTypes
Remarks

It is used by OIV.Inventor.Nodes.SoIndexedFaceSet and OIV.Inventor.Nodes.SoFaceSet to determine which parts of the polygon are on the interior and which are on the exterior and should not be filled. By default this field value is NO_WINDING_TYPE, that is, no winding rules are used, so there are no holes. Use enum OIV.Inventor.Nodes.SoShapeHints.WindingTypes.

For a single contour, the winding number of a point is the signed number of revolutions we make around that point while traveling once around the contour (where a counterclockwise revolution is positive and a clockwise revolution is negative). When there are several contours, the individual winding numbers are summed. This procedure associates a signed integer value with each point in the plane. Note that the winding number is the same for all points in a single region.

The following figure shows three sets of contours and winding numbers for points inside those contours. In the left set, all three contours are counterclockwise, so each nested interior region adds one to the winding number. For the middle set, the two interior contours are drawn clockwise, so the winding number decreases and actually becomes negative.
The winding rule classifies a region as inside if its winding number belongs to the chosen category (odd, nonzero, positive, negative, or "absolute value of greater than or equal to two"). The odd and nonzero rules are common ways to define the interior. The positive, negative, and "absolute value>=2" winding rules have some limited use for polygon CSG (computational solid geometry) operations. The four sets of contours shown in the following figure are used with different winding rule properties to see their effects. For each winding rule, the dark areas represent interiors. Note the effect of clockwise and counterclockwise winding.

NOTE: In LINES drawing style (see OIV.Inventor.Nodes.SoDrawStyle), if OIV.Inventor.Nodes.SoShapeHints.windingType is not NO_WINDING_TYPE, or if OIV.Inventor.Nodes.SoShapeHints.faceType is UNKNOWN_FACE_TYPE, the edges of the tessellated triangles will be drawn.

Note Note

Field available since Open Inventor 4.0

See Also