snap to bounding box, just not its own?

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:

snap to bounding box, just not its own?

Postby brynn » Tue Aug 17, 2010 11:37 am

Hi Friends,
I just had occassion to use the Snap to bounding box corners feature, which I probably have used before. However in this case, I want to snap a node handle to the bounding box of the path which contains the node. It seems this is not possible?

I can snap it to other bounding boxes, just not its own. Is there a reason for this, and would it be possible to make it work? Or is this a bug?

I'm using 0.47 stable on Windows 7, 64-bit (if it matters).

Thanks for you help :D

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: snap to bounding box, just not its own?

Postby ~suv » Tue Aug 17, 2010 1:08 pm

brynn wrote:I want to snap a node handle to the bounding box of the path which contains the node. It seems this is not possible?
Not possible, sorry. Bounding box corners snap to bounding box targets, nodes and handles to paths, nodes, midpoint/rotation center, both snap to page border, grid, guides. Also, a path does not snap to itself when node-editing (the location of the snap target isn't fixed - it changes when a node or handle of the path is dragged).

IMHO not a bug - that's how snapping works at the moment - AFAIU.

Maybe dvlierop will comment on the reason…? ;)

dvlierop
Posts: 139
Joined: Sat Sep 08, 2007 4:25 am

Re: snap to bounding box, just not its own?

Postby dvlierop » Thu Aug 19, 2010 6:59 am

Of course I will comment :-)

As soon as you start editing a path, it's bounding box might change. Suppose you drag the node outside the boundingbox, then the bounding box will grow. That makes it awkward to snap to that moving bounding box. Generally speaking, Inkscape only snaps to stationary objects. Nodes therefore snap to nodes/paths in other (stationary) objects, but also to the stationary part of the path that's currently being edited. The latter has not been implemented yet in the new node tool editor in v0.48 if I'm correct, but it does still work like that in v0.47

There are currently three classes of snap sources: bounding box nodes, path nodes, and others (such as guides, grids, text base lines, etc). Bounding box nodes won't snap to paths and path nodes, and vice versa. But the "other" class will snap to anything. For a detailed list see the second half of this page:

http://inkscape.modevia.com/doxygen/htm ... source.php

OK, sorry for getting too technical ;-). The reason for all this is that when anything would snap to anything, then you would be able for example to snap a node both to the path of a rectangle and to the bounding box of that same rectangle. For narrow strokes it would be nearly impossible to tell what you would have snapped to, and that's very inconvenient when snapping. People using snapping tend to be picky ;-). If the node snapped to the bounding box, then the stroke of the source path and the target path would not be aligned, i.e. the middle of the source path's stroke would be at the outside of the target path's stroke.

BTW, in this discussion I only considered visual bounding boxes, which are the default. Things are different when using geometric bounding boxes.

Does this make any sense ;-) ?

vwanweb
Posts: 169
Joined: Sun Jun 06, 2010 1:48 pm

Re: snap to bounding box, just not its own?

Postby vwanweb » Thu Aug 19, 2010 1:41 pm

workaround;

Duplicate (Ctrl+D) the object you are working on then press Shift+G, create guides from object. The duplicate will be deleted and guides will be placed on the canvas using the duplicates bounding box for the placement.

Shift+\ (| key), Show/Hide Guides

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

Re: snap to bounding box, just not its own?

Postby brynn » Fri Aug 20, 2010 12:03 pm

Thanks dvlierop :D

workaround;

Nice vwanweb!

vwanweb
Posts: 169
Joined: Sun Jun 06, 2010 1:48 pm

Re: snap to bounding box, just not its own?

Postby vwanweb » Fri Aug 20, 2010 1:51 pm

no problem, thanks to the developers 'oh the Great Inkscape 'Draw Freely'!! :)


Return to “Help with using Inkscape”