Hello. Currently the status bar shows the position and the size of the selected object, but this size refers to the size delimited by the handles of the shape, that is a four side polygon or rectangle. It will be good to have an automatic area calculation of the shape itself in the status bar and in the dialog of position and size. For basic shapes, like square, rectangle, triangle and circle, a think the calculation could be simple, because the length of the handles polygon match some of the measures needed for the calculation. For example, in the square and rectangle is as simple as multiplying the width by the height. For the triangle, the width match the base and the height is the same needed for the calculation of base of triangle by height divided by two. In the case of a regular circle, the size of the width is equal the diameter needed for the area calculation. Even with the ellipsis, the size of the width is equal to the long diameter and the height is equal to the short diameter, which can be used to calculate the area. I know that some shapes will require a more complex procedures to calculate, and I don't have the programming skills to develop this feature. So I hope that this enhancement goes to the right people thinking on improve the Draw module of LibreOffice. Thanks.
Created attachment 114114 [details] Some shapes
Sounds useful -> NEW.
What is the use case for this calculation? I mean to calculate the area size is rather a question after the drawing, or is it necessary for some reason to know it precisely?
One use case is probably pretty common: calculating the floor area of a room or bit of land that is oddly shaped or contains fixtures that result in the area being oddly shaped. This is useful for example when working out how much flooring is required, or the amount of fertiliser needed to maximise yield from a particular crop. You would simply set the scale used on an imported graphic layer and then draw a polygon over it. As the original poster noted this is easy for regular shapes, but within Draw it should be relatively easy to calculate the area within any closed polygon (because it's routinely done in GIS, so the calculations must be well known - could ask the QGIS devs how it is done).
Can I please know how to calculate the sizes and shapes of these polygons and rectangles? I am a bit confused. https://www.thatchfinder.com/directory/19485/pleasanton-concrete-and-masonry/
I admire your great help ere that would be informative to all. The people who really wants the help about programming to understand can get the information. Please keep it up with your work on https://www.assignmentmasters.co.uk/nhd-assignment/ that would be recommending as well.
*** Bug 137126 has been marked as a duplicate of this bug. ***
I've marked bug 137126 as a duplicate, even though it also asked for perimeter. I can see how area and perimeter (or "total length of all paths") can be useful values in various use cases (see also bug 156549). Question is: - what can realistically fit in the status bar, e.g. what would be most useful? Does it need to be configurable? - should extra statistics live in a dedicated "object statistics" dialog, just like we have document stats in Writer? For a selection of objects, could be numbers like: number of objects, total length of paths, total area, total length of paths with a style, total filled area...
Created attachment 189340 [details] Statusbar Both shapes are 1x1cm - the statusbar shows the size of the selection. What is missing?
(In reply to Heiko Tietze from comment #9) > Created attachment 189340 [details] > Statusbar > > Both shapes are 1x1cm - the statusbar shows the size of the selection. What > is missing? In this particular case, how I picture it would be having (as well as the _selection frame_ info we already have): - Shape area = 2 cm² - Total path length = 8 cm
(In reply to Stéphane Guillou (stragu) from comment #10) > - Total path length = 8 cm My point was that we actually show all information and I wonder if the simple math is worth all the effort. But no objection to a statistics dialog similar to Writer.
(In reply to Heiko Tietze from comment #11) > (In reply to Stéphane Guillou (stragu) from comment #10) > > - Total path length = 8 cm > > My point was that we actually show all information and I wonder if the > simple math is worth all the effort. > > But no objection to a statistics dialog similar to Writer. It's simple maths for a 1 × 1 square but not for (groups of) more complex shapes. And we show some information for the selection rectangle, not for the objects.
(In reply to Stéphane Guillou (stragu) from comment #12) > (In reply to Heiko Tietze from comment #11) > > (In reply to Stéphane Guillou (stragu) from comment #10) > > > - Total path length = 8 cm > > > > My point was that we actually show all information and I wonder if the > > simple math is worth all the effort. > > > > But no objection to a statistics dialog similar to Writer. > > It's simple maths for a 1 × 1 square but not for (groups of) more complex > shapes. > And we show some information for the selection rectangle, not for the > objects. It is rather simple for regular "non self-intersecting" forms, see e.g.: https://www.wikihow.com/Calculate-the-Area-of-a-Polygon, based on https://www.mathopenref.com/polygonregulararea.html and https://www.mathsisfun.com/geometry/area-irregular-polygons.html in the later there is even a interactive tool to calculate this: https://www.mathsisfun.com/geometry/area-polygon-drawing.html. For self-intersecting polygons, this is more tricky. I guess the easiest is to split them in two separate polygons. This is properly handled for the drawing of filled polygons (see attachment). Beyond precise calculations, there are also a very nice way of calculating on integer coordinates, covering all cases: https://en.wikipedia.org/wiki/Pick's_theorem that could be used if the coordinates are quantized with a reasonable large step.
Created attachment 189366 [details] Self-intersecting polygon