From FreeCAD Documentation
- Prepare two lines to represent a beam of light, and an edge to act as an interface. The lines should be on different sides of the interface. The interface can be a line, an arc, a circle or a conic.
- Select an endpoint of the first line, an endpoint of the second line, and the interface edge. Note the selection order of the endpoints.
- There are several ways to invoke the tool:
- Select the Sketch → Sketcher constraints → Constrain refraction (Snell's law) option from the menu.
- Use the keyboard shortcut: K then W.
- The Refractive index ratio dialog opens.
- Enter the Ratio n2/n1. Where n2 is for the medium where the second selected line resides, and n1 is for the first line's medium.
- A Snell's law constraint is added. If required the endpoints are made coincident and constrained onto the interface. These additional constraints are called helper constraints.