I've done some research on this matter however I cannot find any clear answers.
How does a SolidWorks CAD file get 'converted' into a file format suitable for 3D printing, in detail?
3D Printing Stack Exchange is a question and answer site for 3D printing enthusiasts. It only takes a minute to sign up.Sign up to join this community
Any and all CAD files can be converted to STL (Standard Triangle Language). In this file format, surfaces are parsed to be combinations of triangles. For example a flat rectangular surface gets represented as two triangles in the same plane.
As the complexity of the solid increases more triangles are required to adequately approximate the surface. Flat surfaced models are simpler to convert and will have smaller file sizes whereas curved solids will be more complex and larger file sizes (for the most part). The dimensions of your part do not translate to the STL file technically. The STL version of your part is based on unit vectors and a scaling factor is included in the file. So none of the vertices of the STL file are dimensioned, but the file is then scaled appropriately when opened.
If you think of something as simple as a large diameter cylinder, you would need a relatively large number of triangles to approximate the curved surface. With a low number of triangles the curved surface would come out quite blocky, however increasing the resolution and the number of triangles used the blocky surfaces begin to approximate a curved surface. In theory if you had infinite resolution your curved surface would be exactly represented. The resolution of the file is something that you can choose when you save the file in STL format. The higher the resolution the more triangles will be required and the file size will also increase.
The specific algorithm on how to complete this task will be proprietary to each CAD software, however if you're just curious on the math involved or the general process of converting them, I did a quick google search for "STL format algorithm" and found several useful links on the first page that could be useful.
Here are a few links to a few sites with good information:
The TL;DR version: 15-294 Rapid Prototyping Technologies: STL Files and Slicing Software;
A Published paper on the algorithm: A method for slicing cad models in binary stl format, and;
A rehash of what I wrote above: STL File Format for 3D Printing – Explained in Simple Terms.
When you convert it to, let's say, a .stl (3d object file) file, I believe it converts the geometry of the parts into binary and saves the sets. These matrices can be used by the software of 3d printer in order to give the appropriate Trajectory for the extruder. And then the motion of the extruder is 'divided' amongst the available stepper motors and it generates equations of motion for the motors in electrical signals. That's what I've learned so far by using a 3d printer.