This code will extrude a cylinder and then rotate the workplane and put some text on the bottom. It works, but I don't understand one thing. I would have expected that after extrusion, the face the text would be put on would be the top face, but it's actually the original circle I started with. Why is that? Is it because it's the first face of the object? If I wanted to put text on the top, would I have to select that top face first?
import cadquery as cq
from ocp_vscode import *
cyl = cq.Workplane("XY").circle(100).extrude(20).transformed(rotate=(0, 180, 0)).text(
"Cone Packs", # The text string
fontsize=15, # Size of the text
distance=1, # Extrusion distance (depth)
combine=True
)
result = cyl
show(result)