VTK pipeline, Broken warp filter

About the development of the FEM module/workbench.

Moderator: bernd

nquantum
Posts: 22
Joined: Fri Aug 03, 2018 1:29 am

Re: VTK pipeline, Broken warp filter

Post by nquantum »

Me value clamped at 99 also for Freecad 0.17 windows 64bit.
For 0.18 pre, the value not clamped but I've to set max value too much like 5000, 10000 so that displacement show like 20-time from FEM result.
Attachments
2.jpg
2.jpg (233.11 KiB) Viewed 1275 times
1.jpg
1.jpg (262.84 KiB) Viewed 1275 times
0.jpg
0.jpg (214.26 KiB) Viewed 1275 times
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: VTK pipeline, Broken warp filter

Post by UR_ »

nquantum wrote: Sun Sep 16, 2018 2:36 pm I've to set max value too much like 5000, 10000 so that displacement show like 20-time from FEM result.
I think this is a bug :o

The factor between vtk's warp filter and FreeCAD native displacement visualisation is 1000.

Please see 3D Cantilever example from FreeCAD start page.

Here max deflection in z direction is -86.9271 mm.

Therefore a displacement factor of approx 11 shows a deflection similar to beam's height.
With vtk's warps filter you will need a factor of approx 11000.

If you export results to a vtk file for displaying in Paraview same factor has to be applied.

Paraview will show this spread sheet view sorted by displacement

ParaView 5.6.0-RC1 64-bit-000063.png
ParaView 5.6.0-RC1 64-bit-000063.png (13.56 KiB) Viewed 1265 times

And that is obliviously wrong :(

If the frd file is translated by "mmh_ccx2vtk.exe", Paraview show this spread sheet view

ParaView 5.6.0-RC1 64-bit-000064.png
ParaView 5.6.0-RC1 64-bit-000064.png (10.12 KiB) Viewed 1265 times

Which looks much better. And warp factor needs to be applied is approx 11 now :)
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: VTK pipeline, Broken warp filter

Post by bernd »

nquantum
Posts: 22
Joined: Fri Aug 03, 2018 1:29 am

Re: VTK pipeline, Broken warp filter

Post by nquantum »

Hope get fix soon. :P I've no great in coding much maybe someday I can help some. Today I only can spot some strange then encourage. ;)
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: VTK pipeline, Broken warp filter

Post by bernd »

this line is the culprit: https://github.com/FreeCAD/FreeCAD/blob ... s.cpp#L868

if this is used it works:

Code: Select all

                    double tuple[] = {it->x, it->y, it->z};
but the scale factor has some reasons, means I do not just want to change this line. I will have a closer look.
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: VTK pipeline, Broken warp filter

Post by UR_ »

scaling only displacements to SI and leaving all the rest as they are, makes no sense to me :roll:

https://github.com/FreeCAD/FreeCAD/blob ... s.cpp#L844
:?: :?: :?:
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: VTK pipeline, Broken warp filter

Post by bernd »

I have been searching the net. The only resource I found was http://vtk.1045678.n5.nabble.com/units- ... 29229.html From there it seams vtk is like CalculiX, the user has to take care about the unit system. He can take any unit is likes, he just needs to take care all other units fit.

IMHO we could delete all this scale in vtktools.cpp If something should be scaled all needs to be scaled and not with an fictive unit scale. If we scale we should take FreeCAD unit system.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: VTK pipeline, Broken warp filter

Post by bernd »

@_UR: What's your opinion about this: https://github.com/berndhahnebach/FreeC ... it/b2325ef
Since I'm not in the mud to implement all unit stuff in vtk ATM ... IMHO we should have better no implementation than a totally messed up one ...

bernd
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: VTK pipeline, Broken warp filter

Post by bernd »

I left the scale factor in vtk mesh reader and writer but deleted it in all result creation methods ... git commit 5fc337b
Post Reply