---
title: "init(extruding:extrusionOptions:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/meshresource/init(extruding:extrusionoptions:)"
---

# init(extruding:extrusionOptions:)

Synchronously generates a 3D mesh by extruding a 2D path.

## Declaration

```swift
@MainActor @preconcurrency convenience init(extruding path: Path, extrusionOptions: MeshResource.ShapeExtrusionOptions = ShapeExtrusionOptions()) throws
```

## Parameters

- `path`: A path that contains the starting shape for the 3D mesh geometry.
- `extrusionOptions`: A configuration for extruding the path in 3D.

## Discussion

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.
