<p>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. </p>

CC BY-SA 3.0
2017-04-24T08:02:55.123Z
This isn't a very accurate answer. "Binary" doesn't really have anything to do with it (everything on a computer is binary, so "converting into binary" doesn't tell you much). What are "sets"? STL files aren't (and don't contain) "matrices".
Tom van der Zanden
CC BY-SA 3.0
2017-04-24T09:29:52.477Z
This "answer" appears as confusing as the original question.
fred_dot_u
CC BY-SA 3.0
2017-04-24T07:17:26.800Z
2017-04-24T07:17:26.800Z
user7844775
<p>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. </p>

<p>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.</p>

<p>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. </p>

<p>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. </p>

<p>Here are a few links to a few sites with good information:</p>

<ul>
<li><p>The TL;DR version: <a href="https://www.cs.cmu.edu/afs/cs/academic/class/15294-s15/lectures/stl/stl.pdf" rel="nofollow noreferrer">15-294 Rapid Prototyping Technologies: STL Files and Slicing Software</a>;</p></li>
<li><p>A Published paper on the algorithm: <a href="https://www.researchgate.net/profile/Okan_Topcu2/publication/259843304_A_method_for_slicing_cad_models_in_binary_stl_format/links/0deec52fd258c68deb000000.pdf" rel="nofollow noreferrer">A method for slicing cad models in binary stl format</a>, and;</p></li>
<li><p>A rehash of what I wrote above: <a href="https://all3dp.com/what-is-stl-file-format-extension-3d-printing/" rel="nofollow noreferrer">STL File Format for 3D Printing – Explained in Simple Terms</a>.</p></li>
</ul>

CC BY-SA 3.0
2017-04-24T12:12:26.223Z
2017-05-02T12:26:34.893Z
2017-05-02T12:26:34.893Z
Diesel
<p>I've done <em>some</em> research on this matter however I cannot find any clear answers.   </p>

<p>How does a SolidWorks CAD file get 'converted' into a file format suitable for 3D printing, in detail?</p>

CC BY-SA 3.0
2017-04-24T13:40:51.580Z
I see that you've substantially shortened your question and created a clear question. Unfortunately, I believe that your final question is mostly unrelated to this forum. Your query involves programming sequences within Solidworks, those sequences involved in creating files to meet either STL standards or G-code standards or both. It would not surprise me to learn that such information is considered proprietary to the companies involved in creating them.
fred_dot_u
CC BY-SA 3.0
2017-04-24T13:41:06.073Z
Magic.   It's all magic.
Carl Witthoft
<print-quality><file-formats>
How does a SolidWorks file get converted to be 3D printed?
Mcccccc
# How does a SolidWorks file get converted to be 3D printed?

(Asked by: username_0 on 2017-04-23)

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?

**Tags:** print-quality, file-formats

> **Comments:**
> **username_1**: I see that you've substantially shortened your question and created a clear question. Unfortunately, I believe that your final question is mostly unrelated to this forum. Your query involves programming sequences within Solidworks, those sequences involved in creating files to meet either STL standards or G-code standards or both. It would not surprise me to learn that such information is considered proprietary to the companies involved in creating them.  
> **username_2**: Magic.   It's all magic.  

---

## 2 answers

### Answer by username_5 on 2017-04-24. Score: 4 | Accepted answer

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](https://www.cs.cmu.edu/afs/cs/academic/class/15294-s15/lectures/stl/stl.pdf);
* A Published paper on the algorithm: [A method for slicing cad models in binary stl format](https://www.researchgate.net/profile/Okan_Topcu2/publication/259843304_A_method_for_slicing_cad_models_in_binary_stl_format/links/0deec52fd258c68deb000000.pdf), and;
* A rehash of what I wrote above: [STL File Format for 3D Printing – Explained in Simple Terms](https://all3dp.com/what-is-stl-file-format-extension-3d-printing/).


---

### Answer by username_3 on 2017-04-24. Score: -4

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.

> **Comments:**
> **username_4**: This isn't a very accurate answer. "Binary" doesn't really have anything to do with it (everything on a computer is binary, so "converting into binary" doesn't tell you much). What are "sets"? STL files aren't (and don't contain) "matrices".  
> **username_1**: This "answer" appears as confusing as the original question.  

---

