Project creates different results

A projection is simply setting up a variational problem:

a=inner(u,v)*dx
L=inner(expression,v)*dx
Uh=Function(V)
solve(a==L, Uh)

To project only on parts of a domain, see for instance How to plot normal unit vector of faces in a 2D mesh? - #2 by dokken
For custom interpolation, you Need to decide what you would like to interpolate and into what space.