Create a line on top of scattered points

So it’s bit hard to describe but this is what I’m trying to achieve… so I have an array of scattered points and I need a line that encloses them from top. Something like on the image below. The line needs to pas trough two points that define a slope at which the rest of the points would end up underneath the line… I hope this make sens… the points are of course planar but I’m also interested in the case of non planar thus not a line but a plane or surface, but this part is less relevant right now.

Maybe line by best fit and offset in z-axis?

Won’t help, the angles are not the same

Can you make a plane, filter points above and then do line by best fit?

I don’t really follow what do you mean?