import mathfrom AlibreScript import *# Initialize the part sessionpart = CurrentPart()# Fetch the standard planesxy_plane = part.GetPlane("XY-Plane")zx_plane = part.GetPlane("ZX-Plane")# Create a profile sketch on the XY planeprofile_sketch = part.AddSketch("ProfileSketch", xy_plane)# Add a circle to the profile sketch as the sweep profileprofile_sketch.AddCircle(0, 0, 2, False) # Center at (0,0), Radius = 2# Create a path sketch on the ZX planepath_sketch = part.AddSketch("PathSketch", zx_plane)# Add a line to the path sketch as the sweep pathpath_sketch.AddLine([0, 0], [10, 10], False) # Line from (0,0) to (10,10)# Define parameters for the sweep bossis_rigid = Falseend_condition = part.EndCondition.EntirePath # Using EntirePath as the end conditionend_plane = Noneend_offset = 0draft_angle = 0 # No draft angleoutward_draft = False # No outward draft# Add the sweep boss featurepart.AddSweepBoss("SweepBossFeature", profile_sketch, path_sketch, is_rigid, end_condition, end_plane, end_offset, draft_angle, outward_draft)# Regenerate the part to update the viewpart.Regenerate()