HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
WillAdams
gcodepreview
TeX2022–2026
WillAdams / gcodepreview

gcodepreview

OpenPythonSCAD library for moving a tool in lines and arcs so as to model how a part would be cut using G-code or described as a DXF.

2Distinct people
96Mentions
0Explicit recommenders
86GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

OpenPythonSCAD library for moving a tool in lines and arcs so as to model how a part would be cut using G-code or described as a DXF.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 4:00:59 PM UTC.

Is there a 'right amount' of AI? direct repository linkDebated

Participants debate whether AI-generated code constitutes meaningful creativity or merely derivative plagiarism, with some arguing it crowds out human artistry while others view it as a natural evolution of tool-assisted development. The discussion also highlights a sharp divide between those who see AI ethics as comparable to other industrial harms and those who emphasize its unique capacity to disrupt creative labor.

36 readable replies · Supporting reply 1 · Supporting reply 2 · Supporting reply 3 · Supporting reply 4

Mentions over time

HN mentions by year96 dated mentions

Observed mentions: 2022-08-04 14:51:26 UTC to 2026-10-26 10:41:34 UTC.

0102030402022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 40 mentions; 0 submissions, 40 comments20242025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 28 mentions; 0 submissions, 28 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 22 mentions; 0 submissions, 22 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC303
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC303
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC40040
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC28028
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC22022

What Hacker News says

