Thank you Mathieu, It works perfectly. Best Regards, Andrea
From: Mathieu Westphal [mailto:[email protected]] Sent: Wednesday, April 25, 2018 16:50 To: Caffagni, Andrea Cc: [email protected] Subject: Re: [Paraview] Clip a domain using a close surface Hi Andrea, Here is an updated script to clip instead of cutting. You will recover the volume of your main dataset which is inside the provided surface. (if your are interested by what is outside, just change the InsideOut value) import vtk.vtkPVVTKExtensionsDefault as ext inpMain = self.GetInputDataObject( 0, 0 ) inpClip = self.GetInputDataObject( 0, 1 ) out = self.GetOutput() clipper = ext.vtkPVMetaClipDataSet() clipper.SetInputDataObject(inpMain) clipper.SetInsideOut(True) clipFunction = vtk.vtkImplicitPolyDataDistance() clipFunction.SetInput(inpClip) clipper.SetClipFunction(clipFunction) clipper.Update() outData = clipper.GetOutputDataObject(0) out.DeepCopy(outData) I've included the state file and a dataset to test with. make sure to set the path to the dataset when loading the state file. You may also want to take a look into the resample with dataset solution. Best regards, Mathieu Westphal On Wed, Apr 25, 2018 at 11:14 AM, Caffagni, Andrea <[email protected]<mailto:[email protected]>> wrote: Thank you Mathieu for your answer, When I tries your filter I obtain ‘an intersection’ between the sphere and my domain. While the result that I would get is a clipped domain, I have included a Statefile for demonstration on what I would get. Maybe I'm using your filter in a wrong way? Best Regards, Andrea From: Mathieu Westphal [mailto:[email protected]<mailto:[email protected]>] Sent: Wednesday, April 25, 2018 10:13 To: Caffagni, Andrea Cc: [email protected]<mailto:[email protected]> Subject: Re: [Paraview] Clip a domain using a close surface 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 <[email protected]<mailto:[email protected]>> 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:[email protected]<mailto:[email protected]>] On Behalf Of Caffagni, Andrea Sent: Sunday, April 22, 2018 12:32 To: [email protected]<mailto:[email protected]> 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<http://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 _________________________________________________________________________________________________________________ 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
