View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014143 | VTK | (No Category) | public | 2013-06-24 07:48 | 2014-01-03 08:51 | ||||
Reporter | David Doria | ||||||||
Assigned To | Will Schroeder | ||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0014143: vtkClipPolyData with implicit function produces NANs | ||||||||
Description | In this example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/PolyData/ImplicitDataSetClipping [^] I create a sphere (vtkPolyData) and clip it with an implicit cube (vtkBox). The visual result of the clipping looks correct (the portion of the sphere that is inside the box remains), but there are 68 cells reported in the resulting clipped data (clipped->GetNumberOfCells()), but I only count 20 (2 columns of 10 triangles). The cells seem to be well formed, but there are tons of NAN points that I guess the cells are referencing. At line 250ish in vtkClipPolyData.cxx: // evaluate implicit cutting function for ( i=0; i < numberOfPoints; i++ ) { s = clipScalars->GetComponent(cellIds->GetId(i),0); cellScalars->InsertTuple(i, &s); } 's' is getting set to -inf for many of the cells, which is my best quick guess at what is causing the NANs. | ||||||||
Tags | No tags attached. | ||||||||
Project | TBD | ||||||||
Type | incorrect functionality | ||||||||
Attached Files | ClipPolyData.png [^] (24,079 bytes) 2014-01-03 08:50
ImplicitDataSetClipping.cxx [^] (6,131 bytes) 2014-01-03 08:50 | ||||||||
Relationships | |
Relationships |
Notes | |
(0032123) Will Schroeder (manager) 2014-01-03 07:02 edited on: 2014-01-03 08:48 |
Investigating now. There is definitely a problem, lots of bad points and scalars. Diving in now. Okay this is user error, a very bad example of using a box to clip a sphere. Here is the litany of errors: 1. Using vtkImplicitDataSet -> You really need to set the OutValue. By default it is a very large number which resulted in the NaNs. 2. Having said that, it is difficult in this case to choose any reasonable out value. Using large, negative numbers causes the clipped triangles on the edge to be "squashed" into little slivers. So although only 20 triangles were counted by eye, there were actually many more, most of which were squashed. 3. Using a cube source and then using Delaunay3D to create a 3D dataset which is then used as an implicit function is way overkill. It's better just to use the implicit function vtkBox. 4. Doing so fixes the problem. I have uploaded a final image and the working code. |
(0032124) Will Schroeder (manager) 2014-01-03 08:51 |
User error. Test program modified and fixed. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-06-24 07:48 | David Doria | New Issue | |
2014-01-03 07:02 | Will Schroeder | Note Added: 0032123 | |
2014-01-03 07:02 | Will Schroeder | Assigned To | => Will Schroeder |
2014-01-03 07:02 | Will Schroeder | Status | backlog => active development |
2014-01-03 07:54 | Will Schroeder | Note Edited: 0032123 | |
2014-01-03 08:48 | Will Schroeder | Note Edited: 0032123 | |
2014-01-03 08:50 | Will Schroeder | File Added: 0014143-ClipPolyData.png | |
2014-01-03 08:50 | Will Schroeder | File Added: ImplicitDataSetClipping.cxx | |
2014-01-03 08:51 | Will Schroeder | Note Added: 0032124 | |
2014-01-03 08:51 | Will Schroeder | Status | active development => closed |
2014-01-03 08:51 | Will Schroeder | Resolution | open => fixed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |