Click or drag to resize

MeshFaceListConvertNonPlanarQuadsToTriangles Method

Splits non-planar quads into two triangles based on given params.

Namespace:  Rhino.Geometry.Collections
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
public int ConvertNonPlanarQuadsToTriangles(
	double planarTolerance,
	double angleToleranceRadians,
	int splitMethod
)

Parameters

planarTolerance
Type: SystemDouble
If planarTolerance >= 0, then a quad is split if its vertices are not coplanar. If both planarTolerance = Rhino.RhinoMath.UnsetValue and angleToleranceRadians >= 0.0, then the planarity test is skipped.
angleToleranceRadians
Type: SystemDouble
If angleToleranceRadians >= 0.0, then a quad is split if the angle between opposite corner normals is > angleToleranceRadians. The corner normal is the normal to the triangle formed by two adjacent edges and the diagonal connecting their endpoints. A quad has four corner normals. If both angleToleranceRadians = Rhino.RhinoMath.UnsetValue and planarTolerance >= 0.0, then the corner normal angle test is skipped.
splitMethod
Type: SystemInt32
0 default Currently divides along the short diagonal. This may be changed as better methods are found or preferences change. By passing zero, you let the developers of this code decide what's best for you over time. 1 divide along the short diagonal 2 divide along the long diagonal 3 minimize resulting area 4 maximize resulting area 5 minimize angle between triangle normals 6 maximize angle between triangle normals

Return Value

Type: Int32
Number of quads that were converted to triangles.
Remarks
If both planarTolerance = Rhino.RhinoMath.UnsetValue and angleToleranceRadians = Rhino.RhinoMath.UnsetValue, then all quads are split.
Version Information

Rhino for Windows

Supported in: 6.2
See Also