Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registrationmarks #25

Merged
merged 16 commits into from
Jan 16, 2017
Merged

Registrationmarks #25

merged 16 commits into from
Jan 16, 2017

Conversation

EtherGraf
Copy link
Collaborator

I have created a branch registrationmarks, in which I got the regmark functionality to work.

My silhouette portrait has succesfully searched and found the registration marks. It's tested with Ubuntu 14.04. No idea if this works on a cameo too. Needs testing.

To get it working, I had to pull in some changes from Alexander Senger, which sets the default coordinate system from landscape to portrait mode.

To plot with registration marks do the following:

  1. Open the document examples/registration-marks.svg
  2. Insert your cutting paths and graphics.
  3. Printout the whole document including registration marks.
  4. Select your cutting paths in the document, but exclude regmarks and graphics.
  5. Set or ensure the correct values (offset/width/height) on the regmark tab.
  6. Enable 'Document has registration marks' and 'Search for registration marks'
  7. Start cut.

The plotter will search the registration marks at the given positions. If it founds the marks, they will serve as accurate reference and define the origin. Therefore it is necessary to set the correct offset values of the mark. As a result the cut will go precisely along the graphics.

A further improvement (not yet implemented) would be automatic detection of the regmarks in the svg by ID, so it would not be necessary to set the numbers by hand.

Alexander Senger and others added 12 commits March 10, 2016 17:08
+ Graphtec.py: de-cruft and refactor hardware communication and add proper command delimiter
Merge commit '47d86e1ca3672eef203541da29944d96203b83e6' into registrationmarks
Corrected some typos
Limit cutting area inside regmarks.
* Position of the regmarks correctedd. (They were slightly off, leading to parallelograms)
* Width of the regmarks set to 0.5mm, this is hardcoded in sourcecode
* Named the regmarks with IDs
* Created an extra layer for the regmarks.
@jnweiger
Copy link
Member

Hey @EtherGraf thanks for working on regmarks support!

I am afraid I broke your PR by allowing other changes to happen meanwhile.
Is it easy for you to try a rebase, or should we try a walk through and merge manually?

@EtherGraf
Copy link
Collaborator Author

I am no git expert, so I cannot overview the implications of a rebase.
But I think it should be no big problem for me to merge the latest
changes into my regmark branch.

Note that my work is based partly on changes from Alexander Senger,
which was PR #21 too.
Maybe you should look at this first?

I will have a look later.

Am 30.08.2016 um 18:54 schrieb Jürgen Weigert:

Hey @EtherGraf thanks for working on regmarks support!

I am afraid I broke your PR by allowing other changes to happen meanwhile.
Is it easy for you to try a rebase, or should we try a walk through and merge manually?

@jnweiger
Copy link
Member

Same with PR#21. unfortunately.

@EtherGraf
Copy link
Collaborator Author

EtherGraf commented Aug 30, 2016 via email

@jnweiger
Copy link
Member

jnweiger commented Aug 31, 2016

@EtherGraf I am inviting you to directly push here. How about that?
https://github.com/fablabnbg/inkscape-silhouette/invitations
Please let me know if that is helpful in this case.

@EtherGraf
Copy link
Collaborator Author

Just released the merged regmarks branch. I had no time to do any tests, but expect no serious problems. At weekend I will have more time to continue with this.
Thank you for your invitation, I will see if it is usefull.

@jnweiger
Copy link
Member

Hey great work. Thanks.
Could you please check what thappend to the return_home code? I have fragments in https://github.com/fablabnbg/inkscape-silhouette/blob/master/silhouette/Graphtec.py
but in your branch it seems to be missing. I believe it was functional with my silhoeutte 1 some time ago.

@EtherGraf
Copy link
Collaborator Author

I remember that something on the return to home was changed with the
patches imported from Alexander. I had to patch this code, but finally
it worked for me.

At the moment I'm a little short at time, so please excuse me till
weekend, then I will have more time to investigate.

@EtherGraf
Copy link
Collaborator Author

@jnweiger
To answer your question 2 months ago about the return_home code: It was removed by the patches from Alexander Wenger and later replaced by a new option 'endposition'. See PR #21
Should the existing interface be preserved or could it be replaced with the new one?

EtherGraf added a commit that referenced this pull request Jan 16, 2017
Cleanup of code and mirror the coordinate system.

This is a prerequisite to get the regmarks working.
With this commit the options return_home and no_trailer has been removed. It will be replaced in a later commt with end_position.

Comments from the author:
The biggest problem was the non-standard communication between software and cutter. There seem to be a lot of left-overs from previous work and also quite a bit of mis-interpretation.
My approach:

 * replace comma with "\x03" as command delimiter (comma is for separation of parameters within command) and properly terminate all communication
 * drop all unnecessary communication (polls where result is not used, unknown commands, anything not found in the sniffed communication
 * refactor communication in initialization, setup and job
 * do more testing to determine actual effect of commands (well, not always successful, but I think it is an improvement)
 * use cleaner coordinate transform before sending data to Cameo. Helps in offset-issue (see comment in code)

This results in much more stable and reliable operation with my cutter. I think other users could also benefit.
EtherGraf added a commit that referenced this pull request Jan 16, 2017
Comment from the author:
The Cameo will get lost in communication if any new data is send while the machine is busy cutting. Also data chunk size in Silhouette Studio is limited to 3k chars at most and 1k is standard. In response a method "safe_write" was added as a wrapper for the write method to further split large data words (from plot commands) into more digestible chunks. Also inkscape-silhouette will now wait for the cutter to be ready before sending new data.

This results in the cutter returning to the main menu after the complete job is finished (e.g. the nifty option to advance the media into a position where the very handy cross-cutter can be used is offered). Without waiting the machine will only offer to eject the media after cutting.
EtherGraf added a commit that referenced this pull request Jan 16, 2017
Comment from the author:
In GUI and plot code an option is implemented to chose the end position of the blade after cutting. This can be useful for some jobs. There was already some code which seemed to be intended for this purpose but was left unfinished. Frankly, I had some difficulties understanding the logic and implemented my own approach.
@EtherGraf EtherGraf merged commit dd16493 into fablabnbg:master Jan 16, 2017
EtherGraf added a commit that referenced this pull request Jan 16, 2017
Solves pull request #25
Tested and verified working on my Silhouette Portrait.
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