alias_api.tessellate_number

alias_api.tessellate_number(node: alias_api.AlDagNode, type: alias_api.AlTessellateTypes, total: SupportsInt, count_tol: SupportsInt, curve_tol: SupportsFloat) tuple[int, alias_api.AlDagNode]

This method repeatedly tessellates the surfaces with different adaptive subdivision parameters until settings are found that produce a total polygon count close to the requested number. If the requested polygon count cannot be satisfied within the given search tolerance, this function will return either the closest tessellation found that is below the requested total or the minimum number of polygons that it can possibly create. Unlike the interactive method there is no way to abandon this process prematurely.

Since the number of polygons that a spline surface may be tessellated into is not a continuous function it may not be possible to achieve the desired number of polygons exactly. To prevent the search from continuing infinitely, there are tolerances that limit the tesselation. When a test tesselation finds parameter settings that give a polygon count that is between total - count_tol and total + count_tol the search is stopped. Further since it may not be possible to find a tesselation that satisfies the requested total within the given count tolerance this parameter allows the search to be ended when the changes the function makes to the adaptive subdivision curvature threshold parameter falls below curve_tol.

Parameters
  • node – The AlDagNode above the geometry to tessellate.

  • type – kTESSELATE_TRIANGLE or kTESSELATE_QUADRILATERAL.

  • total – The number of polygons desired (minimum of 1 ).

  • count_tol – How close to the total is acceptable (minimum of 0).

  • curve_tol – The adaptive subdivision tolerance (between 0 and 1). Lower values give a better approximation.

Return A tuple containing status and dagNode

The status code result: Success - the file was stored successfully Failure - the wire file could not be stored properly InvalidArgument - unrecognized file type or fileName is NULL.

The resulting mesh Dag Node.