Hi-
Learning cadquery here, for this example trying to overcome the issues Freecad has placing text parametricaly.
Wondering if I've missed something in the API, I don't see a relative-to-current-position variant for radiusArc, a radiusArc equivalent to line vs lineTo? The ogee below would be simpler/easier with relative moves, but the apparant absence of a relative radiusArc makes this troublesome.
Feedback on this code appreciated; is there a better way to do this?
Thanks!
Duncan
import cadquery as cq
margin=80
cutDepth=-1.0
textSize=40.0 # Specifying an integer here will crash cq-editor
thickness=18
corners=20
rad=3.0
s=1
text = "Made With\nCadQuery"
# Create the text first to get the size.
textObject = cq.Workplane("XY").transformed([0,0,0],[0,0,thickness/2]).text(text, textSize, cutDepth)
bb = textObject.val().BoundingBox()
plaque = cq.Workplane("XY").box( bb.xlen + margin, bb.ylen + margin, thickness)
plaque = plaque.vertices(">Z").circle(corners).cutThruAll()
ogee = cq.Workplane().copyWorkplane(plaque.faces(">X").vertices(">YZ").workplane(centerOption='CenterOfMass')).\
lineTo(-(rad+2*s),0).\
lineTo(-(rad+2*s),-s).\
lineTo(-(rad+s),-s).\
radiusArc([-s,-(rad+s)],rad).\
lineTo(-s,-(rad+2*s)).\
lineTo(0,-(rad+2*s)).\
close().sweep(plaque.wires(">Z"))
plaque=plaque.cut( ogee ).cut( textObject )
# Discard cutting tools
ogee=None
textObject = None