import mathfrom AlibreScript import *# Initialize the part sessionpart = CurrentPart()# Assuming you have a part with an edge to chamfer.# The edge can be obtained in various ways, depending on the context.# Here's a generic way to get an edge, replace this with your specific method.edges = part.GetEdges()edge_to_chamfer = edges[0] # Assuming you want to chamfer the first edge in the list# Define chamfer parametersdistance1 = 1 # The first chamfer distancedistance2 = 1 # The second chamfer distance (for unequal chamfer, otherwise set same as distance1)# Add chamfer to the selected edgepart.AddChamfer("ChamferName", edge_to_chamfer, distance1, distance2, False)# Regenerate the part to update the viewpart.Regenerate()