Have a look at Round-edged box flat already. You can derive a solution from this.
Similar to Prism you can simply define the vertices. In addition to the 6 corners, you must always define the points on the arc in pairs. The formula is much simpler than with Round-edged box flat, as the formula there applies to all four corners.