← All bug reports

FS#2478Make RMathLineEdit unit aware

Type
Feature Request
Status
Assigned
Category
QCAD (main)
Severity
Low
Priority
Low
Reported version
3.28.1
Operating system
All
Reported
2023-06-11 by CVH
Votes
1

Andrew,

Related topic: https://www.qcad.org/rsforum/viewtopic.php?f=32&t=10094

When entering 1' 1'' in an input field.
- As the size of the rectangle in the topic
- As the length property of a line selected in the drawing
- ....

Returns 13 in a drawing in mm.
And also in a drawing in inch what turns out to be correct.
But also in a drawing in foot.

Similar, entering 1' with a drawing in kilometers it returns 12 units = 12 kilometers.

Regards,
CVH

Comments (2)

andrew 2023-06-11

Note that RMathLineEdit is simply not unit aware at all (by design).

1'1" is simply transformed into 1*12 + 1. It's a convenience notation for Inch users. For all other units this notation does not make sense.

CVH 2023-06-13

That was assumed in the topic:
Meaning that the foot abbreviation triggers 'times 12' in any case.

Now I know where: RMath.cpp Line 416-439.
And advanced: RMath.cpp Line 390-414.

If there was a document it passes first by RDocument::eval and Document::substituteAutoVariables.

The link with a document is within reach.

Regards,
CVH