Incorrect volume calculation for complex object from 3D-Print toolbox #79394

Closed
opened 2020-07-30 15:22:38 +02:00 by Alexis Maizel · 9 comments

System Information
Operating system: macOS 10.14.6
Graphics card: Intel Iris Plus Graphics 655

Blender Version
Broken: 2.83.3
Worked: -

Short description of error
When using the 3D-Print toolbox (or any code using bmesh.types.BMesh.calc_volume()) to calculate the volume of a complex closed object I noticed that the volume calculation is incorrect if the object is moved far away from the 0,0,0 mark and becomes more incorrect the further the 3D object is displaced from the 0,0,0 origin.
No problems if the object is a simple cube. This was readily reported (https://developer.blender.org/T73295) and marked as resolved, but the problem remains for complex objects.

Exact steps for others to reproduce the error
*Add a Monkey head at the 0,0,0 mark in blender.
*Use 3D-Print toolbox to calculate volume, note that the volume is 2255372 cm cubed.
*Use transform location and move object 100m units in x, y & z directions.
*Re do volume calculation in 3D-Print toolbox, the volume should now say 5561196 cm cubed.
*Volume of the standard cube (8000000 cm3) is the same irrespective of the location (indeed fixing the issue raised in https://developer.blender.org/T73295).

Many thanks in advance.

**System Information** Operating system: macOS 10.14.6 Graphics card: Intel Iris Plus Graphics 655 **Blender Version** Broken: 2.83.3 Worked: - **Short description of error** When using the 3D-Print toolbox (or any code using `bmesh.types.BMesh.calc_volume()`) to calculate the volume of a complex closed object I noticed that the volume calculation is incorrect if the object is moved far away from the 0,0,0 mark and becomes more incorrect the further the 3D object is displaced from the 0,0,0 origin. No problems if the object is a simple cube. This was readily reported (https://developer.blender.org/T73295) and marked as resolved, but the problem remains for complex objects. **Exact steps for others to reproduce the error** *Add a Monkey head at the 0,0,0 mark in blender. *Use 3D-Print toolbox to calculate volume, note that the volume is 2255372 cm cubed. *Use transform location and move object 100m units in x, y & z directions. *Re do volume calculation in 3D-Print toolbox, the volume should now say 5561196 cm cubed. *Volume of the standard cube (8000000 cm3) is the same irrespective of the location (indeed fixing the issue raised in https://developer.blender.org/T73295). Many thanks in advance.
Author

Added subscriber: @alexis.maizel

Added subscriber: @alexis.maizel

Added subscriber: @rjg

Added subscriber: @rjg

This could potentially be fixed by 0ab66dd63f if it has the same cause as #79369. I haven't had time to test this though.

This could potentially be fixed by 0ab66dd63f if it has the same cause as #79369. I haven't had time to test this though.

Added subscriber: @Foaly

Added subscriber: @Foaly

Keep in mind that calculating the volume reliably can only work on manifold meshes.
The default Suzanne mesh is not manifold.

However, it would of course be better if it could compute a reasonable approximate volume even in the non-manifold case.

Keep in mind that calculating the volume reliably can only work on manifold meshes. The default Suzanne mesh is not manifold. However, it would of course be better if it could compute a reasonable approximate volume even in the non-manifold case.
Author

@Foaly: Thanks for the note. Indeed, "fixing" the Suzanne mesh to make it manifold does make the volume calculations invariant with regard to location. I guess this is not really a bug but a limitation.

@Foaly: Thanks for the note. Indeed, "fixing" the Suzanne mesh to make it manifold does make the volume calculations invariant with regard to location. I guess this is not really a bug but a limitation.

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Triage' to: 'Archived'

Changed status from 'Needs Triage' to: 'Archived'
Richard Antalik self-assigned this 2020-08-02 00:38:47 +02:00

Following steps now this looks like it's resolved now, so will close regardless of being limitation.

Following steps now this looks like it's resolved now, so will close regardless of being limitation.
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
4 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#79394
No description provided.