|
[Sponsors] |
[General] Slice origin as annotation in animation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 20, 2013, 05:47 |
Slice origin as annotation in animation
|
#1 |
New Member
Pia Jensen
Join Date: Jul 2013
Location: Denmark
Posts: 3
Rep Power: 13 |
I am making an animation where I vary the origin of a slice through my gaussian cube data, and would like to have an annotation of what value the X-coordinate of the slice origin is, for each frame.
I have tried using the Python Annotation Filter, but I simply cannot figure out how to get to the slice origin value. My first guess was something like Code:
"Slice origin in X = %f" % (XSlicesOrigin[0]) |
|
July 21, 2013, 13:07 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Pia and welcome to the forum!
How exactly are you varying the slice? Because it might be possible to generate the annotation directly in the code where you're doing the slice movement. Best regards, Bruno
__________________
|
|
July 21, 2013, 18:38 |
|
#3 |
New Member
Pia Jensen
Join Date: Jul 2013
Location: Denmark
Posts: 3
Rep Power: 13 |
I'm working in the ParaView GUI (I didn't know that you could get to the code behind that?). I use the animation view and simply choose the slice in the dropdown menu, and afterwards the origin value, and interpolate its value along with the time in the animation.
|
|
August 12, 2013, 06:44 |
bump
|
#4 |
New Member
Pia Jensen
Join Date: Jul 2013
Location: Denmark
Posts: 3
Rep Power: 13 |
I'm just bumping this thread again, in the hope that someone can help me?
|
|
August 16, 2013, 19:10 |
|
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Pia,
Sorry, but I've been busy for the past few weeks and didn't manage to look into this until now. And I've been playing around with ParaView 3.98.0 for the past 2 hours or so and the only solution I could manage to figure out was as follows:
Best regards, Bruno
__________________
Last edited by wyldckat; August 16, 2013 at 19:24. Reason: added attempt #4 and #5 |
|
January 10, 2017, 11:29 |
|
#6 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
If you want to modify the origin instead of the offset the code is:
Code:
try: paraview.simple except: from paraview.simple import * paraview.simple._DisableFirstRenderCameraReset() Slice1 = FindSource("Slice1") PythonAnnotation1 = FindSource("PythonAnnotation1") PythonAnnotation1.Expression = "'Slice origin in X = %f' % " + str(Slice1.SliceType.Origin[0]) Render()
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
July 27, 2018, 05:37 |
|
#7 |
New Member
Christian Jähnel
Join Date: Nov 2016
Posts: 11
Rep Power: 10 |
I know this thread is quit old, but maybe one of you could help me. I initialised this macro, it all worked fine.
But is there a possibility to syncronise the macro while exporting an animation? Yet I would need to click on the macro for every new timestep, which should go automaticly by skipping the timestep. Thank you for your help! |
|
Tags |
annotate, paraview |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 07:09 |
Animation Sweep Plane not displaying correctly | u2berggeist | FLUENT | 1 | August 26, 2018 21:51 |
[General] Rotation of a slice | beral | ParaView | 3 | January 16, 2018 07:01 |
Equation for a rotating circle outside the origin | mali28 | Main CFD Forum | 0 | November 14, 2014 07:38 |
[OpenFOAM] ParaFoam: Slice Animation | Nucleophobe | ParaView | 2 | August 5, 2012 17:51 |