CadQuery: How to chamfer only two opposing edges of top face

chamfer_two_edges.py
import cadquery as cq

obj = cq.Workplane("XY").box(1,1,3)
# Add chamfer to only the top face edges parallel to the X axis
obj = obj.faces("+Z").edges("|X").chamfer(0.2)
obj


Check out similar posts by category: CadQuery, Python