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

Position of origin in Cut Settings is ignored #2545

Open
vsm-projects opened this issue Jun 10, 2024 · 1 comment
Open

Position of origin in Cut Settings is ignored #2545

vsm-projects opened this issue Jun 10, 2024 · 1 comment

Comments

@vsm-projects
Copy link

Version

2.1.7

Hardware / Firmware

GRBL 1.1

What happened

The changing of the Width or Height in the Cut Settings pane automatically changes X and Y assuming the origin to be at the left-botton always. But intuitively, a user expects that the position of the dot, showing the origin of the object on the right from X and Y, is taken into account. It basically means that the X and Y should not be auto-changed at all, because it follows the position of the dot. If you switch the dot, then the coordinates of the corners will change compared to the ones that were there before changing Width or Height.

I guess, internally, the position of the object is defined by its left-bottom and width-height. So, when Width or Height is changed, the left-bottom is left untouched.

In all other programs (for example, LightBurn, Inkscape, or similar), the change of width and height adjusts the corners' coordinates according to the position of the origin, which is not necessarily at the left-bottom corner. This inconsistency cost me a wrong cut and a trashed sample. I set the origin in the middle of the object. Then I changed Width & Height and expected the origin to stay at the same point, in the middle, but it was auto-changed as if the origin was in the left-bottom. I did not notice the auto-change of X and Y, run cut, and could not understand why it went to the wrong place.

I was not sure how to categorize this issue: bug or feature request. Comparing this behavior to the other widely known and commonly used software convinced me to put it under the bugs, because an absence of a feature does not cause a sample to be trashed, but this inconsistency did :)

How to reproduce

  1. Draw a circle or rectangle or select any object.
  2. Make "Cut Settings" pane active.
  3. Set the dot, showing the origin of the object, to the center (or anywhere other than the left-bottom corner)
  4. Set X & Y to zero, for example, or any other specific values.
  5. Change Width or Height value to anything different than it was.
  6. Observe that the values of X and Y are auto-changed as if the origin is at the left-bottom corner (but it was not set to the left-bottom).
  7. In short, values of X&Y should never auto-change at all (a user does not expect it to change).

Operating System

Windows, but it does not matter

Anything else

It happens every time when the origin of an object is set to anywhere other than the left-bottom corner. I understand the reason, why it behaves in this way. The developers assumed that the origin must be always at the left-bottom corner, and ignored the position of the dot in the Cut Settings pane, when adjusting the internal variables. I understand that people probably indeed rarely change the position of the origin, but when they do, the program stops working as expected.

@breiler
Copy link
Collaborator

breiler commented Jun 17, 2024

I have made a change in the latest nightly build (https://github.com/winder/Universal-G-Code-Sender?tab=readme-ov-file#downloads) where it will now respect the anchor/origin setting when resizing.

Rotation should probably also use this anchor, but this is a start.

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

No branches or pull requests

2 participants