<div dir="ltr">For vtkPlaneSource, you have to set the Origin (you have this commented out), Point1, and Point2. You shouldn't have to set the PlaneSource's normal unless you want to change it's orientation as defined by the origin and the two points.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 26, 2016 at 9:52 AM, Luis Vieira <span dir="ltr"><<a href="mailto:luis.vieira@vektore.com" target="_blank">luis.vieira@vektore.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-CA" link="#0563C1" vlink="#954F72"><div><p class="MsoNormal"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;background:white">Hello vtkusers,</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><u></u><u></u></span></p><div><div class="h5"><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222"><u></u> <u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">I am trying to draw a vtkPlaneSource from a vtkPlaneWidget after some user interactions. I had extracted Point1, Point2, Normal and Center from my Widget as well. However, applying against a vtkPlaneSource the result does not reflect the vtkPlaneWidget's definitions chosen by the user. It means, basically size and orientation of the final plane. Many thanks for any help.<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222"><u></u> <u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">following my snapshot.<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222"><u></u> <u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget = vtkSmartPointer<vtkPlaneWidget>::New();<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->SetInteractor(mouseClickCallback->renderWindowInteractor); //iren is vtkRenderWindowInteractor<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->SetInputConnection(mydataset);<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->SetPlaceFactor(1.0);<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->SetHandleSize(0.03);<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->SetResolution(10);<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->GetHandleProperty()->SetColor(0, 0.6, 0.1);<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->GetPlaneProperty()->SetColor(0, 0.3, 1);<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->GetPlaneProperty()->SetEdgeColor(0, 0.9, 1);<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->GetPlaneProperty()->SetEdgeVisibility(1);<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->PlaceWidget();<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->SetRepresentationToSurface();<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->GetPolyData(planeW);<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->AddObserver(vtkCommand::InteractionEvent, mouseClickCallback);<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->SetNormal(normalVector[0], normalVector[1], normalVector[2]); // normal of my target plane<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->SetCenter(center[0], center[1], center[2]); // origin of my target plane<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->UpdatePlacement();<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->EnabledOn();<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222"><u></u> <u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">Callback Interactions<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222"><u></u> <u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">_plane = vtkPlane::New();<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">vtkPolyData *polydata = vtkPolyData::New();<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">vtkSmartPointer<vtkExtractEdges> extractEdges =<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">vtkSmartPointer<vtkExtractEdges>::New();<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->GetPlane(_plane);<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->GetPolyData(polydata);<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->GetPoint1(Point1);<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->GetPoint2(Point2);<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeWidget->GetCenter(Center);<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">extractEdges->SetInputData(0, polydata);<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">extractEdges->Update();<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222"><u></u> <u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">vtkSmartPointer<vtkPlane> newPlane = vtkSmartPointer<vtkPlane>::New();<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">newPlane->SetNormal(planeWidget->GetNormal());<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">newPlane->SetOrigin(planeWidget->GetOrigin());<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222"><u></u> <u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">VtkPlaneSource<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222"><u></u> <u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">vtkSmartPointer<vtkPlaneSource> planeSource =<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">vtkSmartPointer<vtkPlaneSource>::New();<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeSource->SetPoint1(Point1[0], Point1[1], Point1[2]);//Point1<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeSource->SetPoint2(Point2[0], Point2[1], Point2[2]);//Point2<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">//planeSource->SetOrigin(newPlane->Origin[0], newPlane->Origin[1], newPlane->Origin[2]);//<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeSource->SetCenter(Center[0], Center[1], Center[2]);<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeSource->SetNormal(newPlane->GetNormal()[0], newPlane->GetNormal()[1], newPlane->GetNormal()[2]);<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">planeSource->Update();<u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222"><u></u> <u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222"><u></u> <u></u></span></p></div></div><p class="MsoNormal" style="background:white"><span style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222">Anybody here knows whats is wrong with my solution? Once, again many thanks for any help.<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></span></p><span class="HOEnZb"><font color="#888888"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><b><span style="font-size:12.0pt;font-family:"Times New Roman",serif">Luis </span></b><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p></font></span></div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>