40 sources
I need to brush up on math for my current project: https://github.com/WillAdams/gcodepreview and found the book series: - _Make:Geometry_ https://www.goodreads.com/book/show/58059196-make - _Make:Trigonometry_ https://www.goodreads.com/book/show/123127774-make - _Make:Calculus_ https://www.goodreads.com/book/show/61739368-make a helpful review and extension of my slipshod math education (remember how Feynman once critiqued some math books, esp. calling out one for using made-up associations of colors and star temperatures? guess which one the school system I attended was using...). Next step is I need to work with conic sections and after that Bézier curves/surfaces --- could you suggest texts on those subjects?
In “A Course of Pure Mathematics” – G. H. Hardy (1921) [pdf]
The great thing about OpenSCAD is that it makes representing things which can be described mathematically easy. The awful limitation of OpenSCAD is that one's ability to model in it is limited by one's knowledge of math and trigonometry. The funny thing is, when it comes down to actual manufacture, ultimately, one is making G-code, which is limited to lines and arcs in most implementations --- so I'm approaching it thus by way of Python in OpenSCAD: https://github.com/WillAdams/gcodepreview
In CADing and 3D printing like a software engineer
Every time this comes up, I am mystified by why very few programmers I have met are aware of the concept of Literate Programming: http://literateprogramming.com/ as developed by Dr. Donald Knuth to create the programs TeX and METAFONT. The big thing here is that writers need different tools than programmers --- but one thing which wasn't acknowledged for TeX was that the woven .web files documented a low level of the programs in question, one which was so low that the woven documentation wasn't really useful to most folks --- arguably, what should have happened is plain.tex and plain.mf should have been plaintex.web and plainmf.web and included the text of _The TeX Book_ and _The METAFONT Book_ respectively (perhaps one day Dr. Knuth will allow that, or take the time to do this). The mention in this podcast of TypeSpec is interesting, but
Read the rest
the proposed application seems a very narrow one. A better option maybe would be a collaborative approach where it is acknowledged that code which cannot be easily explained/documented maybe needs to be re-written: https://www.folklore.org/Inside_Macintosh.html Just watched MIT's OCW for Introductory Python, and one of the suggestions there for debugging was describing the code to a child (or kitten, or stuffed animal) --- of course the best code is that which never needs to be written (using a library), but arguably second-best is the code which is correct and doesn't need to be debugged, so third-best would be code which is documented well enough that it may be debugged/re-written easily. When I looked for Literate Programming tools for my current project, I didn't find anything which seemed a good fit, so resorted to asking on tex.stackexchange.com https://tex.stackexchange.com/questions/722886/how-to-write-... which allowed me to create: https://github.com/WillAdams/gcodepreview/blob/main/literati... which I've been using in: https://github.com/WillAdams/gcodepreview/blob/main/gcodepre... (which is currently being re-written in Python) Quite simplistic, but working with the linear .tex file is way better than my previous approach of tiling 3 different files open in 3 different OpenPythonSCAD instances and using a fourth window to test the code. I'd be very interested in suggestions of other tools and resources to consider. I've been collecting LP texts at: https://www.goodreads.com/review/list/21394355-william-adams... (in particular, while not an LP text, Ousterhout's _A Philosophy of Software Design_ was quite striking and reading through it and then reviewing my code to apply its principles one chapter at a time helped immeasurably) The idea that they have here of using AI to make a first automated pass at documentation and then editing it by hand seems like a lot of extra work, and likely to create the possibility of introducing some subtle misunderstanding in the text which is then difficult to ferret out.
In Your docs are your infrastructure
For a long while, I was trying to track CAD applications for a wiki for a then opensource CNC: https://web.archive.org/web/20211126210706/https://wiki.shap... (trying to get that back into shape at: https://old.reddit.com/r/shapeoko/wiki/cad ob. discl., I work for Carbide 3D) and FreeCAD seemed simultaneously the most ambitious, and the most promising --- hopefully v1.0 will pay off on that, and result in a tool which can be used widely --- but it will eventually need some sort of commercial support. Ondsel seemed a good fit for that, and it's unfortunate that they didn't make it. Notable other options include: - Solvespace --- a venerable and simple tool, it is barebones to the extent that many folks won't be able to accept it - Dune 3D --- this is an incredibly elegant and usable tool, which I hope FreeCAD will look to in terms of UI, p
Read the rest
reviously discussed here previously: https://news.ycombinator.com/item?id=37979758 and https://news.ycombinator.com/item?id=40228068 - BRL-CAD --- _the_ venerable choice, but the interface is so old school and programming-like, most folks won't even consider it - OpenSCAD --- 3D modeling for programmers --- the great thing about it is, anything which one can describe mathematically can be modeled --- the awful thing about it is, what one can model is limited by one's mathematical knowledge. A further concern is that DXFs from it are just polylines, no arcs --- I've been working to address that using OpenPythonSCAD at: https://github.com/WillAdams/gcodepreview LibreCAD is workable for 2D, though I only use it for file conversion. The other notable options are OnShape (free for public designs), Alibre (quite affordable), Solidworks for Makers (for values which include non-commercial usage watermarking).
In We are shutting down Ondsel
This is a problem which Literate Programming can solve: http://literateprogramming.com/ getting folks to actually use that is a totally different problem. I've been using a custom .sty file to do this in a native fashion: https://github.com/WillAdams/gcodepreview/blob/main/gcodepre... so that the source isn't a sea of grey comments: https://github.com/WillAdams/gcodepreview/blob/main/gcodepre... but it's early days yet, and the project is niche and my coding style quite prosaic.
In Diagram as Code
Parallel track: - MacBASIC: Mac GUI programming w/o Pascal or C https://www.folklore.org/MacBasic.html (which is something I'll never forgive Bill Gates for) - HyperCARD (also on that list, and agree with almost all points made): It was magic to get into Developer mode and to create stacks --- it's unfortunate that Asymetrix Toolbook didn't get further, nor that the Heizer stack for converting HyperCard stacks to Toolbook wasn't more widely available, and a shame that Runtime Revolution which became Livecode reneged on their opensource effort --- hopefully someone will make good on that: https://openxtalk.org/ Unfortunately, I never got anywhere w/ Interfacebuilder.app or Objective-C.... - Lua: real variables in TeX! (and latex), and one gets METAPOST as well --- even recursion becomes simple: https://tex.stackexchange.com/questions/72389
Read the rest
7/breaking-out-... - OpenSCAD: Make 3D things w/o having to use a full-fledged CAD program - BlockSCAD: Make 3D things w/o typing: https://www.blockscad3d.com/editor/ (though to be fair, https://github.com/derkork/openscad-graph-editor also allows that) - PythonSCAD: variables and file I/O for OpenSCAD (though to be fair, RapCAD had the latter, it was just hard to use it w/o traditional variables) https://pythonscad.org/ Still working through a re-write of my OpenSCAD library in Python: https://github.com/WillAdams/gcodepreview and am hopeful that a tool like to https://nodezator.com/ will make that graphically accessible (w/o going into OpenSCAD mode to use OSGE).
In Programming languages that blew my mind (2023)
I've found that Literate Programming suits how I think/approach projects, and it has worked for some quite large projects in the past for me. I've been maintaining a list of programs published as books and resources for Literate Programming at: https://www.goodreads.com/review/list/21394355-william-adams... esp. see: https://www.pbrt.org/ and https://mruckert.userweb.mwn.de/understanding_mp3/index.html My current project is: https://github.com/WillAdams/gcodepreview which uses a LaTeX package for this which I put together with a bit of help from tex.stackexchange --- the big advantage to it is that it allows editing the documentation/code with "normal" syntax highlighting, the disadvantage is that the .sty file has to be edited/updated to match the files which are being output and I still don't have a good setup for the readme.md I find h
Read the rest
aving the typeset PDF w/ its hyperlinked ToC and marginalia and indices helps a lot in having a "nice" version which I can look through to remind myself of what was intended at a given point, and most importantly, to find _where_ that was written down. Working on a re-write now --- we'll see if this holds up for that.
In What docs-as-code means

Showing the 15 most recent of 40 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.