MeshFaceListConvertNonPlanarQuadsToTriangles Method |
Splits non-planar quads into two triangles based on given parameters.
Namespace:
Rhino.Geometry.Collections
Assembly:
RhinoCommon (in RhinoCommon.dll)
Since: 6.0
Syntax public int ConvertNonPlanarQuadsToTriangles(
double planarTolerance,
double angleToleranceRadians,
int splitMethod
)
Public Function ConvertNonPlanarQuadsToTriangles (
planarTolerance As Double,
angleToleranceRadians As Double,
splitMethod As Integer
) As Integer
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:
Int32Number of quads that were converted to triangles.
Remarks
If both planarTolerance = Rhino.RhinoMath.UnsetValue and angleToleranceRadians = Rhino.RhinoMath.UnsetValue,
then all quads are split.
See Also