In this model, a Modelica Custom Component is used (which accesses Maplesoft.Multibody Modelica Library) to simulation a pin-in-slot joint. The slot is in the form of a sinusoid (but can be replaced by any smooth curve). Elasto-gap components are used to provide end point contact between the pin and the slot.