WillAdams 7 days ago

I've actually been using OpenPythonSCAD for this sort of thing:

https://pythonscad.org/

paired with:

https://www.blockscad3d.com/editor/

it lets me rough out an algorithm (see the section on arcs in: https://github.com/WillAdams/gcodepreview/blob/main/gcodepre... ) interactively, seeing the result on-screen --- then once I have the rough concept, I can re-write it in Python, retaining this interactivity.

EDIT: next step is to work up a batch file which has me running OpenSCAD on a series of files to output .png and .svg files to read them back in and place the output at the appropriate places in the document.

2
jerf 7 days ago

This seems a very surprising combination of technologies to turn into a visual prototyping language. Do you have a blog post or something on this topic that might expand on this workflow?

WillAdams 7 days ago

I suppose I should blog about this at: https://designinto3d.com/

but I've written a fair number of posts on it at:

https://forum.makerforums.info/search?q=gcodepreview

and it has come up a few times at:

https://community.carbide3d.com/search?q=gcodepreview

and on the OpenSCAD mailing list --- that latter might need to be extended back in time to encompass: https://github.com/openscad/openscad/issues/2017

EDIT: also see my post history here, and this post might be what you are asking after?

https://news.ycombinator.com/item?id=44108440

Reasons for the technologies:

- OpenSCAD affords 3D modeling

- Python was added to it which finally got me the ability to write out files _and_ mutable variables (programming this w/o them was an interesting intellectual challenge and resulted in a quite stilted programming style)

- G-code is the _lingua franca_ of CNCs, so modeling that seemed a natural fit

- DXFs are imported by many CAD and CAM applications, so supporting them was a no-brainer

- LuaLaTeX is the current (La)TeX implementation, and I've been using/learning TeX since first checking out a copy of _TeX and METAFONT_ from the local college library

Maybe the most important context is what my first project on my Shapeoko 3 entailed: https://community.carbide3d.com/t/locking-register-calipers-... --- drawing in Macromedia Freehand, making a one character font in Fontforge, doing V-carving using F-Engrave, then the balance of the CAM using MakerCAM (a Flash file formerly known as PartKam).

The over-arching name of the project is "Design Into 3D", so also see: https://willadams.gitbook.io/design-into-3d/programming and you may find the (very early) Tugboat article: https://tug.org/TUGboat/tb40-2/tb125adams-3d.pdf of interest.

Glad to answer any other questions you might have! I'm hoping to have a project ready for a "Show HN" before 4 July.

7thaccount 7 days ago

Nice setup to solve a problem. Seems like something I would do :)

WillAdams 7 days ago

Thanks!

I kind of wish that I could find some tool like to Jupyter Notebook which would work for my needs, but I always run into some odd limitation.