And here is the code to cut all the pie polygons with the fault polylines:
import arcpy
def main():
fc_pie = r'C:\GeoNet\SplitBalls\shp\focal_sml_pie.shp'
fc_faults = r'C:\GeoNet\SplitBalls\shp\focal_sml_faults.shp'
fc_result = r'C:\GeoNet\SplitBalls\shp\pie_pieces01.shp'
arcpy.env.overwriteOutput = True
# create dct with faults
dct_faults = {r[0]: r[1] for r in arcpy.da.SearchCursor(fc_faults, ('OID@', 'SHAPE@'))}
# loop through pie polygons
lst_polygons = []
with arcpy.da.SearchCursor(fc_pie, ('SHAPE@')) as curs_pie:
for row_pie in curs_pie:
polygon = row_pie[0]
# get list of faults for current pie
lst_faults_pie = getFaults(polygon, dct_faults.values())
# cut pie based on faults
lst_polygons_pie = [polygon]
for fault in lst_faults_pie:
lst_polygons_pie = splitPolygon(lst_polygons_pie, fault)
# add polygons to list
lst_polygons.extend(lst_polygons_pie)
# write the pie pieces to a new featureclass
arcpy.CopyFeatures_management(lst_polygons, fc_result)
def getFaults(polygon, lst_faults):
'''Get list of fault polylines for pie polygon'''
lst_faults_pie = []
for fault in lst_faults:
mid_pnt = fault.positionAlongLine(0.5, True)
if polygon.contains(mid_pnt):
lst_faults_pie.append(fault)
return lst_faults_pie
def splitPolygon(lst_polygons, polyline):
'''split pie polygon with fault polyline'''
lst_pols = []
for polygon in lst_polygons:
try:
lst_pols += polygon.cut(polyline)
except Exception as e:
print "Error:", e
pass
return lst_pols
if __name__ == '__main__':
main()
Also find attached the resulting shapefile.