Creating a polyhedron using the API

I would like to create a polyhedron from an array of coordinates using the API. Initially, this will have 6 faces, but will not be a regular shape (i.e. not a prism), so I cannot use CreateSolidByExtrude on a polyline.

I have tried to do this by creating each face of the polyhedron, but TxComponent.CreatePlane throws an error. This problem is also described here: