# `GSLayer pathIntersect:`

*Instance Method*

Intersects selected paths with unselected paths.

## Declaration

```swift
func pathIntersect() throws
```

```objc
- (BOOL) pathIntersect:(NSError **) error;
```

```python
pathIntersect_() -> tuple[bool, NSError]
```

## Parameters

- `error` — On output, a pointer to an error object that describes why the method failed, or `nil` if no error occurred. If you are not interested in the error information, pass `nil` for this parameter.

## Return Value

Whether the operation completed successfully.

## See Also

### Boolean Operations

- [`GSLayer removeOverlapCheckSelection:error:`](/Core/GlyphsCore/GSLayer/removeOverlapCheckSelection:error:) — Removes overlaps between applicable paths.
- [`GSLayer removeOverlapCheckSelection:keepOpenPaths:grid:error:`](/Core/GlyphsCore/GSLayer/removeOverlapCheckSelection:keepOpenPaths:grid:error:) — Removes overlaps between applicable paths using explicit open-path and grid settings.
- [`GSLayer removeOverlap:grid:error:`](/Core/GlyphsCore/GSLayer/removeOverlap:grid:error:) — Removes overlaps between paths according to a set of options.
- [`GSLayer pathSubtract:`](/Core/GlyphsCore/GSLayer/pathSubtract:) — Subtracts selected paths from unselected paths.
- [`GSLayer pathSubtractKeepOverlaps:error:`](/Core/GlyphsCore/GSLayer/pathSubtractKeepOverlaps:error:) — Subtracts selected paths from unselected paths.
- [`GSLayer pathSubtract:from:keepOverlaps:error:`](/Core/GlyphsCore/GSLayer/pathSubtract:from:keepOverlaps:error:) — Subtracts one mutable path collection from another.
- [`GSLayer pathIntersectCheckSelection:error:`](/Core/GlyphsCore/GSLayer/pathIntersectCheckSelection:error:) — Intersects applicable selected and unselected paths.

