<div dir="ltr">Few points here<br><br> You are setting a -ve scaling (1,1,-1). I am not sure whether scaling in -ve has any meaning. To shrink it will be <1 and >1 to expand. (I am not familiar with matrix operations, excuse if its wrong)<br>
<br><br>With few typographical error corrections they appear in the color I set (yellow)<br><br>//...................<br> vtkCubeSource *cubeSource = vtkCubeSource::New();<br> cubeSource->SetCenter(5,5,5);<br> cubeSource->SetXLength(10);<br>
cubeSource->SetYLength(10);<br> cubeSource->SetZLength(10);<br><br> vtkPolyDataMapper* mapper = vtkPolyDataMapper::New();<br> mapper->SetInput(cubeSource->GetOutput());<br> <b><span style="color:rgb(204,0,0)">mapper->ScalarVisibilityOff();</span></b><br>
<br> vtkActor* cubeActor = vtkActor::New();<br> cubeActor->SetMapper(mapper);<br> <span style="color:rgb(204,0,0)"><b> cubeActor->GetProperty()->SetColor(1,1,0);</b></span><br><br> this->modelRenderer->AddActor(cubeActor);<br>
vtkTransform *transform = vtkTransform::New();<br> <span style="color:rgb(204,0,0)"><b> transform->Scale(1,1,0.5);</b></span><br><br>// cubeActor->GetProperty()->BackfaceCullingOff();<br><br> cubeActor->SetUserTransform(transform);<br>
<br><br>Regards<br>Jothy<br><br><br><br><br>On Mon, Sep 3, 2012 at 3:17 PM, zlf <<a href="mailto:jxdw_zlf@yahoo.com.cn">jxdw_zlf@yahoo.com.cn</a>> wrote:<br>><br>> Dear David,<br>><br>> Thank you for your response. But I still cannot see anything. My code is<br>
><br>> vtkCubeSource cubeSource = vtkCubeSource->New();<br>> cubeSource->SetCenter(5,5,5);<br>> cubeSource->SetXLength(10);<br>> cubeSource->SetYLength(10);<br>> cubeSource->SetZLength(10);<br>
><br>> vtkPolyDataMapper mapper = vtkPolyDataMapper::New();<br>> mapper->SetInput(cubeSource->GetOutput());<br>><br>> vtkActor cubeActor = vtkActor::New();<br>> cubeActor->SetMapper(mapper);<br>
><br>> render->AddActor(cubeActor);<br>><br>> vtkTransform transform = vtkTransform::New();<br>> transform->Scale(1,1,-1);<br>> cubeActor->GetProertry()->BackfaceCullingOff();<br>> cubeAcotr->SetUserTransform(transform);<br>
><br>> renderer->ResetCameraClippingRange();<br>> renderer->ResetCamera();<br>> renwin->Render();<br>><br>> Regards,<br>><br>> zlf<br>><br>><br>><br>> --<br>> View this message in context: <a href="http://vtk.1045678.n5.nabble.com/PolyData-actor-is-invisible-after-applying-scale-1-1-1-tp5715785p5715801.html">http://vtk.1045678.n5.nabble.com/PolyData-actor-is-invisible-after-applying-scale-1-1-1-tp5715785p5715801.html</a><br>
> Sent from the VTK - Users mailing list archive at Nabble.com.<br>> _______________________________________________<br>> Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>><br>> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
><br>> Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>><br>> Follow this link to subscribe/unsubscribe:<br>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br><br><br><br>--<br>Jothybasu Selvaraj<br>PhD Student<br>University of Liverpool<br>UK<br></div>