Test if numbers are in bounds, then divide lines


I have written a very simple C# node to test a line length then divide with points based on results. When I plug in multiple lines and try to pass through a stream filter it’s failing.

Am I missing a graft? Or is something more required in the C# node?

See attached.



test.in.bounds.divide.gh (9.2 KB)

I think the problem is just with Stream Filter, it doesn’t do what you need it to do.
The error is: Filter component can only operate on a single Filter Index value.

In this particular case, it may be easier to just output the number of divisions from your C# script directly:

Not only fewer components, but also a lot less work being done per solution.

1 Like


Thank you for your help. I’m clearly just getting my feet wet with C#, the support on this forum is much appreciated.


Sadly my solution doesn’t scale to all problems of this type. I can’t think of an easy way to do what you originally tried to do.