Origins and future directions for Meerk40t

After I came up with the whole PPI feature, I emailed Scorch about it. It’s basically just a carry forward value. total += PPI, if total >= 1000, { laser on, total -= 1000}, else laser off. He’s more than welcome to it. In fact, he’s welcome to any code in MeerK40t.

Before writing MeerK40t I wrote K40Nano which sought to streamline the important code from Whisperer and give wouldbe programmers a more functional API into the whisperer code. I tried to get some support for such things LBS (lightburn) expressed interest but gave a pretty good set of objections. The license made including it in a commercial product impossible, (since K40Nano was derived from Whisperer it had to be put under GPL3 not even GPL-lite where you could use it as an API). Didn’t have power modulation. And the replacing driver bit made the native software fail.

I scrapped K40Nano and wrote a from scratch driver for Java to include in Visicut. Got a bit disillusioned with the lacking fine grain controls there. So I started up MeerK40t hoping to write something that people could hack on the code and work with it. It seems like there’s a lot of talent out there and not equal parts access. I figured out how to do PPI power modulation and reverse engineered the native windows CH341 driver.

I coded it properly threaded so you can use the interface while it’s running or run multiple devices at the same time. And view realtime information about it the current workings. I gave it a proper transformation matrices so you could zoom and pan and those nice guides etc. I coded it so that the different parts don’t depend on each other implicitly. You can switch elements out and it won’t care.

I made sure to avoid pitfalls, everything is processed for multilingual support. I don’t ever use colors to be the only way to see things are different. Grey and blue are the same color to some colorblind people and whisperer has that the only way to tell rasters from engraves.

I included a few killer features like Zingl-Bresenham curve draw algorithms. When it draws a bezier curve, that’s drawn from the values of the bezier curve and is pixel perfect. It’s not subdivided into lines ever, it’s a native plotting of the shape at the most basic level.

I spent a lot of extra time making sure to reverse engineer Lhymicro-GL as well as I could. The stuttering during rastering in Whisperer is largely absent in MeerK40t as the code used is much more compact. I also made sure to include things like vertical rastering. I spent a long time thinking about the core workflow methodology which made me realize one of the core issues in laser cutting software. Namely the over-focus on the elements rather than what we’re doing with the elements.

I’m currently working on a few more really good features. I’ve added webcam support with fish-eye correction (still needs alignment to the field). And I’m adding a GRBL mode so you can use MeerK40t like it’s a networked GRBL device and it’ll just do the translations of gcode and lhymicro-gl and let you use programs like Lightburn and Visicut and LaserWeb to control MeerK40t. And since everything is threaded it just shows you the position updated and lets you view the stuff being sent to the controller etc. Even if LBS doesn’t get around to adding Lhymicro-gl support, I’ll have GRBL support, which would open up those software platforms anyway.

There’s some backchannel discussions about expanding lhymicro-gl and making some hardware that basically runs on the same principles. You could add PWM control, zbed control, other GPIO pins to a cheap Arduino and with the software streaming the bytecode controller commands (which is what lhymicro-gl is) you could easily raster faster than stepper motors could allow and have all the bells and whistles people seem to want for like 15 bucks, without any limits on software used.

4 Likes

I do work pretty diligently and the software is pretty constantly improving but I am missing some really basic features. I don’t have any tools. Lightburn has some basic tools and they seem to work pretty well. And don’t get me wrong, coding those basic shape and alignment tools would be a day or two max. If you’re doing something really complex you can draw your own rectangle or move some nodes for the shapes around. I also don’t have easy handles for resizing and rotating shapes. My support for text is abysmal. And I’m missing a bunch of clearly better UI and UX corrections beyond that which would make the software much more useful. And I’m not design oriented enough to know what those would be. So you’re more likely to get support for importing lightburn files than the right tools to align your design where you need it, unless somebody raises an reminds me that that’s a thing people would certainly want.

