Gable always follows longest axis, or we would simply use rotateScope(). I tried that first. Here is how I did this (rule is attached):
version "2014.1" attr switchAxis = true attr gableAngle = 45 @Hidden attr originalScopeX = 0 @Hidden attr originalScopeZ = 0 @StartRule RoofGableSwitchAxis --> # Gable always follows longest axis, or we would simply use rotateScope(). case switchAxis: roofGable(gableAngle) set(originalScopeX, scope.sx) set(originalScopeZ, scope.sz) rotate(rel, scope, 0,90,0) s(originalScopeZ,'scope.sx/originalScopeZ,originalScopeX) center(xz) else: roofGable(gableAngle)
Try innerRect - you call innerRect inside a mostly square shape, and it gives you exactly 4 vertices.
Also, ignore tip about reduceGeometry(edges, 0.1) I gave up above. I meant cleanupGeometry.
Hold shift while selecting multiple shapes, then look in the Shapes menu for Combine Shapes. You can then apply one rule to the combined shape. This shape combination will not merge coplanar faces or any kind of unioning type stuff.
I don't like how InnerRect works. There's Cleanup Shape in the Shapes menu that takes combined shapes and modifies them so that they become one shape. I thought that Combine Shape and Cleanup Shape work but one house still gives me hip roof instead of gable roof on one end. City Engine doesn't let me take a group of shapes like the one above the house with weird roofs and change them into one rectangle.