<div dir="ltr">Hello vtkusers,<div><br></div><div>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.<br></div><div><br></div><div>following my snapshot.</div><div><br></div><div><div>planeWidget = vtkSmartPointer<vtkPlaneWidget>::New();</div><div>planeWidget->SetInteractor(mouseClickCallback->renderWindowInteractor);  //iren is vtkRenderWindowInteractor</div><div>planeWidget->SetInputConnection(mydataset);</div></div><div><div>planeWidget->SetPlaceFactor(1.0);</div><div>planeWidget->SetHandleSize(0.03);</div><div>planeWidget->SetResolution(10);</div></div><div><div>planeWidget->GetHandleProperty()->SetColor(0, 0.6, 0.1);</div><div>planeWidget->GetPlaneProperty()->SetColor(0, 0.3, 1);</div><div>planeWidget->GetPlaneProperty()->SetEdgeColor(0, 0.9, 1);</div><div>planeWidget->GetPlaneProperty()->SetEdgeVisibility(1);</div></div><div><div>planeWidget->PlaceWidget();</div><div>planeWidget->SetRepresentationToSurface();</div><div>planeWidget->GetPolyData(planeW);</div><div>planeWidget->AddObserver(vtkCommand::InteractionEvent, mouseClickCallback);</div><div>planeWidget->SetNormal(normalVector[0], normalVector[1], normalVector[2]); // normal of my target plane</div><div>planeWidget->SetCenter(center[0], center[1], center[2]); // origin of my target plane</div><div>planeWidget->UpdatePlacement();</div><div>planeWidget->EnabledOn();</div></div><div><br></div><div>Callback Interactions</div><div><br></div><div><div>_plane = vtkPlane::New();</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">              </span>vtkPolyData *polydata = vtkPolyData::New();</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">            </span>vtkSmartPointer<vtkExtractEdges> extractEdges =</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                  </span>vtkSmartPointer<vtkExtractEdges>::New();</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">         </span>planeWidget->GetPlane(_plane);</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">              </span>planeWidget->GetPolyData(polydata);</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">         </span>planeWidget->GetPoint1(Point1);</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>planeWidget->GetPoint2(Point2);</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>planeWidget->GetCenter(Center);</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>extractEdges->SetInputData(0, polydata);</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">            </span>extractEdges->Update();</div></div><div><br></div><div>vtkSmartPointer<vtkPlane> newPlane = vtkSmartPointer<vtkPlane>::New();<br></div><div><div>newPlane->SetNormal(planeWidget->GetNormal());</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">               </span>newPlane->SetOrigin(planeWidget->GetOrigin());</div></div><div><br></div><div>VtkPlaneSource</div><div><br></div><div><div>vtkSmartPointer<vtkPlaneSource> planeSource =</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                   </span>vtkSmartPointer<vtkPlaneSource>::New();</div><div>planeSource->SetPoint1(Point1[0], Point1[1], Point1[2]);//Point1</div><div>planeSource->SetPoint2(Point2[0], Point2[1], Point2[2]);//Point2</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                                      </span>//planeSource->SetOrigin(newPlane->Origin[0], newPlane->Origin[1], newPlane->Origin[2]);//</div><div>planeSource->SetCenter(Center[0], Center[1], Center[2]);</div><div>planeSource->SetNormal(newPlane->GetNormal()[0], newPlane->GetNormal()[1], newPlane->GetNormal()[2]);</div><div>planeSource->Update();</div></div><div><br></div><div><br></div><div>Anybody here knows whats is wrong with my solution? Once, again many thanks for any help.<br></div><div><br></div><div>Luis</div><div><br></div><div><br></div><div><br></div></div>