[Paraview] Apply Clip Filter using Python

Dominic Jennewein dominic.jennewein at gmail.com
Fri Nov 20 12:09:33 EST 2009


No, sorry... :(
I marked the object in the pipeline and added this line:

pipe00=GetActiveSource()
clip01=Clip(Input=pipe00)
clip01.InsideOut=1
clip01.ClipType = "Box"
clip01.ClipType.Scale=[0.5,0.5,0.5]
clip01.UpdatePipeline()
Render()

after that, I used the "Extract Surface" Filter and had to apply the Clip
again.

But still thank you!

2009/11/20 Adriano Gagliardi <agagliardi at ara.co.uk>

>  Sorry, I've just realised you haven't passed an input to the clip filter.
> You need to give the clip filter an input property from the previous
> pipeline like so:
>
>  clip01 = Clip( Input=pipe00 )
>
> clip01.InsideOut=1
> clip01.ClipType = "Box"
> clip01.ClipType.Scale=[0.5,0.5,0.5]
> clip01.UpdatePipeline()
> Render()
>
> does that work?
>
>
> ===================================
>
> Adriano Gagliardi MEng PhD
> Project Scientist
> Computational Aerodynamics
> Aircraft Research Association Ltd.
> Manton Lane
> Bedford
>
> Tel: 01234 32 4644
> E-mail: agagliardi at ara.co.uk
> Url: www.ara.co.uk
>
>
>  ------------------------------
> *From:* Dominic Jennewein [mailto:dominic.jennewein at gmail.com]
> *Sent:* 20 November 2009 16:47
> *To:* agagliardi at ara.co.uk; paraview at paraview.org
> *Subject:* Re: [Paraview] Apply Clip Filter using Python
>
> Thank you for your answer!
>
> I already tried both of them.
> After adding the "Extract Surface" Filter on the clip01, everything ist
> gone.
> I then have to press manually "Reset Bounds" for the Clip and the "Apply"
> Button (for the Clip) to get the same state, as if i'm adding both filters
> manually.
>
> 2009/11/20 Adriano Gagliardi <agagliardi at ara.co.uk>
>
>>  clip01=Clip()
>> clip01.InsideOut=1
>> clip01.ClipType = "Box"
>> clip01.ClipType.Scale=[0.5,0.5,0.5]
>> ##try this
>> clip01.UpdatePipeline()
>> ##or this, which I think should automatically update the pipeline for you
>> Render()
>>
>> ===================================
>>
>> Adriano Gagliardi MEng PhD
>> Project Scientist
>> Computational Aerodynamics
>> Aircraft Research Association Ltd.
>> Manton Lane
>> Bedford
>>
>> Tel: 01234 32 4644
>> E-mail: agagliardi at ara.co.uk
>> Url: www.ara.co.uk
>>
>>
>>  ------------------------------
>> *From:* paraview-bounces at paraview.org [mailto:
>> paraview-bounces at paraview.org] *On Behalf Of *Dominic Jennewein
>> *Sent:* 20 November 2009 16:14
>> *To:* paraview at paraview.org
>> *Subject:* [Paraview] Apply Clip Filter using Python
>>
>>   Hello!
>> I'm new to ParaView and Python and have the following question:
>>
>> How can I "apply" the Clip Filter using Python?
>> I'm using ParaView 3.6.1 on Windows XP with the "Python Shell" from the
>> Tools Menu.
>>
>> My Python Script:
>> ---------------------------
>> clip01=Clip()
>> clip01.InsideOut=1
>> clip01.ClipType = "Box"
>> clip01.ClipType.Scale=[0.5,0.5,0.5]
>> Show(clip01)
>>
>> surface=ExtractSurface()
>> Show(surface)
>>
>> Render()
>> ---------------------------
>>
>> I haven't found the possibilty to "apply" the Clip Filter via Python...I
>> always have to press manually the "Apply" Button in the Object Inspector.
>>
>> I've also tried:
>>
>> >>> view = servermanager.CreateRenderView()
>> >>> rep = servermanager.CreateRepresentation(shrinkFilter, view)
>> >>> view.StillRender()
>>
>> out of the "Servermanger.pdf", but this creates a new window, which I
>> don't want.
>> And also
>>
>> >>> clip01.UpdatePipeline()
>>
>> doesn't work.
>>
>> There was a nearly similar question on this mailinglist, but it doesn't
>> help me, I'm sorry:
>>
>> http://markmail.org/thread/54kjzlk4i5d6sprh
>>
>> Thank you for your work on ParaView! :-)
>>
>> Dominic Jennewein
>>
>> ---------------------------
>>
>> This email contains information that is private and confidential and is
>> intended only for the addressee. If you are not the intended recipient
>> please delete it and notify us immediately by e-mailing the sender.
>>
>> Note: All email sent to or from this address may be accessed by someone
>> other than the recipient, for system management and security reasons.
>>
>> Aircraft Research Association Ltd. Registered in England, Registration No
>> 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB
>> 196351245
>>
>>
>>
>>
>>
>
> ---------------------------
>
> This email contains information that is private and confidential and is
> intended only for the addressee. If you are not the intended recipient
> please delete it and notify us immediately by e-mailing the sender.
>
> Note: All email sent to or from this address may be accessed by someone
> other than the recipient, for system management and security reasons.
>
> Aircraft Research Association Ltd. Registered in England, Registration No
> 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB
> 196351245
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20091120/e3ef4fba/attachment.htm>


More information about the ParaView mailing list