[Paraview] Moving clip plane

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Wed Jun 8 10:29:44 EDT 2016


State file attached. It uses can.ex2.

The crux is in the Python Animation Cue script:

def start_cue(self): pass

def tick(self):
  ts = self.GetClockTime()
  from paraview import simple as pvs
  clip = pvs.FindSource("Clip1")
  ip = clip.Input
  ip.UpdatePipeline(ts)
  bds = ip.GetDataInformation().GetBounds()
  center = [ (bds[0] + bds[1]) / 2.0,
             (bds[2] + bds[3]) / 2.0,
             (bds[4] + bds[5]) / 2.0 ]
  clip.ClipType.Origin = center

def end_cue(self): pass



On Wed, Jun 8, 2016 at 10:05 AM, Utkarsh Ayachit
<utkarsh.ayachit at kitware.com> wrote:
> In theory, you can do this using a Python animation cue too... let me
> see how that can be put together.
>
> On Wed, Jun 8, 2016 at 8:50 AM, David E DeMarle
> <dave.demarle at kitware.com> wrote:
>>
>> If the slice stays fixed relative to the bounding box of the moving object,
>> try a python calculator to calculate the normalized local coordinates, than
>> apply isocontour on them.
>>
>> On Tuesday, June 7, 2016, Scott, W Alan <wascott at sandia.gov> wrote:
>>>
>>> Is there a way to create a clip plane and have it translate with a moving
>>> part so that the same material is clipped throughout?
>>>
>>>
>>>
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>> Alan
>>>
>>>
>>
>>
>>
>> --
>> David E DeMarle
>> Kitware, Inc.
>> R&D Engineer
>> 21 Corporate Drive
>> Clifton Park, NY 12065-8662
>> Phone: 518-881-4909
>>
>> _______________________________________________
>> 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
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ClipAndCenterOfData.pvsm
Type: application/octet-stream
Size: 181539 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160608/5fbd9251/attachment-0001.obj>


More information about the ParaView mailing list