# Why addCylinder function not respecting the given coordinates?

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);

double lc = 1e-2;

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;
}

• You should ask this on the gmsh specific forums. – Wolfgang Bangerth Mar 28 at 17:20
• Did once, got no answer. – FourZeroFive Mar 28 at 17:25
• The problem is that the people with gmsh knowledge who hang out here are, at best, a subset of those who hang out at the gmsh forums. If they don't respond there, they're unlikely to respond here. – Wolfgang Bangerth Mar 29 at 15:50
• @WolfgangBangerth not necessarily true. I don't read gmsh forums/maillist except when I google something. It is debatable where it is best to ask a certain question first. One can certainly qualify GMSH as a niche software, and then it is off-topic, but those questions are often answered here, as lots of people use GMSH. – Anton Menshov Apr 2 at 4:22
• @AntonMenshov, I think that was a Meta discussion that never reached conclusion, though. – nicoguaro Apr 2 at 21:27

How are the coordinates interpreted? If the coordinates are $$x$$ $$y$$ $$z$$, shouldn't the second cylinder be straight upwards, length one?
0,35 0,35 0    0,35, 1,35 0