@@ -307,10 +307,10 @@ def disable_picking(self):
307
307
308
308
def show (
309
309
self ,
310
- object : Any = None ,
310
+ plottable_object : Any = None ,
311
311
screenshot : Optional [str ] = None ,
312
312
view_2d : Dict = None ,
313
- filter : str = None ,
313
+ name_filter : str = None ,
314
314
** plotting_options ,
315
315
) -> List [Any ]:
316
316
"""Plot and show any PyAnsys object.
@@ -320,13 +320,13 @@ def show(
320
320
321
321
Parameters
322
322
----------
323
- object : Any, default: None
323
+ plottable_object : Any, default: None
324
324
Object or list of objects to plot.
325
325
screenshot : str, default: None
326
326
Path for saving a screenshot of the image that is being represented.
327
327
view_2d : Dict, default: None
328
328
Dictionary with the plane and the viewup vectors of the 2D plane.
329
- filter : str, default: None
329
+ name_filter : str, default: None
330
330
Regular expression with the desired name or names to include in the plotter.
331
331
**plotting_options : dict, default: None
332
332
Keyword arguments. For allowable keyword arguments, see the
@@ -338,7 +338,7 @@ def show(
338
338
List with the picked bodies in the picked order.
339
339
340
340
"""
341
- self .plot (object , filter , ** plotting_options )
341
+ self .plot (plottable_object , name_filter , ** plotting_options )
342
342
if self ._pl ._object_to_actors_map :
343
343
self ._object_to_actors_map = self ._pl ._object_to_actors_map
344
344
else :
@@ -363,14 +363,14 @@ def show(
363
363
self .show_plotter (screenshot )
364
364
365
365
picked_objects_list = []
366
- if isinstance (object , list ):
366
+ if isinstance (plottable_object , list ):
367
367
# Keep them ordered based on picking
368
368
for meshobject in self ._picked_list :
369
- for elem in object :
369
+ for elem in plottable_object :
370
370
if hasattr (elem , "name" ) and elem .name == meshobject .name :
371
371
picked_objects_list .append (elem )
372
- elif hasattr (object , "name" ) and object in self ._picked_list :
373
- picked_objects_list = [object ]
372
+ elif hasattr (plottable_object , "name" ) and plottable_object in self ._picked_list :
373
+ picked_objects_list = [plottable_object ]
374
374
375
375
return picked_objects_list
376
376
@@ -395,14 +395,14 @@ def show_plotter(self, screenshot: Optional[str] = None) -> None:
395
395
pv .OFF_SCREEN = self ._pv_off_screen_original
396
396
397
397
@abstractmethod
398
- def plot_iter (self , object : Any , filter : str = None , ** plotting_options ):
398
+ def plot_iter (self , plottable_object : Any , name_filter : str = None , ** plotting_options ):
399
399
"""Plot one or more compatible objects to the plotter.
400
400
401
401
Parameters
402
402
----------
403
- object : Any
403
+ plottable_object : Any
404
404
One or more objects to add.
405
- filter : str, default: None.
405
+ name_filter : str, default: None.
406
406
Regular expression with the desired name or names to include in the plotter.
407
407
**plotting_options : dict, default: None
408
408
Keyword arguments. For allowable keyword arguments, see the
@@ -412,14 +412,14 @@ def plot_iter(self, object: Any, filter: str = None, **plotting_options):
412
412
pass
413
413
414
414
@abstractmethod
415
- def plot (self , object : Any , filter : str = None , ** plotting_options ):
415
+ def plot (self , plottable_object : Any , name_filter : str = None , ** plotting_options ):
416
416
"""Plot a single object to the plotter.
417
417
418
418
Parameters
419
419
----------
420
- object : Any
420
+ plottable_object : Any
421
421
Object to add.
422
- filter : str
422
+ name_filter : str
423
423
Regular expression with the desired name or names to include in the plotter.
424
424
**plotting_options : dict, default: None
425
425
Keyword arguments. For allowable keyword arguments, see the
@@ -458,7 +458,7 @@ def __init__(
458
458
def plot_iter (
459
459
self ,
460
460
plotting_list : List [Any ],
461
- filter : str = None ,
461
+ name_filter : str = None ,
462
462
** plotting_options ,
463
463
) -> None :
464
464
"""Plot the elements of an iterable of any type of object to the scene.
@@ -470,33 +470,33 @@ def plot_iter(
470
470
----------
471
471
plotting_list : List[Any]
472
472
List of objects to plot.
473
- filter : str, default: None
473
+ name_filter : str, default: None
474
474
Regular expression with the desired name or names to include in the plotter.
475
475
**plotting_options : dict, default: None
476
476
Keyword arguments. For allowable keyword arguments, see the
477
477
:meth:`Plotter.add_mesh <pyvista.Plotter.add_mesh>` method.
478
478
479
479
"""
480
- for object in plotting_list :
481
- self .plot (object , filter , ** plotting_options )
480
+ for plottable_object in plotting_list :
481
+ self .plot (plottable_object , name_filter , ** plotting_options )
482
482
483
- def plot (self , object : Any , filter : str = None , ** plotting_options ):
483
+ def plot (self , plottable_object : Any , name_filter : str = None , ** plotting_options ):
484
484
"""Plot a ``pyansys`` or ``PyVista`` object to the plotter.
485
485
486
486
Parameters
487
487
----------
488
- object : Any
488
+ plottable_object : Any
489
489
Object to add.
490
- filter : str
490
+ name_filter : str
491
491
Regular expression with the desired name or names to include in the plotter.
492
492
**plotting_options : dict, default: None
493
493
Keyword arguments. For allowable keyword arguments, see the
494
494
:meth:`Plotter.add_mesh <pyvista.Plotter.add_mesh>` method.
495
495
496
496
"""
497
- if hasattr (object , "__iter__" ):
497
+ if hasattr (plottable_object , "__iter__" ):
498
498
logger .debug ("Plotting objects in list..." )
499
- self .pv_interface .plot_iter (object , filter , ** plotting_options )
499
+ self .pv_interface .plot_iter (plottable_object , name_filter , ** plotting_options )
500
500
else :
501
- self .pv_interface .plot (object , filter , ** plotting_options )
501
+ self .pv_interface .plot (plottable_object , name_filter , ** plotting_options )
502
502
0 commit comments