-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
Tracking Issue: Quick measurement overlays while holding the Alt key #1896
Comments
Hi, @Keavon . |
Hi, @Keavon do you happen to know of any tool(s) that show similar functionality/features especially for rotated objects. I think it would be best to have some examples on expected functionality for rotated shapes before i work any further on this issue especially since the existing axis crossing and center line crossing logic may not work as expected when relative rotation is involved. |
Please ping me again if I forget to respond with an answer in the next day or two. It'll take me a little while to prepare a spec for you, but you are definitely right to ask because it's nontrivial what should happen here. |
okay! |
Hi, @Keavon just a quick ping for the specs. |
Still haven't gotten to it yet, sorry. Ping me in a few more days if I still haven't. |
@singhutsav5502 Ok, I have an answer for you, thanks for your patience. The quick measurement overlay should occur in the rotational space of the selected layer. Then, if the hovered layer has a different rotation compared to the selected layer, it should draw blue overlays of an axis-aligned bounding box (where the axis-alignment is in the space of the selected layer) around the hovered layer. That way, the quick measurement can measure a straight line from the selected layer to this bounding box of the hovered layer, with both sharing the same rotation in relation to each other. References to the "selected layer" in the previous paragraph technically mean "the transform cage's bounding box". Because if you have multiple layers selected and they don't share the same rotation, the transform cage will use the rotation of the top layer for the transform cage. It is the transform cage which counts as the "selected layer" in the context of the previous paragraph. |
I see, so the AABB drawn around the Hovered layer runs parallel to the "selected layer" transform cage? and there's a straight line connecting the "selected layer" transform cage to the drawn AABB ? |
Okay, is there a particular function that defines how the AABB is affected by the skew transform? |
On both ends of the quick measure, we want the AABB in the rotational space of the transform cage. As the name AABB implies, "box" shouldn't be a parallelogram. So you will want the AABB around the parallelogram on the selected (transform cage) and hovered ends of the measurement, where both of those boxes have parallel edges with each other. |
By the way, there's no need to quote my message every time you reply, that just makes this comment section longer than it needs to be. You can either |
If you just moved the points with the Path tool, that isn't skewing. Use the Select tool to rotate it, scale it along one axis with |
The first image is correct. I don't understand your second comment's question so I can't answer it. |
@singhutsav5502 just checking in :) |
Hi, still working on the issue. Will try to figure out what's causing the issue with skewed objects first. |
When holding the Alt key with a layer (or multiple) selected, while hovering over another layer (or group), an overlay should appear visualizing the AABB of both the selected and hovered layers, with lines and distance numbers (in document coordinates) between them as shown below.
When the document is viewed with a tilt in the viewport PTZ navigation, the lines become angled but the text labels stay upright for readability.
Here are, I believe, all the scenarios. The three diagrams with text do care about which is the selected layer and which is the hovered layer; all the others are drawn the same in either order, so it doesn't matter which is the selected or hovered one. The two colored boxes represent AABBs, not actual shapes in the artwork— those should be drawn with a blue outline around both their AABBs.
- "Boxes overlap along 0/1/2 axes" means extruding the box's edge infinitely left/right, or up/down, would hit the other box
- "0/1/2 of their centerlines cross the other boxes" means extending both box's center points infinitely left/right, or up/down, would hit the other box
- "Along axis A/B" means either the X and Y, or the Y and X, axes
- "box A/B" means either one particular box and its opposite, or the reverse
- Along axis A, box A has 1 edge line cross box B while box B has 1 edge line cross box A
- Along axis B, box A has 1 edge line cross box B while box B has 1 edge line cross box A
- Along axis A, box A has 1 edge line cross box B while box B has 1 edge line cross box A
- Along axis B, box A has 2 edge lines cross box B while box B has 0 edge lines cross box A
- Along axis A, box A has 2 edge lines cross box B while box B has 0 edge lines cross box A
- Along axis B, box A has 0 edge lines cross box B while box B has 2 edge lines cross box A
- Along axis A, box A has 2 edge lines cross box B while box B has 0 edge lines cross box A
- Along axis B, box A has 1 edge line cross box B while box B has 1 edge line cross box A
- Along axis A, box A has 2 edge lines cross box B while box B has 0 edge lines cross box A
- Along axis B, box A has 2 edge lines cross box B while box B has 0 edge lines cross box A
Diagram source file: Quick Measurement Overlays Design.graphite.txt
The text was updated successfully, but these errors were encountered: