The complex roof algorithm seems to be fairly robust thus far, I haven't been able to break it just yet. However as I am contemplating how to make it so that each roof plane is adjustable (variable pitch) it is quickly becoming apparent that such a feature would become very complicated.
The issue really is a situation where you have a particular roof plane that you want to adjust. You then change its pitch (assuming all other pitches are left the same) and the roof gets recalculated. In certain situations that roof plane may then merge with another roof plane. If that happens then one of the two roof planes is absorbed by the other (both pitches must be equal of course).
The difficulty seems to arise in the tracking of each roof plane and the custom pitch assigned to it. The number of roof planes can be variable. The ability to edit each roof plane will need to be an "on the fly" sort of tool which allows the user to adjust only one roof plane at a time and then recalc the entire roof to re-determine the shape of the roof and hence how many and where its new roof planes actually are.
The easiest way to store this information, in my option. is to maintain the roof solid group (on a separate hidden layer). From this solid the roof planes can quickly be ascertained as well as the outline or footprint of the roof. I'm still thinking this one through as you can probably tell.
Initially the roof will be drawn with one overhang and one pitch. Where the edit menu can take it from there is where it potentially becomes quite complicated.
Consider a complex roof like the one below:
I can see that the framing can be accomplished with some basic rules/logic however non-orthogonal roof outlines will probably require some additional logic.
The tool that allows the user to define the footprint or outline of the roof should allow for the selection of a face or allow the user to pick points that then define the closed path of the roof outline. The code required to do this is already within my foundation plugin and will only need some minor modifications to make if work for this module as well.
The issue really is a situation where you have a particular roof plane that you want to adjust. You then change its pitch (assuming all other pitches are left the same) and the roof gets recalculated. In certain situations that roof plane may then merge with another roof plane. If that happens then one of the two roof planes is absorbed by the other (both pitches must be equal of course).
The difficulty seems to arise in the tracking of each roof plane and the custom pitch assigned to it. The number of roof planes can be variable. The ability to edit each roof plane will need to be an "on the fly" sort of tool which allows the user to adjust only one roof plane at a time and then recalc the entire roof to re-determine the shape of the roof and hence how many and where its new roof planes actually are.
The easiest way to store this information, in my option. is to maintain the roof solid group (on a separate hidden layer). From this solid the roof planes can quickly be ascertained as well as the outline or footprint of the roof. I'm still thinking this one through as you can probably tell.
Initially the roof will be drawn with one overhang and one pitch. Where the edit menu can take it from there is where it potentially becomes quite complicated.
Consider a complex roof like the one below:
I can see that the framing can be accomplished with some basic rules/logic however non-orthogonal roof outlines will probably require some additional logic.
The tool that allows the user to define the footprint or outline of the roof should allow for the selection of a face or allow the user to pick points that then define the closed path of the roof outline. The code required to do this is already within my foundation plugin and will only need some minor modifications to make if work for this module as well.