MantisBT - ParaView
View Issue Details
0013475ParaView(No Category)public2012-09-27 09:162015-01-11 08:34
Alejandro Ribes 
Utkarsh Ayachit 
normalminorhave not tried
closedfixed 
3.14.1 
3.98.0 
ParaViS
13475_add_select_cells_python_api
feature
0013475: Python scripting and cell selection
Dear Kitware friends,

We have at EDF some simulation engineers scripting hardly for visualizing their data. They made some nice custom diagrams and for one of them they need to select all cells in a mesh (a result of some pre-processing) in a py file. Surprisingly they told me that the selection of the cells in a mesh can only be done interactively by using the mouse and this point forces them to, at each execution of the py, stop and manually select all the cells before continuing. This operation makes them dull and unhappy.

Their aim is to superpose some numerical labels to each cell:

_DataRepresentation.SelectionCellLabelJustification = 'Center'
_DataRepresentation.SelectionCellFieldDataArrayName = self.fieldName
_DataRepresentation.SelectionCellLabelVisibility = 1
_DataRepresentation.SelectionCellLabelFormat = '%.1f'
_DataRepresentation.SelectionCellLabelFontSize = 9
_DataRepresentation.SelectionColor = [0.0, 0.0, 0.0]
_DataRepresentation.SelectionCellLabelColor = [0.0, 0.0, 0.0]

Then MY QUESTION is: is it true that we cannot script the selection of cells? In case we cannot ... is it possible to add two methods "SelectAllCells" and "DeselectAllCells" to the representation?

Thanks for the answer,

Alejandro.
No tags attached.
Issue History
2012-09-27 09:16Alejandro RibesNew Issue
2012-10-04 14:45Utkarsh AyachitNote Added: 0029321
2012-10-04 14:46Utkarsh AyachitAssigned To => Utkarsh Ayachit
2012-10-04 14:46Utkarsh AyachitStatusbacklog => todo
2012-10-04 14:46Utkarsh AyachitStatustodo => active development
2012-10-04 16:26Utkarsh AyachitTopic Name => 13475_add_select_cells_python_api
2012-10-04 16:26Utkarsh AyachitNote Added: 0029324
2012-10-04 16:26Utkarsh AyachitStatusactive development => gatekeeper review
2012-10-04 16:26Utkarsh AyachitFixed in Version => git-next
2012-10-04 16:26Utkarsh AyachitResolutionopen => fixed
2012-10-05 10:12Utkarsh AyachitFixed in Versiongit-next => git-master
2012-10-05 10:13Utkarsh AyachitStatusgatekeeper review => customer review
2012-10-05 10:13Utkarsh AyachitNote Added: 0029334
2012-10-29 17:04Utkarsh AyachitFixed in Versiongit-master => 3.98.0
2013-02-11 16:02Utkarsh AyachitStatuscustomer review => closed
2015-01-11 08:33Utkarsh AyachitSource_changeset_attached => ParaView master 51ee5a12
2015-01-11 08:34Utkarsh AyachitSource_changeset_attached => ParaView master 06de2264

Notes
(0029321)
Utkarsh Ayachit   
2012-10-04 14:45   
We can indeed add some Python utility functions that assist in creating selections from Python.
(0029324)
Utkarsh Ayachit   
2012-10-04 16:26   
commit 06de22642fc20c8da9f39088498c024acce58847
Author: Utkarsh Ayachit <utkarsh.ayachit@kitware.com>
Date: Thu Oct 4 16:23:42 2012 -0400

    BUG 0013475. Adding API to select/unselect cells.
    
    Adding APU to select/unselect cells in Python. Users can now use SelectCells()
    and ClearSelection() to make new selections from Python.
    
    Change-Id: Idfda0824242de3f9617267215ea29cde7cbb4aaa
(0029334)
Utkarsh Ayachit   
2012-10-05 10:13   
merged into master, if applicable.