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