'Solid' object has no attribute 'extrude'
Workplane.val returns the selected shape. A Solid is not the Workplane modelling chain and does not provide Workplane.extrude.
Python attempted to resolve extrude on a Solid instance and found no such attribute. CadQuery did not start the requested extrusion.
Calling val changed the receiver from a Workplane to a shape before a Workplane-only operation. Workplane and Solid expose different APIs. Keeping a shape for inspection is valid, but it cannot be used as though it were the original modelling chain.
import cadquery as cad
body = cad.Workplane("XY").circle(3).extrude(4)
result = body.val().extrude(4)
Keep the Workplane chain for modelling. For this raised boss, select the top face, create the intended 2 mm radius profile, and extrude it by 4 mm. Use val only when a shape is actually needed for inspection or a shape API.
```python
import cadquery as cad
body = cad.Workplane("XY").circle(3).extrude(4)
result = body.faces(">Z").workplane().circle(2).extrude(4)
```