Hide details behing 3d model

Hi, I need to draw details around undersized panels.
Something like
image

where the filled region indicates the material to be removed.

In some cases the panels have angles:

In the first scenario, the fill region is a detail family that has a length parameter that changes according to the remaining size of the panel O I use Dynamo to auto insert the detail already pre-formated to size. I could do 2 parameters for the fill region something like an interior side length and an exterior side length. The CATCH is the lines (length of the fill region) could end up being zero if the cut happens on the edge of the panel.

I tough about doing a region that is always behind the panel, but by it always will be on top of the 3d object masking it, so can’t do it that way either.

Any ideas?\