@@ -22,7 +22,8 @@ def __init__(self, projectfile, use_thickness=None):
2222 orientations = self .projectfile .stratigraphyOrientations
2323 fault_orientations = self .projectfile .faultOrientations
2424 fault_locations = self .projectfile .faultLocations
25-
25+ fault_relationships = self .projectfile ["eventRelationships" ]
26+ faultLog = self .projectfile .faultLog .set_index ("eventId" )
2627 orientations .rename (columns = column_map , inplace = True )
2728 contacts .rename (columns = column_map , inplace = True )
2829 fault_locations .rename (columns = column_map , inplace = True )
@@ -63,6 +64,26 @@ def __init__(self, projectfile, use_thickness=None):
6364 ],
6465 )
6566 )
67+
68+ for i in fault_relationships .index :
69+ fault_relationships .loc [i , "Fault1" ] = faultLog .loc [
70+ fault_relationships .loc [i , "eventId1" ], "name"
71+ ]
72+ fault_relationships .loc [i , "Fault2" ] = faultLog .loc [
73+ fault_relationships .loc [i , "eventId2" ], "name"
74+ ]
75+ fault_edges = []
76+ fault_edge_properties = []
77+ for i in fault_relationships .index :
78+ fault_edges .append (
79+ (fault_relationships .loc [i , "Fault1" ], fault_relationships .loc [i , "Fault2" ])
80+ )
81+ fault_edge_properties .append (
82+ {
83+ "type" : fault_relationships .loc [i , "type" ],
84+ "angle" : fault_relationships .loc [i , "angle" ],
85+ }
86+ )
6687 super ().__init__ (
6788 contacts = contacts ,
6889 contact_orientations = orientations ,
@@ -73,12 +94,12 @@ def __init__(self, projectfile, use_thickness=None):
7394 fault_orientations = fault_orientations ,
7495 fault_locations = fault_locations ,
7596 fault_properties = fault_properties ,
76- fault_edges = [] , # list(fault_graph.edges),
97+ fault_edges = fault_edges , # list(fault_graph.edges),
7798 colours = colours ,
7899 fault_stratigraphy = None ,
79100 intrusions = None ,
80101 use_thickness = use_thickness ,
81102 origin = self .projectfile .origin ,
82103 maximum = self .projectfile .maximum ,
83- # fault_edge_properties=fault_edge_properties
104+ fault_edge_properties = fault_edge_properties ,
84105 )
0 commit comments