I do a lot of marketing, but it’s generally intended towards getting people who could help with things. And maybe solid enough footing to fit the hopes I have for it. Most of the work I’ve done is trying to get it to have very good bones and a community behind it. So I do things like consider, if somebody had a thermostat digitally available in their machine and wanted to turn the laser off while the water is too hot, how can I make sure that that works well with MeerK40t. Where a person could write up the code for that and have all the different parts of Meerk40t just let that work. Or if somebody has a good idea for how to raster things like a novel idea for how to run the laser how can I make sure that will just work? If there’s a fantastic program somewhere that will do things like pack shapes for efficient material usage, how can I make sure that can be easily supported and utilized without forcing dependencies. Or if somebody wants MeerK40t to run a different type of laser, like a Ruida how can I make sure that that can be done without too much trouble? I’ve spent a lot of effort keeping options open and additions easy and not enough making a way to drag select multiple objects from the scene.

In short, if you have anything you need from Whisperer that would make your life easier, I’d be happy to add it to MeerK40t. If there’s any features from any other software you’d like (assuming no patents) I’d be happy to add those too. Odds are good I’m just kinda oblivious to the need. You can raise an issue and I’ll be happy to write a thousand words on the subject and then 20 lines of code.

3 Likes

Hi Tatarize,

Thanks for the extensive explanation. I’ll try to come up with some sugestions for impovement…

Kind regards,
Jos.

Thanks for the great software ! Forgive me if these feature are already present, just started using the software:

  1. One minor inconvenience is that I am not able to turn off the grid without turning off the white background. Turning off the grid would make it less cluttered. But also turning off the white background makes the contrast with the black raster lines smaller.

  2. Additional, is there a “clear path” option somewhere? It does clean the path when you execute a new program. But in between two programs, the path stays visible (or when you stop prematurely at least).

  3. A nice feature would be to optimize the raster engraving automatically by removing whitespace. Imagine if you have a vertical line on the utmost left and utmost right of your engraving range. There will a big chunk of white space between the two lines. I broke up the image in two different raster operations and run them after each other.

  4. Edit: just though of another improvement: a clear all button which clears all Operations, Elements and Files.

  5. Edit: a standard settings for Engraving, Rastering and cutting when loading a new file.

Thanks and best regards !

2 Likes
  1. You’re right. I’ll fix that. Commit: https://github.com/meerk40t/meerk40t/commit/8238f8cd5ac7633689bd3bc22dca72ce23cf7ec3 is in the 0.6.3 branch now and will be in the update.

  2. There was not. I added one. It’ll clears when you change the selection now, and also has an added control called “Clear Laserpath” so a console command bound to “control Clear Laserpath” would do it, but that shouldn’t be needed if it’s more frequently cleared. Commit: https://github.com/meerk40t/meerk40t/commit/eada116d2f05a653c7c9156dc40d80a6fd601f15 – It’s one of those things I sort of like but can’t really figure out a better thing to do with it.

  1. If you wanted to raster that, you could do so using vertical rastering and it would go fast, just drawing the two relevant lines. There’s some methods to optimize that kinda thing but none of them are that great. Imagine though if you had a square you were rastering. No directionality would make that better. Detecting that the more optimal solution is to raster the top, then go down one of the sides, do the bottom, then go back up the other side. is a pretty hefty process. It’s actually an NP-Complete problem and optimizing it would require some two-opt optimizations (which exist for vectors in a sort of secret-ish feature but would not be easy for rastering.
  1. File New should actually do that.

  2. The settings currently are the same as you previously had them and save between sessions. Generally so they can be saved out and reused. If you want your own settings, make a set of them, and save the project. You could load those up at any point you want. Also, you can right click on the Operations tree menu item and select between Other/Blue/Red and Basic. Which load up two predefined standard settings. More could be added as needed, but it’s intended that these be loaded, saved, and modified based on whatever you need so standard settings aren’t extremely useful since they should get modified a lot.

3 Likes