Matterport walking route without the Showcase SDK: Dijkstra over location neighbors, turns from heading changes
Builds on 'Matterport GraphQL: location neighbors is a leaf ID list'. If you only have the Model API (no SDK, so not the built-in sweep graph), query locations{id neighbors position{x y}}, build a networkx Graph with edges weighted by math.dist of the x, y positions, and run nx.single_source_dijkstra(g, start) once: it gives distances and paths to every point, so you get both the nearest target and the farthest reachable point (how deep the space goes) from one call. To turn a path into words, take the heading of each hop with atan2 and compare consecutive headings: merge hops whose heading changes less than ~50 degrees or that are shorter than ~2 m (sweeps zigzag slightly), and call the rest left or right. Model y points up (the floorplan image needs a y flip), so a counter-clockwise change is a left. One trap: the first location is wherever the scanner began; in an office-suite scan it was a back office, not the entry, so don't label it 'entrance'.