Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate roofs on multiple faces at once #187

Open
Mi-Pe opened this issue Jun 12, 2021 · 8 comments
Open

Generate roofs on multiple faces at once #187

Mi-Pe opened this issue Jun 12, 2021 · 8 comments
Labels
enhancement New feature or request

Comments

@Mi-Pe
Copy link

Mi-Pe commented Jun 12, 2021

Hello,
I succeeded in using a custom face as an outline for hip roof generation by joining the face into the Floorplan object.
I compared this method to some other free roof-making tools in Blender (e.g. Inset Straight Skeleton), and I can confirm - Building Tools has the best implementation of straight skeleton algorithm for generating hipped roofs. It properly handles the craziest shapes with zero geometry error. Impressive!
Regarding this, my only wish is to be able to select multiple faces (even if they are not connected) that were joined into Floorplan object, and use them all at once to generate many roofs. Currently, it only takes the ACTIVE face as input, so we only can make ONE roof at a time.
Do you think you could implement this?
I have lots of tenement quarters (entire old city, actually) and I'd like to quickly generate hip roofs for all the buildings.

And maybe, as a side note, you could expand the extreme values for roof properties - thickness, outset and height? Currently, they are bound to something like 0.01 - 1 m.
Though it's easy to dive into source code and change the values in roof_props.py, but I think the defaults could be less limiting, even starting from 0.00 and ending with 100 m. I think that if someone uses too extreme values and screws up their roof, it's their own problem :) I expanded the extreme values for myself in code and experienced no crashes or any other problems.

@Mi-Pe Mi-Pe added the enhancement New feature or request label Jun 12, 2021
@Mi-Pe
Copy link
Author

Mi-Pe commented Jun 12, 2021

I was also thinking of a possibility of handling hip roofs of atrial houses.
When you inset a Floorplan face and remove the inner face, you get a hole. It would be nice if the algorithm was capable of respecting the hole and kind of combine the four faces into one base that has both "outer border" and "inner border". You could think about it as about "donut hip roof" :D

This very case, portrayed in the screenshot, is easy to do manually, but I have more complex shapes with holes that I would love to use as hip roof base. Handling more than one hole in the base shape would be a dream!

Here's a screenshot of what I imagined:
-2021-jun-12-004

@Mi-Pe
Copy link
Author

Mi-Pe commented Jun 12, 2021

Maybe I should split my suggestions into multiple posts. Sorry if I made a mess, but they are kind of referring to each other.

@ranjian0
Copy link
Owner

Hi @Mi-Pe , here are my thoughts:

  1. I am happy to here building tools has the most robust hip roof generation among blender tools, I spent a lot of time scratching my head to make it so.

  2. The reason multiple roofs are not supported is because the roof tool dissolves faces when multiple are selected. I guess the easiest way to solve your use case is to add an boolean option e.g Individual that makes the add-on treat each selected face as an independent roof. This would of course need to be done for all roof types, not just hip.

  3. As for the extreme property values, you may not have experienced a crash because your roofs are mostly rectangular and can expand infinitely without intersection. Consider what would happen if your building was U-shaped. At some point increasing the roof offset too high would cause an intersection between opposite sides. I agree that the user should be reasonable enough to avoid this situation and I have also added some checks especially for hip roof that warn about this and prevent crashes, but usability is a huge concern in any software. I can't anticipate what a user will do to make the program fail, so I have to make the checks very strict. There could be one of two solutions for this:

  • We could have add-on preferences to set the maximum values for the properties.
  • Or a better alternative is to have both (min/max) and also (soft_min,soft_max). Have a look here at what those mean.
  1. Finally support for holes is a large issue that has effects throughout the add-on. An issue already exists Support floorplans with holes #103.

@ranjian0
Copy link
Owner

I recommend splitting the requests in this issue to:

  1. Generate roofs on multiple faces at once.
  2. Better support for extreme property values.

@Mi-Pe
Copy link
Author

Mi-Pe commented Jun 14, 2021

What do you mean by "add an boolean option e.g. Individual"?

@ranjian0
Copy link
Owner

I mean, a toggle button called Individual which switches the behavior from generating a single roof on all faces (current default behaviour) to generating a roof on each selected face (your requested behaviour).

@Mi-Pe
Copy link
Author

Mi-Pe commented Jun 14, 2021

Ok, sorry, I didn't get you meant a hypothetical feature, not an existing one.

@Mi-Pe Mi-Pe changed the title Generate roofs on multiple faces at once + expand extreme values for roof properties Generate roofs on multiple faces at once Nov 12, 2022
@Mi-Pe
Copy link
Author

Mi-Pe commented Nov 12, 2022

Hello,
I know it's been a long time we discussed this topic, but I am again facing a need of generating a lot of hipped roofs quickly, so I'll ask if you could edit your addon by adding an option to roof generator, to prevent the algorithm from dissolving faces, so it handles multiple selected faces at once.
I mean, it actually makes a perfect sense that the algorithm dissolves connected faces and treats them as a single base for a complex roof, but in my case, it's multiple objects, so the faces are disconnected from each other. I can join them all into a single object, and they will stay disconnected, and then I could generate hundreds of roofs in one click. So maybe it could be done without actually altering the dissolving mechanism. But any way you'd achieve it, would be great.
I know nothing about how to code, so I can't do it myself.

PS I abandoned the request of expanding limit values for hip roof input, but I'm going to keep my posts unedited here, so not to make even more mess than I made a year ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants