Jump to content

Turn edges into separate primitives


guache

Recommended Posts

What's the fastest way to turn edges into separate primitives? E.g. given a simple quad (1 primitive, 4 points), I want to get 4 primitives, one for each edge, for a total of 4 primitives, 8 points. I can do this in a small loop, using Add SOPs, but I wonder if there's a faster solution with just one or two SOPs.

Edited by guache
Link to comment
Share on other sites

Depends if you want the un-shared edges or all edges, but the method is the same..

For un-shared edges add a Divid SOP and turn on Remove Shared Edges (turn off Convex), for all edges skip this step.

Add a Polywire SOP (set the radius to 0.0)

Add a Group SOP, set Operation to Group by Range

Add a Blast SOP for that group1

Add another Group SOP, set Operation to Group by Range

Add another Blast SOP for that group1

Add a Fuse SOP (turn off Degenerate)

And your done.

Edited by hopbin9
  • Like 1
Link to comment
Share on other sites

Cool, thanks. Exactly what I wanted.

Two more ways. Short and Long.

A. Use curvsect sop and plug the primitive in both the inputs. Leave it to defaults. Done.

B. Little not intuitive use of copy sop to remove geometry.

Append sort : carve: blast: copy sop to your polygon with following settings.

1. Sort- by vertex order(just to make sure if points are not ordered)

2. Carve- Make first U = 0( this should split point 0 and give you total 5 points)

3. Blast- Choose group type "Edges" and Delete non selected using expression in group field < p`stamp("../copy1","num",0)`-`stamp("../copy1","num",0)+1` >.

4. Copy - Rename copy sop to copy1 if not. Set number of copies to 4. ( you could also automate this and fetch points using pointlist and argc from the original polygon). Enable stamp inputs set the variable "num" to value $CY.

Done.

-Cheers!!

Link to comment
Share on other sites

  • 4 years later...
  • 3 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...