<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" 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 11 (filtered medium)">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="City"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Wingdings 2";
        panose-1:5 2 1 2 1 5 7 7 7 7;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:45.1pt 1.0cm 53.85pt 1.0cm;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>Dear all,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>I am trying to use the vtkPlaneWidget object to try control
a vtkCutter object (see earlier query). The essential part of the code is:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>void vtkMyCallback::Execute(vtkObject *caller,
unsigned long, void*)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>{<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp; CMainFrame* pMainFrame =
(CMainFrame*)AfxGetMainWnd() ;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp; if (pMainFrame==NULL) return ;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp; CSampleView* pVTKView =
(CSampleView*)(pMainFrame-&gt;MDIGetActive()-&gt;GetActiveView()) ;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp; if (pVTKView == NULL)
AfxMessageBox(&quot;NULL&quot;) ; ;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp; if (pVTKView == NULL) return ;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp; pVTKView-&gt;GetDocument()-&gt;UpdateXSection()
; // Part of what this does is update pPlane<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>}<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>In document class definition:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp;
vtkPlaneWidget&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
*pPlaneWidget ;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp;
vtkMyCallback&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
*pCallback ;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>IN document constructor:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp; this-&gt;pPlaneWidget = vtkPlaneWidget::New()
;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp; this-&gt;pCallback&nbsp;&nbsp;&nbsp; =
vtkMyCallback::New();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>In Open Document<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pPlaneWidget-&gt;SetInteractor(GetView()-&gt;Interactor);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkFloatingPointType
bounds[6] ;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkFloatingPointType
center[3] ;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GetView()-&gt;Renderer-&gt;ComputeVisiblePropBounds(bounds)
; <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; center[0]
= (bounds[0] + bounds[1])/2.0;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; center[1]
= (bounds[2] + bounds[3])/2.0;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; center[2]
= (bounds[4] + bounds[5])/2.0;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>// Note pPlane is the pointer to the implicit
function that is used by the vtkCutter<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pPlaneWidget-&gt;GetPlane(pPlane)
;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pPlaneWidget-&gt;SetResolution(10)
;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pPlaneWidget-&gt;PlaceWidget();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pPlaneWidget-&gt;NormalToYAxisOn()
;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pPlaneWidget-&gt;AddObserver(vtkCommand::InteractionEvent,
pCallback);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>The code doesn&#8217;t crash, but the movement of the
vtkPlaneWidget has no effect on the vtkPlane &nbsp;(pPlane). Any ideas??<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>Regards,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>Jim<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><b><font size=3 face=Arial><span lang=EN-IE
style='font-size:12.0pt;font-family:Arial;font-weight:bold'>James C Robinson</span></font></b><font
size=2 face=Arial><span lang=EN-IE style='font-size:10.0pt;font-family:Arial'>,
PhD, Chartered Engineer,</span></font><span lang=EN-IE><o:p></o:p></span></p>

<p class=MsoNormal><font size=3 face=Wingdings><span lang=EN-IE
style='font-size:12.0pt;font-family:Wingdings'>+</span></font><span lang=EN-IE>&nbsp;&nbsp;&nbsp;&nbsp; </span><font
size=2 face=Arial><span lang=EN-IE style='font-size:10.0pt;font-family:Arial'>42
Rivergrove,</span></font><span lang=EN-IE><o:p></o:p></span></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Glanmire,</span></font><span
lang=EN-IE><o:p></o:p></span></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Co. <st1:place
w:st="on"><st1:City w:st="on">Cork</st1:City></st1:place>,</span></font><span
lang=EN-IE><o:p></o:p></span></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-IE style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <st1:place
w:st="on">Eire</st1:place></span></font><span lang=EN-IE><o:p></o:p></span></p>

<p class=MsoNormal><font size=3 face="Wingdings 2"><span lang=EN-IE
style='font-size:12.0pt;font-family:"Wingdings 2"'>'</span></font><span
lang=EN-IE>&nbsp;&nbsp;&nbsp;&nbsp; +353 21 4822028<o:p></o:p></span></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-IE
style='font-size:12.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +353
87 2393010<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Wingdings 2"><span lang=EN-IE
style='font-size:12.0pt;font-family:"Wingdings 2"'>6</span></font><span
lang=EN-IE>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +353 21 4822028<o:p></o:p></span></p>

<p class=MsoNormal><font size=3 face=Wingdings><span lang=EN-IE
style='font-size:12.0pt;font-family:Wingdings'>-</span></font><span lang=EN-IE>&nbsp;&nbsp;&nbsp; <font
color=blue><span style='color:blue'>j.robinson@kepler-systems.com</span></font>&nbsp;</span><span
lang=EN-IE><o:p></o:p></span></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-IE
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>