Procedural edge loop ?

   8678   6   4
User Avatar
Member
39 posts
Joined: March 2020
Offline
It's probably a stupid question but what is the best way to procedurally insert an edge loop in the middle of a simple poly line, like the one in the picture? Also grouping the new line …

I guess one of the ways is to somehow select one of the rings and polysplit it in the middle, but i am still new to the software and i am not sure how to do that procedurally.

My goal is somehow to get a middle curve out of this. Maybe with extracting centroid and then rebuilding the curve from the points. The problem with that approach is - the curve will be shorter than the length of the poly line, because it will end at the center of the end primitives … Or maybe that curve will be somehow useful for the split ..
Edited by SnowballWar - July 24, 2020 12:48:59

Attachments:
sdfx.png (28.5 KB)

User Avatar
Member
504 posts
Joined: July 2005
Offline
Hi,

for this special case you can set edgegroups using two neighboured points, which have the same adjacent primitives.

Here is an example, but I don't think that this is a very elegant way.

Attachments:
edge_loop_procedural.hipnc (143.2 KB)

User Avatar
Member
39 posts
Joined: March 2020
Offline
Elegant or not, it does work like a charm. Thank you for your time and help.

Man, i need to learn vex codding…
User Avatar
Member
447 posts
Joined: April 2018
Offline
Here's another approach that still uses VEX, but far lesser code, and instead simply builds a string that feeds the PolySplit SOP split locations and lets that do all the work.

I did need to rebuild your mesh using a Sweep, because the PolyExtrude creates some messed up point numberings for some reason.

Attachments:
edge_loop_procedural_polysplit.hipnc (167.9 KB)
Annotation 2020-07-25 125546.png (9.5 KB)

User Avatar
Member
719 posts
Joined: Sept. 2013
Offline
The edge divide SOP can do this (if you are able to select all the right edges in advance).

Attachments:
edge_divide.hipnc (146.4 KB)

https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
39 posts
Joined: March 2020
Offline
Thank you guys for suggestions.
User Avatar
Member
281 posts
Joined: Sept. 2012
Offline
You could select loop and ring with the group find path.

Now how with 2 point selected for example , would you select the proper half edge before running it?
The point doesn't not have to be connect by an edge, but I guess we could get the direction to identify which half edge to pick?

How would you do that?
Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
  • Quick Links