vtk pipeline change source

About the development of the FEM module/workbench.
HoWil
Posts: 446
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

vtk pipeline change source

Postby HoWil » Sat Mar 04, 2017 9:06 am

Hi,

I miss the feature to change the source of a vtk pipeline. Once created you do not know which result element it belongs to and changing the source would help to reuse it easier.

Is there already some possibility and I missed it?

Thx,
HoWil
User avatar
bernd
Posts: 3924
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: vtk pipeline change source

Postby bernd » Mon Mar 06, 2017 7:28 pm

HoWil wrote:I miss the feature to change the source of a vtk pipeline. Once created you do not know which result element it belongs to and changing the source would help to reuse it easier.
Very good point. If you have made a few clip filter and stuff like that, change some load or mesh density you need to redo all the filters ... This is a needed feature, but as far as I know it goes only one direction at the moment.
User avatar
bernd
Posts: 3924
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: vtk pipeline change source

Postby bernd » Mon Mar 06, 2017 7:35 pm

Just played a bit ... FreeCAD crashes :shock: could some other confirm?

- start FreeCAD
- load FEM 3D example
- activate analysis
- select result object
- click on icon create post processing pipeline --> new object Pipeline
- run the following code:

Code: Select all

App.ActiveDocument.Pipeline.Data


optional test the Pipeline before the crash:
- change visibility of FEM mesh to off
- couble click on the pipline
- change Mode to Surface with edges
- change Field to Displacement
- see colored post processing on screen

OS: Debian GNU/Linux 8.7 (jessie)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10427 (Git)
Build type: Unknown
Branch: master
Hash: b1347ec12b99a7f90e336ede50d935393c14bf9d
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.0.0
HoWil
Posts: 446
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: vtk pipeline change source

Postby HoWil » Mon Mar 06, 2017 8:39 pm

Can confirm the crashes in both cases. :D :(
BR Howil
HoWil
Posts: 446
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: vtk pipeline change source

Postby HoWil » Mon Mar 06, 2017 8:42 pm

Even if I completely rebuild the analysis.

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10423 (Git)
Build type: None
Branch: master
Hash: 45bf8ed91ed1bd65d7c5750685f8c435c9b092cf
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
fandaL
Posts: 226
Joined: Thu Jul 24, 2014 8:29 am

Re: vtk pipeline change source

Postby fandaL » Mon Mar 06, 2017 10:57 pm

FC do not crash. I get only a message
pipeline_error.png
pipeline_error.png (12.7 KiB) Viewed 254 times

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9927 (Git)
Build type: Release
Branch: master
Hash: 2780edd903e9819eb0d0940ca0e754f1124ac188
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
qingfeng.xia
Posts: 107
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford Uk
Contact:

Re: vtk pipeline change source

Postby qingfeng.xia » Fri Mar 10, 2017 9:39 am

I will have a look next week, after an academic report event. I have no experience on how vtk pipeline works

We should recommend user to use paraview directly, how about a command/push button in solver control panel to load result to paraview (I did it in CFD), in addition to basic view in FreeCAD. stress and displacement view in task panel is actually quick handy.

bernd wrote:Just played a bit ... FreeCAD crashes :shock: could some other confirm?

- start FreeCAD
- load FEM 3D example
- activate analysis
- select result object
- click on icon create post processing pipeline --> new object Pipeline
- run the following code:

Code: Select all

App.ActiveDocument.Pipeline.Data


optional test the Pipeline before the crash:
- change visibility of FEM mesh to off
- couble click on the pipline
- change Mode to Surface with edges
- change Field to Displacement
- see colored post processing on screen

OS: Debian GNU/Linux 8.7 (jessie)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10427 (Git)
Build type: Unknown
Branch: master
Hash: b1347ec12b99a7f90e336ede50d935393c14bf9d
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.0.0
Ubuntu 0.17-dev OpenFOAM + FreeCAD
qingfeng.xia
Posts: 107
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford Uk
Contact:

Re: vtk pipeline change source

Postby qingfeng.xia » Fri Mar 10, 2017 9:41 am

I see there is one line in importFemREsultVTK.

"DisplacementLength should be calcuated in cpp"

yes, but I did not understand what is "DisplacementLength", is that magnitude of displacement.
Please show me the equation, I can quickly fix it.
Ubuntu 0.17-dev OpenFOAM + FreeCAD
User avatar
bernd
Posts: 3924
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: vtk pipeline change source

Postby bernd » Sat Mar 11, 2017 4:29 pm

qingfeng.xia wrote:I see there is one line in importFemREsultVTK.

"DisplacementLength should be calcuated in cpp"

yes, but I did not understand what is "DisplacementLength", is that magnitude of displacement.
Please show me the equation, I can quickly fix it.


in importToolsFem.py see lines https://github.com/FreeCAD/FreeCAD/blob ... #L153-L154

it is implemented in importVTKResults.py too, but this could be move to importToolsFem.py too
see lines https://github.com/FreeCAD/FreeCAD/blob ... lts.py#L95 and https://github.com/FreeCAD/FreeCAD/blob ... ts.py#L116
User avatar
bernd
Posts: 3924
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: vtk pipeline change source

Postby bernd » Sun Mar 19, 2017 10:19 pm

bernd wrote:
qingfeng.xia wrote:I see there is one line in importFemREsultVTK.

"DisplacementLength should be calcuated in cpp"

yes, but I did not understand what is "DisplacementLength", is that magnitude of displacement.
Please show me the equation, I can quickly fix it.


in importToolsFem.py see lines https://github.com/FreeCAD/FreeCAD/blob ... #L153-L154

it is implemented in importVTKResults.py too, but this could be move to importToolsFem.py too
see lines https://github.com/FreeCAD/FreeCAD/blob ... lts.py#L95 and https://github.com/FreeCAD/FreeCAD/blob ... ts.py#L116
git commit 9568fa4 it is in importToolsFem.py only now