CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[General] Python Shell Clipping

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 30, 2017, 12:57
Default Python Shell Clipping
  #1
Member
 
Sebastian Trunk
Join Date: Mar 2015
Location: Erlangen, Germany
Posts: 60
Rep Power: 11
sisetrun is on a distinguished road
Hello everybody,

I am working with Paraview 5.1.2 at the moment.

I traced a script to perform some clips.
1. Divide a tubular lattice in a disk (disk.png)
2. Cut out a box from this disk (pic2.png)

The problem is: I do not see pic2, I see pic1.
When i move the cursor over the GUI or when I klick on clip3 (see code; this is the Box clip), the animation changes to pic2.


Code:
from paraview.simple import *

#read file
fixstl = STLReader(FileNames=['/home/fix.stl'])

#1st clip tube 
clip1 = Clip(Input=fixstl)
clip1.ClipType = 'Plane'
clip1.ClipType.Origin = [0.0, 0.0, 0.0]
clip1.ClipType.Normal = [0.0, 0.0, 1.0]

#2nd clip tube
clip2 = Clip(Input=clip1)
clip2.ClipType = 'Plane'
clip2.ClipType.Normal = [0.0, 0.0, -1.0]
clip2.ClipType.Origin = [0.0, 0.0, 0.005]

#clip out a element 
clip3 = Clip(Input=clip2)
clip3.ClipType = 'Box'
clip3.ClipType.Scale = [0.25, 0.25, 1.0]

clip3.InsideOut = 1
clip3.ClipType.Position = [0,0,0]

#extract the surface
extractSurface1 = ExtractSurface(Input=clip3)

#triangulate
triangulate1 = Triangulate(Input=extractSurface1)

Show()
Could anybody give me a hint what I am doing wrong so far?

I would like to run the script within a for loop to go through many Box-positions.

Thank you so much

Best regards
Attached Images
File Type: jpg disk.jpg (41.0 KB, 10 views)
File Type: jpg pic1.jpg (17.6 KB, 10 views)
File Type: jpg pic2.jpg (17.3 KB, 9 views)
sisetrun is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM] Paraview from python shell : Glew initialization and VTKcommoncorepython error pradyumnsingh ParaView 0 September 18, 2018 13:40
[OpenFOAM] Integrate Variables using ParaView Python Shell cfdsolver1 ParaView 0 October 12, 2016 03:08
[General] Python Shell button is diabled JPW ParaView 4 November 8, 2015 14:51
[OpenFOAM] using the python shell in paraFoam colinB ParaView 14 September 14, 2015 09:04
How to get Python Shell into ParaView 3.8.1? blaise OpenFOAM Installation 3 July 24, 2012 04:58


All times are GMT -4. The time now is 11:30.