How can I draw a line at right angles to the previous line? (perpendicular)

Post questions on how to use or achieve an effect in Inkscape.
strelkovandrey
Posts: 7
Joined: Fri May 26, 2017 4:38 pm

How can I draw a line at right angles to the previous line? (perpendicular)

Postby strelkovandrey » Fri May 26, 2017 4:52 pm

Good afternoon, I want to draw a line and put a point, the next draw perpendicular to the previous one, how can this be done?
Untitled.png
Untitled.png (6.57 KiB) Viewed 5827 times

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: How can I draw a line at right angles to the previous line? (perpendicular)

Postby Moini » Fri May 26, 2017 9:58 pm

Currently, I think the best way is to draw first, using the horizontal/vertical mode of the Pen tool, then rotating the whole thing later. Or you could use guides, and turn them around. Or an (axonometric) grid that is tilted. (the last two options need snapping enabled, and rotation of the scaffolding isn't quick).
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: How can I draw a line at right angles to the previous line? (perpendicular)

Postby Lazur » Fri May 26, 2017 10:00 pm

A substitute can be using the rectangle tool ...until the new rotate canvas option will be fully developed(?).

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: How can I draw a line at right angles to the previous line? (perpendicular)

Postby Moini » Fri May 26, 2017 10:17 pm

Want a preview, Lazur? I compiled it a couple of days ago :)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: How can I draw a line at right angles to the previous line? (perpendicular)

Postby Moini » Fri May 26, 2017 10:18 pm

