Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@elzekool
Copy link

@elzekool elzekool commented Jun 3, 2019

compositor transformer allows compositing multiple transformers and the
bound transformer makes sure all emitted points are within the bounding region.


The rationale of the bound transformer is that I ran into an issue where points where outside the bounds of 0.0 - 1.0 causing the Helios DAC driver to crash. This is already fixed in the application itself but I tried to make a more generic solution.

Combined with perspective transform it can be a little unpredictable where points will end up. It can also be usefull when a safe zone is desired.

The algorithm is currently a little bit crude but if the resolution is not to low it should not be an issue.

compositor transformer allows compositing multiple transformers and the
bound transformer makes sure all emitted points are within the bounding
region
@SpaceK33z
Copy link
Contributor

Wow, thanks for this PR!

About the bound transformer, we had this same issue a few weeks ago in our Modulaser app. The problem is that if you cut off lines like you do now, the laser doesn't have enough blanking lines so it will displace lines and because of this it can still go outside of the "safe" zone.

We found a fix for this that works quite well (some improvements can still be made). It's currently only present in our closed-source code, but I've uploaded it in a Gist here (warning: it's messy code). I currently don't have the time to implement this in laser-dac, but if you want you can use it!

It basically works like this: if a point goes out of bounds, it is forced to the maximum allowed x/y value. 8 blanking points are inserted at that point to be sure the laser goes nothing further than that. If the next point goes out of bounds again, that point is completely removed since it has no added value. If the point after that is in bounds again, it gets prefixed with 20 blanking points to prevent unwanted lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants