import cadquery as cq w0=cq.Workplane('XY',origin=(0,0,-8)) w1=cq.Workplane('YZ',origin=(-16,0,0)) r=w0.workplane(offset=-42/2).moveTo(32,-16).cylinder(42,16).union(w1.sketch().push([(20.5,31)]).rect(23,38).push([(25,36)]).circle(1,mode='s').push([(30.5,48)]).rect(1,2,mode='s').finalize().extrude(-32))