Grasshopper

algorithmic modeling for Rhino

Curves with zero length cause trouble because downstream components using them cannot work.

I tried to weed them out with "Replace Nulls" (in my case I can replace them by tiny lines) or "Clean Tree", but it doesn't work : curves with zero length are not considered as "Null" values.

It looks like I'm going to make a big spaghetti plate to build a workaround :(

Wouldn't it make sense that those curves with zero length be "Null" values ?

Cheers,

--

Olivier

Views: 1694

Replies to This Discussion

Hi Olivier,

Maybe you can try to Cull all curves based on their length.
For example, you can cull all curves, smaller than: 0.001:

You can replace "0.001" with what ever value you want. Maybe even "0" will work.

Attachments:

Hi Djordje,

Thanks for your help.

The thing is that I can't just ignore the line, even if the length is zero because it is going to ruin the definition downstream.

I need to replace it with a very short line, so I need to retrieve the index of the zero length line, and make the replacement.

Not too used to fiddle with those "Set" components ; sometimes it seems that doing something apparently simple ends up in a whole pearl necklace of components...

Maybe this will help?

Attachments:

Thanks Djordje,

It can't really work for zero length curves because you can't scale them,

but your definition makes me understand how I can do, using "Replace list".

Cheers,

--

Olivier

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service