setzer22 / blackjack

A procedural, node-based modelling tool, made in rust 🦀

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improvements for 'Edge divide'

setzer22 opened this issue · comments

Originally a comment as a potential improvement to #66

We could extend this to match Houdini's "Edge divide" node and make it usable for more use cases: https://www.sidefx.com/docs/houdini/nodes/sop/edgedivide.html

In that case we'd need:

  • Allowing to select multiple edges
    Instead of calling .next() and using only the first edge, we could loop over all the edges and then run the operation for each of them.

  • Allowing a configurable number of divisions
    This one is a bit trickier, but can be implemented without delving into the HalfEdgeMesh internals. We would need to run the divide edge operation successively in a loop N times. The first halfedge would be obtained by the selection, and the next ones can be obtained by the VertexId that divide_edge returns using conn.at_vertex(v).halfedge().try_end()?. That halfedge is guaranteed to be the second half of the split. Here, there is also an open question of what to do with the interp parameter in such cases thinking. I would expect that if we make more than one division, the interp parameter is ignored and instead divisions become uniform. thinking