<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Calibri">Hi folks,<br>
<br>
I'm developing a pre-processor for a Finite Differences based
geomechanics solver and I need to clip though my original mesh,
but for mathematical reasons is desirable that all Hexas that
weren't touched by the cutting surface remains untouched (not
triangulated). That's why I'm using </font>
vtkPolyData pd = vtkPolyData.New();<br>
<font face="Calibri"><a class="el"
href="http://www.vtk.org/doc/nightly/html/classvtkTableBasedClipDataSet.html"
title="Clip any dataset with a user-specified implicit function
or an input scalar point data array...">vtkTableBasedClipDataSet</a>.
In my initial tests where I cut the mesh with a plane everything
works fine.<br>
<br>
Now I have a cloud of points, which I can triangulate with a
delaunay2d to form the surface, and I wanted to use that surface
as the Clipping Function, passing it via SetClipFunction(..). <br>
<br>
My first option was to feed a vtkImplicitDataSet with the data
from my delaunay2d but I keep receiving the error:<br>
"In
..\..\..\..\vtksource-prefix\src\vtksource\Filtering\vtkImplicitDataSet.cxx,
line 76 vtkImplicitDataSet (0A17E848): Can't evaluate dataset!"<br>
in vtkOututWindow.<br>
<br>
I'm using C# and this is my code:<br>
PS: points contains the cloud of points I'm reading from a DXF
file and I've checked, points are ok, the surface is shown perfectly
in the render window.<br>
</font><font face="Calibri">
<blockquote type="cite"> vtkPolyData pd =
vtkPolyData.New();<br>
pd.SetPoints(points.GetPoints());<br>
pd.Update();<br>
<br>
vtkDelaunay2D d2d = vtkDelaunay2D.New();<br>
d2d.SetInput(pd);<br>
<br>
vtkDataSetMapper ds = vtkDataSetMapper.New();<br>
ds.SetInput(d2d.GetOutput());<br>
<br>
<br>
vtkTableBasedClipDataSet clippeme =
vtkTableBasedClipDataSet.New();<br>
vtkDataSet mygrd =
m_Mesh.GetMapper().GetInput();<br>
clippeme.SetInput(mygrd);// pdf.GetOutput());<br>
<br>
vtkImplicitDataSet func =
vtkImplicitDataSet.New();<br>
func.SetDataSet(d2d.GetOutput());<br>
<br>
<br>
clippeme.SetClipFunction(func);<br>
clippeme.Update();<br>
clippeme.GenerateClippedOutputOn();<br>
<br>
vtkUnstructuredGrid pdcut =
clippeme.GetOutput();// vtkUnstructuredGrid.New();<br>
vtkDataSetMapper dscut = vtkDataSetMapper.New();<br>
dscut.SetInput(pdcut);<br>
vtkActor cuttedAc = vtkActor.New();<br>
cuttedAc.SetMapper(dscut);<br>
<br>
ds = null;<br>
<br>
vtkRenderer renderer =
m_VTK.RenderWindow.GetRenderers().GetFirstRenderer();<br>
<br>
renderer.AddViewProp(cuttedAc);<br>
renderer.ResetCamera();<br>
</blockquote>
<br>
Thanks in advance.<br>
Gustavo.<br>
</font>
<pre class="moz-signature" cols="72">--
Gustavo Longhin
+55(19) 99757 4509
+55(19) 3289 1800 ext 26
The First Offices
Rua Paulo Cezar Fidelis 39, Sala 306.
CEP: 13087-727 – Campinas – SP – Brasil</pre>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br />
<table style="border-top: 1px solid #D3D4DE;">
<tr>
<td style="width: 55px; padding-top: 13px;"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" width="46" height="29" style="width: 46px; height: 29px;" /></a></td>
<td style="width: 470px; padding-top: 12px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">www.avast.com</a>
</td>
</tr>
</table><a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>