Grouping neigbouring primitives which share the same vertex

   2356   2   1
User Avatar
Member
21 posts
Joined: May 2016
Offline
Hi there,

I was wondering if i could brainstorm a method here. Attached you can see a pentagonal tiling grid. Each line is a primitive and i want to figure out the best way possible to get any primitive and store it's neigbouring primitives.
You can see in the image attached that primitive 471 has 4 neighbour primitives: 464,509,506,444.
I thought that if i make a list for each primitives 2 point vectors and compare these to a list of all point vectors that i would find duplicate vectors and group these, but then i would also need to know the primitives associated with those vectors, not sure how to do this bit?

If anyone has any suggestions i'd appreciate it.
planning to do this in python as i am more familiar with it
Edited by 212A - May 2, 2017 18:17:34

Attachments:
1.JPG (111.6 KB)

User Avatar
Member
670 posts
Joined: Sept. 2013
Offline
If they share a point you could use pointprims:
http://www.sidefx.com/docs/houdini/vex/functions/pointprims [sidefx.com]

What is it you want to achieve in the end?
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
8555 posts
Joined: July 2007
Offline
what about 474? don't you consider that a neighbor?
but anyway pointprims() is the way to go
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links