Well, here is my code, now it seems to work .<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">vtkSmartPointer&lt;vtkCylinderSource&gt; cylinderSource = vtkSmartPointer&lt;vtkCylinderSource&gt;::New();<br>


cylinderSource-&gt;SetCenter(center[0], center[1], center[2]);<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


 </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">vtkSmartPointer&lt;vtkTransform&gt; transform = vtkSmartPointer&lt;vtkTransform&gt;::New();<br>


transform-&gt;Translate(-center[0],-center[1],-center[2]);<br>transform-&gt;PostMultiply();  <font color="#ff0000">//This was the fundamental line, if I have not put this line, the second translation goes to a wrong place.</font><br>


transform-&gt;RotateX(90);<br>transform-&gt;Translate(centerV[0],centerV[1],centerV[2]);<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


 </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">vtkSmartPointer&lt;vtkTransformPolyDataFilter&gt; transF = vtkSmartPointer&lt;vtkTransformPolyDataFilter&gt;::New();<br>


transF-&gt;SetInput(cylinderSource-&gt;GetOutput());<br>transF-&gt;SetTransform(transform);<br>transF-&gt;Update();<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


 </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">vtkSmartPointer&lt;vtkPolyData&gt; cylinder = transF-&gt;GetOutput();</blockquote>


<div> </div><br><div class="gmail_quote">2012/7/18 David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria@gmail.com" target="_blank">daviddoria@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div class="gmail_quote"><div>On Wed, Jul 18, 2012 at 10:07 AM, Gonzalo Amadio <span dir="ltr">&lt;<a href="mailto:gonzaloamadio@gmail.com" target="_blank">gonzaloamadio@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



I forgot to put the code, I only add this to the previous one<div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">





vtkSmartPointer&lt;vtkTransform&gt; transform = vtkSmartPointer&lt;vtkTransform&gt;::New();<br>transform-&gt;RotateY(90);<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">





 </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">vtkSmartPointer&lt;vtkTransformPolyDataFilter&gt; transF = vtkSmartPointer&lt;vtkTransformPolyDataFilter&gt;::New();<br>





transF-&gt;SetInput(cylinderSource-&gt;GetOutput());<br>transF-&gt;SetTransform(transform);<br>transF-&gt;Update();<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">





 </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">vtkSmartPointer&lt;vtkPolyData&gt; cylinder = transF-&gt;GetOutput();</blockquote>



</div></blockquote><div><br></div></div>These are transformation it the mathematical sense - i.e. &quot;around the origin&quot;. You&#39;d have to center your data (by subtracting it&#39;s center, a translation to the origin), apply the rotation, and then return your data to its original position by adding its center (a final translation).<span><font color="#888888"><br clear="all">



<br>David</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>--------<br>Gonzalo Amadio<br><br>