Autodesk Creative Platform Core Version 1.19.0
A broad and deep collection of 2D and 3D capabilities.
|
Sketch2D Overview
Creates an object that represents a 2D sketch. It contains an array of Path2D objects.
Introduced in Version: 1.1.0
Class Member Summary
- Sketch2D ( Array [ Path2D ] or JSON or Sketch2D ) |
- methodbounds ( )
- methodclone ( )
- methodcombine ( Sketch2D or Array [ Sketch2D ] ) |
- propertypaths
- methodprojectBoundary ( Mesh3DBoundary , Matrix3D ) |
- methodtoJSON ( )
- methodtoPolygons ( Number )
- methodtransform ( Matrix2D or Array [ Number ] ) |
- propertywindingRule |
Class Member Details
• Sketch2D ([other]) |
The following parameters can be specified in the constructor:
• Box2D bounds()
Calculates the bounds of the Sketch2D object
• Sketch2D clone()
Clones the Sketch2D object
• Sketch2D combine (sketches) |
Combines this sketch with supplied sketch(es) or paths.
• Array [ Path2D ] paths
The array of the Path2D objects.
• Sketch2D projectBoundary (boundary, projection) |
Projects a boundary onto the sketch as an additional Path2D object.
- boundary: Mesh3DBoundary - A boundary to project onto the Sketch2D.
- projection: Matrix3D - The projection matrix to use for the projection.
• JSON toJSON()
Returns the JSON representation of the object that can be serialized.
The resulting JSON can be passed into the constructor later on to reconstruct the object.
• Array [ Array [ Number ] ] toPolygons ([tolerance])
Gets an array of connected path outlines for all the paths in the sketch.
If the first and last points are the same then the path is closed.
- tolerance: Number - A chord height deviation to use for discretizing nonlinear curves. |
• Sketch2D transform (matrix) |
Transforms all the paths in the sketch by the transform.
• WindingRule windingRule |
The winding rule that determines the interior of the sketch.