Re: [Inkscape-devel] Creating guidelines from objects
Hi Max,
Op Vr, 11 januari, 2008 20:04, schreef Maximilian Albert:
I just committed a change to SVN (rev. #17022) which allows the user to convert rectangles and 3D boxes to a collection of guidelines that are aligned along these objects' edges.
That's indeed a very cool feature! I could have used that today at work :-)
I have not checked it out yet though, but I wonder: are the guides aligned with the nodes or with the bounding box? Or is there a way to specify this? I ask this because there are essentially two ways of working: either aligning objects at their visual boundingbox, or at their geometrical bbox (or nodes or stroke center). This distinction is being used in the preferences for the selector tool, and also when snapping. So we need it here also IMO.
Diederik
Diederik en Rezi schrieb:
Hi Max,
Op Vr, 11 januari, 2008 20:04, schreef Maximilian Albert:
I just committed a change to SVN (rev. #17022) which allows the user to convert rectangles and 3D boxes to a collection of guidelines that are aligned along these objects' edges.
That's indeed a very cool feature! I could have used that today at work :-)
I have not checked it out yet though, but I wonder: are the guides aligned with the nodes or with the bounding box? Or is there a way to specify this? I ask this because there are essentially two ways of working: either aligning objects at their visual boundingbox, or at their geometrical bbox (or nodes or stroke center). This distinction is being used in the preferences for the selector tool, and also when snapping. So we need it here also IMO.
You are right. I also thought of making this distinction but haven't yet implemented it. At present, only the geometrical bounding box is taken into account, and the guides for rectangles and 3D boxes use the precise location of the nodes (disregarding stroke etc.).
I don't think that for 3D boxes anything else would make sense anyway. But for rectangles and other objects this would indeed be useful. How about adding the following option in the "Guides" tab of Document Preferences: "When converting objects to guides, use visual/geometric bounding box"?
However, right now I'm not sure how to deal with rotated/twisted rectangles that have stroke applied (since I can't use their visual bounding box as provided by sp_item_bbox_desktop, for example). Will think about that.
Now that I think of it, it may be useful to provide another option which lets the user choose whether rectangles/3D boxes should be treated differently when converting to guides. Would the Document Properties be the right place for this, too, or should this go in the tools' preference pages?
Max
Maximilian Albert wrote:
You are right. I also thought of making this distinction but haven't yet implemented it. At present, only the geometrical bounding box is taken into account, and the guides for rectangles and 3D boxes use the precise location of the nodes (disregarding stroke etc.). I don't think that for 3D boxes anything else would make sense anyway. But for rectangles and other objects this would indeed be useful. How about adding the following option in the "Guides" tab of Document Preferences: "When converting objects to guides, use visual/geometric bounding box"?
We can't snap to the stroke outline anyway, so aligning the guides at the nodes is the right thing to do here. When using the bbox instead, then just follow the bbox preference as set for the selector tool, that should do.
BTW, we don't have a better location for this bbox option yet, but this doesn't feel right. It's not only applicable for the selector tool.
However, right now I'm not sure how to deal with rotated/twisted rectangles that have stroke applied (since I can't use their visual bounding box as provided by sp_item_bbox_desktop, for example). Will think about that.
I don't think there's an easy fix for this...
Diederik
Diederik van Lierop schrieb:
Maximilian Albert wrote:
You are right. I also thought of making this distinction but haven't yet implemented it. At present, only the geometrical bounding box is taken into account, and the guides for rectangles and 3D boxes use the precise location of the nodes (disregarding stroke etc.). I don't think that for 3D boxes anything else would make sense anyway. But for rectangles and other objects this would indeed be useful. How about adding the following option in the "Guides" tab of Document Preferences: "When converting objects to guides, use visual/geometric bounding box"?
We can't snap to the stroke outline anyway, so aligning the guides at the nodes is the right thing to do here. When using the bbox instead, then just follow the bbox preference as set for the selector tool, that should do.
Thanks, this was what I needed. This preference option is now taken into account when converting objects to guides. Moreover, I added checkboxes in the Rectangle and 3D box pages to allow converting these using their bbox, too. In case anyone is interested, here is the Release Notes entry:
http://wiki.inkscape.org/wiki/index.php/ReleaseNotes046#Converting_objects_t...
BTW, we don't have a better location for this bbox option yet, but this doesn't feel right. It's not only applicable for the selector tool.
Why not simply move it to the global "Tools" page? Shouldn't be a problem that this page otherwise empty, should it?
Max
Maximilian Albert wrote:
Diederik van Lierop schrieb:
BTW, we don't have a better location for this bbox option yet, but this doesn't feel right. It's not only applicable for the selector tool.
Why not simply move it to the global "Tools" page? Shouldn't be a problem that this page otherwise empty, should it?
That would be fine with me. At least it's better than where it's now, but it will still be under "Tools". I think this Inkscape-wide option deserves an even higher level, but I don't have a better suggestion than yours...
Diederik
Diederik van Lierop wrote:
BTW, we don't have a better location for this bbox option yet, but this doesn't feel right. It's not only applicable for the selector tool.
Why not simply move it to the global "Tools" page? Shouldn't be a problem that this page otherwise empty, should it?
That would be fine with me. At least it's better than where it's now, but it will still be under "Tools". I think this Inkscape-wide option deserves an even higher level, but I don't have a better suggestion than yours...
OK, I moved it there where it can reside until we have found an even better place for it.
Max
participants (3)
-
Diederik en Rezi
-
Diederik van Lierop
-
Maximilian Albert