---
title: "MeshResource.ShapeExtrusionOptions.ExtrusionMethod.tracePositions(_:)"
framework: realitykit
role: symbol
role_heading: Case
path: "realitykit/meshresource/shapeextrusionoptions/extrusionmethod-swift.enum/tracepositions(_:)"
---

# MeshResource.ShapeExtrusionOptions.ExtrusionMethod.tracePositions(_:)

Extrudes the shape by sweeping it along a piecewise-linear curve.

## Declaration

```swift
case tracePositions([SIMD3<Float>])
```

## Discussion

Discussion The curve is defined as the set of line segments For each edge in the provided curve, the swept shape (e.g. the 2D path provided in MeshResource(extruding: Path), or text) will be instantiated at the edge’s endpoints. Each instance of the swept shape will be joined together by a strip of geometry. The positions are traced in such a way as to avoid twist in the generated 3D shape.  When possible, the local y-axis of the swept (2D) shape will be aligned with the y-axis of the generated 3D shape. For example, extrude a rounded square along the z-axis, while zig-zagging in the y-axis: // Positions in a zig-zag pattern. let positions: [SIMD3<Float>] = [     [0,    0,   0],     [0, -0.1, 0.2],     [0,    0, 0.4],     [0, -0.1, 0.6] ]

var extrusionOptions = ShapeExtrusionOptions() extrusionOptions.extrusionMethod = .tracePositions(positions)
