@@ -303,22 +303,21 @@ def _update_perforation( self, perforation: Perforation, show: bool, path: str )
303303 if not show :
304304 if path in self ._perforations :
305305 self ._remove_perforation ( path )
306- self ._make_mesh_transparent (False )
306+ self ._make_mesh_transparent ( False )
307307 return
308308
309309 distance_from_head = float ( perforation .distance_from_head )
310310 self ._add_perforation ( distance_from_head , path )
311- self ._make_mesh_transparent (True )
311+ self ._make_mesh_transparent ( True )
312312
313- def _make_mesh_transparent (self , isTransparent : bool ):
314- opacity : float = 0.2 if isTransparent else 1.
313+ def _make_mesh_transparent ( self , isTransparent : bool ):
314+ opacity : float = 0.2 if isTransparent else 1.
315315 if self ._mesh_actor is not None :
316316 prop = self ._mesh_actor .GetProperty ()
317- prop .SetOpacity (opacity )
317+ prop .SetOpacity ( opacity )
318318 self .plotter .renderer .Modified ()
319319 return
320320
321-
322321 def _remove_perforation ( self , path : str ) -> None :
323322 """Remove all actor related to the given path and clean the stored perforation."""
324323 saved_perforation : PerforationViewer = self ._perforations [ path ]
@@ -372,7 +371,7 @@ def _update_box( self, active_block: Box, show_obj: bool ) -> None:
372371 self .plotter .remove_actor ( extracted_cell_actor )
373372
374373 if not show_obj :
375- self ._make_mesh_transparent (False )
374+ self ._make_mesh_transparent ( False )
376375 return
377376
378377 box : Box = active_block
@@ -382,7 +381,7 @@ def _update_box( self, active_block: Box, show_obj: bool ) -> None:
382381 extracted_cell : pv .UnstructuredGrid = self .box_engine .get_extracted_cells ()
383382
384383 if box_polydata is not None and extracted_cell is not None :
385- self ._make_mesh_transparent (True )
384+ self ._make_mesh_transparent ( True )
386385 _box_polydata_actor = self .plotter .add_mesh ( box_polydata , opacity = 0.2 )
387386 _extracted_cells_actor = self .plotter .add_mesh ( extracted_cell , show_edges = True )
388387 self .box_engine .set_box_polydata_actor ( _box_polydata_actor )
0 commit comments