Using CImg to creat 3D object and export to .stl file

I have a 15 year old boy that got a job last summer so that he could buy himself a 3d-printer. He just recently got his second, with conveyor belt.

My 12 boy has recently taken an interest in programming, so I've started him out with some C++ books.

The idea came to me, with the all the functionality that the CImg library has, I could work with my 12 year old to create a 3d design tool for my 15 year old. I am familiar with CImg and have used in a couple of programs already. I'm confident that I could pull this off, however what I'm not sure about is how I would import from or export to an .stl file. If anyone has some experience here, I'd appreciate the help.
Funny, there was just another thread talking about stl files as well.
https://cplusplus.com/forum/general/277800/

I assume you have programming experience. When you say importing/exporting stl files, you're talking about doing this in your own custom program, and not in an existing CAD program, right?

The ASCII (plaintext) version of STL files will produce larger file sizes, but may be easier for a kid to understand.
https://people.sc.fsu.edu/~jburkardt/data/stla/stla.html

You can read/write the data in these types of files using i/o fstreams, respectively.
Last edited on
Topic archived. No new replies allowed.