<!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> renWin AddRenderer ren<BR> renWin AddRenderer
ren1<BR>vtkRenderWindowInteractor iren<BR> iren
SetRenderWindow renWin</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>#input the hipjoin image<BR>vtkSTLReader
hip<BR> hip SetFileName
$VTK_DATA/ballJoint60.stl<BR>vtkPolyDataNormals normals<BR>
normals SetInput [hip GetOutput]<BR>vtkPolyDataMapper
hipMapper<BR> hipMapper SetInput [normals
GetOutput]<BR>vtkLODActor hipActor<BR> hipActor SetMapper
hipMapper<BR>eval [hipActor GetProperty] SetColor 1 0 0</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>#vtkOutlineFilter outline<BR> #outline
SetInput [normals GetOutput]<BR>#vtkPolyDataMapper
mapOutline<BR> #mapOutline SetInput [outline
GetOutput]<BR>#vtkActor outlineActor<BR> #outlineActor
SetMapper mapOutline<BR> #[outlineActor GetProperty] SetColor
0.9 0 0</FONT></DIV>
<DIV> </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> </DIV>
<DIV><FONT size=2>#input the cutter1 image<BR>vtkSTLReader
cut<BR> cut SetFileName
$VTK_DATA/cutter1.stl<BR>vtkPolyDataNormals normal<BR> normal
SetInput [cut GetOutput]<BR>vtkPolyDataMapper
cutMapper<BR> cutMapper SetInput [normal
GetOutput]<BR>vtkLODActor cutActor<BR> 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> </DIV>
<DIV><FONT size=2>#vtkCubeAxesActor2D axes<BR> #axes SetProp
hipActor<BR> #axes SetCamera [ren
GetActiveCamera]<BR> #axes SetLabelFormat
"%6.3g"<BR> #axes ShadowOff<BR> #axes
SetFlyModeToOuterEdges<BR> #axes
SetFlyModeToClosestTriad<BR> #axes SetFontFactor
1.5<BR> #[axes GetProperty] SetColor 1 1 1<BR>#ren AddProp
axes <BR>#vtkCubeAxesActor2D axes1<BR> #axes1 SetProp
cutActor<BR> #axes1 SetCamera [ren
GetActiveCamera]<BR> #axes1 SetLabelFormat
"%6.3g"<BR> #axes1 ShadowOff<BR> #axes1
SetFlyModeToOuterEdges<BR> #axes1
SetFlyModeToClosestTriad<BR> #axes1 SetFontFactor
1.1<BR> #[axes1 GetProperty] SetColor 1 1 1<BR>#ren AddProp
axes1 </FONT></DIV>
<DIV> </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> </DIV>
<DIV><FONT size=2>#renWin SetFileName "ballJoint50.stl.ppm"<BR>#renWin
SaveImageAsPPM</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2># test regeneration of the LODMappers<BR># stlActor
Modified</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV> </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!! </FONT></DIV>
<DIV> </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>