For example, we initially have an object in our Blender scene that consists of several curves, and we need to do something with the curve that has the shortest length of all. A bundle of several geometry nodes will help us select the curve we need to operate.
Let’s create an object consisting of several nested curves. Add a circle curve to the scene (shift + a – Curve – Circle), switch to the Edit mode (tab), make several copies (shift + d) and change their scale (s – move the mouse).
Open the Geometry Nodes area and press the “New” button to create the initial node tree.
We can get the lengths of the curves using the Spline Length node (shift + a – Curve – Read – Spline Length). From its “Length” output, we get a list of lengths of all the curves of the object.
To find the smallest value in the resulting list, we can use the Attribute Statistic node (shift + a – Attribute – Attribute Statistic). Link this node to the main Geometry branch and feed it the “Attribute” input with the list of curve lengths obtained from the Spline Length node.
Now, at the “Min” output of the Attribute Statistic node, we get one minimum value from the passed list – the length of the shortest curve.
We have only found the minimum length now, and in order to switch from the found length to the curve to which it belongs, we will use a simple comparison node.
Add a Compare node (shift + a – Utilities – Math – Compare) and feed its “A” and “B” inputs with the minimum curve length obtained from the Attribute Statistic node and the list of curve lengths obtained from the Spline Length node. Switch the node’s operating mode to “Float – Equal”.
From the “Result” output of the Compare node (its name has now been transformed into Equal), we receive the logical value “True” only for the curve from the list whose length is equal to the minimum length found among all curves.
We can now use this value to work with the found curve. For example, we can delete it. To do this, add the Delete Geometry node (shift + a – Geometry – Operations – Delete Geometry) to the main branch of the node tree. Link the output of the Compare (Equal) node to the “Selection” input of the Delete Geometry node.
This way, we select only the curve with the shortest length found for deletion and delete it. And this curve, as we can see, is successfully removed.

.blend file on Patreon


