Translations:A2plus Workbench/129/it

while angle < 360: # run this loop until we have one full turn (360 degrees) # increase the rotation angle angle += step # set the new angle to the progress dialog progressDialog.setValue(angle) # change the rotation angle of the part "star_wheel_001" starWheel.Placement.Rotation.Angle = math.radians(angle) # solve the constraints a2p_solver.solveConstraints(document, useTransaction=True) # update the view after the solving ('Gui' stands for 'graphical user interface') FreeCADGui.updateGui # bring the progress dialog to front PySide.QtGui.QWidget.raise_(progressDialog) # if 'Stop' was pressed in the dialog, exit the loop if progressDialog.wasCanceled: angle = 360 # wait some time before performing the next step time.sleep(timeout) }}
 * 1) the while block is the main loop to change the angle and solve
 * 2) the assembly constraints subsequently