Hi @richiedlon
Thank you for reaching out.
One way this could be achieved is using the envelope operation instead of a roof operation.
The envelope operation allows to define an angle and baseHeight for each edge of your roof polygon. You can specify an angle of 90 for the edges that should result in a gable and the normal roof angle for all others. BaseHeight would be 0 in you case.
To create an array with a value for each edge, you can use the comp function and the fe selector.
Here some example code:
const maxHeight = 1000 // set this super high, if the roof shouldnt be cutoff
baseHeights = comp(fe) {all: 0 }
angles = comp(fe) { front: 90 // this puts a gable at all front edges.
| all: 40 } // edit to your roof angle
Example-->
envelope(normal, maxHeight, baseHeights, angles)
Unfortunately, this wont let you define an overhang. Another approach could be to generate a hip roof on a larger polygon and use the split operation to cut it where you want to have the gable.
Let me know if that helps or you have follow-up questions.
Best, Houskan