(but I think it's supposed to rotate the 'notion' of horizontal/vertical together with the view)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: How can I draw a line at right angles to the previous line? (perpendicular)

Postby Moini » Fri May 26, 2017 10:20 pm

(resizing the window when it rotated mode looks funny... The drawing dances around in the visible area in circles.)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

strelkovandrey
Posts: 7
Joined: Fri May 26, 2017 4:38 pm

Re: How can I draw a line at right angles to the previous line? (perpendicular)

Postby strelkovandrey » Fri May 26, 2017 10:41 pm

The fact is that in this way I line a satellite image with buildings, and all buildings have different sizes, angles of rotation.
And it turns out that if I roughly draw the shape of the building and rotate its desired angle, I can no longer change the individual length and width in a certain direction, only the entire figure can change

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: How can I draw a line at right angles to the previous line? (perpendicular)

Postby Moini » Fri May 26, 2017 11:35 pm

If you use rectangles, and modify them with the rectangle tool, this will still be possible.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: How can I draw a line at right angles to the previous line? (perpendicular)

Postby theozh » Fri May 26, 2017 11:59 pm

The Bezier tool (Shift+F6) has an option "Create a sequence of paraxial line segments".
BezierToolOption.png
BezierToolOption.png (3.73 KiB) Viewed 5775 times
I guess you are looking for something convenient like this, however, this option allows only to draw horizontal and vertical lines. Actually, it could be worth modifying this tool such that it will start the 90° turns with respect to the angle of first segment drawn (worth a feature request?). In case you want to draw a strictly vertical or horizontal lines you always can press Ctrl-Key. So I do not really see the benefit of this option (besides not having to hold the Shift-Key all the time.)


Well, as @Moini mentioned you could use guides.
In order to make life easier you need to enable "Snap to path", "Snap to cusp node" and "Snap to guides" in the Snap controls bar. Furthermore, you need "Snap perpendicularly" which is (for some strange reasons) hidden under:
Menubar | File | Document Properties | Snap | Miscellaneous | Snap perpendicularly

I assume you know that you can create a guide by a mouse click on the ruler, keep holding the mouse key and drag the guide where you want it.

1. draw a segment with the Freehand Tool (F6)
2. get/drage a first guide, snap it perpendicular to this segment and move it to the start node.
3. continue to draw a segment at the endnode
4. get a second guide and let it snap perpendicularly to the previous drawn segment and move/snap it to its endnode.
5. draw a line, let it snap to this second guide and end it with a double click
6. continue the line and let it snap perpendicular to the first guide, double click
7. continue the line to the starting point
Done!
Sounds a bit complicated, but I hope you can follow my description. An animated demo might be helpful...
Win7/64, Inkscape 0.92.2

strelkovandrey
Posts: 7
Joined: Fri May 26, 2017 4:38 pm

Re: How can I draw a line at right angles to the previous line? (perpendicular)

Postby strelkovandrey » Sat May 27, 2017 12:11 am

theozh wrote:The Bezier tool (Shift+F6) has an option "Create a sequence of paraxial line segments".
BezierToolOption.png I guess you are looking for something convenient like this, however, this option allows only to draw horizontal and vertical lines. Actually, it could be worth modifying this tool such that it will start the 90° turns with respect to the angle of first segment drawn (worth a feature request?). In case you want to draw a strictly vertical or horizontal lines you always can press Ctrl-Key. So I do not really see the benefit of this option (besides not having to hold the Shift-Key all the time.)


Well, as @Moini mentioned you could use guides.
In order to make life easier you need to enable "Snap to path", "Snap to cusp node" and "Snap to guides" in the Snap controls bar. Furthermore, you need "Snap perpendicularly" which is (for some strange reasons) hidden under:
Menubar | File | Document Properties | Snap | Miscellaneous | Snap perpendicularly

I assume you know that you can create a guide by a mouse click on the ruler, keep holding the mouse key and drag the guide where you want it.

1. draw a segment with the Freehand Tool (F6)
2. get/drage a first guide, snap it perpendicular to this segment and move it to the start node.
3. continue to draw a segment at the endnode
4. get a second guide and let it snap perpendicularly to the previous drawn segment and move/snap it to its endnode.
5. draw a line, let it snap to this second guide and end it with a double click
6. continue the line and let it snap perpendicular to the first guide, double click
7. continue the line to the starting point
Done!
Sounds a bit complicated, but I hope you can follow my description. An animated demo might be helpful...



Thank for detail answer!,... but I little confused (my English is not well), can You show...
I found simple portable software which allow record screen (http://www.screentogif.com/)

Thanks!

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: How can I draw a line at right angles to the previous line? (perpendicular)

Postby theozh » Sat May 27, 2017 3:57 am

@strelkovandrey, maybe this helps additionally to the above description...
don't forget to have all the necessary snapping options on.

RotatedRectangle.gif
RotatedRectangle.gif (208.65 KiB) Viewed 5740 times
Win7/64, Inkscape 0.92.2

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: How can I draw a line at right angles to the previous line? (perpendicular)

Postby Moini » Sat May 27, 2017 4:54 am

I keep forgetting about perpendicular snapping - this looks really doable :)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

strelkovandrey
Posts: 7
Joined: Fri May 26, 2017 4:38 pm

Re: How can I draw a line at right angles to the previous line? (perpendicular)

Postby strelkovandrey » Sat May 27, 2017 5:06 am

@theozh, Thanks, It seems that there is no other way out, so I did something similar to your decision
scr.png
scr.png (32.9 KiB) Viewed 5728 times

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: How can I draw a line at right angles to the previous line? (perpendicular)

Postby theozh » Sat May 27, 2017 5:13 am

For your purpose, a probably easier way might be the following:
use the LPE (Live Path Effect) Pattern along path and pattern a rectangle along a line.
This you can easily rotate and size with two handles.

Since this is a bit complicated to explain, just take the attached SVG...
And copy a red rectangle to your SVG file.

- move a red rectangle such that its upper left corner aligns with a corner of a building
- use the Node Tool (F2)
- drag the upper right corner node of the rectangle to the other corner of the building
- drag the handle (circle) such that the width of the rectangle matches your building
- copy/duplicate rectangles as many as you need.

edit: oh, I just see your post, it's not just rectangles but more complex (but all 90°) structures...

RotatedRectangle2.gif
RotatedRectangle2.gif (240.32 KiB) Viewed 5727 times
Attachments
RotatedRectangle.svg
(89.79 KiB) Downloaded 190 times
Last edited by theozh on Sat May 27, 2017 2:27 pm, edited 1 time in total.
Win7/64, Inkscape 0.92.2

strelkovandrey
Posts: 7
Joined: Fri May 26, 2017 4:38 pm

Re: How can I draw a line at right angles to the previous line? (perpendicular)

Postby strelkovandrey » Sat May 27, 2017 1:11 pm

Yes, it is true, I have more complex buildings. But what you showed to me is new, before I did not notice this and it's very useful. Thank you.
While I will use the methods described above, I hope in future releases Inkscape there will be some kind of similar tool

I want to note that I did not expect that this forum for the program will be so friendly, all thanks for the replies and quick help!

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: How can I draw a line at right angles to the previous line? (perpendicular)

Postby theozh » Sat May 27, 2017 2:22 pm

You're welcome!
From time to time, I take such questions to play around and try to find satisfying solutions and additionally broaden my own horizon with Inkscape. It's fun :).
By the way, I filed a feature request:
https://bugs.launchpad.net/inkscape/+bug/1693925
As above mentioned, with the bezier-tool there is an option to draw lines in 90° steps, but only horizontally and vertically. Why not also tilted?
Win7/64, Inkscape 0.92.2

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: How can I draw a line at right angles to the previous line? (perpendicular)

Postby druban » Sat May 27, 2017 3:14 pm

At this time Inkscape does not allow relative rotation snapping of anything but guidelines.
Hopefully you can change the preferences to rotation snapping every 90 degrees and check the box that says guideline rotation is relative to original angle to work out a method to quickly draw rectilinear objects not aligned with x and y axes. You can alternatively check the relative change option in each guide's properties.
You can duplicate an object and convert to guides to start the process...

A completely different option would be to create an axonometric grid which allows you to specify the angle of the grid lines, if you know what tilt you want to give your drawing... This achieves a weak form of page rotation if your grid is fine.
Your mind is what you think it is.

strelkovandrey
Posts: 7
Joined: Fri May 26, 2017 4:38 pm

Re: How can I draw a line at right angles to the previous line? (perpendicular)

Postby strelkovandrey » Sat May 27, 2017 4:34 pm

Hmmm... axonometric grid interesting solution
scr2.jpg
scr2.jpg (121.52 KiB) Viewed 5651 times


Hopefully you can change the preferences to rotation snapping every 90 degrees and check the box that says guideline rotation is relative to original angle to work out a method to quickly draw rectilinear objects not aligned with x and y axes. You can alternatively check the relative change option in each guide's properties.
You can duplicate an object and convert to guides to start the process...


In connection with my bad English did not fully understand how it is?

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: How can I draw a line at right angles to the previous line? (perpendicular)

Postby theozh » Mon May 29, 2017 5:37 am

Just for fun, another procedure without "hundreds" of guide lines...
As others mentioned above, in the current version of Inkcsape the canvas cannot yet be rotated, but can't you temporarily rotate your satellite image? That's probably what @Moini meant in the first answer.

- create a guide and move its origin to the corner of a building
- rotate the guide (Shift+Mouse drag) such that it aligns it with the edge of the building
- double click on the guide and copy the angle
- select your background image
- use the Transform dialog (Shift+Ctrl+M)
- select clockwise rotation
- paste the angle value
- apply (the image will be rotated such that your building edge is horizontal)

- use the Bezier tool (Shift+F6) and select Mode "Paraxial lines"
- draw the outline of your building(s) which have the same tilt angle
- rotate the image and your outline back counterclockwise
- continue with buildings with different tilt angle.

Actually, if you have buildings with non-90°corners, instead of the Bezier-Paraxial lines it might be better to use the Mode straight lines and for horizontal or vertical lines hold Ctrl-Key pressed when dragging a new segment.

RotatedBuildings.gif
RotatedBuildings.gif (245.92 KiB) Viewed 5599 times
Win7/64, Inkscape 0.92.2


Return to “Help with using Inkscape”