# state file generated using paraview version 5.7.0-RC1 # ---------------------------------------------------------------- # setup views used in the visualization # ---------------------------------------------------------------- # trace generated using paraview version 5.7.0-RC1 # # To ensure correct image size when batch processing, please search # for and uncomment the line `# renderView*.ViewSize = [*,*]` #### import the simple module from the paraview from paraview.simple import * #### disable automatic camera reset on 'Show' paraview.simple._DisableFirstRenderCameraReset() # Create a new 'Render View' renderView1 = CreateView('RenderView') renderView1.ViewSize = [1080, 914] renderView1.AxesGrid = 'GridAxes3DActor' renderView1.OrientationAxesVisibility = 0 renderView1.CenterOfRotation = [0.0, 0.0, -1e-20] renderView1.StereoType = 'Crystal Eyes' renderView1.CameraPosition = [0.0, 0.0, 546.4101615137755] renderView1.CameraFocalPoint = [0.0, 0.0, -1e-20] renderView1.CameraParallelScale = 141.4213562373095 renderView1.Background = [0.32, 0.34, 0.43] SetActiveView(None) # ---------------------------------------------------------------- # setup view layouts # ---------------------------------------------------------------- # create new layout object 'Layout #1' layout1 = CreateLayout(name='Layout #1') layout1.AssignView(0, renderView1) # ---------------------------------------------------------------- # restore active view SetActiveView(renderView1) # ---------------------------------------------------------------- # create a new 'Fast Uniform Grid' fastUniformGrid1 = FastUniformGrid() fastUniformGrid1.WholeExtent = [-100, 100, -100, 100, -100, 100] # create a new 'Slice' slice1 = Slice(Input=fastUniformGrid1) slice1.SliceType = 'Plane' slice1.SliceOffsetValues = [0.0] # init the 'Plane' selected for 'SliceType' slice1.SliceType.Normal = [0.0, 0.0, 1.0] # show data from slice1 slice1Display = Show(slice1, renderView1) # get color transfer function/color map for 'X' xLUT = GetColorTransferFunction('X') xLUT.RGBPoints = [-100.0, 0.231373, 0.298039, 0.752941, 0.0, 0.865003, 0.865003, 0.865003, 100.0, 0.705882, 0.0156863, 0.14902] xLUT.ScalarRangeInitialized = 1.0 # trace defaults for the display properties. slice1Display.Representation = 'Surface' slice1Display.ColorArrayName = ['POINTS', 'X'] slice1Display.LookupTable = xLUT slice1Display.OSPRayScaleArray = 'X' slice1Display.OSPRayScaleFunction = 'PiecewiseFunction' slice1Display.SelectOrientationVectors = 'Swirl' slice1Display.ScaleFactor = 20.0 slice1Display.SelectScaleArray = 'X' slice1Display.GlyphType = 'Arrow' slice1Display.GlyphTableIndexArray = 'X' slice1Display.GaussianRadius = 1.0 slice1Display.SetScaleArray = ['POINTS', 'X'] slice1Display.ScaleTransferFunction = 'PiecewiseFunction' slice1Display.OpacityArray = ['POINTS', 'X'] slice1Display.OpacityTransferFunction = 'PiecewiseFunction' slice1Display.DataAxesGrid = 'GridAxesRepresentation' slice1Display.DataAxesGrid.GridAxesVisibility = 1 # init the 'PiecewiseFunction' selected for 'ScaleTransferFunction' slice1Display.ScaleTransferFunction.Points = [-100.0, 0.0, 0.5, 0.0, 100.0, 1.0, 0.5, 0.0] # init the 'PiecewiseFunction' selected for 'OpacityTransferFunction' slice1Display.OpacityTransferFunction.Points = [-100.0, 0.0, 0.5, 0.0, 100.0, 1.0, 0.5, 0.0] # setup the color legend parameters for each legend in this view # get color legend/bar for xLUT in view renderView1 xLUTColorBar = GetScalarBar(xLUT, renderView1) xLUTColorBar.Title = 'X' xLUTColorBar.ComponentTitle = '' # set color bar visibility xLUTColorBar.Visibility = 1 # show color legend slice1Display.SetScalarBarVisibility(renderView1, True) # ---------------------------------------------------------------- # setup color maps and opacity mapes used in the visualization # note: the Get..() functions create a new object, if needed # ---------------------------------------------------------------- # get opacity transfer function/opacity map for 'X' xPWF = GetOpacityTransferFunction('X') xPWF.Points = [-100.0, 0.0, 0.5, 0.0, 100.0, 1.0, 0.5, 0.0] xPWF.ScalarRangeInitialized = 1 # ---------------------------------------------------------------- # finally, restore active source SetActiveSource(slice1) Hide3DWidgets() # ----------------------------------------------------------------