So ...
This does not seem totally possible with the engine, my rough starting point for those interested:
#insure direction of Gable is aligned
doCreateGableRoof -->
case scope.sx > scope.sy :
roofGable(InternalRoofAngle,InternalRoofOverhang, InternalRoofOverhang, false, 1)
doCreateGableRoofSideRemove(isCorner )
else:
roofGable(InternalRoofAngle, InternalRoofOverhang, InternalRoofOverhang, false, 0)
doCreateGableRoofSideRemove(isCorner )
#get the side section out of a gable roof
doCreateGableRoofSide -->
comp(f) {top=doCreateGableRoofTest | bottom:NIL | side:col.PINK }
#see if the roof top section has more than 2 faces if so different case (ie:not possible with engine..lots of hacking needed)
doCreateGableRoofVolumeTest-->
case geometry.nFaces() > 2:
col.RED
else: #this should be triangle overhang
split(x) { InternalRoofOverhang: doSplitTestExtrude
| ~1: col.ORANGE #middle section,will need another split for long edge
| InternalRoofOverhang:doSplitTestExtrude
}
#extrude
doSplitTestExtrude-->
extrude(world.y, -RoofThickness)
doCreateTouch
#test overlap if it overlaps NIL out and clean up edge
doCreateTouch()-->
case overlaps(inter): #overlap so cap end
split(x) { RoofThickness/2:col.GREEN| ~1:NIL }
else : # all good so cap end
split(x) { ~1:col.ORANGE |RoofThickness/2:col.GREEN}
my lesson so far is the programming language needs further development to be considered a complete procedural modeling tool.