# `GSLayer connectAllOpenPaths`

*Instance Method*

Connects coincident endpoints of open paths.

## Declaration

```swift
func connectAllOpenPaths()
```

```objc
- (void) connectAllOpenPaths;
```

```python
connectAllOpenPaths()
```

## Discussion

When the layer has a selection, only connections between a selected and an unselected endpoint are made. Paths must belong to the same shape group.

## See Also

### Connecting Paths

- [`GSLayer connectPathsWithNode:andNode:`](/Core/GlyphsCore/GSLayer/connectPathsWithNode:andNode:) — Connects two path endpoints.
- [`GSLayer connectPathsWithNode:andNode:extendPath:`](/Core/GlyphsCore/GSLayer/connectPathsWithNode:andNode:extendPath:) — Connects two path endpoints and optionally adjusts their adjacent segments.
- [`GSLayer dividePathAtNode:`](/Core/GlyphsCore/GSLayer/dividePathAtNode:) — Opens or divides the path at a node.
- [`GSLayer reconnectNodesAtNode1:node2:offset:`](/Core/GlyphsCore/GSLayer/reconnectNodesAtNode1:node2:offset:) — Divides paths at two on-curve nodes and reconnects the resulting endpoints crosswise.
- [`GSLayer reconnectNodes:`](/Core/GlyphsCore/GSLayer/reconnectNodes:) — Reconnects four on-curve nodes according to their tangent directions.
- [`GSLayer closeOpenPaths:`](/Core/GlyphsCore/GSLayer/closeOpenPaths:) — Connects the nearest endpoints of a collection of open paths.

