---
title: "DfmResult"
description: "Full DFM prediction result."
canonical_url: "https://www.rosette.dev/docs/api-reference/DfmResult"
markdown_url: "https://www.rosette.dev/docs/api-reference/DfmResult.md"
source_url: "https://github.com/PreFab-Photonics/rosette/blob/f086d7670645fd36c05362d696d442a2b2e74850/www/content/docs/api-reference/DfmResult.mdx"
docs_channel: "main"
docs_revision: "f086d7670645fd36c05362d696d442a2b2e74850"
---

# DfmResult

Full DFM prediction result.

Import with `from rosette.dfm import DfmResult`.

Returned by `run_dfm()`. Contains per-layer predictions, aggregate
statistics, and all violations. Use the `passed` attribute for a quick
pass/fail check when tolerances are configured.

```python
result = run_dfm(cell, layers=[Layer(1)], config=config)
if result.passed:
    print(f"DFM passed ({result.layers_processed} layers, {result.total_pixels} pixels)")
else:
    print(f"DFM failed with {len(result.violations)} violations")
    for v in result.violations:
        print(f"  {v.message}")

for lp in result.layers:
    m = lp.metrics
    if m:
        print(f"Layer {lp.layer}: edge dev {m.max_edge_deviation:.3f} um")
```

## Attributes



### `layers`

```python
layers: list[LayerPrediction]
```

Per-layer prediction results.





### `total_predicted_polygons`

```python
total_predicted_polygons: int
```

Total number of predicted polygons across all layers.





### `total_input_polygons`

```python
total_input_polygons: int
```

Total number of input (designed) polygons across all layers.





### `passed`

```python
passed: bool
```

`True` if no violations were found. Always `True` when no tolerances are
configured.





### `violations`

```python
violations: list[DfmViolation]
```

Aggregate list of all DFM violations across all layers.





### `layers_processed`

```python
layers_processed: int
```

Number of layers processed.





### `total_pixels`

```python
total_pixels: int
```

Total number of raster pixels computed across all layers.





### `resolution`

```python
resolution: float
```

Rasterization resolution used (design units per pixel).





### `elapsed_ms`

```python
elapsed_ms: float
```

Elapsed time in milliseconds.