Hello @Jana_Trdlicova, the job of
vmtkboundaryreferencesystems is to create a dataset with as many vertices as there are open boundaries, with each vertex placed at the barycenter of each open boundary. For each boundary, the script computes the average radius, the outward normal (or an approximation if the boundary is not planar), as well as two points so that
(p1, o) and
(p2, o) are orthogonal (see https://github.com/vmtk/vmtk/blob/master/vtkVmtk/ComputationalGeometry/vtkvmtkBoundaryReferenceSystems.cxx#L243).
Now, regarding the issue of having inlets on the first line, the order of reference systems coincides with the order of the open boundaries that are found on the mesh, which is not easily predicted (https://github.com/vmtk/vmtk/blob/master/vtkVmtk/Misc/vtkvmtkPolyDataBoundaryExtractor.cxx#L82).
Your best bet with the current algorithms is try to match the reference system coordinates (the coordinates of the vertices of the output poly data) to your inlet/outlet specifications after the fact.
For instance, if you had a
vtkPolyData with a PointData integer for inlet/outlet points (e.g. 0 for inlet, 1 for outlet), you could use
vmtksurfaceprojection to bring that information into the output of
Hope this helps.