# Extruding Roofs out of Surface in Geo Nodes

. Hi Iam trying to build a building generator. For this i need to extrude the roof from a flat surface.

The Input to the Nodes:

The optimal Result: (With a mesh subdivision and a triangulate modifier)

I thought it would be a good idea to subdivide the mesh so I have topolgy to create the roof. But I have difficulties selecting the right verticies to move with the Vertex/Edge/Face Neighbor Nodes. I also converting it to a curve and the new Mesh Topology Nodes in 3.4 Alpha but they do not help much either.

Subdivision Applied and the right edges selected manually:

Has anyone an idea how this could be done?

Only for completion and as an alternative solution:

1. Subdivide the mesh with the node Subdivide.
2. Create a selection of points that have more than $$3$$ faces.
3. Add to this selection the points that have less than $$3$$ faces and at the same time the same or more than $$3$$ vertex neigbors.
4. Move the position of the points with this selection.
5. Triangulate the mesh along the longest diagonal so that the roof has correct edges.
6. (Optional): Additionally use the Decimate modifier to remove the excess edges.

(Blender 3.2+)

• Thanks for uploading a complete version. I couldn't upload images for a few days and then forgot about completing my answer Commented Oct 24, 2022 at 14:26
• @soerensc_ You are welcome! Commented Oct 24, 2022 at 14:31

Lel, found the solution after some experimentation. For everyone interested the selection setup looks like this:

And the output roofes like this:

• the setup will be more readable if you use Boolean: Not $(¬x)$ rather than Math: Substract $(1-x)$, as well as Boolean: Or $(a ∨ b)$ rather than Math: Add $(a + b)$. Greater Than or Equal $3$ would also be more readable than Greater Than $2.9$ You could also post the entire tree without cropping, because it's not clear how you use this selection, especially as you mix vertex and face attributes. Commented Oct 12, 2022 at 8:59