<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Consolas","serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thank you Mathieu for your answer,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">When I tries your filter I obtain ‘an intersection’ between the sphere and my domain.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">While the result that I would get is a clipped domain, I have included a Statefile for demonstration on what I would get.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Maybe I'm using your filter in a wrong way?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Best Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Andrea<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Mathieu Westphal [mailto:mathieu.westphal@kitware.com]
<br>
<b>Sent:</b> Wednesday, April 25, 2018 10:13<br>
<b>To:</b> Caffagni, Andrea<br>
<b>Cc:</b> paraview@public.kitware.com<br>
<b>Subject:</b> Re: [Paraview] Clip a domain using a close surface<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi Andrea,<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">This is achievable using a Programmable Filter, with the following script :
<o:p></o:p></p>
<pre style="margin-top:9.0pt">inpMain <span style="color:#666666">=</span> <span style="color:green">self</span><span style="color:#666666">.</span>GetInputDataObject( <span style="color:#666666">0</span>, <span style="color:#666666">0</span> )<o:p></o:p></pre>
<pre>inpCut <span style="color:#666666">=</span> <span style="color:green">self</span><span style="color:#666666">.</span>GetInputDataObject( <span style="color:#666666">0</span>, <span style="color:#666666">1</span> )<o:p></o:p></pre>
<pre>out <span style="color:#666666">=</span> <span style="color:green">self</span><span style="color:#666666">.</span>GetOutput()<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>cutter <span style="color:#666666">=</span> vtk<span style="color:#666666">.</span>vtkCutter()<o:p></o:p></pre>
<pre>cutter<span style="color:#666666">.</span>SetInputDataObject( inpMain )<o:p></o:p></pre>
<pre>cutFunction <span style="color:#666666">=</span> vtk<span style="color:#666666">.</span>vtkImplicitPolyDataDistance()<o:p></o:p></pre>
<pre>cutFunction<span style="color:#666666">.</span>SetInput( inpCut )<o:p></o:p></pre>
<pre>cutter<span style="color:#666666">.</span>SetCutFunction( cutFunction )<o:p></o:p></pre>
<pre>cutter<span style="color:#666666">.</span>Update()<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>outData <span style="color:#666666">=</span> cutter<span style="color:#666666">.</span>GetOutputDataObject( <span style="color:#666666">0</span> )<o:p></o:p></pre>
<pre style="margin-bottom:12.0pt">out<span style="color:#666666">.</span>DeepCopy(outData)<o:p></o:p></pre>
<pre style="margin-bottom:12.0pt"><span style="font-family:"Arial","sans-serif"">(thanks @Yves Roger for providing it here :  <a href="https://public.kitware.com/pipermail/paraview/2015-April/033903.html">https://public.kitware.com/pipermail/paraview/2015-April/033903.html</a>)</span><o:p></o:p></pre>
<pre style="margin-bottom:12.0pt"><span style="font-family:"Arial","sans-serif"">In case you do not know how to use the programmable filter in this case, I have included a StateFile that demonstrate it.<br>Notice that we are using an "output data type : vtkPolyData".</span><o:p></o:p></pre>
<pre style="margin-bottom:9.0pt"><span style="font-family:"Arial","sans-serif"">Best regards,</span><o:p></o:p></pre>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal">Mathieu Westphal<o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Wed, Apr 25, 2018 at 7:49 AM, Caffagni, Andrea <<a href="mailto:Andrea.Caffagni@ferrari.com" target="_blank">Andrea.Caffagni@ferrari.com</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D">Nobody has had to face this problem in the past? Is it an impassable obstacle to paraview at the moment?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D">Best Regards,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D">Andrea</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> ParaView [mailto:<a href="mailto:paraview-bounces@public.kitware.com" target="_blank">paraview-bounces@public.kitware.com</a>]
<b>On Behalf Of </b>Caffagni, Andrea<br>
<b>Sent:</b> Sunday, April 22, 2018 12:32<br>
<b>To:</b> <a href="mailto:paraview@public.kitware.com" target="_blank">paraview@public.kitware.com</a><br>
<b>Subject:</b> [Paraview] Clip a domain using a close surface</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Dear users,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I need to clip a domain with a close surface.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I have tried using clip with scalars, but I am not able to understand how use it properly.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks for the suggestions,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Andrea<o:p></o:p></p>
<p>_________________________________________________________________________________________________________________<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>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.<o:p></o:p></p>
<p>_________________________________________________________________________________________________________________<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>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.<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>_________________________________________________________________________________________________________________ <o:p></o:p></p>
</div>
<p>_________________________________________________________________________________________________________________<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>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.<o:p></o:p></p>
<p>_________________________________________________________________________________________________________________<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>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.<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>_________________________________________________________________________________________________________________ <o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">
http://paraview.org/Wiki/ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" target="_blank">
http://markmail.org/search/?q=ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/paraview" target="_blank">https://public.kitware.com/mailman/listinfo/paraview</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p>_________________________________________________________________________________________________________________</p>
<p> </p>
<p>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.</p>
<p>_________________________________________________________________________________________________________________</p>
<p> </p>
<p>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.</p>
<p> </p>
<p>_________________________________________________________________________________________________________________ </p>
</body>
</html>