Help needed

How do i make the corner pieces same hight at the edges the slope upto the middle

It is ment to be a top on a fence pole

Are you trying to copy the pyramid shape in the background?
If not can you explain a bit more?

I am trying to make it like the pyramid in the background but with the corners camferd also.
so it will be like if you look from above it will look like 8 faced piece.

Hope you understood

Closest i got so far

Use the Replace Face tool.

The replace face tool will tilt it from one reference face to the other. Even if the face is split into two pieces by a projected edge :confused:
Please see one, not that clean solution below using the replace face first. Then an edge should be projected and the remaining cross-section can be swept along another edge. Just to subtract the swept body from the corner piece.