[solved] Geometric vs Visual Bounding Boxes, Tiled Clones

Post questions on how to use or achieve an effect in Inkscape.
User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

[solved] Geometric vs Visual Bounding Boxes, Tiled Clones

Postby brynn » Thu Jul 24, 2008 5:04 pm

Hi Friends,
I'm just starting to try my hand at Tiled Clones. The 1st thing I read about the Shift tab of the Tiled Clones dialog is
The Shift tab allows one to vary the spacing between tiles. With the default parameters, rectangular tiles are arranged so that their Geometric bounding boxes are touching. The following options are available to add or subtract space between the tiles:
    Shift X, Shift Y: Adds (or subtracts) to the tile spacing in units of bounding box width and height. A random factor can also be added.

At first I thought this meant that one must set their Inkscape Preferences to use Geometric bounding boxes, rather than visual bounding boxes. I was working with an object of width 57.574 px, using visual b-boxes. And I expected when I changed to geometric b-boxes, the width would be slightly smaller, representing the loss of the tiny distance the Stroke adds to an object's width. Because I thought the difference between types of b-boxes was basically the Stroke width. But after changing my Inkscape Pref setting for Geometric B-boxes, I find my object is the exact same width!

Then I re-read the Guide, and notice that it doesn't exactly say that one must use geometric b-boxes; just that the tiles are arranged relative to geometric b-boxes. It implies (at least to me it implies) that the X Shift is in units of the geometric bounding box width. This is confusing in 2 ways: 1 - the bounding box appears to be the same width, no matter which type is chosen in the Inkscape Prefs, and 2 - the settings on the Shift tab (of the Tiled Clones dialog) are indicated as percentages (%), not units, with no option to choose what type of unit.

So I have a few questions (big surprise :mrgreen: ):
If an object is the same width, whether one is using geometric or visual bounding boxes, what is the difference between types of b-boxes? Further, why does it matter that tiled clones are arranged so that their geometric bounding boxes are touching, if the visual b-box is the exact same size?

I might mention that it occurred to me that maybe it would be necessary to restart Inkscape, for the changed bounding box setting to take effect. But restarting did not make any difference -- my object is still the exact same size (57.574 px), no matter which type of b-box is chosen. Could it be that restarting one's entire system is needed for the change to take effect? I wouldn't think so, but... :?

And finally, have I stuumbled upon another bug? (This is in v 0.46, the last stable release.)
Thank you very much for your help -- I do so appreciate it :D

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Geometric vs Visual Bounding Boxes, Tiled Clones

Postby microUgly » Thu Jul 24, 2008 8:50 pm

Ok, so I had to do a lot of trial and error, but basically, that preference has no impact on any tools. It only effects where the dashed line appears--visual puts it around the whole object including the stroke, whilst geometric puts it around the object as if it didn't have stroke.

Regardless of your preferences, the selector tool always uses the visual bounding box for it's calculations and the tile clone tool always uses the geometric bounding box. I would suggest that at the very least all tools should use the same bounding box. I wouldn't like to suggest that the preferences setting should influence which bounding box these tools use--I think that could be extremely complicated--but it would make sense if your preference was to use the geometric bounding box that the X, Y, W and H values for an object corresponds to the box you see.

bbyak
Posts: 64
Joined: Sun Oct 07, 2007 4:53 am

Re: Geometric vs Visual Bounding Boxes, Tiled Clones

Postby bbyak » Fri Jul 25, 2008 4:07 am

microUgly wrote:Regardless of your preferences, the selector tool always uses the visual bounding box for it's calculations


I'm not sure I understand that - can you give an example?

microUgly wrote:and the tile clone tool always uses the geometric bounding box.


that I just fixed in svn, thanks for the report

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Geometric vs Visual Bounding Boxes, Tiled Clones

Postby microUgly » Fri Jul 25, 2008 9:21 am

bbyak wrote:
microUgly wrote:Regardless of your preferences, the selector tool always uses the visual bounding box for it's calculations


I'm not sure I understand that - can you give an example?

Image
In this screenshot, the values in the tool control bar are X:0, Y:0, W:100 and H:100 are based on the visual bounding box rather than the geometric bounding box indicated by the dashed line.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Geometric vs Visual Bounding Boxes, Tiled Clones

Postby brynn » Fri Jul 25, 2008 5:42 pm

Thanks micro and bbyak :D

bbyak
Posts: 64
Joined: Sun Oct 07, 2007 4:53 am

Re: Geometric vs Visual Bounding Boxes, Tiled Clones

Postby bbyak » Sat Jul 26, 2008 3:58 pm

microUgly wrote:In this screenshot, the values in the tool control bar are X:0, Y:0, W:100 and H:100 are based on the visual bounding box rather than the geometric bounding box indicated by the dashed line.


I cannot reproduce that. Maybe you just need to deselect and reselect the shape after you change the prefs.

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Geometric vs Visual Bounding Boxes, Tiled Clones

Postby microUgly » Sat Jul 26, 2008 4:46 pm

bbyak wrote:
microUgly wrote:In this screenshot, the values in the tool control bar are X:0, Y:0, W:100 and H:100 are based on the visual bounding box rather than the geometric bounding box indicated by the dashed line.


I cannot reproduce that. Maybe you just need to deselect and reselect the shape after you change the prefs.

I did that, and if you examine the screeshot above you'll see that the bounding box is in the correct place but all the values in the tool controls bar are wrong.

Having said that, I just installed the latest Win32 build of 0.47 and the X, Y, W, H do reflect the geometric bounding box. So it seems it's fixed.


Return to “Help with using Inkscape”