# Obtain position of point in geometry node

I have a mesh in which I have two vertices in a vertex group. I would like to create a line between those two points. For that, I have tried to add a Line node which requires a start location and an end location. I have also added a Point Separate node to get the two mentioned vertices in my original mesh. However, I have no idea how to obtain the vertices position in order to feed the Line node.

What I want to achieve with this is to create a solid geometry between those two points by instancing a cube on the line points.

How can I position my line between the two points in the vertex group?

• the point separate node separates between all points in a vertex group and all other points of that mesh. So this would "maybe" only work, if you mesh just has 2 vertices at all....it would be much if you hook two empties to your two vertices and then you can can the position of the empties and create a line between them Sep 30, 2021 at 12:09
• I have tried to add the empties with a copy location constraint, but that is not working correctly. The transform of the empty not yet updated apparently when computing the geometry nodes Sep 30, 2021 at 12:49

As of 3.0 you can use Transfer Attribute + Set Position to remap a mesh or curve line to any series of points as long you place them in the correct index order.

How good are you at connect the dots games?

From

to

Use the Selection input to use the relevant vertices:

The Mesh to Points node isn't necessary for this method work if you're using all vertices, it's only there to isolate vertices and make the vertices > (something) conversion explicit.

Right now you could replace that Mesh Line with a Curve Line node and plug the geometry Group Input directly in the Target and the vertices would be automatically converted to curve control points as required by the node tree. With a little creativity you can do a lot more with this, like welding procedurally generated lines, curves and faces into something new.