int1d(Th, label) on a 3D mesh

How can I compute a curve integral, which is part of a 3D mesh, such as:
int1d(Th, label)(1.)
where Th is a 3D mesh?

My approach would be to define a 3D line mesh, interpolate the results onto the line mesh, and do the integration there.

Thank you @aszaboa !

Unfortunately, it is an integration of unknowns, which should go to the variation form.

The problem is an optimisation as follows:

L(u,f) = int1d(Th, 1) + int3d(Th)(...) + int2d(Th, 2) (|f|^2)

The first term is objective, the second term is constraint PDE and the last term is the control.

Variation of L(u,f) leads to a FEM weak form involving integration in different domains. The problem may not be well defined initially, but I just want to give it a try, and then some regularisation terms may be introduced to make the problem solvable.

Any ideas?

Generaly, make 1d integration on 3d objet have no mathematics sense at continious level,
So this is why it is not coded