Hello QCAD Community,
I'm a newcomer to QCAD, so please bear with me! I'm currently working on a floor plan, and I've noticed an abundance of decimals when incorporating area measurements into the drawing. Since I'm operating within the metric system, can anyone guide me on how to set QCAD to display only three decimal places after the point?
Kindly refer to the attached image for clarification.
I appreciate any help you can provide.
Configuring QCAD for 3 Decimal Places in Metric System Floor Plans
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
-
Kmeelo
- Newbie Member
- Posts: 8
- Joined: Fri Nov 24, 2023 1:55 am
Configuring QCAD for 3 Decimal Places in Metric System Floor Plans
- Attachments
-
- XN-231124-08-10.jpg (872.42 KiB) Viewed 10031 times
- Husky
- Moderator/Drawing Help/Testing
- Posts: 5054
- Joined: Wed May 11, 2011 9:25 am
- Location: USA
Re: Configuring QCAD for 3 Decimal Places in Metric System Floor Plans
Hello,
you can set the global "Label Format" precision like "3 places after point" below:
Menu / Edit / Drawing Preferences / Dimension / Dimension Settings
you can set the global "Label Format" precision like "3 places after point" below:
Menu / Edit / Drawing Preferences / Dimension / Dimension Settings
Work smart, not hard: QCad Pro
QcadPro, QcadCam, Win11/64, 64GB RAM, 10-Core, SSD
If a thread is considered as "solved" pls. change the title of the 1. post to "[solved] Title..."
QcadPro, QcadCam, Win11/64, 64GB RAM, 10-Core, SSD
If a thread is considered as "solved" pls. change the title of the 1. post to "[solved] Title..."
-
CVH
- Premier Member
- Posts: 4958
- Joined: Wed Sep 27, 2017 4:17 pm
Re: Configuring QCAD for 3 Decimal Places in Metric System Floor Plans
Hi,
To my knowledge the number of decimal places of the info tools aren't all governed by the drawing dimension settings.
And then the area of a polygon is an exception.
Polygonal Area (IR):
-> Area to 12 decimal digits but always as short as possible
-> There is no preference, setting nor option that has an influence.
We can look it up:
Polygonal Area (IR) = InfoArea.js
https://github.com/qcad/qcad/blob/maste ... nfoArea.js
Line 128 calls for a formatted area text string omitting a parameter:
https://github.com/qcad/qcad/blob/maste ... ea.js#L128
Line 138-140 calls a Information.js function for formatting a value with no rounding:
https://github.com/qcad/qcad/blob/maste ... ea.js#L139
Line 81 of Information.js lines 75-96 sets precision = 12
https://github.com/qcad/qcad/blob/maste ... ion.js#L81
This value is left unchanged there variable 'rounded' is undefined. Rounded it would be 3 decimal digits.
With a drawing unit other than 'Inch' the area string is then constructed by RUnit.cpp with leading, without trailing zeros
https://github.com/qcad/qcad/blob/maste ... ion.js#L93
https://github.com/qcad/qcad/blob/maste ... #L853-L901
In Line 873-877 we see that it is handled differently for Qt6
If after all this you expect 12 decimal digits (not Qt6) then you are in for a surprise ... It has definitely changed since for example 3.27.6
One can verify the area value with Misc .. Information .. 2D Centroids .. Area Centroid.
After creation see the custom properties of the Centroid marker, reported values are as exact as can be in full floating point notation.
Centroids code exploits specialized algorithms to avoid known pitfalls in floating point arithmetic.
The Info tools also report a user information on the Command Line History and that might be in a different and/or mixed format.
Between brackets up to 6 decimal digits, so-called 'Exact', and only if different string-wise with the formatted string for the Command Line.
For IP - IE - IN there is a hidden preference in the QCAD.ini/config that I exploit to get full floating point information:
[Info] Precision=17 (The number of decimal digits, -1 = normal)
Not to be confused with number precision what is the amount of significant digits.
Quite important at GUI level when creating custom scripts handling all kinds of geometric information.
Remark that the option 'Add measurement to drawing' may also add other entities to the drawing than only measurements as text:
-> A point, lines and ticks (= more lines), an arc, a polygon, plain entity copies, a chord (or 2 radii).
And that this is not configurable except for IC.
Regards,
CVH
To my knowledge the number of decimal places of the info tools aren't all governed by the drawing dimension settings.
And then the area of a polygon is an exception.
Polygonal Area (IR):
-> Area to 12 decimal digits but always as short as possible
-> There is no preference, setting nor option that has an influence.
We can look it up:
Polygonal Area (IR) = InfoArea.js
https://github.com/qcad/qcad/blob/maste ... nfoArea.js
Line 128 calls for a formatted area text string omitting a parameter:
https://github.com/qcad/qcad/blob/maste ... ea.js#L128
Line 138-140 calls a Information.js function for formatting a value with no rounding:
https://github.com/qcad/qcad/blob/maste ... ea.js#L139
Line 81 of Information.js lines 75-96 sets precision = 12
https://github.com/qcad/qcad/blob/maste ... ion.js#L81
This value is left unchanged there variable 'rounded' is undefined. Rounded it would be 3 decimal digits.
With a drawing unit other than 'Inch' the area string is then constructed by RUnit.cpp with leading, without trailing zeros
https://github.com/qcad/qcad/blob/maste ... ion.js#L93
https://github.com/qcad/qcad/blob/maste ... #L853-L901
In Line 873-877 we see that it is handled differently for Qt6
If after all this you expect 12 decimal digits (not Qt6) then you are in for a surprise ... It has definitely changed since for example 3.27.6
One can verify the area value with Misc .. Information .. 2D Centroids .. Area Centroid.
After creation see the custom properties of the Centroid marker, reported values are as exact as can be in full floating point notation.
Centroids code exploits specialized algorithms to avoid known pitfalls in floating point arithmetic.
The Info tools also report a user information on the Command Line History and that might be in a different and/or mixed format.
Between brackets up to 6 decimal digits, so-called 'Exact', and only if different string-wise with the formatted string for the Command Line.
For IP - IE - IN there is a hidden preference in the QCAD.ini/config that I exploit to get full floating point information:
[Info] Precision=17 (The number of decimal digits, -1 = normal)
Not to be confused with number precision what is the amount of significant digits.
Quite important at GUI level when creating custom scripts handling all kinds of geometric information.
Remark that the option 'Add measurement to drawing' may also add other entities to the drawing than only measurements as text:
-> A point, lines and ticks (= more lines), an arc, a polygon, plain entity copies, a chord (or 2 radii).
And that this is not configurable except for IC.
Regards,
CVH
-
Kmeelo
- Newbie Member
- Posts: 8
- Joined: Fri Nov 24, 2023 1:55 am
Re: Configuring QCAD for 3 Decimal Places in Metric System Floor Plans
It didn't work
see attached.- Attachments
-
- XN-231126-05-40.jpg (254.32 KiB) Viewed 9870 times
-
- XN-231126-05-37.jpg (374.5 KiB) Viewed 9870 times
-
CVH
- Premier Member
- Posts: 4958
- Joined: Wed Sep 27, 2017 4:17 pm
Re: Configuring QCAD for 3 Decimal Places in Metric System Floor Plans
As explained, no.
You might want to file a bug report or a feature request here: https://www.ribbonsoft.com/bugtracker/
For that you need a separate account or create a new one.
The work around is obvious, edit the text, truncate or round the value.
Regards,
CVH
-
Kmeelo
- Newbie Member
- Posts: 8
- Joined: Fri Nov 24, 2023 1:55 am
Re: Configuring QCAD for 3 Decimal Places in Metric System Floor Plans
I will file a report. Thank you so much for your help!