Hacker News new | ask | show | jobs
by WillAdams 68 days ago
More than anything, what I _really_ want is an interactive tool which allows me to work in both 2 and 3 dimensions, tagging points/coordinates with names and then referring to them by name while applying distances/lengths and modifications such as arcs and curves.

I've been using Open(Python)SCAD: https://github.com/WillAdams/gcodepreview but have wished for an interactive tool which would allow programmatic usage as well (apparently OnShape does this by having FeatureScript as the basis and the UI simply edits the script?).

1 comments

This is really good feedback.

The data model supports solving dependencies like this on the data level.

TBH I don't know at the moment how to make something like this accessible but will definitely keep it in mind.

One thought --- could you export the file as a structured XML description?

BlockSCAD does this, and I've been thinking about parsing the XML and then using that 3D structure in my own project.

Theoretically, yes, but in practice a structured XML description of a parametric model is not useful in the general case without standardized format.

STEP XML would be probably the closest here.

To be realistic, I might wrap a CLI to AdaShape first, then the user could query the model and have their LLM backport the model tree to something like CadQuery :D

I am fine with a representational XML which depicts the contents of the tree with the data for each node --- my idea is I would parse the XML and re-create the structure inside my program (which is pretty much what I had in mind for supporting BlockSCAD).
Ah, ok, so do I understand correctly you would sort of like a visual preprocessor for programmatic model data?

And specifically ”whatever xml”, not, say STEP, or , openscad code, python code (via using cadquery) or anything like that?

Do you know your final output format?

I would like a way to take a 3D model which has been made in an interactive tool such as your tool or BlockSCAD, then export the descriptive representation (so the 2D and 3D geometry and parameters and instructions for interaction) as an XML file (BlockSCAD does this as its "native" format, allowing one to save a design locally and reload it.

Then, I would import that into my project, parse the geometry and instructions for processing it so as to create a 3D model, then I would work through the toolpaths necessary to cut the part thus described using G-code. Or, at least, that's what I would like to try to do. I'll have to give it a whirl w/ BlockSCAD if nothing else.

If it helps I've been doing a lot of projects with TSX (via OCX) as a file format.

It works nicely for these things because it already supports typed parameters and can be treated as a a raw AST without JS engine.

Its also easy to manipulate with the same library.

Yeah, a typed tree structure is definitely what we want here.

I guess you mean https://github.com/oxc-project ?

Are there benefits compared to using, say, protobuf?