3
$\begingroup$

I want to build a road in Geometry Nodes. For that I want the the input to be a mesh line. The Line follows the Path of the road.

I want the node tree to "see" junctions, AKA vertices with more than two edges. Is there a way to get these values in Geometry Nodes?

Thanks alot in advance, first time posting here, hopefully I didnt forget anything :D

Edit: Using 3.1

$\endgroup$

2 Answers 2

5
$\begingroup$

Here's a very simple solution

Here's a very simple solution

and here is the result

Example of geometry nodes

This relies on the Vertex Neighbors node, which, as the name implies, provides a count of how many vertices are connected to a give vertex by edges (or faces.)

Obviously in my example you will want to replace the Mesh Circle with however you want to draw the intersection, but it's fairly simple in 3.1

You want an intersection wherever there are more than 2 neighbors, so use a simple math Greater Than set to 2 to set the selection. Feed that and the original geometry to an Instances on Points nodes, and use whatever you'd like for your instances.

$\endgroup$
0
3
$\begingroup$

Node setup:

enter image description here

The node setup creates a cube (you can do there whatever you want, i just wanted to make the result visible) whenever there is a cross section which i defined as vertex count = 4 neighbours.

enter image description here

Note: i hope/think every 4 year old kid knows that you could use a "greater than" node instead of the "compare + not" nodes to get the "exact" goal of the question.

$\endgroup$
3
  • 2
    $\begingroup$ Very nice :). Can't imagine doing this in any way without GN $\endgroup$ Mar 15, 2022 at 11:40
  • 1
    $\begingroup$ thank you and...well ...with python ;) or animation nodes....or sverchok ;) $\endgroup$
    – Chris
    Mar 15, 2022 at 11:48
  • $\begingroup$ yeah well, that's just a list of more things I never learned :)) $\endgroup$ Mar 15, 2022 at 11:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .