# [Gmsh] spline with many points

Purvis Bedenbaugh pbedenbaugh at gmail.com
Wed Nov 4 03:57:41 CET 2020

The following test program, which generates a helical pipe by extruding a disk along a spline.

When the number of turns of the helix is 4, it generates an attractive helix, and 3D-mesh creates an attractive mesh.
When the number of turns of the helix is 5, it generates an attractive helix, and 3D mesh crashes gmsh.
When the number of turns is 12, the helix is ugly, and 3D mesh crashes gmsh.

I would very much appreciate your insight into diagnosing the error.

bottom = 0;
steps = 3000;

bodyturns = 12;

pitch = 5;  // vertical mm/turn
turnsteps =20;   // reference points for each turn of the helix

lc = 0.05;

argmult =   2*Pi/pitch ;
nsteps = bodyturns*turnsteps;

For ii In {0:nsteps}
zpos = (pitch/turnsteps) * ii;
Point(ii) = {xpos, ypos, zpos, lc};
EndFor

Disk(1000) = {radius, 0, 0, 0.5};
jcoef = -pitch/Sqrt(pitch^2 + 4 * Pi^2);
kcoef = (2 * Pi)/Sqrt(pitch^2 + 4 * Pi^2);
Rotate {{-1, 0, 0}, {radius,0,0}, Asin(kcoef)} { Surface{1000}; }
Spline(2000) = {0:nsteps};
Wire(3000) = {2000};
Extrude { Surface{1000}; } Using Wire{3000}