Measuring tool reports incorrect diameter of circle #108385

Open
opened 2023-05-29 09:05:04 +02:00 by David-Hillman · 12 comments

System Information
Operating system: Linux-5.19.0-42-generic-x86_64-with-glibc2.35 64 Bits
Graphics card: Quadro K2200/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.182.03

Blender Version
Broken: version: 3.5.1, branch: blender-v3.5-release, commit date: 2023-04-24 18:11, hash: e1ccd9d4a1d3
Worked: unknown, but this bug has been present since at least 3.0.1

Short description of error
Measuring tool reports incorrect diameter of circle.

Exact steps for others to reproduce the error

  1. Create new General file
  2. Change length unit from meters to millimeters
  3. Add a Mesh->Circle with the default radius of 1 ( mm )
  4. Activate the Measuring Tool, and measure the diameter of your circle

Expected result: 2 mm
Observed result: 2000 mm ( +/- the accuracy of the user's operation of the tool )

See attached screenshot for the status at this point.

The same behavior can be observed with Imperial units, as shown in the second screenshot. The default length unit here was changed to inches, and Blender reports that a 1" radius circle has a diameter of ~24".

Conclusion: Non-default unit settings are not applied to the measuring tool.

**System Information** Operating system: Linux-5.19.0-42-generic-x86_64-with-glibc2.35 64 Bits Graphics card: Quadro K2200/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.182.03 **Blender Version** Broken: version: 3.5.1, branch: blender-v3.5-release, commit date: 2023-04-24 18:11, hash: `e1ccd9d4a1d3` Worked: unknown, but this bug has been present since at least 3.0.1 **Short description of error** Measuring tool reports incorrect diameter of circle. **Exact steps for others to reproduce the error** 1. Create new General file 2. Change length unit from meters to millimeters 3. Add a Mesh->Circle with the default radius of 1 ( mm ) 4. Activate the Measuring Tool, and measure the diameter of your circle Expected result: 2 mm Observed result: 2000 mm ( +/- the accuracy of the user's operation of the tool ) See attached screenshot for the status at this point. The same behavior can be observed with Imperial units, as shown in the second screenshot. The default length unit here was changed to inches, and Blender reports that a 1" radius circle has a diameter of ~24". Conclusion: Non-default unit settings are not applied to the measuring tool.
David-Hillman added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-05-29 09:05:05 +02:00
Member

Hi @David-Hillman , I can't really reproduce the issue.

I don't think the default Mesh->Circle size is 1mm, but 1000mm (see the 3rd pic). I have to edit the value to get a 1mm and then the measuring result is correctly showing a diameter of 2mm.

Are you sure your default size is displaying as 1mm but the circle being added is in fact 1000mm ? Here on 3.5.1/3.6/4.0 all shows 1000mm as default size, and from the screenshot of yours, it's likely the case for you as well.

图片 图片 图片
Hi @David-Hillman , I can't really reproduce the issue. I don't think the default `Mesh->Circle` size is `1mm`, but `1000mm` (see the 3rd pic). I have to edit the value to get a `1mm` and then the measuring result is correctly showing a diameter of 2mm. Are you sure your default size is displaying as `1mm` but the circle being added is in fact `1000mm` ? Here on 3.5.1/3.6/4.0 all shows `1000mm` as default size, and from the screenshot of yours, it's likely the case for you as well. | | | | |---|---|---| | ![图片](/attachments/7066b279-1045-4829-a245-3e16a83c589f) | ![图片](/attachments/c757a38b-c786-4627-b663-8d5895380a45) | ![图片](/attachments/cbd493a1-781e-4798-b622-c12dff6f8b29) |
Author

The default radius is 1, with no unit. The default length unit is meters, or feet, depending on the selected system. The bug arises when the default unit is altered, to mm, or inches, or probably anything else.

So, as I described, after the default unit has been changed, the default circle radius becomes 1 mm.

Adding that circle works correctly, but the measuring tool has not been informed of the unit change, and it reports nonsense as a result.

The situation you describe would actually be a different bug -- where the user attempts to create a 1 mm radius circle and the system ignores that request, and gives the default 1 meter radius instead. Either way, there's a bug.

The default radius is 1, with no unit. The default length unit is meters, or feet, depending on the selected system. The bug arises when the default unit is altered, to mm, or inches, or probably anything else. So, as I described, after the default unit has been changed, the default circle radius becomes 1 mm. Adding that circle works correctly, but the measuring tool has not been informed of the unit change, and it reports nonsense as a result. The situation you describe would actually be a different bug -- where the user attempts to create a 1 mm radius circle and the system ignores that request, and gives the default 1 meter radius instead. Either way, there's a bug.
Member

Got same result as @ChengduLittleA mentioned.
@David-Hillman hi, I did not understand how you get 1mm of radius after changing the unit.
Could you share screen recording to demonstrate this?

Got same result as @ChengduLittleA mentioned. @David-Hillman hi, I did not understand how you get 1mm of radius after changing the unit. Could you share screen recording to demonstrate this?
Pratik Borhade added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-05-30 07:12:17 +02:00
Member

@David-Hillman You should be able to see the default value also having units if you enabled any units in the properties panel, and this should only be a UI display thing, where the value underneath should not have changed if the only thing you've done is changing the unit.

This could also be a plugin or something messing with it, or it being an accidental bug from a particular version... If you can't see unit when adding the geometry while the scene unit is set, then try reset to factory and see if it makes any difference.

@David-Hillman You should be able to see the default value also having units if you enabled any units in the properties panel, and this should only be a UI display thing, where the value underneath should not have changed if the only thing you've done is changing the unit. This could also be a plugin or something messing with it, or it being an accidental bug from a particular version... If you can't see unit when adding the geometry while the scene unit is set, then try reset to factory and see if it makes any difference.
Author

There are no plugins installed. This is a virgin installation of 3.5.1, just downloaded yesterday. The same bug appears in a virgin installation of 3.0.1 from the Ubuntu repository -- and probably other versions, but those are the only two I checked.

No unit is displayed for the default object size before, or after, the default length unit is changed. The attached screenshot shows the condition immediately after launching the application -- the location is specified with a unit, but the object size is not.

In point of fact, blender does not even accept modifying the object size with specific units. For example, attempting to enter "50 cm" in one of the scale fields is rejected. In other words, contrary to your belief, the scale fields are unit-less, and necessarily inherit that property from the application's default unit.

Additional edit: Blender throws the following errors when a user attempts to adjust the scale of an object with explicit units, as I described above.
`Error evaluating number, see Info editor for details: File "", line 1
50 cm
^^
SyntaxError: invalid syntax

Error evaluating number, see Info editor for details: File "", line 1
3m
^
SyntaxError: invalid decimal literal

Error evaluating number, see Info editor for details: File "", line 1
3m
^
SyntaxError: invalid decimal literal

Error evaluating number, see Info editor for details: File "", line 1
10 m
^
SyntaxError: invalid syntax
`

There are no plugins installed. This is a virgin installation of 3.5.1, just downloaded yesterday. The same bug appears in a virgin installation of 3.0.1 from the Ubuntu repository -- and probably other versions, but those are the only two I checked. No unit is displayed for the default object size before, or after, the default length unit is changed. The attached screenshot shows the condition immediately after launching the application -- the location is specified with a unit, but the object size is not. In point of fact, blender does not even accept modifying the object size with specific units. For example, attempting to enter "50 cm" in one of the scale fields is rejected. In other words, contrary to your belief, the scale fields are unit-less, and necessarily inherit that property from the application's default unit. Additional edit: Blender throws the following errors when a user attempts to adjust the scale of an object with explicit units, as I described above. `Error evaluating number, see Info editor for details: File "<string>", line 1 50 cm ^^ SyntaxError: invalid syntax Error evaluating number, see Info editor for details: File "<string>", line 1 3m ^ SyntaxError: invalid decimal literal Error evaluating number, see Info editor for details: File "<string>", line 1 3m ^ SyntaxError: invalid decimal literal Error evaluating number, see Info editor for details: File "<string>", line 1 10 m ^ SyntaxError: invalid syntax `
Member

@David-Hillman that's the "Scale" of the object, which is a dimensionless quantity, so you can't have any unit there. You can verify the difference by checking both Scale and Dimension properties of the object. The "Dimension" here represents the bounding box size of the object, while "Scale" represents "a factor of the actual size".

图片

@David-Hillman that's the "Scale" of the object, which is a dimensionless quantity, so you can't have any unit there. You can verify the difference by checking both Scale and Dimension properties of the object. The "Dimension" here represents the bounding box size of the object, while "Scale" represents "a factor of the actual size". ![图片](/attachments/445d2d1d-b533-4b66-ad40-18e4cc08df6c)
Author

That's what I am saying. A freshly-created object with the default size of 1 and default unit of millimeters, should have a dimension of 1mm. Either that does not occur, or, if it does, the measuring tool does not measure the resulting object correctly.

That's what I am saying. A freshly-created object with the default size of 1 and default unit of millimeters, should have a dimension of 1mm. Either that does not occur, or, if it does, the measuring tool does not measure the resulting object correctly.
Member

@David-Hillman hi, a freshly-created object has a default "Scale" of 1 and "Size" of 1000mm. "Scale" is a different thing from "Size". It can be verified from the operator properties panel when you create the object.

@David-Hillman hi, a freshly-created object has a default "Scale" of 1 and "Size" of 1000mm. "Scale" is a different thing from "Size". It can be verified from the operator properties panel when you create the object.

This looks very much like the issue I'm having with bforartists AppImage on arch (unable to install blender via pacman/aur). There more information on the bforartists github issue page here.

This looks very much like the issue I'm having with bforartists AppImage on arch (unable to install blender via pacman/aur). There more information on the bforartists github issue page [here](https://github.com/Bforartists/Bforartists/issues/3695).

Just tried setting up millimetres again in blender version 3.6.4 and it works as intended.

Added a picture for context of it working:
image
image

Just tried setting up millimetres again in blender version 3.6.4 and it works as intended. Added a picture for context of it working: ![image](/attachments/841b93ec-89f2-4452-ac1f-23215257a69a) ![image](/attachments/4a723dfb-fe6e-420e-b89a-434fd1d4b3f0)
8.3 KiB
131 KiB
Member

@David-Hillman - A freshly-created object with the default size of 1 and default unit of millimeters, should have a dimension of 1mm

You aren't setting "default unit of millimeters". You are setting a default unit system of "Metric" and preferred length value of "Millimeters". The "Length" input does not change how big new items will be created, it only changes how the values are shown:

Meters.gif

Any new circle cube will be 2 meters wide regardless of what you select for "Length". The tooltip for it says "Unit that will be used to display length values".

> @David-Hillman - A freshly-created object with the default size of 1 and default unit of millimeters, should have a dimension of 1mm You aren't setting "default unit of millimeters". You are setting a default unit system of "Metric" and preferred length value of "Millimeters". The "Length" input does not change how big new items will be created, it only changes how the values are shown: ![Meters.gif](/attachments/26d6af43-367f-4de0-89e9-b51bce36136f) Any new circle cube will be 2 meters wide regardless of what you select for "Length". The tooltip for it says "Unit that will be used to **display** length values".
203 KiB
Contributor

I think the size of the default object being unpredictable, as yes, it is unpredictable... is probably a bug and unintended UX directly inherited from how scene units are defined internally. Looking at the code, everything should be created to 1 scene unit in each axis (2 scene units total). Scene units are agnostic to the display of the scene unit scale for the measurements ratio, agnostic to the measurement type, and agnostic to the grid view, or should be agnostic. The geometry are set by one scene unit scale on all axis (+1x, -1x, +1y -1y +1z -1z). You can see this in the video.

To clarify, the scene unit is relative to when you re-update the depsgraph (?), so when you save the startup, close Blender and reload, instead of building to 0.001 scale of a scene unit (1 scene unit = 20mm), then the unit scale relatively becomes 1 again, and the scene unit display will then show 0.2mm instead of 20mm when creating a new object (stored to be 0.001 displayed). I think that would be the core issue from and why it "appears" to store a memory of scaled scene units on object creation vs the current session when setting scene unit scale.

If you store the new startup yet again with unit scale to 0.001, then 0.2mm for a scene unit will then load up to be 0.0002, unless you put the scene units scale back to 1 again...

I think the size of the default object being unpredictable, as yes, it is unpredictable... is probably a bug and unintended UX directly inherited from how scene units are defined internally. Looking at the code, everything should be created to 1 scene unit in each axis (2 scene units total). Scene units are agnostic to the display of the scene unit scale for the measurements ratio, agnostic to the measurement type, and agnostic to the grid view, or should be agnostic. The geometry are set by one scene unit scale on all axis (+1x, -1x, +1y -1y +1z -1z). You can see this in the video. To clarify, the scene unit is relative to when you re-update the depsgraph (?), so when you save the startup, close Blender and reload, instead of building to 0.001 scale of a scene unit (1 scene unit = 20mm), then the unit scale relatively becomes 1 again, and the scene unit display will then show 0.2mm instead of 20mm when creating a new object (stored to be 0.001 displayed). I think that would be the core issue from and why it "appears" to store a memory of scaled scene units on object creation vs the current session when setting scene unit scale. If you store the new startup yet again with unit scale to 0.001, then 0.2mm for a scene unit will then load up to be 0.0002, unless you put the scene units scale back to 1 again...
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#108385
No description provided.