I have need to calculate the "box" that a part would fit in so that I know how it's dimensions in all three axis. There is a GetBox method on many object types in the SolidWorks API but the API help warns not to rely on this for anything but the roughest estimate. I tried it and the warning is well founded. I need a closer estimate. Here is a typical warning:
IMPORTANT: The values returned are approximate and should not be used for comparison or calculation purposes. Furthermore, the bounding box may vary after rebuilding the model.
Pouring over the help files I see two possiblilties:
1) Tesselation. There are some methods that return triangles, normals and TriStripEdges that seem to be used for rendering.
2) Extract my own geometry. In the method IComponent2 Interface : GetTessTriangles Method (IComponent2) there is a note that states:
These triangles are intended for graphics display purposes and do not represent a tessellation that could be used, for example, by a machining application. If you need the type of accuracy associated with a machining product, we recommend that you traverse the body faces and extract the topology and geometry data to create your own faceting.
My question is how?