<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-CA link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;background:white;mso-fareast-language:EN-CA'>Hello vtkusers,</span><span style='font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-CA'><o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'><o:p> </o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>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.<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'><o:p> </o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>following my snapshot.<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'><o:p> </o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget = vtkSmartPointer<vtkPlaneWidget>::New();<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->SetInteractor(mouseClickCallback->renderWindowInteractor);  //iren is vtkRenderWindowInteractor<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->SetInputConnection(mydataset);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->SetPlaceFactor(1.0);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->SetHandleSize(0.03);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->SetResolution(10);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->GetHandleProperty()->SetColor(0, 0.6, 0.1);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->GetPlaneProperty()->SetColor(0, 0.3, 1);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->GetPlaneProperty()->SetEdgeColor(0, 0.9, 1);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->GetPlaneProperty()->SetEdgeVisibility(1);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->PlaceWidget();<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->SetRepresentationToSurface();<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->GetPolyData(planeW);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->AddObserver(vtkCommand::InteractionEvent, mouseClickCallback);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->SetNormal(normalVector[0], normalVector[1], normalVector[2]); // normal of my target plane<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->SetCenter(center[0], center[1], center[2]); // origin of my target plane<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->UpdatePlacement();<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->EnabledOn();<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'><o:p> </o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>Callback Interactions<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'><o:p> </o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>_plane = vtkPlane::New();<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>vtkPolyData *polydata = vtkPolyData::New();<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>vtkSmartPointer<vtkExtractEdges> extractEdges =<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>vtkSmartPointer<vtkExtractEdges>::New();<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->GetPlane(_plane);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->GetPolyData(polydata);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->GetPoint1(Point1);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->GetPoint2(Point2);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeWidget->GetCenter(Center);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>extractEdges->SetInputData(0, polydata);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>extractEdges->Update();<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'><o:p> </o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>vtkSmartPointer<vtkPlane> newPlane = vtkSmartPointer<vtkPlane>::New();<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>newPlane->SetNormal(planeWidget->GetNormal());<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>newPlane->SetOrigin(planeWidget->GetOrigin());<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'><o:p> </o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>VtkPlaneSource<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'><o:p> </o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>vtkSmartPointer<vtkPlaneSource> planeSource =<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>vtkSmartPointer<vtkPlaneSource>::New();<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeSource->SetPoint1(Point1[0], Point1[1], Point1[2]);//Point1<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeSource->SetPoint2(Point2[0], Point2[1], Point2[2]);//Point2<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>//planeSource->SetOrigin(newPlane->Origin[0], newPlane->Origin[1], newPlane->Origin[2]);//<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeSource->SetCenter(Center[0], Center[1], Center[2]);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeSource->SetNormal(newPlane->GetNormal()[0], newPlane->GetNormal()[1], newPlane->GetNormal()[2]);<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>planeSource->Update();<o:p></o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'><o:p> </o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'><o:p> </o:p></span></p><p class=MsoNormal style='background:white'><span style='font-size:9.5pt;font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-CA'>Anybody here knows whats is wrong with my solution? Once, again many thanks for any help.<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><b><span style='font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-CA'>Luis </span></b><span style='font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-CA'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>