<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=big5" http-equiv=Content-Type>
<META content="MSHTML 5.00.2614.3500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>
<DIV><FONT size=2>
<DIV><FONT size=2>Dear all vtk user:</FONT></DIV>
<DIV><FONT size=2>I want to move the object (cutActor) to the new position such 
as (cutActor SetPosition 2 2 2) but I want to keep the old image on the screen 
such as (2 2 1). How can I use the renWin EraseOff?</FONT></DIV>
<DIV><FONT size=2>The following is my code:--</FONT></DIV>
<DIV><FONT size=2># Create the RenderWindow, Renderer and both 
Actors<BR>#<BR>vtkRenderer ren<BR>vtkRenderer ren1<BR>vtkRenderWindow 
renWin<BR>&nbsp;&nbsp;&nbsp; renWin AddRenderer ren<BR>&nbsp;renWin AddRenderer 
ren1<BR>vtkRenderWindowInteractor iren<BR>&nbsp;&nbsp;&nbsp; iren 
SetRenderWindow renWin</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>#input the hipjoin image<BR>vtkSTLReader 
hip<BR>&nbsp;&nbsp;&nbsp; hip SetFileName 
$VTK_DATA/ballJoint60.stl<BR>vtkPolyDataNormals normals<BR>&nbsp;&nbsp;&nbsp; 
normals SetInput [hip GetOutput]<BR>vtkPolyDataMapper&nbsp;&nbsp; 
hipMapper<BR>&nbsp;&nbsp;&nbsp; hipMapper SetInput [normals 
GetOutput]<BR>vtkLODActor hipActor<BR>&nbsp;&nbsp;&nbsp; hipActor SetMapper 
hipMapper<BR>eval [hipActor GetProperty] SetColor 1 0 0</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>#vtkOutlineFilter outline<BR>&nbsp;&nbsp;&nbsp; #outline 
SetInput [normals GetOutput]<BR>#vtkPolyDataMapper 
mapOutline<BR>&nbsp;&nbsp;&nbsp; #mapOutline SetInput [outline 
GetOutput]<BR>#vtkActor outlineActor<BR>&nbsp;&nbsp;&nbsp; #outlineActor 
SetMapper mapOutline<BR>&nbsp;&nbsp;&nbsp; #[outlineActor GetProperty] SetColor 
0.9 0 0</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2><BR>hipActor SetOrigin 0 0 0<BR>hipActor RotateX 
-90<BR>hipActor SetPosition 0 2.73 2.244</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>#input the cutter1 image<BR>vtkSTLReader 
cut<BR>&nbsp;&nbsp;&nbsp; cut SetFileName 
$VTK_DATA/cutter1.stl<BR>vtkPolyDataNormals normal<BR>&nbsp;&nbsp;&nbsp; normal 
SetInput [cut GetOutput]<BR>vtkPolyDataMapper&nbsp;&nbsp; 
cutMapper<BR>&nbsp;&nbsp;&nbsp; cutMapper SetInput [normal 
GetOutput]<BR>vtkLODActor cutActor<BR>&nbsp;&nbsp;&nbsp; cutActor SetMapper 
cutMapper<BR>cutActor SetOrigin 0 0 0<BR>cutActor RotateX -90<BR>cutActor 
SetPosition 0 10 0<BR># Add the actors to the renderer, set the background and 
size<BR>#<BR>renWin EraseOff<BR>ren AddActor hipActor<BR>ren1 AddActor 
cutActor<BR>#ren AddProp outlineActor<BR>ren SetBackground 0.1 0.2 0.4<BR>renWin 
SetSize 600 600</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>#vtkCubeAxesActor2D axes<BR>&nbsp;&nbsp;&nbsp; #axes SetProp 
hipActor<BR>&nbsp;&nbsp;&nbsp; #axes SetCamera [ren 
GetActiveCamera]<BR>&nbsp;&nbsp;&nbsp; #axes SetLabelFormat 
"%6.3g"<BR>&nbsp;&nbsp;&nbsp; #axes ShadowOff<BR>&nbsp;&nbsp;&nbsp; #axes 
SetFlyModeToOuterEdges<BR>&nbsp;&nbsp; #axes 
SetFlyModeToClosestTriad<BR>&nbsp;&nbsp;&nbsp; #axes SetFontFactor 
1.5<BR>&nbsp;&nbsp;&nbsp; #[axes GetProperty] SetColor 1 1 1<BR>#ren AddProp 
axes <BR>#vtkCubeAxesActor2D axes1<BR>&nbsp;&nbsp;&nbsp; #axes1 SetProp 
cutActor<BR>&nbsp;&nbsp;&nbsp; #axes1 SetCamera [ren 
GetActiveCamera]<BR>&nbsp;&nbsp;&nbsp; #axes1 SetLabelFormat 
"%6.3g"<BR>&nbsp;&nbsp;&nbsp; #axes1 ShadowOff<BR>&nbsp;&nbsp;&nbsp; #axes1 
SetFlyModeToOuterEdges<BR>&nbsp;&nbsp; #axes1 
SetFlyModeToClosestTriad<BR>&nbsp;&nbsp;&nbsp; #axes1 SetFontFactor 
1.1<BR>&nbsp;&nbsp;&nbsp; #[axes1 GetProperty] SetColor 1 1 1<BR>#ren AddProp 
axes1 </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2># render the image<BR>#<BR>iren SetUserMethod {wm deiconify 
.vtkInteract}<BR>set cam1 [ren1 GetActiveCamera]<BR>$cam1 Zoom 1.1<BR>iren 
Initialize</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>#renWin SetFileName "ballJoint50.stl.ppm"<BR>#renWin 
SaveImageAsPPM</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2># test regeneration of the LODMappers<BR># stlActor 
Modified</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2># prevent the tk window from showing up then start the event 
loop<BR>wm withdraw .<BR>#</FONT></DIV>
<DIV><FONT size=2>--------------------------------------</FONT></DIV>
<DIV><FONT size=2>But the image can not move properly......please HELP 
ME!!&nbsp; </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>Thank for any advise</FONT></DIV>
<DIV><FONT size=2>German Leung 
:(</FONT></DIV></FONT></DIV></FONT></DIV></BODY></HTML>