FreeCAD / FreeCAD/FreeCAD

Measurement: tool doesn't follow "banker's rounding"

Open
#18,865 10 comments 0 reactions 0 assignees View on GitHub
Mod: Measurement Status: Needs confirmation
Dominant language
C++
Stars
33.6k
Forks
6k
Avg merge
3d 17h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Problem description

For example, if you set a line's length to 7.135mm in Sketcher and then measure its length using the measure tool, it shows 7.14mm while the other parts of the program shows 7.13mm which is the correct number after banker's rounding.

It rounds most of the numbers correctly so you have to change the number for a bit to find the buggy ones.

Here's some numbers showing length[mm] difference between status bar and measure tool:
|Value|Stat|Meas|
|-----|----|----|
|7.135|~7.13~|7.14|
|8.975|~8.97~|8.98|
|9.275|9.28|9.27|
|10.555|~10.55~|10.56|

(Values marked with strikethrough don't show up in the recent version 1.2.0dev.20260519)

There seems no particular pattern for measure tool's rounding while the status bar follows banker's rounding.

Tested on version 1.0.0, 1.0.0dev(39750), 0.20.1.

### Full version info

```shell
OS: Windows 11 build 22631
Architecture: x86_64
Version: 1.0.0.39109 (Git) Conda
Build type: Release
Branch: (HEAD detached at 1.0.0)
Hash: 2fcc5317fe3aee96ca73475986a577719fc78e20
Python 3.11.10, Qt 5.15.15, Coin 4.0.3, Vtk 9.3.0, OCC 7.8.1
Locale: Korean/South Korea (ko_KR)
Stylesheet/Theme/QtStyle: unset/FreeCAD Light/Qt default
```

### Subproject(s) affected?

None

### Anything else?

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.