vtk pipeline change source

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

vtk pipeline change source

Post by HoWil »

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
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: vtk pipeline change source

Post by bernd »

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
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: vtk pipeline change source

Post by bernd »

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
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: vtk pipeline change source

Post by HoWil »

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

Re: vtk pipeline change source

Post by HoWil »

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: 440
Joined: Thu Jul 24, 2014 8:29 am

Re: vtk pipeline change source

Post by fandaL »

FC do not crash. I get only a message
pipeline_error.png
pipeline_error.png (12.7 KiB) Viewed 2278 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: 227
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford UK/Shenzhen China
Contact:

Re: vtk pipeline change source

Post by qingfeng.xia »

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 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
qingfeng.xia
Posts: 227
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford UK/Shenzhen China
Contact:

Re: vtk pipeline change source

Post by qingfeng.xia »

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 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: vtk pipeline change source

Post by bernd »

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
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: vtk pipeline change source

Post by bernd »

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
Post Reply