Hello @fe48,
The most critical part of this whole operation is to provide a clean mesh to Kangaroo, and to produce this flawless quad mesh, you have to provide impeccable data to the Fatten
component.
What Daniel provided is mostly the Kangaroo part that happens after the mesh creation, notably the mesh relaxation and diamond subdivision.
As I understand, the Fatten
component takes a couple of lines and in your case an additional sphere for each node, to define a local radius.
First of all, the curves that you input probably need to be ordered from bottom to top, top to bottom, or in some other order that you can use later. Furthermore, the curves all need to face the same direction.
Let’s say you provide a single line for each branch of the tree-like structure and the lines are all sorted from bottom to top, as well as facing from bottom to top.
The start and end points of the lines form nodes that a spheres sits on. The end point of one line and the start point of the next line(s), except for the lines with only one “neighbour”, form a common node. In this case, you probably only want to produce a single sphere for, let’s say three neighbouring lines, so you have to devise a system to avoid duplicates. To be clear the spheres are ordered in the same fashion as the nodes. There is only one sphere for each node and there is only one node for each gathering of lines.
If you have that figured out, simply plug your lines and spheres into their corresponding Fatten
inputs.
tree_branching.gh (23.0 KB)
In the Kangaroo portion of the definition, the LengthFactor
probably needs to be larger than 0 for something to happen. Also, you forgot to insert your anchor output A to the {0;1} input of Entwine
!