A switch in Assemblies, off unless turned on. With it on, each move of a drag is gone in steps (a millimetre, or three degrees, of the dragged joint), and at the first step a part runs into another the place is found by halving: the part stops there, and the value beside the pointer says "contact".
Two parts are run into each other when a corner of one is more than a quarter of a millimetre inside the other (inside: a ray from the point crosses the other's mesh an odd number of times; more than a little: six points round it are inside too). So parts that touch, or sit in each other with a hair of play - a nut on its thread - are let be: their drawn facets cross here and there without the parts doing so. What is in each other as the drag begins is left alone for that drag. Walls and teeth thinner than half a millimetre are not felt. Each body's mesh is put in a tree of boxes once (src/assembly/contact.ts).
Found with it: the tutorial's nut, cut round the bolt where it stands, turns a third of a turn towards the head and no further - the bolt's thread begins a millimetre above the rod's end, inside the nut, and the nut's hole below that is a plain bore the thread cannot pass. (The tutorial is put right next.)
tests/contact.test.ts, 14 checks: a point in and out of a box; boxes apart, touching, a tenth in, two millimetres in, one inside the other, swung on a hinge; a pin in a hole with play; a move undone; two meshes of 19 200 triangles asked 20 times. In the app: the M10 nut turned by its side with the switch on - 3.5 ms a move, not stopped by its own thread; turned on towards the head - stopped at 137 degrees, where the bolt's thread start meets the nut's plain bore; the switch off - no stop.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>