# `GSPath addCurveWithOff1:off2:end:connection:attributes:`

*Instance Method*

Appends a cubic curve segment and aligns its node positions to the layer grid.

## Declaration

```swift
func addCurve(withOff1 off1: NSPoint, off2: NSPoint, end: NSPoint, connection: GSNode.Connection, attributes: [GSShapeKey : Any]? = nil)
```

```objc
- (void) addCurveWithOff1:(NSPoint) off1 off2:(NSPoint) off2 end:(NSPoint) end connection:(GSNodeConnection) connection attributes:(NSDictionary<NSString *,id> *) attributes;
```

```python
addCurveWithOff1_off2_end_connection_attributes_(off1: NSPoint, off2: NSPoint, end: NSPoint, connection: GSNodeConnection, attributes: dict[str, object])
```

## Parameters

- `attributes` — Attributes for the ending on-curve node.

## See Also

### Inserting Nodes

- [`GSPath addNode:`](/Core/GlyphsCore/GSPath/addNode:) — Appends a node and aligns its position to the layer grid.
- [`GSPath addNodeFast:`](/Core/GlyphsCore/GSPath/addNodeFast:) — Appends a node without registering undo, aligning its position, or notifying the layer.
- [`GSPath addNodes:`](/Core/GlyphsCore/GSPath/addNodes:) — Appends nodes.
- [`GSPath addNodeWithPosition:type:connection:attributes:`](/Core/GlyphsCore/GSPath/addNodeWithPosition:type:connection:attributes:) — Appends a new node and aligns its position to the layer grid.
- [`GSPath addNodeFastWithPosition:type:connection:attributes:`](/Core/GlyphsCore/GSPath/addNodeFastWithPosition:type:connection:attributes:) — Appends a new node without registering undo, aligning its position, or notifying the layer.
- [`GSPath addCurveFastWithOff1:off2:end:connection:attributes:`](/Core/GlyphsCore/GSPath/addCurveFastWithOff1:off2:end:connection:attributes:) — Appends a cubic curve segment without registering undo, aligning its node positions, or notifying the layer.
- [`GSPath insertObject:inNodesAtIndex:`](/Core/GlyphsCore/GSPath/insertObject:inNodesAtIndex:) — Inserts a node at an index and aligns its position to the layer grid.
- [`GSPath insertNodeWithPathTime:`](/Core/GlyphsCore/GSPath/insertNodeWithPathTime:) — Inserts an on-curve node at a path time while preserving the path shape.
- [`GSPath insertOffcurveWithStartIdx:endIdx:`](/Core/GlyphsCore/GSPath/insertOffcurveWithStartIdx:endIdx:) — Inserts an off-curve node into a quadratic segment.
- [`GSPath addExtremes:checkSelection:`](/Core/GlyphsCore/GSPath/addExtremes:checkSelection:) — Adds nodes at extrema of cubic curve segments.
- [`GSPath addInflections`](/Core/GlyphsCore/GSPath/addInflections) — Adds nodes at inflection points of cubic curve segments.

