Bug 129823 - Hexagon Aspect Ratio Bug
Summary: Hexagon Aspect Ratio Bug
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
6.3.3.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks:
 
Reported: 2020-01-06 00:37 UTC by BelovedBr
Modified: 2020-06-18 09:40 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
three hexagons draft (9.75 KB, application/vnd.oasis.opendocument.graphics)
2020-01-08 23:02 UTC, BelovedBr
Details
CustomShapes regular hexagon (9.91 KB, application/vnd.oasis.opendocument.graphics)
2020-05-06 21:38 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BelovedBr 2020-01-06 00:37:16 UTC
Issue: the Draw default values assigned for the hexagon width and height are the sames. This lets the figure to be distorted (asymmetrical). 

Solution:  to correct the shape keep the height value as user defined and assign the width multiplying the height value by 2/(tan(60)=2/(3^(1/2)). Otherwise, keep the width value fixed and assign the height value as width*(3^(1/2))/2.
Comment 1 Julien Nabet 2020-01-06 14:07:53 UTC
On which env are you? (Linux, Windows, Macos, other?)
Which LO version do you use?
Last stable one is 6.3.4
Comment 2 Julien Nabet 2020-01-08 16:16:29 UTC
Please respond on bugtracker by using this link https://bugs.documentfoundation.org/show_bug.cgi?id=129823# instead of sending an email in private.
The goal is to share information.

For the rest:
"The correction factor is sin(60)= 0.866025

You shall multiply width by (1/sin(60)) or multiply height by sin(60) in order to draw a perfect (regular) hexagon."
I can't tell.

So I put back UNCONFIRMED since I don't have more questions.
Comment 3 BelovedBr 2020-01-08 23:02:19 UTC
Created attachment 157020 [details]
three hexagons draft

The picture in annex represent 3 hexagon the first was generated using shift and mouse, the 2º and 3º is copies corrected by sin(60). See the distances between paralel sides.
Comment 4 Julien Nabet 2020-01-09 14:27:09 UTC
I can't help here so uncc myself.
Comment 5 Xisco Faulí 2020-02-17 15:22:49 UTC
@Regina, I thought you might be interested in this issue
Comment 6 Regina Henschel 2020-02-17 16:22:41 UTC
The current custom-shape collection is designed to give good results in exchange with binary MS Office formats. So I would not change anything in this collection. For import and export with OOXML we use the definitions of the OOXML standard. So I would not make changes there.

The problem is, that in case the shape has equal width and height and a regular hexagon (or pentagon or 5-point-star or 6-point-star) at the same time, the line of the polygon or point of the star would nor reach the edge of the shape.

You can always scale these shapes so that they become regular. Do this once and put them into a Gallery theme. Or if you really want a custom-shape, that shows a regular polygon on a square area, then write your own custom-shape and put it into a Gallery theme.

I can image to add a "mathematical" theme to the Gallery, which e.g. has parabola and hyperbole too.

If you are not stuck on a solution with "custom-shapes", we could think of implementing the element <draw:regular-polygon> of ODF and design its UI so, that it is easy to keep it regular.

I think, here is nothing to "fix". But it might be an enhancement request for a Gallery theme or for <draw:regular-polygon>.
Comment 7 Regina Henschel 2020-05-06 21:38:50 UTC
Created attachment 160474 [details]
CustomShapes regular hexagon

The attachment contains two hexagons, which are so designed, that if the size of the shape is a square, then the hexagon is regular. In consequence the hexagon often does not touch the bounding square.

The hexagon has a handle to rotate the hexagon inside the bounding square. One hexagon in the document has the handle at 0°, the other at 90°.

The hexagon has gluepoints at the corners and in the center.

You can drag the hexagons into the Gallery to have them usable in other documents.

The hexagons work fine in ODF-formats. LibreOffice exports to Microsoft Office formats will not work. But if PowerPoint opens an .odp-document, which has such hexagon, then the hexagon will be correct in PowerPoint.

I think, that these hexagons should solve the issue.
Comment 8 Xisco Faulí 2020-06-17 15:35:46 UTC
(In reply to Regina Henschel from comment #6)
> I think, here is nothing to "fix". But it might be an enhancement request
> for a Gallery theme or for <draw:regular-polygon>.

@Andreas, @Heiko, opinions on this ?
Comment 9 Heiko Tietze 2020-06-18 09:40:28 UTC
(In reply to Xisco Faulí from comment #8)
> @Andreas, @Heiko, opinions on this ?

Following Regina's advice to take her work as fix.

(In reply to Regina Henschel from comment #7)
> I think, that these hexagons should solve the issue.