<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: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'>Thanks to John (Biddiscombe) I am able to control my
vtkCutter using the vtkPlaneWidget. However, I also want to be able to do the
reverse &#8211; i.e. take the vtkPlane setup from the vtkCutter and apply them
to the vtkPlaneWidget (as I have already other menu driven controls to manipulate
the vtkPlane). My attempt at doing this 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 CSampleDoc::UpdatePlaneWidget()<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'>// This method is to update the plane widget from the
vtkPlane used as the <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'>// implicit function for 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'><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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkFloatingPointType normal[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; vtkFloatingPointType origin[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'><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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pPlane-&gt;GetOrigin(origin) ;<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; pPlane-&gt;GetNormal(normal) ;<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'>CString message, dummy ;<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'>message.Format(&quot;Origin:- x %lf, y %lf, z
%lf\n&quot;,origin[0],origin[1],origin[2]) ;<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'>dummy.Format(&quot;Normal:- x %lf, y %lf, z
%lf\n&quot;,normal[0],normal[1],normal[2]) ;<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'>message += dummy ;<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'>AfxMessageBox(message) ;<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;pPlaneWidget-&gt;SetOrigin(origin) ;<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;pPlaneWidget-&gt;SetNormal(normal) ;<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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pPlaneWidget-&gt;GetOrigin(origin) ;<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;GetNormal(normal) ;<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'>message.Format(&quot;Origin:- x %lf, y %lf, z
%lf\n&quot;,origin[0],origin[1],origin[2]) ;<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'>dummy.Format(&quot;Normal:- x %lf, y %lf, z
%lf\n&quot;,normal[0],normal[1],normal[2]) ;<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'>message += dummy ;<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'>AfxMessageBox(message) ;<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></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'>This yields:<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'>Origin: x 100.000000, y 100.0000000, z 10.0000000<o:p></o:p></span></font></p>

<p class=MsoNormal><st1:City w:st="on"><st1:place w:st="on"><font size=2
  face=Arial><span lang=EN-IE style='font-size:10.0pt;font-family:Arial'>Normal</span></font></st1:place></st1:City><font
size=2 face=Arial><span lang=EN-IE style='font-size:10.0pt;font-family:Arial'>:
x 0.000000, y 1.0000000, z 0.0000000<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'>For the vtkPlane &#8211; which is what I have set up.
<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'>However, the output from the vtkPlaneWidget 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'>Origin: x 100.000000, y 10.0000000, z -100.0000000<o:p></o:p></span></font></p>

<p class=MsoNormal><st1:place w:st="on"><st1:City w:st="on"><font size=2
  face=Arial><span lang=EN-IE style='font-size:10.0pt;font-family:Arial'>Normal</span></font></st1:City></st1:place><font
size=2 face=Arial><span lang=EN-IE style='font-size:10.0pt;font-family:Arial'>:
x 0.000000, y 1.0000000, z 0.0000000<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'>So the origin coordinates seem to have been mixed up.
In addition, it doesn&#8217;t show the vtkPLaneWidget in this position (rather
the normal is 1,0,0 and the origin (center??) seems alright??<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'>Any advice would be appreciated.<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>