Inkscape.org
Beginners' Questions Shouldn't horizontally flipped things have the same width and heighth?
  1. #1
    K K @fugueink

    I think my latest project may have driven me insane.

     

    Please see the picture. I made the left flower. I flipped it horizontally and moved it an equal distance from the vertical midpoint.

     

    Yes, there is one bit I tweaked (lowest leaf, innermost part), which is not symmetrical in the original. But all the sizes of the individual parts are wrong!

     

    For instance, the outermost tan tips on either side, should be the same size, yes? They're not. The left one is 8.833 x 8.486 mm. The one on the right is 8.833 x 8.375 mm.

     

    I tried reduplicating the left flower, flipping it, and moving it into position. I'm getting the same discrepancy.

     

    So I tried flxing the sizes to match the left. Even if I get the individual bits fixed, their groups don't match. If I then fix the groups, the parts don't.

     

    Am I again missing something obvious? I'm no mathematical maven, but I just don't see how horizontally flipping something would change its width and height.

     

    Thanks.

    Really Symmetrical?
  2. #2
    Tyler Durden Tyler Durden @TylerDurden

    I grabbed the screenshot and flipped one half, it matches the other half.

    Please share an Inkscape SVG with the issue.

  3. #3
    K K @fugueink

    In this one, the tip of leaf 2 (that furthest out bit on either side) has the dimensions that I cited in my first post.

     

    It looks fine, but . . . I assume the program has the right dimensions for everything.

     

    Thanks.

    For Forum
  4. #4
    Tyler Durden Tyler Durden @TylerDurden

    There are non-mirrored objects in the middle, but the majority of the artwork is symmetric, without a change in size.

     

  5. #5
    InkJack InkJack @InkJack

    Hello K,

    downloaded your sample file and had a quick look at.

    The part you describe ...
    For instance, the outermost tan tips on either side, should be the same size, yes? They're not. The left one is 8.833 x 8.486 mm. The one on the right is 8.833 x 8.375 mm.

    ... shows on my machine the same behaviour. Flipping the left flower horizontaly changes the horizontal dimension of the outer most left object to the values you mention. Honestly I have no idea what is happening.

    Windows 10 with Inkscape 1.1.1 (3bf5ae0d25, 2021-09-20)

    Greetings

     

  6. #6
    Tyler Durden Tyler Durden @TylerDurden

    🤔

     

    Please describe or show the steps y'all take.

  7. #7
    InkJack InkJack @InkJack
    *

    ARGH ... In my attempt to describe what happens I messed up width and height. The value changes in the vertical direction. H = height and not horizontal ...
    From 8.486 mm to 8.375 mm height.

    You can see it in you video.

    Greetings

  8. #8
    Tyler Durden Tyler Durden @TylerDurden

    OK... coffee has made my vision clearer.

    I'm going to chalk the difference up to numeric rounding being compounded by the nested groups.

    If I duplicate the left flower group, then ungroup it, flip the selected objects, no change is observed.

  9. #9
    Paddy_CAD Paddy_CAD @Paddy_CAD
    *

    Sorry to tell you this Tyler, your gif shows that width is preserved but not height. I don't know how you did this.  The height of the top level group is preserved, as is the second level, but the third level group and the shape within have shortened a little.  

    To add to the mystery, on my machine the left and right sides are perfectly symmetrical, numerically and visually.  Duplicating and flipping [ctrl+d] [h] preserves the dimensions of every shape all the way down to the lowest level subgroup.

    All I can think of is maybe these are round-off errors.  Try increasing the precision [Preferences > Input/Output > SVG output].  My Numeric precision is set to 8. 

  10. #10
    Paddy_CAD Paddy_CAD @Paddy_CAD
    🙈

    Oh look.  The conversation moved on while I crafted my comment.

  11. #11
    InkJack InkJack @InkJack

    Even setting precision on the highest possible value = 16 the behavior is still the same ...

    Greetings

  12. #12
    Tyler Durden Tyler Durden @TylerDurden
    *

    Relevant info:

    Inkscape Manual

    There are two important points to note. First, the transformation matrix is with respect to the point (0, 0) in screen coordinates if not editing the current matrix. If editing the current matrix, the transformation is with respect to the User Coordinate System which, if an object is not in a Group, is equivalent to the SVG coordinate system (Initial View Port) where the origin is at the top-left corner of the page. See the SVG standard for more details.

    Second, Inkscape will modify the matrix and other parameters of an object internally so that the internal E and F terms are zero if the Store transformation parameter under the Transforms section in the Inkscape Preferences dialog is set to Optimized. This means, for example, that for a horizontal skew of a rectangle, the internal height parameter may change. The displayed object will still look correct.

    http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Transforms.html

    Another test comparing nodes vs bounding box shows the nodes are the same height, but the bounding box is truncated when grouped. The object is visually the same height.

     

  13. #13
    K K @fugueink

    Okay, still working on my first coffee, and I am having trouble following this, I think. Especially Tyler's last post (although he quoted at length an author I have historically had trouble following).

     

    Are you essentially saying that the numbers Inkscape gives me cannot be relied on? Well, what's the good of that? Is there any way I can stop that happening? I like coordinates. They are universal reference points that I use to keep my drawings accurate (especially because I'm tracing scans from books, which are never flat). It's one of the reason I loathe drawing programs in iOS. They never show coordinates.

     

    I get that it's documented, so it's a "feature" and not a bug (I once worked with a programmer who never fixed problems; he just documented them!). But is there no way to keep it from happening? I can't keep flipping and re-flipping.

     

    Thanks. . . .

  14. #14
    Paddy_CAD Paddy_CAD @Paddy_CAD

    The svg posted in #3 looks perfect on two machines (Inkscape 1.1.1 macos & win10) and dimensions are equal in every reflected object pair.  No matter what I try, none of my transformations and duplications break the symmetry. 

    So I must be doing something right and all of you are doing it wrong.  😏

    Joking aside, I can't reproduce the problem.

  15. #15
    K K @fugueink

    You mean when you select SVGs > central column > upper motif > side flowers > left flower > leaves > 2 > tip, you get the W and H as you do when you select SVGs > central column > upper motif > side flowers > right flower > leaves > 2 > tip? (Sorry about the complexity, but the whole point is that the user is supposed to be able to change colors and and hide what they don't want and so on.)

    I don't. H is always smaller on the right.

     

    And therein lies the problem. I need to be able to rely on the coordinates. I can't be hung up by this quirk that Inkscape has about duplicating and flipping and using the same measurements for coordinates. Coordinates are supposed to be absolute, period.

     

    It's as if GPS sometimes measured latitude and longitude in reference to Greenwich and sometimes to Paris. There isn't any point in the system if it isn't always the same.

  16. #16
    Paddy_CAD Paddy_CAD @Paddy_CAD

    I just realised, I'm using the geometric bounding box and you're using the visual bounding box.  The reflected nodes and paths are in the right place but transforms can mangle the strokes inside groups.  (e.g. https://inkscape.org/forums/beyond/scaled-path-results-in-stretchedsqueezed-strokes-how-to-restore-normal-stroke/).  

  17. #17
    Tyler Durden Tyler Durden @TylerDurden

    In this case the strokes seem unaltered, but the bounding box does not reflect the true size of the objects until they are ungrouped.

    As Paddy_CAD states, this does not seem to be an issue when viewing the geometric BB.

  18. #18
    K K @fugueink

    Ah, okay, the geometric bounding  box was the piece I failed to process. I've changed my preferences now.

     

    (Sorry, but I have a very hard time processing information. My data path is very narrow. . . .)

     

    Thank you!

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Shouldn't horizontally flipped things have the same width and heighth?