I'm working on a building some neighborhood CGA rules and have come across this roofing dilemma. Sometimes my roof turns the wrong way and sometimes my welcome mat gets turned (see image):
Both buildings were created using the same code. Is there a good way to ensure the same building form across all lots?
The problem is that the roofGable tries to be smart and creates the cable along the longest side. We are aware of this problem. However there is already a solution that works in some use cases:
You can use the full-fledge roofGable operation:
roofGable(angle, overhangX, overhangY, even, index)
The last parameter index defines to which edge the ridge should be parallel. Thus, as long as the edge indexes stay constant in your models, this solution will work.
I hope this helps.
This depends very much on the rules and use cases. Some ideas:
One thing to try is using the innerRect operation or inserting (and component splitting) a builtin:cube in case you work rectangular shapes. Then work with the index.
Or in case you know the direction (but not the index) you could scale it into the wanted direction (to make it long), apply the roofGable operation and scale it back. Means s('10,'1,'1) roofGable(angle,overhangX*10,overhangY) s('0.1,'1,'1).