M_Rhino_Geometry_Collections_MeshFaceList_ConvertNonPlanarQuadsToTriangles - mcneel/rhinocommon-api-docs GitHub Wiki

MeshFaceList.ConvertNonPlanarQuadsToTriangles Method

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

Namespace: Rhino.Geometry.Collections
Assembly: RhinoCommon (in RhinoCommon.dll) Version: Rhino 6.0

Syntax

C#

public int ConvertNonPlanarQuadsToTriangles(
	double planarTolerance,
	double angleToleranceRadians,
	int splitMethod
)

VB

Public Function ConvertNonPlanarQuadsToTriangles ( 
	planarTolerance As Double,
	angleToleranceRadians As Double,
	splitMethod As Integer
) As Integer

Parameters

 

planarTolerance
Type: System.Double
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: System.Double
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: System.Int32
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

Supported in: 6.0.16224.21491

See Also

Reference

MeshFaceList Class
Rhino.Geometry.Collections Namespace

⚠️ **GitHub.com Fallback** ⚠️