Add a white point colour to the walls and a grey to the ground. Use Attributetransfer to map the wall colour onto the ground. Tweak the blend radius on the node to fit around the base of the walls. Turn the walls into a VDB with Vdbfrompolygons. In an Attributewrangle, get the VDB value at each point with the volumesample function. Remove points with a negative value.