MantisBT - VTK | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0013300 | VTK | (No Category) | public | 2012-07-10 17:30 | 2012-07-12 18:08 |
Reporter | Lawrence | ||||
Assigned To | Sebastien Jourdain | ||||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | 5.8.0 | ||||
Target Version | Fixed in Version | ||||
Project | ParaViewPro | ||||
Type | incorrect functionality | ||||
Summary | 0013300: VTKCubeAxesActor:ComputeTickSize ; does not always honor changes when custom range is set. (Fix included) | ||||
Description | Issue found with a patched*(footnote) version Paraview 3.14.1 so I don't know which version of vtk I should file this under. PROBLEM: When SetXRange is used to set a custom range, the tick and labels may not updated. Cause: In vtkCubeAxesActor::ComputeTickSize(double bounds[6]) { (identical code for Y and Z axes omitted) bool xRangeChanged = this->LastXRange[0] != bounds[0] || ... if (!(xRangeChanged || yRangeChanged || ...)) { // no need to re-compute ticksize. return false; <<<<< **** RETURNS EARLY HERE WHEN IT SHOULD NOT. **** } So... why is LastXRange's value incorrect? Later in the same function, we have the following logic. this->LastXRange[0] = (this->XAxisRange[0] == VTK_DOUBLE_MAX ? bounds[0] : this->XAxisRange[0]); ->The fix is to check for changes in both the range AND the bounds. The attached cxx file includes a new field "LastBound" to catch these kinds of modifications that need to force an update to the tick marks. The main changes are in ComputeTickSize and are highlighted below - vtkCubeAxesActor::ComputeTickSize(double bounds[6]) { ... double xrange[2], yrange[2], zrange[2]; xrange[0] = (this->XAxisRange[0] == VTK_DOUBLE_MAX ? bounds[0] : this->XAxisRange[0]); ... bool xRangeChanged = this->LastXRange[0] != xrange[0] || ... Also do explicit bounds check - bool boundsChanged = this->LastBounds[0] != bounds[0] || ... this->LastBounds[5] != bounds[5]; // A new boundsChange check - if (!(xRangeChanged || yRangeChanged || zRangeChanged || boundsChanged) && And at the end of the function, we cache the range AND bounds we used- this->LastXRange[0] = xrange[0]; this->LastXRange[1] = xrange[1]; this->LastYRange[0] = yrange[0]; this->LastYRange[1] = yrange[1]; this->LastZRange[0] = zrange[0]; this->LastZRange[1] = zrange[1]; for( int i =0; i < 6; i++) { this->LastBounds[0] = bounds[0]; } Footnote: This will not affect the official Paraview until http://vtk.org/Bug/view.php?id=13093 [^] is included. | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://www.vtk.org/Bug/file/9225/vtkCubeAxesActor.cxx ![]() https://www.vtk.org/Bug/file/9226/vtkCubeAxesActor-v2.cxx | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2012-07-10 17:30 | Lawrence | New Issue | |||
2012-07-10 17:30 | Lawrence | File Added: vtkCubeAxesActor.cxx | |||
2012-07-11 08:44 | Sebastien Jourdain | Assigned To | => Sebastien Jourdain | ||
2012-07-11 08:44 | Sebastien Jourdain | Status | backlog => tabled | ||
2012-07-11 08:50 | Sebastien Jourdain | Note Added: 0028762 | |||
2012-07-11 15:32 | Lawrence | Note Added: 0028763 | |||
2012-07-11 15:38 | Sebastien Jourdain | Note Added: 0028764 | |||
2012-07-12 14:51 | Sebastien Jourdain | Assigned To | Sebastien Jourdain => | ||
2012-07-12 14:51 | Sebastien Jourdain | Assigned To | => Sebastien Jourdain | ||
2012-07-12 16:37 | Lawrence | Note Added: 0028768 | |||
2012-07-12 16:44 | Lawrence | File Added: vtkCubeAxesActor-v2.cxx | |||
2012-07-12 16:47 | Sebastien Jourdain | Note Added: 0028770 | |||
2012-07-12 16:48 | Sebastien Jourdain | Note Added: 0028771 | |||
2012-07-12 18:08 | Sebastien Jourdain | Status | tabled => closed | ||
2012-07-12 18:08 | Sebastien Jourdain | Resolution | open => fixed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|