FoundationPartsPrimitivesCone

Cone

Cone(center, r1, r2, height) is a truncated cone — a Lathe of a trapezoidal profile with radius r1 at the base and r2 at the top.

def __init__(self, r1=10, r2=2, height=15):
        s = Sketch(self.xy())
        # Cone(center, r1, r2, height) — truncated cone (r2=0 collapses
        # to the apex; for a strict pure cone use Lathe of a triangle).
        self.add_operation(Cone(s.origin, r1=r1, r2=r2, height=height))
        self.paint("orange")

Setting r1 == r2 collapses to a Cylinder. For a strict pure cone (apex at the top), keep r2 very small instead of zero — r2 = 0 produces a degenerate trapezoid.