CadQuery chamfer requires that edges be selected

Diagnostic signature

Chamfer requires that edges be selected

The chamfer edge selection is empty. A selector for circular edges on a box finds no edges, so CadQuery refuses to chamfer.

What it means

Workplane.chamfer did not receive any Edge objects from the current selection. It stops before constructing the chamfer.

Why it happens

The selector does not match the current topology, or a previous operation changed or removed the edges it was meant to select. In this example, a plain box has straight edges, so %CIRCLE returns an empty selection. An earlier selection must not be assumed to describe the result of a later Boolean cut.

Minimal reproduction

import cadquery as cad
result = cad.Workplane("XY").box(10,10,4).edges("%CIRCLE").chamfer(0.5)

How to fix it

Select the intended edges on the current solid. For this box, the four vertical edges are the intended chamfer targets. Keep the 0.5 mm chamfer and check the selection before applying it.

```python
import cadquery as cad
body = cad.Workplane("XY").box(10,10,4)
edges = body.edges("|Z")
assert edges.size() == 4
result = edges.chamfer(0.5)
```

Step 1

Step 2

Step 3

Upstream references

CadQuery 2.8.0 chamfer source

CadQuery Workplane.chamfer reference