One of the CAD programs I use is called TinkerCAD, which lets you export your design in either STL or OBJ form. What is the difference between these two file types? And which one is better to use?
STL is the de facto standard in consumer-grade 3D printing. It is a bare-bone format that describes the shape of the object by defining the coordinates of all the vertices of all triangles that a surface may be subdivided into.
This means that in STL any curved surface is represented with an approximation of many very small faces.
OBJ is also somewhat common, but it was originally developed for computer graphics, not manufacturing, and as such is capaple to store information like the texture images to be applied to the surface, which are of no use in the 3D printing world.
In terms of geometry description, OBJ is more capable than STL, as it can describe "real" curves, without the need to approximate them to a series of polygons. The benefit of this feature is however more theoretic than practical, as:
- most entry-level CAD software don't make use of that feature and create a STL-equivalent OBJ file (so, still with polygons)
- a typical STL model for 3D printing will have enough resolution to give the illusion of perfect curves (the same way a high-res screen gives the illusion of perfect curves, despite its pixels being arranged in a squared matrix),
- the slicer/printer's firmware may themselves approximate an accurate curve to a series of segments
Short said, I would suggest you use STL unless you have a specific reason not to.
If you would find yourself in need to accurately describe curves I would rather use the STEP file format, as that has been specifically created for manufacturing, rather than "borrowed" from computer graphics.
While the STL-format can only describe your object aproximatively by those well known triangles, OBJ-files can describe parts of your object parametrically by curves. This can lead to a higher precision and be a huge advance with regard to scalability. Which data format to choose depends, as always, on the application and the processes it contains. E.g. if you want to print large objects, you might consider the OBJ-format if your slicer can translate it to usable g-code.
You might want to read this article on All3DP to get a brief overview.