algorithmic modeling for Rhino
This is closer to what makes sense to me. The only part I haven't figured out now is how to identify the yellow interior surface(s) automatically? It's a manual selection now and will fail if there are multiple surfaces. Otherwise, getting there:
This one happens by simply changing the 'Angle' slider in the pink "Interior Shape" group from 45 to 0:
I'm sure further improvements are possible.