7 ms·
I wonder how many OpenSCAD wrappers now exist? I know of scad-clj [0], openpyscad [1], and solidpython [2]. I particularly like scad-clj, because of `lein auto
by guitarbill 5y ago
I wonder how many OpenSCAD wrappers now exist? I know of scad-clj [0], openpyscad [1], and solidpython [2].
I particularly like scad-clj, because of `lein auto generate`. It watches source files, and regenerates the OpenSCAD files automatically, which OpenSCAD then also picks up. Although I'm not well versed in Clojure, and find debugging Clojure tricky, the workflow is just so good.
[0] https://github.com/farrellm/scad-clj https://github.com/farrellm/scad-clj
[1] https://github.com/taxpon/openpyscad https://github.com/taxpon/openpyscad
[2] https://github.com/SolidCode/SolidPython https://github.com/SolidCode/SolidPython
- bb88 5y ago> It watches source files, and regenerates the OpenSCAD files automatically inotify() is awesome. Here's a library in python that does it. https://michaelcho.me/article/using-pythons-watchdog-to-monitor-changes-to-a-directory https://michaelcho.me/article/using-pythons-watchdog-to-moni... There's also inotifywatch on linux and fswatch on mac which makes it stupidly simple to do the same thing in a shell script. I'm sure there's alternatives for BSD Unix and Windows, but I care the least about those OS's. https://github.com/emcrisostomo/fswatch https://github.com/emcrisostomo/fswatch https://linux.die.net/man/1/inotifywatch https://linux.die.net/man/1/inotifywatch
- sprior 5y agoI always thought it would be interesting to use the solution seeking of Prolog to design a physical object, but haven't figured out a usecase. Funny that in my house it would be possible to trigger the design of an object by a MQTT message of an event, slice that object, then turn on my 3D printer and print it with no manual intervention.
- mrfusion 5y agoThe prolog thing sounds brilliant but I can’t quite see how it would work. Any insight?
- timonoko 5y agoFor example: You could enter some fragile object and then let the Prolog search for best shape of box for it. Only problem is that all (most?) Prologs suck, the realm of natural numbers is not in the search space. In this case there is also good cause to limit this realm by available printing area and accuracy.
- sprior 5y agoYeah the Prolog part would probably have to just do a yes/no analysis of whether the proposed solution is even a candidate, but then maybe something else would score the quality of the remaining candidates.
- sprior 5y agoAnother possibility might be using Prolog's list/object composing ability. As a fun example let's imagine that you have a Flintstone's AirBNB. You write Prolog code to capture some pieces like a weather forecast icon and a headline or two, then compose that into a design that looks like this info on a stone tablet and send it to the printer loaded with marble colored filament, then have it on the table with breakfast.
- smcameron 5y agoI don't recommend anyone try to use it, but there's also OpenCSCAD[1], which allows metaprogramming openscad from C. I wrote it ages ago, back when OpenSCAD didn't support recursion[2]. Back in the early days of openscad, (as I recall it) there were quite a few annoying things missing which I suspect caused some of the proliferation of metaprogramming attempts. [1] http://smcameron.github.io/opencscad/ http://smcameron.github.io/opencscad/ [2] At least I think OpenSCAD didn't support recursion back then, though now, this seems so unlikely that I find myself doubting it. But I also feel like I must have tried it, found it not working, and went on to write this toy OpenCSCAD thing as a result. It was a long time ago, and I don't really remember. Edit: A previous discussion here about Amazon banning the word "union" from chat rooms (among other words) recently reminded me of this too, as "union" in OpenSCAD is obviously a thing, but it's also a reserved word in C. In OpenCSCAD, a union is therefore called an "onion". This could also work at Amazon. Until they banned onions.
- cultofmetatron 5y agoyou know the language is limited/poorly thought out when dozens of people re putting time into making tools that do nothing but wrap it in order to make it usable.
- postalrat 5y agoI think what they are doing is making the utility of openscad available without having to learn yet another language. So it doesn't really matter how good the language is.
- vorpalhex 5y agoOpenScad is fine but it's scad and not a general programming language.
- everforward 5y agoFrom the limited work I've done in it, it comes off as poor for it's specific use as well. As an example, one thing that frustrates me is not having access to the geometry of an object. I fairly frequently want to do something like "add this piece so that it's 20% down from the upper edge of this other piece". I've yet to find any way to do that cleanly, despite it seeming like a common use case. The absolute addressing system can be painful, since updating a piece can require updating locations in lots of place. Likewise, but worse, it's extremely painful to rotate and object, because your algorithms for finding the location break. I've largely given up and use Fusion. I like being able to version control my models, but SCAD feels like I'm working blind with a hand tied behind my back, rather than making things feel expressive like they usually do.
- vorpalhex 5y agoMake sure you are using BOSL - http://openscad.org/libraries.html http://openscad.org/libraries.html Also all of your base points should be variables and your placements operations on those variables. Anything that is dynamically sized should also be built from variables. I usually use a single function per distinct piece of geometry, then use composition. The geometry is the effect, not the cause.