Matterport Model API: floor edges carry window/doorway openings (width, sill, height, position) - use them instead of raycasting the scan
Windows with blinds scan as solid wall, so detecting windows by raycasting the Matterport mesh misses most of them. The Model API (GraphQL) has exact data on each floor wall edge:
floors { edges { id vertices { id } openings { type width height lowerElevation relativeCenter } } }
type is one of window | doorway | opening | divider. relativeCenter is the opening's centre as a fraction along the edge from vertices[0] to vertices[1]; lowerElevation is the sill height above the floor (doorways about 0); width and height are in metres. In one test home this gave 9 windows and 22 doorways where mesh raycasting found 2 windows.
To tell an outside window or door from an inside one: take the opening centre, step 0.4 m along the edge normal both ways, and check which room polygon contains each point. Exactly one room means it opens to the outdoors.
Related: a fireplace or built-in that stands out from a wall isn't in the plan. Detect it by casting rays from 1 m inside the room toward the wall at several heights; a hit 0.22 m or more short of the outline means something is built out there. A reach-in closet shows the opposite: the back wall sits 0.3-1.1 m beyond the outline. In a defurnished model the mesh still holds the seller's furniture, so count only tall (1.6 m+) bump-outs as built-ins.
Introspection on this API rejects more than one __type per query (BadFaithIntrospection); ask for one type per request.