<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/MeshResource/init(extruding:extrusionOptions:)-6640v",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:17RealityFoundation12MeshResourceC01_A11Kit_SwiftUIE9extruding16extrusionOptionsAC0fG04PathV_AC014ShapeExtrusionJ0VtKcfc"
  },
  "title" : "init(extruding:extrusionOptions:)"
}
-->

# init(extruding:extrusionOptions:)

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

```
@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

The filled area of the path is determined using the even-odd winding rule (see
[Filling a Path](https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_paths/dq_paths.html#//apple_ref/doc/uid/TP30001066-CH211-TPXREF106)
in the [Quartz 2D Programming Guide Guide](https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/Introduction/Introduction.html)).
The provided path needs to satisfy the following conditions, or behavior is undefined:

1. Subpaths contains no self intersections.
2. Subpaths do not intersect each other.
3. All subpaths are closed.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)