# Get edges of faces in Geometry Nodes

I have created several node groups which are selecting vertices/points, corners, faces based on a boolean field defined in another Attribute domain. Here are two examples to show what I mean:

Vertices -> Edges (either edges for which both ends are in Vertices or at least one):

Edges -> Vertices (either vertices where all connected edges are in Edges or at least one):

I was able to create several similar nodes. But I couldn't figure out how to do the same for the case Faces -> Edges. What seems to work is this (although it doesn't feel totally right to me):

Note that this one requires to route through the Geometry (because of the Capture Attribute node), which is not the case for the other node groups.

What is possible is to get the Corners of Faces and then to get the Vertices for those Corners and then to get Edges where both ends are in this set of Vertices. But this way I get edges bridging two selected Faces but which do not really belong to any of the selected Faces.

This is what I have tried:

1. Faces -> Corners:

2. Corners -> (Vertices ->) Edges

And the effect is as described - instead of the edges shown on the left I get additional "bridging" edges (right):

Edit: To avoid confusion...

Input:

• Geometry
• Boolean field with attribute domain = faces

Output:

• Boolean field with attribute domain = edges, true only for edges belonging to faces where the input field is true

Etc:

• No geometry changes, i.e. no Delete Geometry or Separate Geometry (also not as helpers)
• (and of course nothing proximity-based)
• I don't have time to post a full answer but are you looking for the Interpolate Domain node? Commented Mar 27, 2023 at 16:06
• Ohhhh yes. Many thanks, I knew there must be a way to do this, but never came across this node. The name is Evaluate Domain now and with this I really need just this one node. Commented Mar 27, 2023 at 18:08

Edit: Forget everything below. @AlpineWorldCup pointed me to the correct solution, which is simply using the Evaluate on Domain node:

Ok, I think I found a solution myself. It suffers a little bit from the fact that there is still no possibility to iterate over things in loops in Geometry Nodes.

The limitation is that this might fail if an end of an Edge (Vertex) belongs to more than 4 Corners belonging to selected Faces. So in reality maybe it should "iterate" over more than 4 Corners.

It would all be much easier with a Faces of Edge node...

The idea goes like this:
To find out if an Edge is selected, given selected Faces:

• Find the top 4 Corners for one end of an Edge, prioritizing Corners belonging to selected Faces
• Find the top 4 Corners for the other end of that Edge, again prioritizing Corners belonging to selected Faces
• Check if any Corner in the first and the second group belongs to the very same Face (and if it's really a selected Face)

This replaces the node group shown under "2. Corners -> (Vertices ->) Edges" in my original post:

Open questions:

• What I don't know is if two calls to Corners of Vertex with the same inputs is guaranteed to return results in the very same ordering. Otherwise I have a problem here...
• I had the feeling that it might be possible to use results for the first end of an Edge (upper part) to create weights for the second end such that only one Corners of Vertex node is needed in the lower part. But I wasn't able to get this to work (without causing severe brain damage).
• What do you dislike about using Separate Geometry node? Commented Mar 27, 2023 at 17:53
• I just don't want to change the geometry here. Ok I at the end I probably want to, but before I want to do several steps of such field modifications before I actually use this to do something with the geometry. And even then this might be something else (not necessarily separate/delete geometry). Commented Mar 27, 2023 at 21:00