Detect Connected Walls for GLTF House Model

I have a gltf house model. And when the GLTF gets loaded, I create an object for each wall. For each wall, i want to detect what walls are connected to it, to the side of it. My goal is if i move a wall, the connected walls move along with it, sort of like in a CAD software for architecture. Does anyone know the best way?

The way I currently have is just using bounding boxes, and testing if the edges are close to each other, but that method doesnt work all the time. I was wondering if there are any better ways.

Consider doing it the other way - have data, then do rendering based on the data. Right now you have rendering (ie. wall meshes), and you’re trying to figure out data from it, which is significantly harder.

Define each wall as two points, then create meshes based on these point pairs. Way quicker and easier to determine intersections of two lines defined by 4 (or more) points, than to determine intersections of arbitrary meshes.