Object inditification

unhandled

(David S. Mavrov) #1

Anybody has an idea how to do the following: Lets say we have a collection of lines/curves. They are connected to other lines in our selection, but they form different “clusters”. All I need to figure out is how to automatically get the count of these “clusters”.

Objects.gh (4.3 KB)


#2

The most straightforward/terse solution I can think of (without going into graph territory), is to mesh the lines/polylines, join/weld these, and split this into disjoint pieces. Here’s an example using Weaverbird:

Objects.gh (6.6 KB)


(David S. Mavrov) #3

I found even easier way. Boundary surface… I can’t delete the topic though. But yes this works very well too!


#4

Note this this method won’t always work out of the plane/in 3D (if the outlines overlap in their projection):

The forum is as much a database of existing/searchable solutions, as a place to ask questions. So please refrain from deleting stuff once answered :wink:


(David S. Mavrov) #5

I just projected the curves on the global plane then used boundary surface and it gave me the count. Brilliant :slight_smile: