This example uses the centreline command to create a line of data points along the centre of mass of a tubular surface mesh.
The data points are generated along the axial xi direction (xi 2) beginning from the start element 1. The number of axis divisions is set to 2 which means two points will be generated along each axial element. Each centreline point is calculated by determining the centre of mass for a curve in the circumferential xi direction (xi 1). The generated points are stored in the same region as the surface mesh and can then be listed or exported.
Note that gaussian quadrature assuming cubic elements is used to calculate the centre of mass points. If cubic elements are used in the circumferential direction then the calculation is exact, otherwise the data points will only be an approximation to the centre of mass.
The view_centreline.com file can be used with cmgui to view the original surface mesh and the generated data points.
Once the data points have been generated a mesh of the line can be created by using the cmgui command gfx snake or by fitting an initial line mesh to the data.