init(extruding:extrusionOptions:)
Synchronously generates a 3D mesh by extruding a 2D path.
Declaration
@MainActor @preconcurrency convenience init(extruding path: Path, extrusionOptions: MeshResource.ShapeExtrusionOptions = ShapeExtrusionOptions()) throwsParameters
- path:
A path that contains the starting shape for the 3D mesh geometry.
- extrusionOptions:
A configuration for extruding the path in 3D.
Discussion
The filled area of the path is determined using the even-odd winding rule (see Filling a Path in the Quartz 2D Programming Guide Guide). The provided path needs to satisfy the following conditions, or behavior is undefined:
Subpaths contains no self intersections.
Subpaths do not intersect each other.
All subpaths are closed.