Hi Mathieu,

Sorry for the late reply. Just now I had time to put together a short
example to reproduce the problem (see attachment).

I am running ParaView-5.4.1 on  Debian 9. I am using mpiexec and pvbatch
that come together with ParaView.
My shell command for running the script is: /opt/ParaView-5.4.1/bin/mpiexec
-np 4 pvbatch example.py

I attach a simple python script (example.py) for debugging purposes. Here I
basically create two boxes with same center but one has twice the length of
the other.
If you run this code with one processor you should see that the output
(example.png) displays two concentric boxes. Increasing the processor count
(anything >1)
seems to cause the center of one of the boxes to be misplaced.

This problem only appears when the boxCenter is something different than
[0.,0.,0.]. Modifying line 8 of the attached script and setting boxCenter
to [0.,0.,0.] results in
correct behavior.

Kind Regards,
Tiago


On Wed, Apr 18, 2018 at 8:56 AM, Mathieu Westphal <
[email protected]> wrote:

> Hi Tiago,
>
> Could you please precise which version of ParaView you are using, how do
> you start pvserver/ParaView/pvpython, and which python command you are
> using exactly.
>
> Thanks,
>
>
> Mathieu Westphal
>
> On Tue, Apr 17, 2018 at 7:18 PM, ufdup <[email protected]> wrote:
>
>> Hi,
>>
>> I am facing some trouble to draw a Box using 'paraview.simple.Box()'.
>> When running in parallel this function fails to draw the boxes at the
>> correct coordinates as specified by boxLength and boxCenter.
>> In serial mode, however, the box is drawn at the correct location.
>>
>> As ad-hoc fix I had to draw the box by using 'paraview.simple.Line()'
>> multiple times.  This seems to work both in parallel and serial.
>>
>> Any hep?
>>
>> Kind Regards
>> Tiago
>>
>> _______________________________________________
>> 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:
>> https://public.kitware.com/mailman/listinfo/paraview
>>
>>
>
from paraview.simple import *

renderView = GetActiveViewOrCreate('RenderView')
renderView.ViewSize   = [640,480]
renderView.Update()

boxLength = [31.0, 47.0, 127.0]
boxCenter = [79.5, 87.5, 127.5]

box1 = Box()
box1.XLength = boxLength[0]
box1.YLength = boxLength[1]
box1.ZLength = boxLength[2]
box1.Center = boxCenter

box1Display = Show(box1,renderView)
box1Display.SetRepresentationType('Outline')


box2 = Box()
box2.XLength = 2.*boxLength[0]
box2.YLength = 2.*boxLength[1]
box2.ZLength = 2.*boxLength[2]
box2.Center = boxCenter

box2Display = Show(box2,renderView)
box2Display.SetRepresentationType('Outline')

fout_name='example.png'
renderView.Update()
Render()
SaveScreenshot(fout_name,renderView,ImageResolution=[2560, 1920])
_______________________________________________
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:
https://public.kitware.com/mailman/listinfo/paraview

Reply via email to