[Solved] Perfect parallel polygon sides when not at 0 or 90°

Discuss the drawing application

[Solved] Perfect parallel polygon sides when not at 0 or 90°

Postby PopStarWannabe » Wed May 06, 2015 12:41 pm

How do I achieve this for instance:

I draw a rhombus. Starting from each side of it I want to draw a square of the same side length. So each side of the rhombus will be shared by one of the 4 squares. How do I do it?

Also, say I draw 1 square, then I rotate it. Then I draw a triangle. How do I align one side of the triangle to one side of the rotated square so that these 2 sides will be perfectly parallel?
Last edited by PopStarWannabe on Mon May 11, 2015 1:44 pm, edited 1 time in total.
OpenOffice 4.1.2 / Windows 10 Pro x64
PopStarWannabe
 
Posts: 9
Joined: Mon May 04, 2015 4:43 pm

Re: perfect parallel polygon sides when not at 0 or 90 degre

Postby keme » Wed May 06, 2015 2:17 pm

Generally, it may be easier if you start with a square, copy/paste, flip vertically, copy/paste the pair and then flip horizontally. When the squares are arrranged to form a rhombus, you can rotate the entire set of objects if required.

If you need to start with the rhombus, this should work as a general procedure (even for an arbitrarily rotated rhombus shape):
Assuming that you have your rhombus as a vector object... (drawn, not a bitmap image inserted/imported from somewhere).
  • Menu selection Tools - Options, then select Draw - Grid.
    • Tick Snap To object points and To object frame.
    • Tick Snap position When rotating.
    • Untick everything else.
  • Select the Line tool.
  • Draw a line along one side of your rhombus. Make sure that the ends snap to the corners.
  • With the line still selected, make 3 copies (so you have 4 identical lines).
    ctrl-C, ctrl-V, ctrl-V, ctrl-V
The last line you pasted should now be the only one selected.
  • Activate the rotate tool. (You should now see red handles instead of the green ones.)
  • Move the rotation axis (like a crosshair in the middle of the selection) to one end of the line. It should snap to the endpoint.
  • Hover over the opposite end so you get a rotation indicator, and drag to rotate it at a right angle to the original.
    Rotation should snap at 15º angle increments unless you altered the rotation snap setting.
  • Select the next line and rotate it around the opposite end in the same manner.
  • Select the next line and drag it to rest on top of the two you just rotated.
    There should now be one line remaining at the rhombus. You have your square.
If you need very precise placement, repeat the procedure for the other sides. Copy/paste/move/rotate is faster, but will not yield exact positioning.

If you need to have the square as one object, there are several ways to do it. The best way may be to use what is created above as helper lines. Select the Polygon or Filled polygon tool from the Curves toolbox, and let the polygon snap to the corners of your square. Clean up by removing the lines when you have your polygon shape.
You can also just group the four lines.
A third possibility is to connect the lines you have drawn. If you use the Modify - Connect option after the above procedure, you will get a diagonal line in your square. To avoid that, first rotate the original line (the one on the side of the rhombus) 180º around its center (do not move the rotation axis).
Apache OO 3.4.1/4.1.2/4.1.3, on Ms Windows 7/10 and Mac OS-X 10.8.5 and 10.11.
LibreOffice 4.3.3.2 on Mepis Antix MX 14
User avatar
keme
Volunteer
 
Posts: 3305
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: perfect parallel polygon sides when not at 0 or 90 degre

Postby keme » Wed May 06, 2015 2:27 pm

For the triangle, you can use a similar technique. Use the snap settings as indicated above, and draw a line on the side of you rotated square. Drag that line to desired position and use it as a guide for your triangle. Remove it when done.

If you need a longer line to support your triangle, you can extend it without altering its angle. Just keep the shift key pressed while dragging the ends of the line.

The shift key acts as a "snap toggle" when dragging (move/resize), so it reverses all the selections in the Draw - Grid dialog (more or less...).
Apache OO 3.4.1/4.1.2/4.1.3, on Ms Windows 7/10 and Mac OS-X 10.8.5 and 10.11.
LibreOffice 4.3.3.2 on Mepis Antix MX 14
User avatar
keme
Volunteer
 
Posts: 3305
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: perfect parallel polygon sides when not at 0 or 90 degre

Postby acknak » Wed May 06, 2015 3:01 pm

This kind of task is possible in Draw, but not comfortable. It doesn't provide the tools for most geometric constructions. You need CAD software or math software to do it well.

I find that constructing exact polygons is easier if I construct the sides as lines. If all you need is a figure, then you can stop here.

If you need a perfect polygon shape, then once the sides are all in place, the lines can be connected to form a polygon, or you can use the lines to serve as guides in placing the vertices of a polygon shape.

 Edit: Oops--too slow! 
keme has already written exactly what I was about to. I might just add that I avoid using the "smart" shapes, except to immediately convert them to polygons. Even then, some of them are not accurate and not all the vertices can be snapped to. Better to do your own constructions and save them as a Draw file and/or in a Gallery set.

The key to doing accurate constructions is the "snap to object points" feature. Unfortunately, it doesn't apply in all situations, but it always applies to line ends, so that's what I use the most.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: perfect parallel polygon sides when not at 0 or 90 degre

Postby acknak » Wed May 06, 2015 6:21 pm

PopStarWannabe wrote:Also, say I draw 1 square, then I rotate it. Then I draw a triangle. How do I align one side of the triangle to one side of the rotated square so that these 2 sides will be perfectly parallel?


keme wrote:For the triangle, you can use a similar technique. ...

keme's suggestion works if you can draw the triangle from the rotated square.

But given a square and a triangle with arbitrary rotations, I don't see any simple way to get them to share sides along the same line.

The best I could come up with was to use lines (snap the ends to vertices) to measure angles for the two sides to be aligned, calculate the difference in angle, the use Format > Position and Size > Rotation ... to get them aligned.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: perfect parallel polygon sides when not at 0 or 90 degre

Postby PopStarWannabe » Mon May 11, 2015 1:44 pm

Thank you both! That was very usefull information!
OpenOffice 4.1.2 / Windows 10 Pro x64
PopStarWannabe
 
Posts: 9
Joined: Mon May 04, 2015 4:43 pm

Re: perfect parallel polygon sides when not at 0 or 90 degre

Postby keme » Wed May 13, 2015 9:42 am

For drawing with mathematically exact matching, you may want to look at GeoGebra instead.

For graphic design applications, consider using Inkscape. I'm not entirely sure that it has tools for exact placement, but I believe so...

For technical applications, there are several titles which I have little experience with, but they should all provide tools for exact placement. See this Open Source Alternative page.
Apache OO 3.4.1/4.1.2/4.1.3, on Ms Windows 7/10 and Mac OS-X 10.8.5 and 10.11.
LibreOffice 4.3.3.2 on Mepis Antix MX 14
User avatar
keme
Volunteer
 
Posts: 3305
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway


Return to Draw

Who is online

Users browsing this forum: No registered users and 0 guests