I spent all day first figuring out that the problem with the laser cutter was backlash and not some weird rounding in my code, then the rest trying to implement some compensation for it. I finally succeeded but my brain was melted by the first part so it took way too long to implement and I still need to add some some smoothing so that the compensation doesn't add weird jumps into lines.