+:Application errors.Close_QPushButton {text='Close' type='QPushButton' unnamed='1' visible='1' window=':Application errors_XGUI_ErrorDialog'}
+:Application errors_XGUI_ErrorDialog {type='XGUI_ErrorDialog' unnamed='1' visible='1' windowTitle='Application errors'}
:Basic.Circle_AppElements_Button {container=':Sketch.Basic_AppElements_MenuGroupPanel' text='Circle' type='AppElements_Button' unnamed='1' visible='1'}
:Basic.Line_AppElements_Button {container=':Sketch.Basic_AppElements_MenuGroupPanel' text='Line' type='AppElements_Button' unnamed='1' visible='1'}
:Basic.Point_AppElements_Button {container=':Sketch.Basic_AppElements_MenuGroupPanel' text='Point' type='AppElements_Button' unnamed='1' visible='1'}
:Circle.property_panel_ok_QToolButton {container=':OpenParts*.Circle_XGUI_PropertyPanel' name='property_panel_ok' type='QToolButton' visible='1'}
:Circle.qt_spinbox_lineedit_QLineEdit {container=':OpenParts*.Circle_XGUI_PropertyPanel' name='qt_spinbox_lineedit' occurrence='3' type='QLineEdit' visible='1'}
:Constraints.Distance_AppElements_Button {container=':Sketch.Constraints_AppElements_MenuGroupPanel' text='Distance' type='AppElements_Button' unnamed='1' visible='1'}
+:Constraints.Radius_AppElements_Button {container=':Sketch.Constraints_AppElements_MenuGroupPanel' text='Radius' type='AppElements_Button' unnamed='1' visible='1'}
:Delete features.Label_QLabel {name='qt_msgbox_label' type='QLabel' visible='1' window=':Delete features_QMessageBox'}
:Delete features.Yes_QPushButton {text='Yes' type='QPushButton' unnamed='1' visible='1' window=':Delete features_QMessageBox'}
:Delete features_QMessageBox {type='QMessageBox' unnamed='1' visible='1' windowTitle='Delete features'}
:Point.property_panel_ok_QToolButton {container=':OpenParts*.Point_XGUI_PropertyPanel' name='property_panel_ok' type='QToolButton' visible='1'}
:Point.qt_spinbox_lineedit_QLineEdit {container=':Point.Point_QGroupBox' name='qt_spinbox_lineedit' type='QLineEdit' visible='1'}
:Point.qt_spinbox_lineedit_QLineEdit_2 {container=':Point.Point_QGroupBox' name='qt_spinbox_lineedit' occurrence='2' type='QLineEdit' visible='1'}
+:Save current file.Discard_QPushButton {text='Discard' type='QPushButton' unnamed='1' visible='1' window=':Save current file_QMessageBox'}
+:Save current file_QMessageBox {type='QMessageBox' unnamed='1' visible='1' windowTitle='Save current file'}
:Sketch.Basic_AppElements_MenuGroupPanel {container=':qt_tabwidget_stackedwidget.Sketch_AppElements_Workbench' name='Basic' type='AppElements_MenuGroupPanel' visible='1'}
:Sketch.Constraints_AppElements_MenuGroupPanel {container=':qt_tabwidget_stackedwidget.Sketch_AppElements_Workbench' name='Constraints' type='AppElements_MenuGroupPanel' visible='1'}
:Sketch.Ok_QToolButton {container=':Sketch.Basic_AppElements_MenuGroupPanel' occurrence='6' type='QToolButton' unnamed='1' visible='1'}
type(waitForObject(":Circle.CircleRadius_ModuleBase_ParamSpinBox"), radius)
clickButton(waitForObject(":Circle.property_panel_ok_QToolButton"))
+
+def circle_create_in_view(point_1, point_2):
+ clickButton(waitForObject(":Basic.Circle_AppElements_Button"))
+
+ mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), point_1[0], point_1[1], 0, Qt.LeftButton)
+ mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), point_2[0], point_2[1], 0, Qt.LeftButton)
+
+ clickButton(waitForObject(":Basic.Circle_AppElements_Button"))
def distance_create(point_1, point_2, annotaion_point, distance):
clickButton(waitForObject(":Constraints.Distance_AppElements_Button"))
clickButton(waitForObject(":Constraints.Distance_AppElements_Button"))
+def radius_create(point_1, point_2, radius):
+ clickButton(waitForObject(":Constraints.Radius_AppElements_Button"))
+
+ mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), point_1[0], point_1[1], 0, Qt.LeftButton)
+ mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), point_2[0], point_2[1], 0, Qt.LeftButton)
+ type(waitForObject(":_ModuleBase_ParamSpinBox"), "<Ctrl+A>")
+ type(waitForObject(":_ModuleBase_ParamSpinBox"), radius)
+ type(waitForObject(":_ModuleBase_ParamSpinBox"), "<Keypad_Enter>")
+
+ clickButton(waitForObject(":Constraints.Radius_AppElements_Button"))
+
def extrusion_feature(points, to_size):
clickTab(waitForObject(":General.qt_tabwidget_tabbar_QTabBar"), "Features")
clickButton(waitForObject(":Extrusion.Extrusion_AppElements_Button"))
--- /dev/null
+def sketch():
+ circle_border = (229, 290)
+ circle_create_in_view((334, 237), circle_border)
+ radius_create(circle_border, (148, 97), 150)
+
+ # check
+ circle_border = (392, 179)
+ mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), circle_border[0], circle_border[1], 0, Qt.LeftButton)
+ waitFor("object.exists(':Circle.CircleRadius_ModuleBase_ParamSpinBox')", 20000)
+ test.compare(str(findObject(":Circle.CircleRadius_ModuleBase_ParamSpinBox").text), "150")
+
+def main():
+ source(findFile("scripts", "common.py"))
+
+ startApplication("GeomApp")
+
+ point = (446, 297) # one of the construction planes
+ sketch_create(point, lambda: sketch())
+
+ sendEvent("QCloseEvent", waitForObject(":OpenParts*_AppElements_MainWindow"))
+ clickButton(waitForObject(":Save current file.Discard_QPushButton"))