Both are on buildings that are the same height. Both buildings have low walls around the roof. Model B is at the far side of the building, not in base contact with the wall that obscures the shot from Model A. Since he is in base contact with the building, If model A shoots at B, does B have cover?
No, because it is the wall that is obscuring, not the roof of the building, they need to be in contact with the wall.
Generally speaking; the surface you're standing on only provides cover if the opponent is shooting from an angle that partially goes through the surface you're standing on. (My own preferred interpretation of "do I get cover" is; if you consider all scenery and terrain fully transparent and consider only the surfaces of the silhouette that are touching scenery; are there any surface touching scenery on the target silhouette that is not obscured by the rest of the silhouette from the origin of the attack? If there are such a surface, the target has cover.) You can, as is the case with all scenery-related issues, agree to play otherwise and have the entire building count as a single piece of scenery*, but large pieces of scenery tend to get fairly... weird... when it comes to providing cover. So to answer the specifics; B should not have cover. * It is even possible to treat ALL scenery as a single piece of scenery and play the game with 40K style cover where anything obscuring any part of the target silhouette causes Partial Cover. Not as outlandish as it sounds, and probably plays better than going only half way with the huge scenery path, but I still wouldn't advice it.
In the OP's example I read the Wall and the Roof being inseparable parts of the same terrain piece. But you can replicate this dynamic with a hill or - in the horizontal - with a single curved wall where its indisputably the same terrain piece. So it's quite possible for a Trooper to be in contact with a piece of Terrain, and for - along the line of fire - it to be Terrain - Air Gap - Sil. In this situation does the Trooper have Cover? From a gameplay POV I agree with your original answer and with @Mahtamori , but it's not an entirely closed question. RAW would suggest that Terrain - Air Gap - Sil is a valid way to gain cover IF the target is in contact with the terrain. @Mahtamori this is the second or third thread asking this specific question, it's probably worth adding to your unresolved questions thread with a "partially resolved" answer with your position above. I'll do up some pictures to describe the issue more clearly, for a situation where it's unambiguously the same terrain piece.
I don't know, I feel taking a building as a "scenery piece" as a whole is folly. If two figurines are on buildings of equal height then they would need to touch a wall to get cover like they were on the ground. If buildings are counted as a scenery piece, then what about those big full-map pieces that elevates the playmap into more than one level. Would everything count as a scenery piece then? Or static tables with built in hills and glued on buildings, would that be a single scenery piece? Something like this? Much more reliable to consider all horizontal surfaces as ground and vertical surfaces as "scenery pieces"