Live data from Hacker News

3D-printed book turns its own G-code into raised lettering

designboom.com

21–30 of 34 posts

Re: 3D-printed book turns its own G-code into raised lettering

#21

Cool idea for printing braille. I bet I could vibe code a program to convert .epub files to braille then to printable copies.

Don't print the braille document directly. Instead, I suggest printing a braille embosser. Think Gutenberg press. Then use that to press braille lettering onto a sheet of paper.

Although if you just want one sheet, I guess you could use the print directly, but maybe don't use PLA since it'd be kinda sharp and unpleasant to run your finger over.

Re: 3D-printed book turns its own G-code into raised lettering

#22
post #2

> Manual contains only 2.5 percent of its own G-code in its first version. That low figure is part of the point. Current FFF 3D printing resolution and text scale place limits on how much code can fit onto the object while also describing the volume of the object itself. A fully self-contained version would enter an endless loop, since every printed mark would add more data to be described. The fact that quines exist…

"This prompt, when fed to a sufficiently capable LLM, will generate the G-code to produce a 3D printed model of a book containing this quote, verbatim, in raised letters."

"Some percentage of the time."

Re: 3D-printed book turns its own G-code into raised lettering

#23
post #18

Earlier quoted context omitted.

Many G-code dialects contain subprogram calls, loops, and conditionals that seem like they'd permit a physical quine. The standard RepRap firmware breaks the rules by taking input: https://reprap.org/wiki/G-code#M98:_Call_Macro.2FSubprogram but Fanuc and other dialects allow M97 to call a subroutine chained to the end of a program.

G-code is like assembly language for CNC. It’s human readable, you can write it by hand if necessary, most machines will compile it internally to machine instructions, and there are a million different flavors with incompatible macros, etc. The flavor I’m most familiar with is Klipper’s interpreter, which will let you write macros, but that would technically be cheating since you could just stuff an entire program in…

For anyone thinking of this, I promise to be suitably impressed (defined as "upvoting it when I see it on Hacker News") if anyone does manage to get a true G-code quine in this sense. Go for it.

Re: 3D-printed book turns its own G-code into raised lettering

#24
post #2

> Manual contains only 2.5 percent of its own G-code in its first version. That low figure is part of the point. Current FFF 3D printing resolution and text scale place limits on how much code can fit onto the object while also describing the volume of the object itself. A fully self-contained version would enter an endless loop, since every printed mark would add more data to be described. The fact that quines exist…

It's fascinating how revered people are who talk in metaphor and implication like this about relatively simple things, when far more complicated things are happening all the time inside their devices.

Ironically, I don't know if you are referring to the article, the comment you are responding to, or the world in general.

Re: 3D-printed book turns its own G-code into raised lettering

#28
The origins of Automatically Programmed Tools (APT the precursor of g-code) is a fascinating read [1] about the early intentions of -- its a poem forseeing LLM & CAD:

(From THE NEW YORKER) Cambridge, Mass., Feb. Z5-The Air Force announced today that it has a machine that can receive instructions in English, figure out how to make whatever is wanted, and teach other machines how to make it. An Air Force general said it will enable the United States to "build a war machine that nobody would want to tackle. " Today it made an ashtray [2]. -- San Francisco Chronicle, March 28, 1959

That ashtray was teh 1st CNC'd object. Noble [3] speaks about the political angle that was an underpinning motivation

[1] http://portal.acm.org/citation.cfm?doid=960118.808374

[2] https://mitmuseum.mit.edu/collections/object/2007.037.001

[3] forces of production - a social history of industrial automation (Noble, mit press)

Re: 3D-printed book turns its own G-code into raised lettering

#29

Is anyone else confused by thier cookie consent banner? The switches start out gray and become black when toggled. which position means consent? It feels intentionally misleading.

Just block cookies, and it doesn't matter whether you consent or not.

Of course, paradoxically, these consent banners need to put a cookie to remember that you didn't consent to cookies, so you might need a plugin like uBlock to block the banner as well.

Re: 3D-printed book turns its own G-code into raised lettering

#30
post #8

I'm sure the idea here was a physical quine, although since it only contains 2.5% of its own G-code it's not really a quine, any more than a "Hello World" program is a quine since the string "Hello World" is in the program text. It would be trivial to generate something like this depending on which part of the G-code you pick.

Many G-code dialects contain subprogram calls, loops, and conditionals that seem like they'd permit a physical quine. The standard RepRap firmware breaks the rules by taking input: https://reprap.org/wiki/G-code#M98:_Call_Macro.2FSubprogram but Fanuc and other dialects allow M97 to call a subroutine chained to the end of a program.

I work a lot with Aerotech's Aerobasic which is G code mixed with a basic like language. You can generate G code on the fly and execute it, manipulate files, call other programs, text boxes, menu boxes, etc.

I wrote a simple teach mode program that puts the machine into jog mode where you move the axes around and create points and associate a command for each, e.g. G0 rapid, G1 coordinated, G2 clockwise arc, G3 counterclockwise arc. Each move is then written to a file that is saved and loaded afterward for testing. Nice system but very costly.

Post reply on HN