I found this post and I am trying to repeat the process;
First, I ran Model To Model Distance and created D_rev2orig
as the “displacement model”
Additionally, I have a “target” model D_ST
which I would like to warp/deform.
Here is what I am doing to warp the “target” model;
dispModel = getNode("D_rev2orig")
targetModel = getNode("D_ST")
dispMesh = dispModel.GetMesh()
dispMesh.GetPointData().SetActiveVectors("PointToPointVector")
warp = vtk.vtkWarpVector()
warp.SetInputData(dispMesh)
warp.SetScaleFactor(1.0)
warp.Update()
targetModel.SetPolyDataConnection(warp.GetOutputPort())
This overrides the D_ST
“target” model and generates a weird hybrid model;
This model has the PointToPointVector
attribute from the displacement model D_rev2orig
, but does not have the geometry of the “target” model. The geometry is not the same as the “displacement model” however, so maybe I am just missing something in the script above?