Pātuhitia tēnei: Bifurcations and chaos in piecewise-smooth dynamical systems