View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015003VTK(No Category)public2014-09-19 06:132014-10-02 15:36
ReporterJorge 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0015003: Wrong result from vtkImplicitPolyDataDistance + vtkSampleFunction
DescriptionAttached is a test code to reproduce a bug with a combination of vtkImplicitPolyDataDistance + vtkSampleFunction.

In this test a triangle mesh of only one connected component is set as input to vtkImplicitPolyDataDistance then an implicit function is sampled with vtkSampleFunction. The result is contoured with vtkImageMarchingCubes and the vtkPolyData resulting from this last step shows more than one connected component.

Attached is also the snapshot of the result.

The test has being executed on reelease 6.1.
Tagshackaton
ProjectTBD
Typeincorrect functionality
Attached Files? file icon Bug_ImplicitPolyDataDistance_01.tcl [^] (1,076 bytes) 2014-09-19 06:13
? file icon fix_mesh.vtk [^] (2,026,553 bytes) 2014-09-19 06:14
? file icon fix_mesh_contour.vtk [^] (3,295,017 bytes) 2014-09-19 06:17
png file icon fix_mesh.png [^] (61,349 bytes) 2014-09-19 06:18


png file icon mesh_iso0_contour_after_SampleFunction.png [^] (85,419 bytes) 2014-09-30 03:21


cxx file icon TestPolyDataDistance.cxx [^] (1,533 bytes) 2014-09-30 03:30

 Relationships

  Notes
(0033381)
Jorge (reporter)
2014-09-30 03:37

The file TestPolyDataDistance.cxx, attached to this report, reproduce the underlying bug. In this test it is evaluated the distance at two points which are clearly outside the body because they are both outside the bounding box. For both points the distances computed should have the same sign but the results are two distances with different sign:

bounds = [8.73729, 113.889, -24.3675, 160.521, 181.872, 243.717]
[20.149, 214.995, 204.775] ==> -75.4122
[3.61978, 205.145, 204.775] ==> 81.7696
(0033528)
Shawn Waldon (developer)
2014-10-02 15:32

Short answer: the dataset is bad.

Long answer: There is a face that hangs off the end of the tube and whose normal is back along the tube. This normal is corrupting the calculation when this face or a point on it is the closest point to the query point. Since the surface normals are used to calculate the sign.

 Issue History
Date Modified Username Field Change
2014-09-19 06:13 Jorge New Issue
2014-09-19 06:13 Jorge File Added: Bug_ImplicitPolyDataDistance_01.tcl
2014-09-19 06:14 Jorge File Added: fix_mesh.vtk
2014-09-19 06:17 Jorge File Added: fix_mesh_contour.vtk
2014-09-19 06:18 Jorge File Added: fix_mesh.png
2014-09-30 03:21 Jorge File Added: mesh_iso0_contour_after_SampleFunction.png
2014-09-30 03:30 Jorge File Added: TestPolyDataDistance.cxx
2014-09-30 03:37 Jorge Note Added: 0033381
2014-09-30 03:41 Jorge Tag Attached: hackaton
2014-10-02 15:32 Shawn Waldon Note Added: 0033528
2014-10-02 15:36 Shawn Waldon Reproducibility have not tried => always
2014-10-02 15:36 Shawn Waldon Status backlog => closed
2014-10-02 15:36 Shawn Waldon Resolution open => no change required


Copyright © 2000 - 2018 MantisBT Team