Simple grasshopper operation help appreciated!

I want to use grasshopper to select all lines less than or equal to a certain length. I’m new to grasshopper so don’t have much of an idea how to do this and I can’t find any relevant instructions online. Help appreciated!

Hugh, See the attached definition for several options. The Geometry pipeline will automatically collect any curves on any layer.

RE_curve_Length.gh (10.4 KB)

1 Like

Many thanks @Japhy

Are you able to take me through the process of using this definition in simple steps? I’m literally just starting to use grasshopper so no step too simple!

Many thanks,

Hugh

Ignore the yellow group, it just generates random curves since you didn’t post any geometry. By the way, your thread title doesn’t describe the issue at all.

The white group does what you want. Dispatch ‘A’ output are the curves whose length is less than or equal to the ‘max_length’ slider value. All curves longer than that are in the Dispatch ‘B’ output.

1 Like

The pipeline references geometry out of Rhino. You can specify a layer or get all with the *. Type can be set by clicking on the point, curve, brep or mesh.

We have selected Curves in this case.

The curve length component outputs a length in the Rhino Document units.

From there you can run a smaller than test on the Length number which will return a True or False.

The Cull Pattern will use the True/False to remove the False results.

The includes component will test for a range, in this example 5 to 10.

But you are culling only the curve length values, not the actual curves.

Thanks! missed that critical connection.

@hughecchapman Cull the list of Curves not the length in this example.

thank you both

You’re welcome. Please post your own code and geometry next time.

You can change the ‘Points’ slider (yellow group) from 4 to 2 to get lines instead of curves.

cull_lines_2021Oct05a.gh (17.8 KB)

P.S. This thread title says nothing at all about the actual issue so is really useless.