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?
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
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.
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.