Hi Cory,
and thank you very much, your proposition works fine for illustration
purposes. I need better accuracy, so I will do the computation
completely differently. In fact I can achieve what I want with a simple
contour applied on my surface wether using the volumic data.
Anyways, below the programmable filter script (input 0 is the tetrahedra
volume, input 1 is the cutting polydata surface):
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 )
That helped, making me think about another way ;-)
Yves
Le 14/04/2015 16:37, Cory Quammen a écrit :
Hi Yves,
Do you want to actually cut the tetrahedra that the polydata geometry
intersects? I don't know of anything that will do that exactly in VTK,
but you could approximate it by using the vtkImplicitPolyDataDistance
class with the vtkCutter to approximately cut the tetrahedra by the
polydata.
If you DON'T want to cut the tetrahedra, you could write a plugin that
computes the distance field from each point in the tetrahedral mesh
using vtkImplicitPolyDataDistance, then thresholds the mesh to keep
only tetrahedra where at least some of the points have a negative
signed distance from the polydata.
I hope that helps,
Cory
On Tue, Apr 14, 2015 at 4:18 AM, Yves Rogez
<[email protected]
<mailto:[email protected]>> wrote:
Hello,
I would like to know if there is a mean with paraview (or VTK, I
could write a plugin) to easily clip a tetrahedron based geometry
and data (built with a delaunay3D filter) with a polydata geometry
(typically a triangle mesh) ?
The implicit sphere-based clipping could be an approximation but
an explicit 3D function would be better for my application...
Thanks,
Yves
_______________________________________________
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:
http://public.kitware.com/mailman/listinfo/paraview
--
Cory Quammen
R&D Engineer
Kitware, Inc.
--
Yves Rogez
/CONSERT Operations Engineer/
*IPAG*
/Institut de Planétologie et d'Astrophysique de Grenoble /
Bat D de Physique - BP. 53 - 38041 Grenoble - FRANCE
tel : +33 (0)4 76 63 52 80
lab : +33 (0)4 76 63 57 60
_______________________________________________
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