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


#### import the simple module from the paraview
from paraview.simple import *
#### disable automatic camera reset on 'Show'
paraview.simple._DisableFirstRenderCameraReset()

# create a new 'Cylinder'
cylinder1 = Cylinder()

# Properties modified on cylinder1
cylinder1.Resolution = 100000
cylinder1.Height = 0.1
cylinder1.Radius = 0.2 
cylinder1.Center = [0.0, 0.0, 0.0]
cylinder1.Capping = 0

# create a new 'Transform'
transform1 = Transform(Input=cylinder1)
transform1.Transform = 'Transform'

# Properties modified on transform1.Transform
transform1.Transform.Rotate = [90.0, 0.0, 0.0]

# create a new 'Transform'
transform2 = Transform(Input=transform1)
transform2.Transform = 'Transform'

# Properties modified on transform2.Transform
transform2.Transform.Translate = [0.5, 0.5, 0.05]

# create a new 'Triangulate'
triangulate1 = Triangulate(Input=cylinder1)

# save data
SaveData('./cylinder.stl', proxy=triangulate1, FileType='Ascii')
_______________________________________________
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

Reply via email to