Hacker News new | ask | show | jobs
by lloydatkinson 214 days ago
I wish there was a write up of how some of the code works. There's a lot of Python in the repo. Looks fascinating, seems to use Python to generate OpenSCAD code, I think.
1 comments

It's specifically using SolidPython2 to generate the models. I originally wanted to do a quick code cleanup and have the specific math be much clearer but by the time it was working that was an absolutely massive undertaking. If I touch the code again I'm probably going to refactor the entire codebase and use a different 3D engine.
Have you considered Build123D for CAD code?

I am also procedurally generating marble tracks and 3D printing them for about a year now and found that library very useful.

The community is very active and its very similar to features we know from Fusion360/SolidWorks but all in code.

What did you not like about the SolidPython2 / OpenSCAD approach? What would you want from a different "3D engine" for this?
Mostly speed, I'm mostly doing large boolean unions of primitives or chain hulls and OpenSCAD chugs pretty good at large numbers of operations. Don't get me wrong, they're great tools for what they're good at. I need to do more research before I start a port, SDFs seem like the best option but I'm not 100% confident. I am considering using your SDF library though (github.com/fogleman/sdf) but need do do some experimenting/benchmarking first.
Not sure if this matters for you or not, but my understanding (with some experiments) is that the "slicers" implicitly do a union. As in: you could have an STL with a bunch of overlapping blobs and the 3d printer slicing code just checks isInside -- which is effectively a union.

At least that's what I found when I was generating STLs in code.