-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Measuring diameters #7741
Comments
Also seeing this on Windows 11, 2.3.0-dev build 658c4f0. |
Ditto, Windows 11, 2.3.0-dev, build 06c809c. Works correctly in 2.2.0. Diameter error grows with height of the cylinder: |
Similar issue seen here on linux mint debian, flatpak release 4d762c4, as well as Win 10 portable release f11eb34 edit Still apparent in Windows (10) 2.3.0-beta build ae5d7ea |
Still broken |
edit Using my limited understanding of C++, with the help of Claude, and o3 mini, It seems that the culprit might be on line 123:
The implication here is that half_w is being added twice - once as part of the scaling (half_w * ndc.x()) and again at the end (+ half_w). This effectively doubles the transformation offset, leading to the consistent scaling factor you're seeing in the measurements (~11.5932x).
This modification should fix the scaling issue and return correct diameter measurements. The scaling factor of approximately 11.5932 that you're seeing is roughly 2π × 1.85, which suggests the extra offset was causing a geometric scaling effect in the measurement calculations. Thus spoke AI. I'd happily try and pummel through these code changes myself, but child minding and sleep deprivation is kicking in hard. |
According to https://eigen.tuxfamily.org/dox/TopicPitfalls.html one should just avoid using `auto` as the type of an Eigen expression. This PR fixes most of them I could found in the project. There might be cases that I missed, and I might update those later if I noticed. This should prevent issues like #7741 and hopefully fix some mysterious crashes happened inside Eigen calls.
Is there an existing issue for this problem?
OrcaSlicer Version
2.3.0-dev
Operating System (OS)
Windows
OS Version
Windows 10
Additional system information
No response
Printer
Bambu X1C
How to reproduce
Actual results
Incorrect diameter measurement
Expected results
Сorrect diameter measurement.
p.s. In Bambustudio where did you get the measurement block, the diameter size is shown correctly

Project file & Debug log uploads
Cylinder.zip
Checklist of files to include
Anything else?
No response
The text was updated successfully, but these errors were encountered: