2
$\begingroup$

In this illustration,

enter image description here

the red line in the upper part of the image is one pair of a large number of pairs of vertices, each pair connected by an edge in Blender. For each pair, I want to replace the edge in red with the vertices and edges in green in the lower picture. If the red edge between one set of vertices is a different length from the red edge between another set of vertices, I want the green replacement to be scaled proportionally, along (in this case) the axis of the existing edge. I know I can do it like Johnny Cash's Caddy, but I'd like to be able to do it more than "one piece at a time". Is it possible, perhaps with an add-on? .

$\endgroup$
  • $\begingroup$ Are you only concerned about edges or do you want to generate/modify faces as well (which seems to be more complicated)? And how do you intend to orient the new edges? Some global axis or dependent on the normals of the old edge or its vertices? $\endgroup$ – binweg Feb 8 '17 at 23:26
  • $\begingroup$ My main interest at the moment is replacing an edge with a profile, using the existing endpoint of the edge ax the endpoints of the replacement profile. In terms of orientation, if the horizontal red lines lies in the xy plane, I want mainly to vary the z at the inserted intermediate points, although if the at some point or points, if the length of the red edge changes, I wold like the intermediate vertices on the green replacement to change proportionally. $\endgroup$ – brasshat Feb 9 '17 at 23:50
3
$\begingroup$

I'm not aware of a simple way to replace edges automatically. The direct approach to this seems to be to loop over the edges and to generate the geometry manually.

With the add-on Animation Nodes I was able to create a setup that replaces all edges of an object with some template profile. Selectively replacing edges based on some condition determined by the coordinates (e.g. replace all edges which are longer than…) is also doable. I was not able to figure out selectively replacing them by criteria like whether the edge is selected or if the edge is marked as seam or sharp.

enter image description here

The new profile could either be oriented along some global axis or an axis dependent on the two vertices' normals. It's also possible to use conditions like “point the profile towards global Z, but point it along the normals if the edge points in Z direction.”

profile orientation illustration

Generating the new edges works fine and this process will also generate any faces that may appear in the template profile. But reusing some faces of the original mesh (without using all of the old vertices and edges of it as well) is more problematic. AN only exposes edges and polygons by index and I assume simply deleting edge indices will lead to errors.

Here is the node setup that I used…

node setup

…and the blend file as I guess nobody wants to copy the wiring:

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.