[Paraview] Clip a domain using a close surface

Mathieu Westphal mathieu.westphal at kitware.com
Wed Apr 25 04:13:22 EDT 2018


Hi Andrea,

This is achievable using a Programmable Filter, with the following script :

inpMain = self.GetInputDataObject( 0, 0 )

inpCut = self.GetInputDataObject( 0, 1 )

out = self.GetOutput()


cutter = vtk.vtkCutter()

cutter.SetInputDataObject( inpMain )

cutFunction = vtk.vtkImplicitPolyDataDistance()

cutFunction.SetInput( inpCut )

cutter.SetCutFunction( cutFunction )

cutter.Update()


outData = cutter.GetOutputDataObject( 0 )

out.DeepCopy(outData)

(thanks @Yves Roger for providing it here :
https://public.kitware.com/pipermail/paraview/2015-April/033903.html)

In case you do not know how to use the programmable filter in this
case, I have included a StateFile that demonstrate it.
Notice that we are using an "output data type : vtkPolyData".

Best regards,



Mathieu Westphal

On Wed, Apr 25, 2018 at 7:49 AM, Caffagni, Andrea <
Andrea.Caffagni at ferrari.com> wrote:

> Nobody has had to face this problem in the past? Is it an impassable
> obstacle to paraview at the moment?
>
>
>
> Best Regards,
>
> Andrea
>
>
>
> *From:* ParaView [mailto:paraview-bounces at public.kitware.com] *On Behalf
> Of *Caffagni, Andrea
> *Sent:* Sunday, April 22, 2018 12:32
> *To:* paraview at public.kitware.com
> *Subject:* [Paraview] Clip a domain using a close surface
>
>
>
> Dear users,
>
> I need to clip a domain with a close surface.
>
> More in details I have a cfd domain with pressure and velocity field, I
> import a table of point and I create a closed surface using delunay3d
> filters.
>
> At this stage, I would clip the computational domain using the close
> surface dividing the cfd domain or in the internal part of the close
> surface or in the external part.
>
>
>
> I have tried using clip with scalars, but I am not able to understand how
> use it properly.
>
>
>
> Thanks for the suggestions,
>
> Andrea
>
> ____________________________________________________________
> _____________________________________________________
>
>
>
> Questo messaggio è da intendersi esclusivamente ad uso del destinatario e
> può contenere informazioni che sono di natura privilegiata, confidenziale o
> non divulgabile secondo le leggi vigenti. Se il lettore del presente
> messaggio non è il destinatario designato, o il dipendente/agente
> responsabile per la consegna del messaggio al destinatario designato, si
> informa che ogni disseminazione, distribuzione o copiatura di questa
> comunicazione è vietata anche ai sensi della normativa vigente in materia
> di protezione dei dati personali. Se avete ricevuto questo messaggio per
> errore, vi preghiamo di notificarcelo immediatamente a mezzo e-mail di
> risposta e successivamente di procedere alla cancellazione di questa e-mail
> e relativi allegati dal vostro sistema.
>
> ____________________________________________________________
> _____________________________________________________
>
>
>
> This message is intended only for the use of the addressee and may contain
> information that is privileged, confidential and exempt from disclosure
> under applicable law. If the reader of this message is not the intended
> recipient, or the employee or agent responsible for delivering the message
> to the intended recipient, you are hereby notified that any dissemination,
> distribution or copying of this communication is prohibited under the
> applicable data protection law. If you have received this e-mail by
> mistake, please notify us immediately by return e-mail and delete this
> e-mail and all attachments from your system.
>
>
>
> ____________________________________________________________
> _____________________________________________________
>
> ____________________________________________________________
> _____________________________________________________
>
>
>
> Questo messaggio è da intendersi esclusivamente ad uso del destinatario e
> può contenere informazioni che sono di natura privilegiata, confidenziale o
> non divulgabile secondo le leggi vigenti. Se il lettore del presente
> messaggio non è il destinatario designato, o il dipendente/agente
> responsabile per la consegna del messaggio al destinatario designato, si
> informa che ogni disseminazione, distribuzione o copiatura di questa
> comunicazione è vietata anche ai sensi della normativa vigente in materia
> di protezione dei dati personali. Se avete ricevuto questo messaggio per
> errore, vi preghiamo di notificarcelo immediatamente a mezzo e-mail di
> risposta e successivamente di procedere alla cancellazione di questa e-mail
> e relativi allegati dal vostro sistema.
>
> ____________________________________________________________
> _____________________________________________________
>
>
>
> This message is intended only for the use of the addressee and may contain
> information that is privileged, confidential and exempt from disclosure
> under applicable law. If the reader of this message is not the intended
> recipient, or the employee or agent responsible for delivering the message
> to the intended recipient, you are hereby notified that any dissemination,
> distribution or copying of this communication is prohibited under the
> applicable data protection law. If you have received this e-mail by
> mistake, please notify us immediately by return e-mail and delete this
> e-mail and all attachments from your system.
>
>
>
> ____________________________________________________________
> _____________________________________________________
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview/attachments/20180425/fe7fa3d0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: surfaceClip.pvsm
Type: application/octet-stream
Size: 343554 bytes
Desc: not available
URL: <https://public.kitware.com/pipermail/paraview/attachments/20180425/fe7fa3d0/attachment-0001.obj>


More information about the ParaView mailing list