<p>This suggestion may be more convoluted than your solution, but one can use OpenSCAD to import an STL, use projection() to create a slice of the first layer of the desired thickness, then export it as an SVG.</p>
<p>Additionally, Prusa Slicer (among others) when configured for a resin printer will generate a series of .PNG files representing the layers to be sent to the printer to expose the resin. The resulting file will have a proprietary extension, but when changed to .ZIP, can have the individual layers extracted and the images processed in the desired manner. Still convoluted, less programming involved.</p>

CC BY-SA 4.0
2024-12-08T22:32:54.597Z
2024-12-08T22:32:54.597Z
fred_dot_u
<p>Is it possible to convert the first layer of the G-code to a 2D print so I can use a 2D printer for a quick size reference?</p>
<p>The G-code (or STL) already contains the exact sizes so I think it shouldn't be hard, yet I could not find any easy solution for this.</p>
<p>Like this, but in realistic size:
<a href="https://i.sstatic.net/jpOZYpFd.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/jpOZYpFd.png" alt="STL first layer preview" /></a></p>
<p>So since most 2D printers use standardized A4 paper and PDF can also use A4 standardized size. It would be very helpful for many 3D prints to have a tool that can quickly take a G-code and generate a PDF of the first layer so that I can use a 2D printer for a quick print size preview when printed in actual size.</p>
<p>This is helpful for example when comparing it to a physical object, and saves wasted filament and time by waiting for the first layer or the whole print to finish and to find out the size wasn't (exactly) right.</p>

CC BY-SA 4.0
2024-12-08T20:35:29.957Z
Ok, I just wrote my own program to achieve this. I might share it as I didn't find any other solutions for this simple task. I'm still interested in other possible solutions.
Bob Ortiz
CC BY-SA 4.0
2024-12-09T10:49:46.840Z
That sounds like an answer! Maybe share the code through GitHub in the answer, or provide some essential hints using techniques and (python) libraries?
0scar
CC BY-SA 4.0
2024-12-09T10:58:10.057Z
I have a working CLI PoC and working GUI PoC. I'm less experienced in making GUI but that was another project of me, so I'll probably soon publish both cross-platform tools as CLI and GUI for MacOS, Linux, Windows. If I find time to finish this.
Bob Ortiz
CC BY-SA 4.0
2024-12-11T21:40:35.953Z
i just take a screenshot of the slicer interface looking directly down, and print it using an app where i can easily customize the printed image size (eg. photoshop).
dandavis
<3d-models><g-code><2d><waste><sustainability>
Is it possible to convert the first layer of the G-code to a 2D print so I can use a 2D printer for a quick size reference?
Bob Ortiz
# Is it possible to convert the first layer of the G-code to a 2D print so I can use a 2D printer for a quick size reference?

(Asked by: username_0 on 2024-12-08)

Is it possible to convert the first layer of the G-code to a 2D print so I can use a 2D printer for a quick size reference?

The G-code (or STL) already contains the exact sizes so I think it shouldn't be hard, yet I could not find any easy solution for this.

Like this, but in realistic size:
[![STL first layer preview](https://i.sstatic.net/jpOZYpFd.png)](https://i.sstatic.net/jpOZYpFd.png)

So since most 2D printers use standardized A4 paper and PDF can also use A4 standardized size. It would be very helpful for many 3D prints to have a tool that can quickly take a G-code and generate a PDF of the first layer so that I can use a 2D printer for a quick print size preview when printed in actual size.

This is helpful for example when comparing it to a physical object, and saves wasted filament and time by waiting for the first layer or the whole print to finish and to find out the size wasn't (exactly) right.

**Tags:** 3d-models, g-code, 2d, waste, sustainability
> **Comments:**
> **username_0**: Ok, I just wrote my own program to achieve this. I might share it as I didn't find any other solutions for this simple task. I'm still interested in other possible solutions.  
> **username_1**: That sounds like an answer! Maybe share the code through GitHub in the answer, or provide some essential hints using techniques and (python) libraries?  
> **username_0**: I have a working CLI PoC and working GUI PoC. I'm less experienced in making GUI but that was another project of me, so I'll probably soon publish both cross-platform tools as CLI and GUI for MacOS, Linux, Windows. If I find time to finish this.  
> **username_2**: i just take a screenshot of the slicer interface looking directly down, and print it using an app where i can easily customize the printed image size (eg. photoshop).  

---

## 1 answers

### Answer by username_3 on 2024-12-08. Score: 1

This suggestion may be more convoluted than your solution, but one can use OpenSCAD to import an STL, use projection() to create a slice of the first layer of the desired thickness, then export it as an SVG.

Additionally, Prusa Slicer (among others) when configured for a resin printer will generate a series of .PNG files representing the layers to be sent to the printer to expose the resin. The resulting file will have a proprietary extension, but when changed to .ZIP, can have the individual layers extracted and the images processed in the desired manner. Still convoluted, less programming involved.


---

