[Gmsh] Getting Points from a Spline

Daniel Ingraham d.j.ingraham at gmail.com
Mon Jan 4 22:29:06 CET 2016


Hi Gmsh people,

Is there a way to get a list of points used to define a spline in a
Gmsh script? Here's a short example:

p1 = newp; Point(p1) = {0., 0., 0.};
p2 = newp; Point(p2) = {1., 0., 0.};
p3 = newp; Point(p3) = {1., 1., 0.};
spline1 = newreg; Spline(spline1) = {p1, p2, p3};

// I want this to give me a list containing p1, p2, and p3, but I think
// it's just the ID of the spline itself.
spline1_points = spline1[];
For i In {0 : #spline1_points[]-1}
  Printf("spline1_points[%g] = %g", i, spline1_points[i]);
EndFor


I know about the Boundary command, but I think that would just give me
p1 and p3, right?


Thanks,


Daniel