How to add a rack and pinion joint, where a rack isn't a straight line in CATIA Kinematics?

I have a rack and a pinion link. The pinion is a regular gear, but the rack isn't straight. It is a little angled, so I can't create a prismatic joint on a curve. Can anyone help me with this?

What I usually do with a rack and pinion link is I add a revolute link between the pinion and fixed part and prismatic between the rack and the fixed part. But since the rack isn't a straight line, I'm not able to do so.