<div dir="ltr">Don't do that, use a vtkPlaneCollection instead.<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 25, 2016 at 8:31 AM, Lonni Besançon <span dir="ltr"><<a href="mailto:lonni.besancon@gmail.com" target="_blank">lonni.besancon@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ok thanks for the advice.<br>
<br>
So here is what I have tried:<br>
<br>
/ vtkSmartPointer<vtkPlanes> planes =<br>
vtkSmartPointer<vtkPlanes>::New();<br>
vtkSmartPointer<vtkPoints> origins = vtkSmartPointer<vtkPoints>::New();<br>
origins->SetNumberOfPoints(1);<br>
origins->InsertNextPoint(plane->GetOrigin());<br>
vtkSmartPointer<vtkDoubleArray> normalsArray =<br>
vtkSmartPointer<vtkDoubleArray>::New();<br>
normalsArray->SetNumberOfComponents(3);<br>
normalsArray->SetNumberOfTuples(1);<br>
normalsArray->SetComponent(0,0,plane->GetNormal()[0]);<br>
normalsArray->SetComponent(0,1,plane->GetNormal()[1]);<br>
normalsArray->SetComponent(0,2,plane->GetNormal()[2]);<br>
planes->SetPoints(origins);<br>
planes->SetNormals(normalsArray);<br>
mainMapper->SetClippingPlanes(planes);/<br>
<br>
But this gives me a memory access error when reaching the last line.<br>
According to the debuger, the error is located in the for loop of the<br>
SetClippingPlanes() method which is in turn in the call to:<br>
/void vtkAbstractMapper::RemoveAllClippingPlanes(){if ( this->ClippingPlanes<br>
) //.../<br>
<br>
Would you happen to know what's wrong with what I've done there. I can't<br>
really understand where the error comes from<br></blockquote></div></div></div>