Cut piles with surface

Hi

I have a model like this, with the bedrock in blue. I would like to cut the piles along that surface, is that possible? 

Regards, 

Robert