Impossible to correctly scale LPE stitch subcurves?
Hello all,
I am trying to fix transformation behavior for LPE (translation, scaling, rotation). I think I found a fundamental problem.
Take Stitch Subcurves. Let's say we are stitching between a straight horizontal line, and a line in the shape of: _________________ / / /
For equidistance stitch spacing, the stitch start points would be:
____o_____________o / / / o
o__________o___________o
Note that the distance is taken *along* the length of the line, not just the distance in the x-direction as this would not work in general
Now, after scaling in the Y direction:
____o_____________o / | | | | | |
/ / o
o__________o___________o
Please ignore my earlier mail because it was sent too soon. :-(
Hello all,
I am trying to fix transformation behavior for LPE (translation, scaling, rotation). I think I found a fundamental problem.
Take Stitch Subcurves. Let's say we are stitching between a straight horizontal line, and a line with a horizontal and angled part: Because stitching is equidistant, the stitch start points would be:
____o_____________o / / / o
o__________o___________o
Note that the distance between stitch points is constant *along* the length of the line (not just the distance in the x-direction as this would not work in general)
Now, after scaling in the Y direction:
__________________o / | | o | | | / | | | | | | / o
o__________o___________o
Can you spot the problem? The 2nd line has shifted position along the line, because the distance along the angled part of the topline changed dramatically. For 'correct visual scaling' the result should have been:
____o_____________o / | | | | | | / | | | | | | / o
o__________o___________o
This however can never be the result of any stitch subpath, because the stitch start points are not equidistant (unless using the variance parameters and being very very lucky).
I have attached an SVG for you to try with the latest inkscape SVN. Note that this problem exists regardless of the "scale width relative" setting.
Thanks for any comment on how to "fix" this.
kind regards, Johan
One solution might be to add transforms to the path, instead of transforming the path itself (the so-called "preserve transformations" option in preferences).
On Thu, 17 Jan 2008 23:10:14 +0100, J.B.C.Engelen@...1578... wrote:
Please ignore my earlier mail because it was sent too soon. :-(
Hello all,
I am trying to fix transformation behavior for LPE (translation, scaling, rotation). I think I found a fundamental problem.
It seems like stitching needs to be done in un-transformed space?
-mental
MenTaLguY wrote:
On Thu, 17 Jan 2008 23:10:14 +0100, J.B.C.Engelen@...1578... wrote:
Please ignore my earlier mail because it was sent too soon. :-(
Hello all,
I am trying to fix transformation behavior for LPE (translation, scaling, rotation). I think I found a fundamental problem.
It seems like stitching needs to be done in un-transformed space?
-mental
Well, the question is if it's more important to be mathematically correct or "visually" correct. What it does now is what I would expect it to do. Perhaps I'm just more technical in how I perceive things. But, I'd like to know what others think.
I've attached Johan's file with a changed visual example and it's an actual lpe this time. It looks the same as his, the difference is that I used the node tool to move the bottom guide path to where it should be and NOT changing the size or orientation of the top line. If either guide path of the stitched curves is changed, I expect every little change to be reflected visually. At this point, I probably have more experience with this feature than anyone else and I can tell you it's always done what I've expected. Then again, could be my technical mind and workflow.
So, imho, what he's looking for works as it should, the math is all correct. It's really just about how you make it happen. If I'm not incorrect, a similar issue would be the reason there's a toggle button for scaling the radii of rounded corners on rectangles (what people expect or need when transforming is different, it's really a convenience option imho). Anyone else want to chime in?
-Josh
participants (3)
-
unknown@example.com
-
Josh Andler
-
MenTaLguY