# `GSPath findRequiredNodeIndexes:grid:`

*Instance Method*

Adds the node indices that cleanup would keep.

## Declaration

```objc
- (void) findRequiredNodeIndexes:(NSMutableIndexSet *) requiredNodeIndexes grid:(GSGridSettings) grid;
```

```python
findRequiredNodeIndexes_grid_(requiredNodeIndexes: NSMutableIndexSet, grid: GSGridSettings)
```

## Parameters

- `requiredNodeIndexes` — The index set to receive the required node indices.

## Discussion

Existing indices in the index set are preserved.

## See Also

### Cleanup

- [`GSPath cleanUp`](/Core/GlyphsCore/GSPath/cleanUp) — Removes redundant nodes and rounds node positions to the layer grid.
- [`GSPath cleanUpGrid:`](/Core/GlyphsCore/GSPath/cleanUpGrid:) — Removes redundant nodes and rounds node positions to a grid.
- [`GSPath removeDuplicateNodes`](/Core/GlyphsCore/GSPath/removeDuplicateNodes) — Removes adjacent on-curve nodes at the same position.

