Dear
Looking at your panel image lacking dimensioning to the door and window edges, I wonder...
Couldn't you simply retrieve the wall geometry and determine all vertical faces perpendicular to the wall location line?
That should include the right and left hand sides of each opening, shouldn't it?
Cheers,
Jeremy