I tried to generate 3 very simple cylinders, each other connected to it end, however the cylinder get connected to an unexistent point in space as the image shows:
It was supposed to each segment be 45º, 90º and 60º of inclination.
The code:
#include <gmsh.h>
int main(int argc, char **argv)
{
gmsh::initialize();
gmsh::option::setNumber("General.Terminal", 1);
gmsh::model::add("t1");
double lc = 1e-2;
gmsh::model::occ::addPoint(0, 0, 0, lc, 0);
gmsh::model::occ::addPoint(0.35, 0.35, 0, lc, 1);
gmsh::model::occ::addPoint(0.35, 1.35, 0, lc, 2);
gmsh::model::occ::addPoint(0.85, 2.21, 0, lc, 3);
gmsh::model::occ::addCylinder(0, 0, 0, 0.35, 0.35, 0, 0.05f, -1);
gmsh::model::occ::addCylinder(0.35, 0.35, 0, 0.35, 1.35, 0, 0.05f, -1);
gmsh::model::occ::addCylinder(0.35, 1.35, 0, 0.85, 2.21, 0, 0.05f, -1);
gmsh::model::occ::synchronize();
gmsh::model::mesh::generate(3);
gmsh::write("t1.msh");
gmsh::finalize();
return 0;
}