MantisBT - VTK | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0013829 | VTK | (No Category) | public | 2013-01-29 11:55 | 2016-07-22 14:18 |
Reporter | Joó Péter | ||||
Assigned To | Haocheng Liu | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | 5.10.1 | ||||
Target Version | 7.1.0 | Fixed in Version | 6.2.0 | ||
Project | TBD | ||||
Type | incorrect functionality | ||||
Summary | 0013829: vtkAssembly::GetBounds blindly adds bounds which are uninitialized | ||||
Description | Assume you have two spheres in an assembly and a clipping plane which entirely clips one of the sphere out but it keeps the other intact. If you query the bounding box of that assembly then it returns with absolutely wrong bounding box coordinates. The reason behind is that the vtkAssembly::GetBounds accumulates bounds but never checks weather an internal part!s bound is initialized or not. initialized or not. Details of the investigation: In file VTK5.10.1\Rendering\vtkAssembly.cxx at line 393 the following bound is an uninitialized bound : line 393: bounds = prop3D->GetBounds(); Debugger tells that this bound is: bounds[0] 1.0000000000000000 double bounds[1] -1.0000000000000000 double bounds[2] 1.0000000000000000 double bounds[3] -1.0000000000000000 double bounds[4] 1.0000000000000000 double bounds[5] -1.0000000000000000 double I recommend the following change in VTK inside vtkAssembly::GetBounds method: ORIGINAL CODE propVisible = 1; prop3D->PokeMatrix(path->GetLastNode()->GetMatrix()); bounds = prop3D->GetBounds(); prop3D->PokeMatrix(NULL); PROPOSAL prop3D->PokeMatrix(path->GetLastNode()->GetMatrix()); bounds = prop3D->GetBounds(); prop3D->PokeMatrix(NULL); if (!vtkMath::AreBoundsInitialized(bounds)) continue; propVisible = 1; I added an optional project as an attachment to test it with a debugger just in case. | ||||
Steps To Reproduce | Used user supplied badbounds.cxx to reproduce | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://www.vtk.org/Bug/file/9389/badbounds.zip | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2013-01-29 11:55 | Joó Péter | New Issue | |||
2013-01-29 11:55 | Joó Péter | File Added: badbounds.zip | |||
2013-06-25 13:29 | Dave DeMarle | Note Added: 0031055 | |||
2013-06-26 03:24 | Joó Péter | Note Added: 0031080 | |||
2013-07-22 21:05 | Dave DeMarle | Assigned To | => Dave DeMarle | ||
2013-07-22 21:05 | Dave DeMarle | Status | backlog => todo | ||
2013-08-12 17:44 | Dave DeMarle | Status | todo => backlog | ||
2014-01-07 14:20 | Serge Lalonde | Note Added: 0032136 | |||
2014-01-07 16:34 | Bill Lorensen | Assigned To | Dave DeMarle => Bill Lorensen | ||
2014-01-07 16:34 | Bill Lorensen | Reproducibility | have not tried => always | ||
2014-01-07 16:34 | Bill Lorensen | Status | backlog => gerrit review | ||
2014-01-07 16:34 | Bill Lorensen | Fixed in Version | => 6.2.0 | ||
2014-01-07 16:34 | Bill Lorensen | Target Version | => 6.2.0 | ||
2014-01-07 16:34 | Bill Lorensen | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=713#r713 | ||
2015-01-16 16:43 | Serge Lalonde | Note Added: 0034088 | |||
2016-07-06 16:50 | Berk Geveci | Status | gerrit review => expired | ||
2016-07-06 16:50 | Berk Geveci | Note Added: 0036302 | |||
2016-07-22 13:14 | Haocheng Liu | Status | expired => backlog | ||
2016-07-22 13:14 | Haocheng Liu | Status | backlog => active development | ||
2016-07-22 13:14 | Haocheng Liu | Target Version | 6.2.0 => 7.1.0 | ||
2016-07-22 13:14 | Haocheng Liu | Assigned To | Bill Lorensen => Haocheng Liu | ||
2016-07-22 14:18 | Haocheng Liu | Note Added: 0036548 | |||
2016-07-22 14:18 | Haocheng Liu | Status | active development => closed | ||
2016-07-22 14:18 | Haocheng Liu | Resolution | open => fixed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|