---
title: "PathCap"
description: "Path endpoint geometry."
canonical_url: "https://www.rosette.dev/docs/api-reference/PathCap"
markdown_url: "https://www.rosette.dev/docs/api-reference/PathCap.md"
source_url: "https://github.com/PreFab-Photonics/rosette/blob/f086d7670645fd36c05362d696d442a2b2e74850/www/content/docs/api-reference/PathCap.mdx"
docs_channel: "main"
docs_revision: "f086d7670645fd36c05362d696d442a2b2e74850"
---

# PathCap

Path endpoint geometry.

PathCap controls how the start and end of a path are rendered. It is
used with `Cell.add_path()` to select the cap style.
Path corners use miter joins with a four-half-width limit and bevel fallback;
round caps are approximated with 16 segments per semicircle.

```python
cell.add_path(
    [Point(0, 0), Point(100, 0)],
    width=0.5,
    layer=Layer(1, 0),
    cap=PathCap.ROUND,
)
```

## Variants



### `FLUSH`

```python
FLUSH: PathCap
```

Flush (square) ends at path endpoints. The path terminates exactly at the
first and last point with no extension. This is the default.





### `ROUND`

```python
ROUND: PathCap
```

Round ends. A semicircle with diameter equal to the path width magnitude is drawn
at each endpoint.





### `HALF_WIDTH_EXTENSION`

```python
HALF_WIDTH_EXTENSION: PathCap
```

Square ends extending half the path width magnitude past the endpoints. Each
end is extended by `abs(width) / 2` along the path direction.