On 04/05/2017 at 17:36, xxxxxxxx wrote:
Excuse me if this isn't the correct place to post this... I'm new here.
I have a spline in the shape of a branching tree. Currently, each branch is it's own segment and I would like to convert it to a spline object with contiguous branches (so that scale would work correctly if I were to sweep the branch path). While my example is a binary tree I would like to be able to do this for any type of segmented tree.
_<_img src="http://phinary.net/shared/c4d/segmented_tree.png" height="344" width="473" border="0" /_>_
One of the dirty ways to deal with this in the viewport is to Extrude the Spline->Convert to Poly->Optimize the Poly->Select similar Poly Edge -> Convert Edge to Spline.
It's not pretty, but it works. I could mimic that in python, but I'm looking for something more elegant. I assumed a more pythonic way to deal with this problem would be to iterate hierarchies of segments and was curious if there's an existing function in the SDK or a pythonic approach that might best suited to help with this.