Labeling and counting identical connector parts using node points and vectors

I was already wondering, part of this must be a very common issue… So I managed to solve my first question (Listing all edges per node) by completely rebuilding my definition around Weaverbird & Lunchbox components. Now I’m left with the main part of my question: How to compare and label all unique vector configurations regardless of their orientation.

I found this discussion: Find similar nodes in framework of lines - #4 by HiMyNameIs which lead me to Weaverbird & Sandbox (Thanks @HS_Kim!). I also thought it would be my magic bullet for IDing the nodes in my mesh but after tinkering a long evening I can’t get HS_Kim’s example to work on even a basic sample mesh with 3 cubes. Too many false positives and negatives.

Another discussion I stumbled upon was this one: compare objects to verify their identity - Grasshopper. So what I understand from that conversation (Especially @DavidRutten’s point about finding a hash) is that I should find some unique fingerprint that I can compare instead of trying to compare all vectors to all vectors? So was playing around with computing an average vector from all vectors but that’s not unique enough, multiple configurations share the same average vector. Maybe combined with bounding box? But in all situations I fail to find a way to separate mirrored configurations… So is there a way to compare all vectors at all possible 90° rotations and label the unique ones or should I go further finding simpler ‘fingerprints’. This part is a bit too far in unknown territory as Grasshopper novice so all input welcome!

20200512-Principles_v4_cleaned.gh (25.7 KB)

1 Like