Align NODE to a object

Flesh out your ideas for new or improved Inkscape features before submitting a request.
User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

Align NODE to a object

Postby Grobe » Wed Oct 20, 2010 6:30 am

I can align nodes to other nodes and likewise objects to other objects.

I often draw chematic-like drawings and several times I've experienced the need to align single nodes to an object. I don't know any good workaround.
Only if a node should go straight into a :tool_rectangle: I can enable Snap from and to midpoints of line segments. But I often have a need to align nodes without touching any segments midpoint, and/or the object that I want to align the node to is more complex than a rectangle which doesn't have a midpoint segment.
node_centerAdjust_samplefile.svg
(2.49 KiB) Downloaded 342 times
:lol:

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

Re: Align NODE to a object

Postby ~suv » Wed Oct 20, 2010 4:06 pm

Grobe wrote:I often draw chematic-like drawings and several times I've experienced the need to align single nodes to an object. I don't know any good workaround.
(…) But I often have a need to align nodes without touching any segments midpoint, (…)
Maybe I don't understand what you are aiming for: any reason why using the snap target 'Snap to path' for 'Snap nodes and handles' would not work for you? You can use it while dragging an object with the select tool as well as when dragging a node with the node tool.

User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

Re: Align NODE to a object

Postby Grobe » Wed Oct 20, 2010 11:47 pm

~suv wrote:Maybe I don't understand what you are aiming for: . . .
No, probably not. I try to explain a little more:

Open the uploaded file. Just one of the simplest drawing ever created :mrgreen:
The path contains four nodes. If I want to move the uppermost nodein x-direction only, so that it align with the rectangle I cannot do that.

Or - yes I can. I can make another straight plumb line. Then align this line to the center of the square. Then center the bottom of that line to the upper part of the path (the original one). Then I can use node tool and move the uppermost node so that it snap to the end of the lower end of the plumb line.
Even this method wil not prevent the node to move in Y-direction.

Another workaround I just figured out: I can simply copy/paste the X-value for any node.

The first workaround is a horrible drawing method. It's likely that the X-position to the node won't keep. I rather want to be able to do that directly.
The other method is slightly better. Actually Inkscape suddenly got a "Bad error" when I turned on "Snap to path" while a node was selected. Unfortunately I wasn't able to recreate the error.

As said, I use Inkscape mostly to draw schematic -like drawings, and such a feature would help.

Thanks
:lol:

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

Re: Align NODE to a object

Postby ~suv » Thu Oct 21, 2010 1:04 am

[Edit time="some minutes later"]
Only after adding my second comment I realized that the topic was posted in 'Inkscape ideas', and not in the 'Help' or 'Software' forum - otherwise I might have answered differently.
The first question that comes to mind: How to implement selecting both nodes and objects at the same time? Would this require a separate "align tool"? Inkscape's current selection model doesn't mix: with the node tool, you can't select objects, with the select tool you can't select nodes.

Some feature requests filed for aligning nodes:
Align dialog should have "Relative to" for nodes, too
Node Tool: improve ui for x- or y-alignment of multiple nodes
Align and Distribute subpaths
[/Edit]

earlier comment:
Grobe wrote:Open the uploaded file. (…)
I did that before answering, of course. Still not sure if I understood your second, detailed description correctly:
Grobe wrote:The path contains four nodes. If I want to move the uppermost nodein x-direction only, so that it align with the rectangle I cannot do that.
I assume you want to move the uppermost node of the curve in the lower part of the drawing horizontally so that it aligns with the x-coordinate of the center of the rectangle?
Grobe wrote:I can make another straight plumb line. Then align this line to the center of the square. Then center the bottom of that line to the upper part of the path (the original one). Then I can use node tool and move the uppermost node so that it snap to the end of the lower end of the plumb line.
Drag a vertical guide from the ruler to the canvas and snap it to the center point of the rectangle.
Grobe wrote:Even this method wil not prevent the node to move in Y-direction.
Now switch to the node tool :tool_node: and drag the node with 'Ctrl' pressed - this constrains the movement along the x- and y-axis - and let it snap to the guide.

References:
Guides, Node tool
Attachments
node_centerAdjust_howto-2.png
node_centerAdjust_howto-2.png (45.14 KiB) Viewed 6259 times

User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

Re: Align NODE to a object

Postby Grobe » Thu Oct 21, 2010 3:47 am

Thanks. I see the use of guides. Inthis particular example I could have used a guide because it would alow me to snap to segment senterpoint.

I just tried with a little more complex figure than a rectangle, and I couldn't get the guide in center position, neither at edge.

Maybe a better solution would be to allow alignment of guides, not nodes.
:lol:


Return to “Inkscape Ideas”