11diff --git a/Common/Core/vtkRandomPool.cxx b/Common/Core/vtkRandomPool.cxx
2- index 46f9aff201..273ca74c50 100644
2+ index c2bcf67d18..69ca63654a 100644
33--- a/Common/Core/vtkRandomPool.cxx
44+++ b/Common/Core/vtkRandomPool.cxx
5- @@ -338 ,6 +338 ,9 @@ const double* vtkRandomPool::GeneratePool()
5+ @@ -332 ,6 +332 ,9 @@ const double* vtkRandomPool::GeneratePool()
66 if (actualThreads < numThreads) // readjust work load
77 {
88 numThreads = actualThreads;
@@ -13,48 +13,26 @@ index 46f9aff201..273ca74c50 100644
1313
1414 // Now distribute work
1515diff --git a/Filters/Modeling/vtkSelectEnclosedPoints.cxx b/Filters/Modeling/vtkSelectEnclosedPoints.cxx
16- index 0dcae6df7a..2986c1e7fd 100644
16+ index 7d5122297e..998e3f888e 100644
1717--- a/Filters/Modeling/vtkSelectEnclosedPoints.cxx
1818+++ b/Filters/Modeling/vtkSelectEnclosedPoints.cxx
19- @@ -88,7 +88,10 @@ struct SelectInOutCheck
20-
19+ @@ -80,6 +80,9 @@ struct SelectInOutCheck
2120 // Precompute a sufficiently large enough random sequence
2221 this->Sequence = vtkRandomPool::New();
23- - this->Sequence->SetSize((numPts > 1500 ? numPts : 1500));
22+ this->Sequence->SetSize((numPts > 1500 ? numPts : 1500));
2423+ // Alan : I see no reason to ever generate more than 1000 random numbers
2524+ // each vector will use 3 and only a few vectors for each point
2625+ // this also works around the bug in vtkRandomPool
27- + this->Sequence->SetSize(1000);
2826 this->Sequence->GeneratePool();
2927 }
3028
31- @@ -325,7 +328,7 @@ int vtkSelectEnclosedPoints::IsInsideSurface(double x[3])
29+ @@ -325,7 +328,8 @@ int vtkSelectEnclosedPoints::IsInsideSurface(double x[3])
3230 // supporting the precomputation of a random sequence (see vtkRandomPool).
3331 //
3432 #define VTK_MAX_ITER 10 // Maximum iterations for ray-firing
3533- #define VTK_VOTE_THRESHOLD 2 // Vote margin for test
34+ + // Alan: I've changed the vote margin to 3
3635+ #define VTK_VOTE_THRESHOLD 3 // Vote margin for test
3736
3837 int vtkSelectEnclosedPoints::IsInsideSurface(double x[3], vtkPolyData* surface, double bds[6],
3938 double length, double tolerance, vtkAbstractCellLocator* locator, vtkIdList* cellIds,
40- diff --git a/Rendering/OpenGL2/vtkCocoaRenderWindow.mm b/Rendering/OpenGL2/vtkCocoaRenderWindow.mm
41- index 0d63d49783..82e6b7c57f 100644
42- --- a/Rendering/OpenGL2/vtkCocoaRenderWindow.mm
43- +++ b/Rendering/OpenGL2/vtkCocoaRenderWindow.mm
44- @@ -228,6 +228,16 @@ vtkCocoaRenderWindow::vtkCocoaRenderWindow()
45- //----------------------------------------------------------------------------
46- vtkCocoaRenderWindow::~vtkCocoaRenderWindow()
47- {
48- + // If we created a vtkCocoaGLView, clear its reference back to us.
49- + if (this->GetViewCreated())
50- + {
51- + NSView* glView = (NSView*)this->GetWindowId();
52- + if ([glView isKindOfClass:[vtkCocoaGLView class]])
53- + {
54- + [(vtkCocoaGLView*)glView setVTKRenderWindow:nullptr];
55- + }
56- + }
57- +
58- if (this->CursorHidden)
59- {
60- this->ShowCursor();
0 commit comments