0

Say, I've drawn an angled line segment in Inkscape, using Bezier Pen tool with Ctrl to snap angles, like this (where I have a 30 degree angle):

angled line segment

Here is an animated gif from How to snap line segments to specific angles in Inkscape? showing the technique:

animation drawing

So, then, let's say I've decided that the second/angled line segment is too along. What is the easiest way to shorten (or lengthen) it along the original angled direction?

For instance, let's take the starting example, and say we'd want to shorten it to where the X is (which is along the original segment direction):

angled line segment with X for shorten

One way is to add a grid line, which will be manually rotated to the same angle, and then using it as a snapping guide, while dragging the end node of the line segment with the mouse - but in my head that asks for two more UI actions than what would be minimally required: one for dragging the grid line at start, and another to delete it at end - so I was wondering whether there is something easier, maybe holding a keyboard combo, while dragging a node using the "Edit paths by nodes (N)" tool?

2
  • 1
    Hi. Welcome to GDSE. Are you trying to make a chamfered corner? It might be better to use the Corner (fillet/chamfer] Live Path Effect. It's fully adjustable. see example. Obviously, this will only work for 45° chamfers.
    – Billy Kerr
    Apr 30 at 15:09
  • Thanks @BillyKerr - was not looking for chamfered corners, just an easier way to edit diagram arrows (which I manually edit anyways)
    – sdbbs
    May 1 at 1:31

2 Answers 2

2

enter image description here

So, segment AB points to the wanted direction, but it is too long. You want to shorten it. You know somehow exactly what's the right wanted place for node B. You want to move B to it so that segments BC and CD keep their lengths and directions, Right?

If yes, then make with the node tool a new node to the wanted place:

enter image description here

Select with the node tool nodes B, C and D. Drag them (by dragging B) to their right places:

enter image description here

Letters did not follow. Sorry.

Now you have 2 nodes at the same place - the inserted one and moved B, Select one of them with node tool and press DEL.

If you must make AB longer draw a new line between A and B (red):

enter image description here

Select the new line with the normal selection tool and drag the line longer. Hold Ctrl to keep the direction:

enter image description here

This seems to work properly with no preference settings in Inkscape 1.2. In older Inkscape versions one had to take geometric bounding boxes into use or to set stroke width = 0.

Now select with the node tool nodes B, C and D. Drag B to the end of the line:

enter image description here

Finish by deleting the extra line.

1
  • Many thanks @KuoHilas - great answer; now I recall I've seen this approach elsewhere years ago - and had promptly forgotten about it; good to have it in writing now!
    – sdbbs
    May 1 at 1:32
2

With the nodes tool, you can move a node along the node handle by dragging the node while pressing Ctrl+Alt.

Even for the intermediate node, this will snap movement to both of the handle directions (horizontal and diagonal in your example).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.