Autodesk Creative Platform Core Version 1.19.0
A broad and deep collection of 2D and 3D capabilities.
Tess OverviewTo achieve optimal precision, shapes are recomputed when they are scaled. These utility functions allow you to control the level of tessellation based on contextual awareness.
Introduced in Version: 1.0.0
Static Member Summary
- methodboundariesFromContours ( Array [ Array [ Number ] ] , WindingRule )
- methodcircleDivisions ( Number )
- methodpolygonsFromBoundaries ( Array [ Array [ Number ] ] )
- methodtolerance ( )
Static Member Details
Extracts the boundaries from the contours. If some contours overlap eachother, the outcome is effected by the winding rule.
- contours: Array [ Array [ Number ] ] - This is an array of arrays, most likely obtained from Sketch2D.toPolygons.
- windingRule: WindingRule - The winding rule to use for boundary generation. See documentation for WindingRule for more information. |
• Number circleDivisions (radius)
Estimate circle divisions based on radius and tesselation tolerance
- radius: Number - the input radius length
• Object polygonsFromBoundaries (boundaries)
Given the boundaries from boundariesFromContours, this will generate the tesselation information.
- vertices: Array [ Number ] - An array of vertex positions.
- triangleIndices: Array [ Number ] - An array of the triangle indices, where the size is the number of triangles * 3.
- boundaryIndices: Array [ Number ] - An array of boundary indices, where the size is the number of boundaries * 2.
• Number tolerance()
Get the tolerance for tessellation