Kyle Davis on Nostr: TIL: You can pipe code into #OpenSCAD by supplying a `-` as the source file. Pretty ...
TIL: You can pipe code into #OpenSCAD by supplying a `-` as the source file. Pretty standard unix thing, but it's not well documented for OpenSCAD. stdout is in the wiki and help text, but stdin doesn't seem to be. See the PR from a few years ago linked below.
With this knowledge, I'm building something either great or unholy: not sure.
`curl
http://localhost:8000/assemblies/thing_1.scad | openscad -o thing_1.stl -`
https://github.com/openscad/openscad/pull/3407Published at
2023-12-20 22:24:07Event JSON
{
"id": "748cc21d9e5fcad6b9fdafd8b6f3b3e978bf937b1d03cf79c14d024a03ba9a3a",
"pubkey": "8b2d2e2a3cca54345b1d2ca993815bc43137f91b7cc72b2dbdca402d44bfa9f9",
"created_at": 1703111047,
"kind": 1,
"tags": [
[
"t",
"openscad"
],
[
"proxy",
"https://fosstodon.org/users/linux_mclinuxface/statuses/111615085621671272",
"activitypub"
]
],
"content": "TIL: You can pipe code into #OpenSCAD by supplying a `-` as the source file. Pretty standard unix thing, but it's not well documented for OpenSCAD. stdout is in the wiki and help text, but stdin doesn't seem to be. See the PR from a few years ago linked below.\n\nWith this knowledge, I'm building something either great or unholy: not sure.\n\n`curl http://localhost:8000/assemblies/thing_1.scad | openscad -o thing_1.stl -`\n\nhttps://github.com/openscad/openscad/pull/3407",
"sig": "3a7597b55712392e01e61bffefe62f06bf7d5cb063b49f4693ce3b2a22f48c8dca48e5c047df81e329ef548da1f60d96323c2517650ece465ab9755fceafe80b"
}