hacked together a #clojure tool to make little art 'cards'.
With improvements, the idea is to be able to use this on my phone and save the SVGs. Hoping to use it when I get bored in lines or whatever, hopefully leading to some more artistic output
Here's an example of using #clojure to define a data model for CAD geometry and operations. From that model, I can create a STEP file via #FreeCAD and also view/export a meshed solid via #OpenSCAD
Using this approach, I should be able to use my #badspreadsheet to build parametric models and view them rapidly with a web-based 'geometry backend', and then use FreeCAD (or other kernels) to output 'industry ready' formats like STEP, IGES, whatever.
I'm increasingly interested in making 'bespoke CAD tools for makers'. I love #clojure for this sort of thing, but wonder if there are other companies, tools, people that are already doing this exact thing that I can learn from or connect with?
I gave a short talk at #Clojure conj this year showing how I use #badspreadsheet.
It's a tool built with a combo of javascript, Clojure, and #HTMX , and just enough naivety to think I can actually build stuff :)
Give it a watch here:
youtu.be/OOtgJm-RL_I?si=BAqR…
Here's a fun #badspreadsheet demo. Use a set of draggable points to sketch shapes over an image. Simple pieces, a way to view SVG, a way to get the position of every point, and a way to layer cells over one another. Add some #clojure and you've got a powerful tool :)
Made this in #clojure quil just for kicks :)
Based on Conway's Game of Life, naturally.
The rules are tweaked slightly (living cells with 0.0 neighbours don't die), and 'dead' cells fade off instead of being set to 0.0 right away.
I think the output is pretty mesmerizing
More #badspreadsheet work. #Clojure, #javascript, mediated by #htmx of course.
Now you can see row/col positions a bit more easily!
Still, UI and usability is tricky.
I'm not sure this is the most readable/usable yet. Curious what others think?
github.com/adam-james-v/bads…
Still working on #badspreadsheetgithub.com/adam-james-v/bads…
Vid of better UI
Key diff is better use of client side changes. Move/translate, then, on the natural action break (stop moving, mouse up, whatever), send data to the backend, render fragments, use #htmx to swap in new html
And, circular references don't break things; iterations will auto-stop after a short time (or if iterations coalesce). You can intentionally set up a circular setup and 'advance' the iterations one at a time if you want.
I also came up with a more robust cell referencing approach. I can reference neigbours, cell IDs, rows/cols, regions, and arbitrary lists of positions.
m.youtube.com/watch?v=r8icH0…
I love @htmx_org, but I think the biggest positive change for me as a programmer has been the grugbrain.dev/ essay. It’s a cornerstone of my “let’s try stuff and see if we can make it work” approach I like to take with projects 😊
Working on a stained glass design and ended up stumbling onto this. Concentric Polygon 'rings' and a delaunay triangulation (red) and the voronoi (black). #clojure
A small example of #badspreadsheet at work.
As I'm working on this I get to discover 'should have' features of the spreadsheet. For example, the Radius/N inputs should be as easy to add/adjust as a 'real' spreadsheet... right now I have to manually create each cell and then 'flip' it to input. Gotta be a faster way!