bounding box

How I can create the oriented bounding box if I have already the triangulation vertexs  ?? tnak you

SolidworksApi macros