Management of Lists - overlapping data

Hello everyone,

 

I created a geodesic dome using delauney edges and everything works fine.

I would like to export this file to dxf. The problem is that if I bake the different lines (from different line lists), some of the lines are baked double or triple...

 

The origin lies in the line lists. Every list contains a number of lines. But list A contains some of the lines of list B and this is the case for all of the lists.

I would like to merge all these lists in one big list, where every line is only presented one time.

Is there an option te remove the overlapped data in order to construct a clean dxf file with no hidden lines?

 

Thank You!

 

Lara

Load Previous Replies
  • up

    Daniel Piker

    This seems to be something several people have wanted for a while.
    (and the definitions that have been posted based on sorting points by coordinates and then comparing them do not actually work in a lot of cases, such as when they are aligned in rows)

    So I am sharing a few very simple tools I wrote for this sort of thing as part of Kangaroo.
    removeDuplicatePoints - pretty self explanatory. optional tolerance setting
    removeDuplicateLines - so far just for straight lines. also with tolerance setting
    interconnectPoints - This could be done before by cross-referencing the point list with itself in a line component but this does it without the nasty mess of duplicates and invalid lines.

    and all nicely wrapped up as proper grasshopper components thanks to what I learned in Giulio's class ! - just download the .gha file and put it in ....\Rhinoceros 4.0\Plug-ins\Grasshopper\Components
    (this file contains just these 3 components - not the whole Kangaroo)
    14
  • up

    Daniel Piker

    Glad it's helpful.

    Ryles - yes, if exploding your rectangles and rejoining them after isn't a problem you can use this. Otherwise the same approach used in this script could theoretically be extended to deal with polylines. It's just a question of comparing the lists of vertices against each other in either direction (closed polygons such as rectangles would also be possible, but a little more work because of the possibility of rotational symmetry).

    Jon - I'm probably not the best one to try and explain making plugins as I'm still new to it myself, but I think there might hopefully be some sort of reference soon.

    Making that interconnect points got me thinking - maybe it would be nice to have this 4th type of data matching for other components such as intersections:


    The first 3 should be recognisable as longest list, shortest list and cross reference. The 4th 'strictly upper triangular' form would be useful whenever you want to have each item in a list interact with every other item in the list apart from itself exactly once.
    2
    • up

      louis gadd

      thanks for this i ve been thinking about/needing something like this ever since i started using grasshopper

      cheers
      1