Tubular primitives

I’m working on a project where I’m using LSystem to generate trees in 3d. I’m not interested(for now) in flowers and leaves, just the structure, trunk and branches.
I’ve started the project using the ofCylinderPrimitive to draw each branch, but this has some complications:
1)The junctions between the branch looks ugly
2)The position of the cylinder is defined by an ofNode that is in the middle of the mesh. What would be helpful for me is having 2 nodes, one where the branch starts and another one where the branch ends.
Before starting to work on my own primitive, i would like to know if there is already a primitive that fits my use case.

I had a look to this https://github.com/julapy/ofxTubePrimitive/ by @julapy, and I’ve simply tried to draw a “Y”.
I’ve added 2 of3Vec for each of the 3 branches composing the “Y”. One vector define the start of the branch, and the other one the end (code availabe here https://github.com/edap/TubeTest). But this is the result:

The first branch is not displayed.
Maybe @julapy you have some suggestion about how could I implement/change your primitive in order to fit my needs?

@julapy, some more debugging. If I define the point as follow

    auto point1 = ofVec3f(0, 0, 0);
    auto point2 = ofVec3f(0, 0, 100);
    auto point3 = ofVec3f(0, 0, 100);
    auto point4 = ofVec3f(100, 0, 200);
    auto point5 = ofVec3f(0, 0, 100);
    auto point6 = ofVec3f(-100, 0, 200); 

The trunk is not displayed. But if i change the point 2 like this:

auto point2 = ofVec3f(0, 1, 100);

or the point 1 like this:

auto point1 = ofVec3f(0, 1, 0);

The trunk is displayed.

It looks it is a problem with the normals, at line 70 of ofxTubePrimitive.cpp. When the 2 ofVec3 has the same x and y, the normals are messed.

hey @edapx,
just got around to looking at this.
if you have a fix for this issue, feel free to submit a PR.
cheers!