@@ -202,7 +202,7 @@ def mat_plot(self, markersize=7, return_plot=False, show_plot=True):
202
202
"""
203
203
plts .matplot_nodes (self , markersize , return_plot , show_plot )
204
204
205
- def vtk_plot (self , markersize = 7 , return_plot = False , show_plot = True ):
205
+ def vtk_plot (self , markersize = 7 , return_plot = False , show_plot = True , notebook = True ):
206
206
"""
207
207
Plot Nodes object with VTK
208
208
:param markersize:
@@ -211,7 +211,7 @@ def vtk_plot(self, markersize=7, return_plot=False, show_plot=True):
211
211
:return:
212
212
"""
213
213
214
- plts .vtkplot_nodes (self , markersize , return_plot , show_plot )
214
+ plts .vtkplot_nodes (self , markersize , return_plot , show_plot , notebook = notebook )
215
215
216
216
def ternary_plot (self ):
217
217
plts .matplot_ternary (self )
@@ -396,7 +396,8 @@ def vtk_plot(self,
396
396
color_set = False ,
397
397
return_plot = False ,
398
398
show_plot = True ,
399
- display_property : str = None ):
399
+ display_property : str = None ,
400
+ notebook = True ):
400
401
"""
401
402
Plot fracture object with VTK
402
403
:param linewidth:
@@ -408,12 +409,13 @@ def vtk_plot(self,
408
409
:return:
409
410
"""
410
411
plts .vtkplot_fractures (self ,
411
- linewidth ,
412
- color ,
413
- color_set ,
414
- return_plot ,
415
- show_plot ,
416
- display_property )
412
+ linewidth = linewidth ,
413
+ color = color ,
414
+ color_set = color_set ,
415
+ return_plot = return_plot ,
416
+ show_plot = show_plot ,
417
+ display_property = display_property ,
418
+ notebook = notebook )
417
419
418
420
419
421
class Boundary (BaseEntity ):
@@ -584,7 +586,8 @@ def vtk_plot(self,
584
586
color = 'red' ,
585
587
color_set = False ,
586
588
return_plot = False ,
587
- show_plot = True ):
589
+ show_plot = True ,
590
+ notebook = True ):
588
591
"""
589
592
Plot Boundary object with vtk
590
593
:param linewidth:
@@ -595,10 +598,11 @@ def vtk_plot(self,
595
598
:return:
596
599
"""
597
600
plts .vtkplot_boundaries (self ,
598
- linewidth ,
599
- color ,
600
- return_plot ,
601
- show_plot )
601
+ linewidth = linewidth ,
602
+ color = color ,
603
+ return_plot = return_plot ,
604
+ show_plot = show_plot ,
605
+ notebook = notebook )
602
606
603
607
604
608
class Backbone (Fractures ):
@@ -837,19 +841,6 @@ def activate_nodes(self, node_type: list = None):
837
841
for t in node_type :
838
842
self .entity_df .loc [self .entity_df ['n_type' ] == t , 'active' ] = 1
839
843
840
- def deactivate_nodes (self , node_type : list = None ):
841
- """
842
- Method that activates the nodes provided in the node_type list.
843
- :param node_type: List of node types to be activated
844
- """
845
-
846
- if node_type is None :
847
- self .entity_df .loc [self .entity_df ['type' ] == 'nodes' , 'active' ] = 0
848
- else :
849
- self .entity_df .loc [self .entity_df ['type' ] == 'nodes' , 'active' ] = 1
850
- for t in node_type :
851
- self .entity_df .loc [self .entity_df ['n_type' ] == t , 'active' ] = 0
852
-
853
844
def is_type_active (self , node_type : int ) -> bool :
854
845
"""
855
846
Method used to return if a given node type is active in the fracture network
@@ -971,21 +962,9 @@ def activate_fractures(self, set_n: list = None):
971
962
self .entity_df .loc [self .entity_df ['type' ] == 'fractures' , 'active' ] = 1
972
963
else :
973
964
self .entity_df .loc [self .entity_df ['type' ] == 'fractures' , 'active' ] = 0
974
- for n in set_n :
975
- self .entity_df .loc [self .entity_df ['f_set' ] == n , 'active' ] = 1
976
-
977
- def deactivate_fractures (self , set_n : list = None ):
978
- """
979
- Method that activates the fractures provided in the set_n list.
980
- :param set_n: List of sets to be activated
981
- """
982
-
983
- if set_n is None :
984
- self .entity_df .loc [self .entity_df ['type' ] == 'fractures' , 'active' ] = 0
985
- else :
986
- self .entity_df .loc [self .entity_df ['type' ] == 'fractures' , 'active' ] = 1
987
- for n in set_n :
988
- self .entity_df .loc [self .entity_df ['f_set' ] == n , 'active' ] = 0
965
+ if len (set_n ) > 0 :
966
+ for n in set_n :
967
+ self .entity_df .loc [self .entity_df ['f_set' ] == n , 'active' ] = 1
989
968
990
969
def is_set_active (self , set_n : int ) -> bool :
991
970
"""
@@ -1113,24 +1092,6 @@ def activate_boundaries(self, group_n: list = None):
1113
1092
for n in group_n :
1114
1093
self .entity_df .loc [self .entity_df ['b_group' ] == n , 'active' ] = 1
1115
1094
1116
- def deactivate_boundaries (self , group_n : list = None ):
1117
-
1118
- """
1119
- Method that deactivates the boundary provided in the group_n list.
1120
- :param group_n: List of groups to be deactivated
1121
-
1122
- Note
1123
- -------
1124
- If group_n is none then all boundaries groups are deactivated
1125
- """
1126
-
1127
- if group_n is None :
1128
- self .entity_df .loc [self .entity_df ['type' ] == 'boundary' , 'active' ] = 0
1129
- else :
1130
- self .entity_df .loc [self .entity_df ['type' ] == 'boundary' , 'active' ] = 1
1131
- for n in group_n :
1132
- self .entity_df .loc [self .entity_df ['b_group' ] == n , 'active' ] = 0
1133
-
1134
1095
def is_group_active (self , group_n : int ) -> bool :
1135
1096
"""
1136
1097
Method used to return if a given boundary group is active in the fracture network
@@ -1342,7 +1303,8 @@ def vtk_plot(self,
1342
1303
boundary_color = 'red' ,
1343
1304
color_set = False ,
1344
1305
show_plot = True ,
1345
- return_plot = False ):
1306
+ return_plot = False ,
1307
+ notebook = True ):
1346
1308
"""
1347
1309
Method used to plot the fracture network using vtk
1348
1310
:param markersize:
@@ -1357,14 +1319,15 @@ def vtk_plot(self,
1357
1319
"""
1358
1320
1359
1321
plts .vtkplot_frac_net (self ,
1360
- markersize ,
1361
- fracture_linewidth ,
1362
- boundary_linewidth ,
1363
- fracture_color ,
1364
- boundary_color ,
1365
- color_set ,
1366
- show_plot ,
1367
- return_plot )
1322
+ markersize = markersize ,
1323
+ fracture_linewidth = fracture_linewidth ,
1324
+ boundary_linewidth = boundary_linewidth ,
1325
+ fracture_color = fracture_color ,
1326
+ boundary_color = boundary_color ,
1327
+ color_set = color_set ,
1328
+ show_plot = show_plot ,
1329
+ return_plot = return_plot ,
1330
+ notebook = notebook )
1368
1331
1369
1332
def backbone_plot (self ,
1370
1333
method = 'vtk' ,
@@ -1373,19 +1336,21 @@ def backbone_plot(self,
1373
1336
fracture_color = 'black' ,
1374
1337
boundary_color = 'red' ,
1375
1338
return_plot = False ,
1376
- show_plot = True ):
1339
+ show_plot = True ,
1340
+ notebook = True ):
1377
1341
"""
1378
1342
Method used to plot the fracture network using vtk
1379
1343
:return:
1380
1344
"""
1381
1345
if method == 'vtk' :
1382
1346
plts .vtkplot_backbone (self ,
1383
- fracture_linewidth ,
1384
- boundary_linewidth ,
1385
- fracture_color ,
1386
- boundary_color ,
1387
- return_plot ,
1388
- show_plot )
1347
+ fracture_linewidth = fracture_linewidth ,
1348
+ boundary_linewidth = boundary_linewidth ,
1349
+ fracture_color = fracture_color ,
1350
+ boundary_color = boundary_color ,
1351
+ return_plot = return_plot ,
1352
+ show_plot = show_plot ,
1353
+ notebook = notebook )
1389
1354
elif method == 'matplot' :
1390
1355
plts .matplot_backbone (self ,
1391
1356
fracture_linewidth ,
0 commit comments