dactyl-keyboard icon indicating copy to clipboard operation
dactyl-keyboard copied to clipboard

export complicated mid-build objects to STL

Open jaredjennings opened this issue 5 years ago • 1 comments

I'm watching four openscad --renders trundling away and pondering about how all four are thinking about what the bottom of my keyboard is shaped like. It's a big waste of effort, and it means a lot of time is wasted too. I'm just playing with the parameters that describe the edges of the pieces of the bottom, trying to arrive at values that reliably result in pieces that fit together with a minimum of postprocessing. Every time I do, I need to wait like ten minutes for the scads to build into stls. If only OpenSCAD had some kind of restart file like CFD solvers do, and I could tell it in some way that this piece of the bottom and this other piece of the bottom differ only in which piece got cut out, not what the bottom is shaped like.

Well - such a file exists: it is an STL file. If I rendered the whole bottom in one STL file, the pieces of the bottom would be defined like

    intersection() {
        import("bottom.stl");
        hex_prism_of_grid(...);
    }

Easy peasy, then I just have to write a few more dependencies in the build system (dm-r-bot*.scad now depend on dm-r-botwh.stl, or some such). And it ought to be a lot faster too, what with only figuring out what the bottom is shaped like once. The same could be applied to the sides.

I've exerted so much effort to push parts of the definitions of these complicated objects down into SCAD code, but never thought of pushing it all the way down to an STL. How silly of me!

jaredjennings avatar Mar 25 '19 03:03 jaredjennings