How to 1D integrate along a path inside mesh

see it: