![]() 84 85 """ 86 outputPorts = 87 88 if not selectedReps or selectedReps. 82 The Modifier can be used to modify the currently existing selection through one of the values 83 'ADD', 'SUBTRACT', 'TOGGLE' or None if the new selection should replace the existing one. Selects blocks instead of cells if the SelectBlocks option is True. SetPropertyWithName (name, value ) 75 76 return s 77 78 79 def _collectSelectionPorts (selectedReps, selectionSources, SelectBlocks = False, Modifier = None ): 80 """ Utility to collect all the selection output ports from a list of selected representations 81 and sources. items (): 72 # Warning: this will add only the attributes initially passed in when creating the proxy. NewProxy ( 'sources', proxyname ) 69 70 s = SelectionProxy (proxy =proxy ) 71 for name, value in args. ProxyManager (session ) 67 68 proxy = pxm. Basically a factory function 62 that creates a proxy of a given name and hands off keyword arguments to the newly 63 created proxy. _init _ (**args ) 58 59 60 def _createSelection (proxyname, **args ): 61 """ Utility function to create a selection source. 54 """ 55 56 def _init_ (self, **args ): 57 super (SelectionProxy, self ). Proxy ): 53 """ Special proxy wrapper type for Selections. simple 50 51 52 class SelectionProxy (sm. 42 # 43 # = 44 45 from _future_ import absolute_import, division, print_function 46 47 import paraview 48 from paraview import servermanager as sm 49 import paraview. See the above copyright notice for more information. 38 # 39 # This software is distributed WITHOUT ANY WARRANTY without even 40 # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 41 # PURPOSE. ![]() 23 SelectIDS(IDs=, FieldType='CELL', Source=sphere, Modifier='SUBTRACT') 24 25 # Extract the currently extracted cells 26 es = ExtractSelection() 27 Show(es) 28 29 """ 30 # = 31 # 32 # Program: ParaView 33 # Module: selection.py 34 # 35 # Copyright (c) Kitware, Inc. 20 SelectIDs(IDs=, FieldType='CELL', Source=sphere, Modifier='ADD') 21 22 # Remove cells on processor 0 with ids 4 and 5 from the current selection. 17 SelectSurfaceCells(Rectangle=) 18 19 # Add cells on processor 0 with ids 1 and 2 to the current selection. 10 sphere = Sphere(ThetaResolution=16, PhiResolution=32) 11 12 # Show the sphere 13 Show(sphere) 14 15 # Select cells falling inside a rectangle defined by two points on a diagonal, 16 # (300, 400) and (600, 800). 3 4 A simple example:: 5 6 from lection import * 7 8 # Create a new sphere proxy on the active connection and register it 9 # in the sources group. It provides 2 a convenience layer to provide functionality provided by the underlying C++ classes. See also the last Fossies "Diffs" side-by-side code changes report for "selection.py": v5.10.1_vs_v5.11.0.ġ """selection is a module for defining and using selections via Python. As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers.Īlternatively you can here view or download the uninterpreted source code file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |