File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
LoopStructural/modelling/core Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,22 @@ def add_fault(self, fault: FaultSegment):
2727
2828 self .faults .append (fault )
2929 self .notify ('fault_added' , fault = fault )
30+
31+ def remove_fault (self , fault : str ):
32+ """
33+ Removes a fault from the fault topology.
34+ """
35+ if fault not in self .faults :
36+ raise ValueError (f"Fault { fault } not found in the topology." )
37+
38+ self .faults .remove (fault )
39+ # Remove any relationships involving this fault
40+ self .adjacency = {k : v for k , v in self .adjacency .items () if fault not in k }
41+ self .stratigraphy_fault_relationships = {
42+ k : v for k , v in self .stratigraphy_fault_relationships .items () if k [1 ] != fault
43+ }
44+ self .notify ('fault_removed' , fault = fault )
45+
3046 def add_abutting_relationship (self , fault_name : str , abutting_fault : str ):
3147 """
3248 Adds an abutting relationship between two faults.
You can’t perform that action at this time.
0 commit comments