Line zero length

Hello :slight_smile:

I have some problem with 0 line length. I have created script where I need to connect created lines to component in tekla to create reinforcement (tekla part is only a background). In line list I have one “Invalid Line” and due to that I can not connect it further. I can not remove that index because because it will mess whole downstream. How can I replace that “Invalid Line” to line with 0 length?

can you isolate (cull) the invalid line, grab its endpoints via the discontinuity component, and then “fit a line” via FitLine?

I tried what you proposed but it still shows Invalid Line.

Zero-length lines are considered invalid. If you must replace them with valid lines, then you’ll have to create very short ones in the same location.

But ideally your algorithm would be flexible enough to be able to either remove invalids or replace them with nulls.

Ok, I undestand. Is it possible then to replace that invalid with nulls somehowe or remove invalids but keeping other indexes in place?

SEE How to replace an <empty> branch with a null branch or a "0" value? - Grasshopper

1 Like