Writing geometry directly to STP (without going through TopoDS_Shape)

I am interested in writing geometry (Geom_Axis2Placement) directly to STP.

The documentation shows this mapping of OCC Geometry -> STP entity:

However, I have not figured out how to do this, and I have also not been able to find an example. Does anybody know how to do this?