<div dir="ltr"><div><div>Hello<br><br></div>One way to go would be to copy (or subclass) vtkCylinderSource and built it as a Plugin for paraview.<br></div><div>Easy if you are building ParaView yourself, more complex otherwise.<br><br></div><div>Another way would be to write your own cylinder source in a Python Programmable Source,<br></div><div>not easy but you will be able to use your new source with the binary release of ParaView<br><br></div><div>Regards,<br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Mathieu Westphal<br></div></div></div>
<br><div class="gmail_quote">On Tue, May 30, 2017 at 5:27 AM, kenichiro yoshimi <span dir="ltr"><<a href="mailto:rccm.kyoshimi@gmail.com" target="_blank">rccm.kyoshimi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Tomislav,<br>
<br>
I find restriction on the resolution number of a cyliner source in<br>
vtkCylinderSource.h, that is:<br>
  vtkSetClampMacro(Resolution,<wbr>int,2,VTK_CELL_SIZE).<br>
This macro amounts to saying that the resolution is restricted to a<br>
range between 2 and VTK_CELL_SIZE(=512). Hence, I think it difficult<br>
to override.<br>
<br>
In order to increase the resolution of the cylinder, one thing you can<br>
try is to apply the loop subdivision filter after triangulating it.<br>
<br>
Thanks,<br>
yoshimi<br>
<br>
2017-05-30 0:06 GMT+09:00 Tomislav Maric <<a href="mailto:tomislav.maric@gmx.com">tomislav.maric@gmx.com</a>>:<br>
> Hello everyone,<br>
><br>
> I have exported the paraview trace into the attached script that<br>
> generates a cylinder source without caps, triangulates and saves an STL<br>
> file.<br>
><br>
> I have noticed that the cylinder resolution can be prescribed to any<br>
> number in the python script:<br>
><br>
> ~~~<br>
>     # create a new 'Cylinder'<br>
>     cylinder1 = Cylinder()<br>
><br>
>     # Properties modified on cylinder1<br>
>     cylinder1.Resolution = 100000<br>
> ~~~<br>
><br>
> And this number is reported by the print command as well<br>
><br>
> ~~~<br>
>     print(cylinder1.Resolution)<br>
> ~~~<br>
><br>
> However, the actual resolution of the cylinder source never exceeds the<br>
> number 512. This I have figured out after manually inspecting the number<br>
> of triangles in the 'cylinder.stl' file generated by the attached script.<br>
><br>
> I have browsed the VTK code as well, but I could not find the point<br>
> where the maximal cylinder source resolution is restricted to 512.<br>
><br>
> My question is: can I somehow (in python, or in VTK) override the<br>
> resolution that is actually then applied to the cylinder? I am using<br>
> paraview version 4.4.0. Does it work in a newer paraview version?<br>
><br>
> Kind Regards,<br>
><br>
> Tomislav<br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/<wbr>ParaView</a><br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/paraview</a><br>
><br>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/<wbr>ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/paraview</a><br>
</blockquote></div><br></div>