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

Add per-layer control of certain settings. #7

Closed
oskay opened this issue Jul 13, 2016 · 1 comment
Closed

Add per-layer control of certain settings. #7

oskay opened this issue Jul 13, 2016 · 1 comment

Comments

@oskay
Copy link
Contributor

oskay commented Jul 13, 2016

In a similar vein to evil-mad/wcb-ink#24, it would be nice to have some per-layer control features for the AxiDraw.

The main ideas listed there are chiefly relevant to paint -- water dipping, and re-inking (per stroke and so forth). AxiDraw does not need these. However, it could use some other potential per-layer adjustments, for example pen-down speed and pen-down height.

Current layer-numbering syntax requires only that the layer name begins with an integer in the range of 0 to 100. We could extend this by detecting that layer-name integer, followed by a specific escape sequence, followed by another integer, perhaps in the range of 0 to 100. (Certain integers may be excluded, depending on the escape sequence.)

The escape sequences could be +H for pen-down height and +S for pen-down speed, not case sensitive. When printing a layer with one or more layers that contain parameters like this, the specified pen-down height or pen-down speed would override the defaults given in the extension, for that layer only. Since the speed cannot go to zero, the integer following +S would need to be in the range 1 to 100. If more than one valid parameter of a given type is found (say, more than one valid speed command for a given layer), only the last one detected would have an effect. Escape sequences need to be given at the start of a layer or immediately following the layer number.

Example layer names:
2 forest floor: The layer number is 2, and it is labeled as "forest floor". It prints with the default pen height and speed.

45+S50_forest floor: The layer number is 45, and it is labeled as "_forest floor". It prints with the default pen height, but with pen-down speed of 50, regardless of the value specified in the extension.

100+H5055forest floor: An invalid declaration, since the requested height is 5055 (which is outside of the range 0 to 100). The layer number is 100. It prints with the default pen height and speed, since there is not a valid override.

0+s1+h100 Forest floor: The layer number is 0. It prints with the pen-down height of 100, and with pen-down speed of 1, regardless of the value specified in the extension.

22+S0+H0 Forest floor: The layer number is 22. It prints with the pen-down height of 0, and with the default pen-down speed 1, since the speed value of 0 is not valid.

99+S25_+H50 Forest floor: The layer number is 99. It prints with the default pen-down height, but with a pen-down speed of 25. The height parameter is not valid, since it does not directly follow the other parameter but is interrupted by an underscore. The layer name is "_+H50 Forest floor".

+H50 Forest floor: No layer number given. It prints with the default pen-down speed, but with a pen-down height of 50. (Layer numbers are not required.)

oskay added a commit that referenced this issue Jul 17, 2016
Implement changes suggested in issue #7.
@oskay
Copy link
Contributor Author

oskay commented Jul 17, 2016

Feature implemented in repository; available for testing.

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

No branches or pull requests

1 participant