-
Notifications
You must be signed in to change notification settings - Fork 5
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
Gable roofs generation #12
Comments
It is difficult for me to answer without having the original data of your attempt. However, I don't think it is a good idea to tweak |
I can provide the data I was using with kwargs = {'faces': None,
'firstVertIndex': 0,
'height': 0.0,
'holesInfo': None,
'numVerts': 4,
'tan': 0.0,
'unitVectors': None,
'verts': [Vector((-1.0, -2.0, 0.0)),
Vector((1.0, -2.0, 0.0)),
Vector((1.0, 2.0, 0.0)),
Vector((-1.0, 2.0, 0.0))]} |
That's just a very simple roof with 2 planes that can be generated using simpler methods. As @polarkernel said, it's not even worth trying to think about adapting a hip roof for the general case due to so many corner cases. At some point you will have to have hips and valleys, and trying to figure out which parts can turn into gables is insanely difficult. If you have an application that allows you to manually edit the position of the vertices using some sort of drag tool, then it is quite easy to adapt the geometry and end up with gables in the desired locations. However, it sounds like you are trying to generate this automatically and have as many gables as possible, right? |
That was just an example, I need it for much more complex shapes and polygonize does good job for creating this type of roof except I need to add some gables to it. I'm looking for a way to do it automatically from the roof footprint and list of edges of that footprint that suppose to have a gable. |
That was already discussed in #9. The way to go would be to postprocess the results provided by bpypolyskel. It is not implemented in Blender-OSM |
@polarkernel
Is it possible to make gable roofs with bpypolyskel?
The best idea I currently came up with is just generating hiped roof from the footprint and moving it's top vertices towards the edges that I want to be flattened.
I tried to hack into
bpypolyskel.polygonize
and alter a part of the skeleton fromSubtree(source=Vector((0.0, -1.0)), height=1.0, sinks=[Vector((-1.0, -2.0)), Vector((1.0, -2.0))]
toSubtree(source=Vector((0.0, 1.0)), height=1.0, sinks=[Vector((1.0, 2.0)), Vector((-1.0, 2.0))])
and setting height for theskeleton_node3D
that's created from that subtree so it wouldn't be zero.But the result was
poly2FacesGraph.faces()
returning inccorrect faces where same vertex appears more than once:[[0, 1, 5, 4], [3, 0, 4], [2, 1, 0, 3, 2, 5, 1, 2, 3, 4, 5]]
(expected something like
[[0, 1, 5, 4], [3, 0, 4], [2, 3, 4, 5], [1, 2, 5]]
)Any suggestions?
@vvoovv did this need occur on Blender-OSM? how were you solving that problem?
The text was updated successfully, but these errors were encountered: