I would use spline for this purpose. It is easier for me to understand. parametricCurve does similar things like spline internally.
Let's say:
width = math.pi * 2.0
steps = 20
inc = width / steps
pts3 = [(x * width / steps, math.sin(x * width / steps)) for x in range(steps + 1)]
or, if you have nump installed
pts3 = [(x, math.sin(x)) for x in numpy.arange(0, width + inc, inc)]
then,
r3 = (cq.Workplane().spline(pts3))
Using parametricCurve() would be
r2 = (cq.Workplane()
.parametricCurve(lambda t: (t, math.sin(t), 0.0), steps, 0.0, width, makeWire = False)
)
*** ***
Given 10 programmers the same spec, they could give you 20 solutions, each and every one of them will work.
I love programming.
*** ***