From FreeCAD Documentation
- You will need two lines that are to follow a beam of light, and a curve to act as an interface. The lines should be on different sides of the interface.
- Select the endpoint of one line, an endpoint of another line, and the interface edge. The interface can be a Line, an Arc, a Circle or a Conic. Note the order you've selected the endpoints.
- Invoke the constraint. A dialog will appear asking for a ratio of indices of refraction n2/n1. n2 corresponds to the medium where the second selected endpoint's line resides, n1 is for the first line.
- The endpoints will be made coincident (if needed), constrained onto the interface (if needed), and the Snell's law will become constrained.