Grasshopper

algorithmic modeling for Rhino

How to remove all duplicate curves from a 2D voronoi cell structure?

Hello everyone,

I was wondering if there is a way to remove all duplicate curves when the 2D voronoi component creates cells with overlapping curves.

I found the 'join curves' component, but I guess that doesn't remove duplicates only connects.

I also found the remove duplicate lines component from Karamba, but it only works with lines, and I'm puzzled on how to convert the curves into lines.

Thanks for any feedback,

Fernando

Views: 5631

Replies to This Discussion

You can explode cells, flatten them and then use kangaroo's "removeduplicateline" component to remove overlapping curves

Hi Khizer,

Thanks for the reply. I tried to use explode, but the output are also curves and the removeduplicateline doesn't accept them.

Any ideas? Thanks.

Or rather, the karamba component says that the input is not an instance.

it works fine, a line is a curve in rhino, Khizer suggests to use kangaroo not karamba. the component "remove duplicate lines" in kangaroo.

The Kangaroo (not Karamba) removeduplicateline component will remove duplicate curves as well as lines.

(Actually it will remove any curves which share endpoints with a curve already in the collection, whether or not they match along their length)

Thanks Daniel and Michael, sorry for my reading error.

But when I connect either a curves output or exploded curves output to Kangaroo's removeduplicatelines component, the component gives the error 'Object reference not set to an instance of an object'.

You can also use Spiderwebs cleanSetOfLines 

works fine here.

Michael, which explode did you use, what is its name? I can't find a component with that icon, my explode curves component works differently. It outputs some null lines, and I think the removeduplicatelines from Kangaroo can't process those.

I now used cleanSetOfLines and that works. I takes care of the null lines.

By the way, cleanSetOfLine doesn't have a tolerance, but I connected its output to removeduplicatelines from Kangaroo and could set the tolerance there.

Thanks for all the help!

it is called "brep components"

Hey Michael,

Is there a reason behind using brep components rather than explode curve? (cause explode curve worked for me) Made me wonder if brep components is exploding curves then is there some special condition where it doesn't work n explode curve comes in?

and what is that percentage and ms value under your components?

Khizer, In this case there is no difference between explode curve and brep components in terms of effectivness, besides maybe computation time, Im just more used to using brep components, however brep components is really handy if for instance you only had surfaces and wanted to extract the edges. the percentage is the profiler widget which lets you know how long each component takes to solve and which in your definition is using the most power.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service