Hello,
I have created a vtk viewer to view FEA results . But some plots are not showing as they should be. If I load the vtk file in paraview it plots correctly but not in my viewer.
The equivalent stress plot is correctly plotted but some plots are not matching.
I have set up my code as below
ArrName = self.pvtkPDataArray.GetPointData().GetArrayName(ArrId)
dataRange = self.pvtkPDataArray.GetPointData().GetScalars(ArrName).GetRange(CompId)
pvtkDataSetMapper = vtk.vtkDataSetMapper()
pvtkDataSetMapper.SetInputData(self.pvtkPDataArray)
pvtkDataSetMapper.SetScalarModeToUsePointFieldData()
pvtkDataSetMapper.SetInterpolateScalarsBeforeMapping(1)
pvtkDataSetMapper.SetArrayId(ArrId)
pvtkDataSetMapper.SetArrayComponent(CompId)
pvtkDataSetMapper.SetScalarRange(dataRange)
self.SetLookUpTable(dataRange)
pvtkDataSetMapper.SetLookupTable(self.pLookUpTable)
pvtkDataSetMapper.Update()
pvtkActor3D = vtk.vtkActor()
pvtkActor3D.SetMapper(pvtkDataSetMapper)
Please can someone review this and point out where is the mistake. It would be very helpfull
Thankyou and Best Regards
Sam