delete an edge in vex?

   482   3   1
User Avatar
Member
67 posts
Joined: 2月 2016
Offline
Hi,

I have a polyline primitive, my goal is to remove some edges between some points (see attached image, note that in this example one polyline primitive yields 2 shorter polyline primitives).

In houdini GUI, I can select the edge and blast and it's done!

In Vex, I could not find a function to remove an edge (I found remove points, vertices,...). My question : should I focus on these remove points/vertices functions and try to remove the edge using them, OR is it better to reconstruct
new lines without the edges to be deleted? what is common in these cases?

Attachments:
quesatin.png (78.8 KB)

User Avatar
Member
67 posts
Joined: 2月 2016
Offline
Thx I looked quickly at this function, it deletes the entire prim (i.e. the whole polyline), however, I want to delete only one edge of that polyline primitive? the edge is specified by start and end points, or half-edge number connecting these two points... thx again
User Avatar
Member
2137 posts
Joined: 9月 2015
Offline
You could use the Convert Line SOP then follow with a delete/blast node to remove the primitive(Edge).

Or if you want to follow the Convert Line SOP with a prim vex wrangle you could use the removeprim function 'paying' attention to the andpoints argument for your purposes.

https://www.sidefx.com/docs/houdini/vex/functions/removeprim.html [www.sidefx.com]

Of course if you wanted, you could recreate individual prims(edges) in vex wrangle too.
User Avatar
Member
4749 posts
Joined: 2月 2012
Online
Hi,

In the case of polylines, removing an edge means, recreating the entire primitive again. But since you want to have each segment as a separate primitive, I would just use the Convert Line SOP and then remove the edges you don't want after using Blast or Attribute Wrangle like BabaJ suggested.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
  • Quick Links