# Geometry nodes - Why is "mesh to curve" extending the selection of nodes?

I'm trying to thicken a loop automatically with geo nodes.

I created a vertex group from the target loop and uses it as input within geometry nodes. But the "mesh to curve" node creates curves between nodes that do not belong to the selection, hence resulting in a rake more than a hoop.

Is this expected behaviour or did I miss something?

• "Why" has been answered well IMO, but a different workaround to the problem is input->separate geometry->mesh to curve, which leaves you with only the edges you want going into the curve. Jul 29, 2022 at 16:44

You would simply have to apply the vertex group to the points first with Capture Attribute, and then use that as the selection for Mesh to Curve:

Here I use the node Named Attribute (Blender 3.2) for the vertex group, but of course you can also do this with a Group Input (Blender 3.0).

A short (simplified) explanation:

It has to do with "Domains".

A vertex group defines points, but Mesh to Curve works based on edges.

When you process a vertex group in Geometry Nodes, this selection is interpolated to all other domains, which also selects adjacent edges.

So all edges that have a point in this vertex group will be converted by the node Mesh to Curve.

With Capture Attribute, however, the selection is explicitly applied only to the points domain and then only edges are selected that actually have both points in this vertex group.

• Amazing. I hadn't realized that a selection of vertices is not just a selection of vertices in geo nodes but that it can be specified what attributes are to be used. :) Jul 29, 2022 at 11:16
• @JagJB Values that are not explicitly restricted to a particular domain are interpolated ...I have attached an attempt at a brief explanation of this. Jul 29, 2022 at 11:26

It is because vertex group has a vector domain, while you want to get edges. This node setup solves the problem:

• Thank you so much. Both answers are pertinent and converge to the same solution. I gave credits to both ;) Jul 29, 2022 at 11:17

Another way of thinking about it?

This cluster selects as expected.

Vertex groups are Floats, (however you think you've stored them) .. and the cast to Boolean interprets everything above 0 as True.

So edges interpolated to 0.5 (1 at one end and 0 at the other) cast to True, but can be explicitly evaluated as False.

• Very interesting perspective! Despite all expertise, in this way I have not looked at it at all. As so often, thank you for expanding my horizons! Jul 29, 2022 at 22:18
• @quellenform .. and vice-versa .. yours and Cranitsz' method took me by surprise ..:) Jul 30, 2022 at 7:19
• Yes of course, it's a float as you can have weight factors in a node group! I hadn't realized I was implicitely converting values when connecting the blocks. Thanks for the explanation! Jul 30, 2022 at 11:07