I’ve had my Glowforge a couple of weeks now. I did some “tutorial” projects that came out well, and experimented with engraving some laser-safe rubber stamp sheets to make custom stamps for my wife… that’s the topic of another post.
I wanted to make some precision templates for one of my favorite table top miniatures game. For a first swing at it, I wanted to make 3 inch diameter circular templates that represent an area of effect.
But I wanted to make it more interesting. So I went looking for an interesting pattern for the interior. I found some code floating around the internet (written in Perl, of all things!) to generate random lattice work (by generating a point field, and then generating a Voronoi diagram from it, and thickening the resulting lines).
I had to mod up the code a bit to generate a circular bounding for the Voronoi diagram, and that took a while since I hadn’t written Perl for a decade. I took the resulting shape into inkscape, added an outside circle, score line, and some text, and cut the result on PG Maple plywood. It came out great!
For a second swing, I wrote some new code that generates hexes and put them through the same bounding code, and built another template with a hex infill instead of the random lattice infill.
I’m happy with how these came out. I didn’t expect to be writing Perl to generate shapes for my Glowforge; who knew?
You do know of course that Inkscape generates its own Voronoi patterns in the built in pattern maker. I am not sure as yet what Glowforge will do with a pattern but Inkscape has quite a powerful capability that a Voronoi pattern is what happens if you do nothing else with it.
@rbtdanforth I didn’t mess with Inkscape’s built-in pattern maker much, but I assumed it could make a Voronoi pattern, and probably a hex pattern. Call it code for code’s sake .
The code I started with (which generated the Voronoi pattern), and the code I wrote from scratch (which generated the hex pattern) both have the property that the cells are generated as complete closed polygons, which is useful for generating the offset that generates the linewidth, and also necessary for clipping the boundary to another shape. I don’t know if Inkscape can do this with the Voronoi Pattern, but I couldn’t figure out how to get that extension to generate separate cells. I’ll probably mess around with it more in Inkscape, but it was for sure a fun exercise, especially to figure out the hex math. I didn’t figure out the Voronoi math; the code I started with was just using a Perl module to generate the cells from a randomized set of points as input.
I’ve tinkered with Inkscape for quite a long time. I have another laser cutter, one of the cheap blue boxes imported from China, and I replaced the controller board with a SmoothieBoard on it. After that mod, Inkscape with GCodeTools was the only tool chain I had for it until I started using and then working on LaserWeb3. Having said that, there is still a lot for me to learn in Inkscape!
I noticed that the patterns generated in Inkscape were image only and would probably be received by the GFUI as a raster, but as a fill, it, of course, reads like any other fill matching the shape of the object and thus clipped I tried to make the pattern back to objects with no success but exported as a png and brought back Inkscape should have no trouble making an outline of that and those would be closed polygons for cutting.
I totally get the exercise part, even more so, as a jump off to really exotic that nothing else will do. I played in LISP a lot in Autocad and often did in seconds what would take hours the ordinary way or be impossible at all.
Ok, so I have no idea what Pearl is, other than my Mom’s best friend. And, I’ve heard of GitHub and ASCII, but likely a place on my computer that I should steer clear of. But… this thread reminded me of something I noticed yesterday on this https://www.evilmadscientist.com/2012/stipplegen2/
Stipplegen converts photos to dots, I know, not the same thing. But… it also does TSP. It referred to that as a Traveling Salesman Path. Not sure if that’s the real name, but it’s the continuous path from dot to dot and can be exported as an SVG. It looks a little like the circle on the left but not intersecting. And, you don’t need to know my Mom’s friend Pearl.
The Traveling Salesman Problem is a classic computer science assignment for beginning artificial intelligence. Basically, find the shortest route between a set of points without passing through any point twice.
These are for Warmachine and Hordes (which we elide to “Warmahordes”). Many of my “minis buddies” play a lot of Guildball; I’ve only played a demo game.
I don’t know if you are familiar with Warmachine, but there are a bunch of common templates: 3, 4, and 5 inch area of effect, measuring keys for 1/2, 1, and 2 inches, and 30/40/50mm base proxies and precision movement templates are all super-common. I’ve been 3D printing a bunch of these for my gaming group; I’m (hopefully) switching to some new designs in hardwood. The funny part is I hardly play right now; I traded most of my minis time for playing hockey. Haven’t figured out what I’m going to laser for hockey yet