# `GSLayer nodeAtPoint:excludeNode:ignoreLocked:tolerance:`

*Instance Method*

Returns the nearest node to a point, excluding one node.

## Declaration

```swift
func node(at aPoint: NSPoint, excludeNode exclude: GSNode?, ignoreLocked: Bool, tolerance: CGFloat) -> GSNode?
```

```objc
- (GSNode *) nodeAtPoint:(NSPoint) aPoint excludeNode:(GSNode *) exclude ignoreLocked:(BOOL) ignoreLocked tolerance:(CGFloat) tolerance;
```

```python
nodeAtPoint_excludeNode_ignoreLocked_tolerance_(aPoint: NSPoint, exclude: GSNode, ignoreLocked: bool, tolerance: float) -> GSNode
```

## Return Value

The nearest node within `tolerance`, or `nil` if no node matches.

## Discussion

Locked paths and nodes are skipped when `ignoreLocked` is `YES`. The search is limited to nodes on this layer.

## See Also

### Node Hit Testing

- [`GSLayer nodeAtPoint:excludeNodes:traverseComponents:ignoreLocked:tolerance:`](/Core/GlyphsCore/GSLayer/nodeAtPoint:excludeNodes:traverseComponents:ignoreLocked:tolerance:) — Returns the nearest node to a point, excluding a set of objects.
- [`GSLayer indexPathOfNodeAtX:actualPosition:`](/Core/GlyphsCore/GSLayer/indexPathOfNodeAtX:actualPosition:) — Returns the index path of an on-curve node near the given x position.
- [`GSLayer indexPathOfNodeAtY:actualPosition:`](/Core/GlyphsCore/GSLayer/indexPathOfNodeAtY:actualPosition:) — Returns the index path of an on-curve node near the given y position.

