# findCollinearOverlaps

Canonical: https://docs.shumoku.dev/en/library/api/findCollinearOverlaps
Language: en

@shumoku/core · 0.4.0 · function

# findCollinearOverlaps

[Source](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/layout/invariants.ts#L159)

Find pairs of edges with segments that run on the same track: parallel (within ~1°), closer than the sum of their half-widths + clearance, and sharing more than \`minSharedLength\` of extent. Reports each edge pair once with its longest shared run.

```
findCollinearOverlaps(lines: readonly PolylineSpec[], options?: CollinearOptions): CollinearOverlap[]
```

## Parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| `lines` | `readonly PolylineSpec[]` | No additional description. | `—` |
| `options` | `CollinearOptions` | No additional description. | `{}` |

## Returns

```
CollinearOverlap[]
```

[`libs/@shumoku/core/src/layout/invariants.ts:159`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/layout/invariants.ts#L159)
