Compare Geometries

Hi there,
I have vtk files representing the interface of two-phase simulations (openFoam) and want to compare their geometric parameters. What I hope to see is a reprensentation of their difference over time (video).

So far everything I found was only useable on two datasets with the same underlying geometrie.
Kind regards,
Terry

You could try to use Resample with Dataset to resample the data arrays from one dataset to the other to get them onto a common underlying geometry.

Thanks, I will try that.

1 Like

I tried Resample with Dataset and it doesn’t seem to be what I need.
I do not need the difference of the field of my dataset but the difference between the geometrie (surface, mesh…).

Or maybe I just do it all wrong…
Maybe I should first create a field out of the geometry, for example with the Elevation Filter, use Resample with Dataset after and compare the Elevation? I will try that.

–edit1-- No, that did not work either.

–edit2-- Seems like vtkDistancePolyDataFilter might be what I need!

-edit–
Thie code i tried for vtkDistancePolyDataFilter:
import vtk
model1=inputs[0].VTKObject
model2=inputs[1].VTKObject
df=vtk.vtkDistancePolyDataFilter()
df.SetInputData(0,model2)
df.SetInputData(1,model1)
df.Update()
self.GetOutput().ShallowCopy(df.GetOutput())

I think I am close enough now. I can now compare two interfaces written out by openFoam as vtk. If anyone knows a better way please share.

Kind regards,
Terry