ToolDblSided.py 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532
  1. from PyQt5 import QtGui
  2. from GUIElements import RadioSet, EvalEntry, LengthEntry
  3. from FlatCAMTool import FlatCAMTool
  4. from FlatCAMObj import *
  5. from shapely.geometry import Point
  6. from shapely import affinity
  7. from PyQt5 import QtCore
  8. class DblSidedTool(FlatCAMTool):
  9. toolName = "2-Sided PCB"
  10. def __init__(self, app):
  11. FlatCAMTool.__init__(self, app)
  12. ## Title
  13. title_label = QtWidgets.QLabel("%s" % self.toolName)
  14. title_label.setStyleSheet("""
  15. QLabel
  16. {
  17. font-size: 16px;
  18. font-weight: bold;
  19. }
  20. """)
  21. self.layout.addWidget(title_label)
  22. self.empty_lb = QtWidgets.QLabel("")
  23. self.layout.addWidget(self.empty_lb)
  24. ## Grid Layout
  25. grid_lay = QtWidgets.QGridLayout()
  26. self.layout.addLayout(grid_lay)
  27. ## Gerber Object to mirror
  28. self.gerber_object_combo = QtWidgets.QComboBox()
  29. self.gerber_object_combo.setModel(self.app.collection)
  30. self.gerber_object_combo.setRootModelIndex(self.app.collection.index(0, 0, QtCore.QModelIndex()))
  31. self.gerber_object_combo.setCurrentIndex(1)
  32. self.botlay_label = QtWidgets.QLabel("<b>GERBER:</b>")
  33. self.botlay_label.setToolTip(
  34. "Gerber to be mirrored."
  35. )
  36. self.mirror_gerber_button = QtWidgets.QPushButton("Mirror")
  37. self.mirror_gerber_button.setToolTip(
  38. "Mirrors (flips) the specified object around \n"
  39. "the specified axis. Does not create a new \n"
  40. "object, but modifies it."
  41. )
  42. self.mirror_gerber_button.setFixedWidth(40)
  43. # grid_lay.addRow("Bottom Layer:", self.object_combo)
  44. grid_lay.addWidget(self.botlay_label, 0, 0)
  45. grid_lay.addWidget(self.gerber_object_combo, 1, 0, 1, 2)
  46. grid_lay.addWidget(self.mirror_gerber_button, 1, 3)
  47. ## Excellon Object to mirror
  48. self.exc_object_combo = QtWidgets.QComboBox()
  49. self.exc_object_combo.setModel(self.app.collection)
  50. self.exc_object_combo.setRootModelIndex(self.app.collection.index(1, 0, QtCore.QModelIndex()))
  51. self.exc_object_combo.setCurrentIndex(1)
  52. self.excobj_label = QtWidgets.QLabel("<b>EXCELLON:</b>")
  53. self.excobj_label.setToolTip(
  54. "Excellon Object to be mirrored."
  55. )
  56. self.mirror_exc_button = QtWidgets.QPushButton("Mirror")
  57. self.mirror_exc_button.setToolTip(
  58. "Mirrors (flips) the specified object around \n"
  59. "the specified axis. Does not create a new \n"
  60. "object, but modifies it."
  61. )
  62. self.mirror_exc_button.setFixedWidth(40)
  63. # grid_lay.addRow("Bottom Layer:", self.object_combo)
  64. grid_lay.addWidget(self.excobj_label, 2, 0)
  65. grid_lay.addWidget(self.exc_object_combo, 3, 0, 1, 2)
  66. grid_lay.addWidget(self.mirror_exc_button, 3, 3)
  67. ## Geometry Object to mirror
  68. self.geo_object_combo = QtWidgets.QComboBox()
  69. self.geo_object_combo.setModel(self.app.collection)
  70. self.geo_object_combo.setRootModelIndex(self.app.collection.index(2, 0, QtCore.QModelIndex()))
  71. self.geo_object_combo.setCurrentIndex(1)
  72. self.geoobj_label = QtWidgets.QLabel("<b>GEOMETRY</b>:")
  73. self.geoobj_label.setToolTip(
  74. "Geometry Obj to be mirrored."
  75. )
  76. self.mirror_geo_button = QtWidgets.QPushButton("Mirror")
  77. self.mirror_geo_button.setToolTip(
  78. "Mirrors (flips) the specified object around \n"
  79. "the specified axis. Does not create a new \n"
  80. "object, but modifies it."
  81. )
  82. self.mirror_geo_button.setFixedWidth(40)
  83. # grid_lay.addRow("Bottom Layer:", self.object_combo)
  84. grid_lay.addWidget(self.geoobj_label, 4, 0)
  85. grid_lay.addWidget(self.geo_object_combo, 5, 0, 1, 2)
  86. grid_lay.addWidget(self.mirror_geo_button, 5, 3)
  87. ## Axis
  88. self.mirror_axis = RadioSet([{'label': 'X', 'value': 'X'},
  89. {'label': 'Y', 'value': 'Y'}])
  90. self.mirax_label = QtWidgets.QLabel("Mirror Axis:")
  91. self.mirax_label.setToolTip(
  92. "Mirror vertically (X) or horizontally (Y)."
  93. )
  94. # grid_lay.addRow("Mirror Axis:", self.mirror_axis)
  95. self.empty_lb1 = QtWidgets.QLabel("")
  96. grid_lay.addWidget(self.empty_lb1, 6, 0)
  97. grid_lay.addWidget(self.mirax_label, 7, 0)
  98. grid_lay.addWidget(self.mirror_axis, 7, 1)
  99. ## Axis Location
  100. self.axis_location = RadioSet([{'label': 'Point', 'value': 'point'},
  101. {'label': 'Box', 'value': 'box'}])
  102. self.axloc_label = QtWidgets.QLabel("Axis Ref:")
  103. self.axloc_label.setToolTip(
  104. "The axis should pass through a <b>point</b> or cut\n "
  105. "a specified <b>box</b> (in a FlatCAM object) through \n"
  106. "the center."
  107. )
  108. # grid_lay.addRow("Axis Location:", self.axis_location)
  109. grid_lay.addWidget(self.axloc_label, 8, 0)
  110. grid_lay.addWidget(self.axis_location, 8, 1)
  111. self.empty_lb2 = QtWidgets.QLabel("")
  112. grid_lay.addWidget(self.empty_lb2, 9, 0)
  113. ## Point/Box
  114. self.point_box_container = QtWidgets.QVBoxLayout()
  115. self.pb_label = QtWidgets.QLabel("<b>Point/Box Reference:</b>")
  116. self.pb_label.setToolTip(
  117. "If 'Point' is selected above it store the coordinates (x, y) through which\n"
  118. "the mirroring axis passes.\n"
  119. "If 'Box' is selected above, select here a FlatCAM object (Gerber, Exc or Geo).\n"
  120. "Through the center of this object pass the mirroring axis selected above."
  121. )
  122. self.add_point_button = QtWidgets.QPushButton("Add")
  123. self.add_point_button.setToolTip(
  124. "Add the coordinates in format <b>(x, y)</b> through which the mirroring axis \n "
  125. "selected in 'MIRROR AXIS' pass.\n"
  126. "The (x, y) coordinates are captured by pressing SHIFT key\n"
  127. "and left mouse button click on canvas or you can enter the coords manually."
  128. )
  129. self.add_point_button.setFixedWidth(40)
  130. grid_lay.addWidget(self.pb_label, 10, 0)
  131. grid_lay.addLayout(self.point_box_container, 11, 0, 1, 3)
  132. grid_lay.addWidget(self.add_point_button, 11, 3)
  133. self.point_entry = EvalEntry()
  134. self.point_box_container.addWidget(self.point_entry)
  135. self.box_combo = QtWidgets.QComboBox()
  136. self.box_combo.setModel(self.app.collection)
  137. self.box_combo.setRootModelIndex(self.app.collection.index(0, 0, QtCore.QModelIndex()))
  138. self.box_combo.setCurrentIndex(1)
  139. self.box_combo_type = QtWidgets.QComboBox()
  140. self.box_combo_type.addItem("Gerber Reference Box Object")
  141. self.box_combo_type.addItem("Excellon Reference Box Object")
  142. self.box_combo_type.addItem("Geometry Reference Box Object")
  143. self.point_box_container.addWidget(self.box_combo_type)
  144. self.point_box_container.addWidget(self.box_combo)
  145. self.box_combo.hide()
  146. self.box_combo_type.hide()
  147. ## Alignment holes
  148. self.ah_label = QtWidgets.QLabel("<b>Alignment Drill Coordinates:</b>")
  149. self.ah_label.setToolTip(
  150. "Alignment holes (x1, y1), (x2, y2), ... "
  151. "on one side of the mirror axis. For each set of (x, y) coordinates\n"
  152. "entered here, a pair of drills will be created:\n\n"
  153. "- one drill at the coordinates from the field\n"
  154. "- one drill in mirror position over the axis selected above in the 'Mirror Axis'."
  155. )
  156. self.layout.addWidget(self.ah_label)
  157. grid_lay1 = QtWidgets.QGridLayout()
  158. self.layout.addLayout(grid_lay1)
  159. self.alignment_holes = EvalEntry()
  160. self.add_drill_point_button = QtWidgets.QPushButton("Add")
  161. self.add_drill_point_button.setToolTip(
  162. "Add alignment drill holes coords in the format: (x1, y1), (x2, y2), ... \n"
  163. "on one side of the mirror axis.\n\n"
  164. "The coordinates set can be obtained:\n"
  165. "- press SHIFT key and left mouse clicking on canvas. Then click Add.\n"
  166. "- press SHIFT key and left mouse clicking on canvas. Then CTRL+V in the field.\n"
  167. "- press SHIFT key and left mouse clicking on canvas. Then RMB click in the field and click Paste.\n"
  168. "- by entering the coords manually in the format: (x1, y1), (x2, y2), ..."
  169. )
  170. self.add_drill_point_button.setFixedWidth(40)
  171. grid_lay1.addWidget(self.alignment_holes, 0, 0, 1, 2)
  172. grid_lay1.addWidget(self.add_drill_point_button, 0, 3)
  173. ## Drill diameter for alignment holes
  174. self.dt_label = QtWidgets.QLabel("<b>Alignment Drill Diameter</b>:")
  175. self.dt_label.setToolTip(
  176. "Diameter of the drill for the "
  177. "alignment holes."
  178. )
  179. self.layout.addWidget(self.dt_label)
  180. grid_lay2 = QtWidgets.QGridLayout()
  181. self.layout.addLayout(grid_lay2)
  182. self.drill_dia = FCEntry()
  183. self.dd_label = QtWidgets.QLabel("Drill diam.:")
  184. self.dd_label.setToolTip(
  185. "Diameter of the drill for the "
  186. "alignment holes."
  187. )
  188. grid_lay2.addWidget(self.dd_label, 0, 0)
  189. grid_lay2.addWidget(self.drill_dia, 0, 1)
  190. ## Buttons
  191. self.create_alignment_hole_button = QtWidgets.QPushButton("Create Excellon Object")
  192. self.create_alignment_hole_button.setToolTip(
  193. "Creates an Excellon Object containing the\n"
  194. "specified alignment holes and their mirror\n"
  195. "images.")
  196. # self.create_alignment_hole_button.setFixedWidth(40)
  197. grid_lay2.addWidget(self.create_alignment_hole_button, 1,0, 1, 2)
  198. self.reset_button = QtWidgets.QPushButton("Reset")
  199. self.reset_button.setToolTip(
  200. "Resets all the fields.")
  201. self.reset_button.setFixedWidth(40)
  202. grid_lay2.addWidget(self.reset_button, 1, 2)
  203. self.layout.addStretch()
  204. ## Signals
  205. self.create_alignment_hole_button.clicked.connect(self.on_create_alignment_holes)
  206. self.mirror_gerber_button.clicked.connect(self.on_mirror_gerber)
  207. self.mirror_exc_button.clicked.connect(self.on_mirror_exc)
  208. self.mirror_geo_button.clicked.connect(self.on_mirror_geo)
  209. self.add_point_button.clicked.connect(self.on_point_add)
  210. self.add_drill_point_button.clicked.connect(self.on_drill_add)
  211. self.reset_button.clicked.connect(self.reset_fields)
  212. self.box_combo_type.currentIndexChanged.connect(self.on_combo_box_type)
  213. self.axis_location.group_toggle_fn = self.on_toggle_pointbox
  214. self.drill_values = ""
  215. def install(self, icon=None, separator=None, **kwargs):
  216. FlatCAMTool.install(self, icon, separator, shortcut='ALT+D', **kwargs)
  217. def run(self):
  218. self.app.report_usage("Tool2Sided()")
  219. FlatCAMTool.run(self)
  220. self.set_tool_ui()
  221. # if the splitter us hidden, display it
  222. if self.app.ui.splitter.sizes()[0] == 0:
  223. self.app.ui.splitter.setSizes([1, 1])
  224. self.app.ui.notebook.setTabText(2, "2-Sided Tool")
  225. def set_tool_ui(self):
  226. self.reset_fields()
  227. self.point_entry.set_value("")
  228. self.alignment_holes.set_value("")
  229. self.mirror_axis.set_value(self.app.defaults["tools_2sided_mirror_axis"])
  230. self.axis_location.set_value(self.app.defaults["tools_2sided_axis_loc"])
  231. self.drill_dia.set_value(self.app.defaults["tools_2sided_drilldia"])
  232. def on_combo_box_type(self):
  233. obj_type = self.box_combo_type.currentIndex()
  234. self.box_combo.setRootModelIndex(self.app.collection.index(obj_type, 0, QtCore.QModelIndex()))
  235. self.box_combo.setCurrentIndex(0)
  236. def on_create_alignment_holes(self):
  237. axis = self.mirror_axis.get_value()
  238. mode = self.axis_location.get_value()
  239. if mode == "point":
  240. try:
  241. px, py = self.point_entry.get_value()
  242. except TypeError:
  243. self.app.inform.emit("[WARNING_NOTCL] 'Point' reference is selected and 'Point' coordinates "
  244. "are missing. Add them and retry.")
  245. return
  246. else:
  247. selection_index = self.box_combo.currentIndex()
  248. model_index = self.app.collection.index(selection_index, 0, self.gerber_object_combo.rootModelIndex())
  249. try:
  250. bb_obj = model_index.internalPointer().obj
  251. except AttributeError:
  252. model_index = self.app.collection.index(selection_index, 0, self.exc_object_combo.rootModelIndex())
  253. try:
  254. bb_obj = model_index.internalPointer().obj
  255. except AttributeError:
  256. model_index = self.app.collection.index(selection_index, 0,
  257. self.geo_object_combo.rootModelIndex())
  258. try:
  259. bb_obj = model_index.internalPointer().obj
  260. except AttributeError:
  261. self.app.inform.emit(
  262. "[WARNING_NOTCL] There is no Box reference object loaded. Load one and retry.")
  263. return
  264. xmin, ymin, xmax, ymax = bb_obj.bounds()
  265. px = 0.5 * (xmin + xmax)
  266. py = 0.5 * (ymin + ymax)
  267. xscale, yscale = {"X": (1.0, -1.0), "Y": (-1.0, 1.0)}[axis]
  268. try:
  269. dia = float(self.drill_dia.get_value())
  270. except ValueError:
  271. # try to convert comma to decimal point. if it's still not working error message and return
  272. try:
  273. dia = float(self.drill_dia.get_value().replace(',', '.'))
  274. self.drill_dia.set_value(dia)
  275. except ValueError:
  276. self.app.inform.emit("[WARNING_NOTCL] Tool diameter value is missing or wrong format. "
  277. "Add it and retry.")
  278. return
  279. if dia is '':
  280. self.app.inform.emit("[WARNING_NOTCL]No value or wrong format in Drill Dia entry. Add it and retry.")
  281. return
  282. tools = {"1": {"C": dia}}
  283. # holes = self.alignment_holes.get_value()
  284. holes = eval('[{}]'.format(self.alignment_holes.text()))
  285. if not holes:
  286. self.app.inform.emit("[WARNING_NOTCL] There are no Alignment Drill Coordinates to use. Add them and retry.")
  287. return
  288. drills = []
  289. for hole in holes:
  290. point = Point(hole)
  291. point_mirror = affinity.scale(point, xscale, yscale, origin=(px, py))
  292. drills.append({"point": point, "tool": "1"})
  293. drills.append({"point": point_mirror, "tool": "1"})
  294. if 'solid_geometry' not in tools:
  295. tools["1"]['solid_geometry'] = []
  296. else:
  297. tools["1"]['solid_geometry'].append(point_mirror)
  298. def obj_init(obj_inst, app_inst):
  299. obj_inst.tools = tools
  300. obj_inst.drills = drills
  301. obj_inst.create_geometry()
  302. self.app.new_object("excellon", "Alignment Drills", obj_init)
  303. self.drill_values = ''
  304. self.app.inform.emit("[success] Excellon object with alignment drills created...")
  305. def on_mirror_gerber(self):
  306. selection_index = self.gerber_object_combo.currentIndex()
  307. # fcobj = self.app.collection.object_list[selection_index]
  308. model_index = self.app.collection.index(selection_index, 0, self.gerber_object_combo.rootModelIndex())
  309. try:
  310. fcobj = model_index.internalPointer().obj
  311. except Exception as e:
  312. self.app.inform.emit("[WARNING_NOTCL] There is no Gerber object loaded ...")
  313. return
  314. if not isinstance(fcobj, FlatCAMGerber):
  315. self.app.inform.emit("[ERROR_NOTCL] Only Gerber, Excellon and Geometry objects can be mirrored.")
  316. return
  317. axis = self.mirror_axis.get_value()
  318. mode = self.axis_location.get_value()
  319. if mode == "point":
  320. try:
  321. px, py = self.point_entry.get_value()
  322. except TypeError:
  323. self.app.inform.emit("[WARNING_NOTCL] 'Point' coordinates missing. "
  324. "Using Origin (0, 0) as mirroring reference.")
  325. px, py = (0, 0)
  326. else:
  327. selection_index_box = self.box_combo.currentIndex()
  328. model_index_box = self.app.collection.index(selection_index_box, 0, self.box_combo.rootModelIndex())
  329. try:
  330. bb_obj = model_index_box.internalPointer().obj
  331. except Exception as e:
  332. self.app.inform.emit("[WARNING_NOTCL] There is no Box object loaded ...")
  333. return
  334. xmin, ymin, xmax, ymax = bb_obj.bounds()
  335. px = 0.5 * (xmin + xmax)
  336. py = 0.5 * (ymin + ymax)
  337. fcobj.mirror(axis, [px, py])
  338. self.app.object_changed.emit(fcobj)
  339. fcobj.plot()
  340. self.app.inform.emit("[success] Gerber %s was mirrored..." % str(fcobj.options['name']))
  341. def on_mirror_exc(self):
  342. selection_index = self.exc_object_combo.currentIndex()
  343. # fcobj = self.app.collection.object_list[selection_index]
  344. model_index = self.app.collection.index(selection_index, 0, self.exc_object_combo.rootModelIndex())
  345. try:
  346. fcobj = model_index.internalPointer().obj
  347. except Exception as e:
  348. self.app.inform.emit("[WARNING_NOTCL] There is no Excellon object loaded ...")
  349. return
  350. if not isinstance(fcobj, FlatCAMExcellon):
  351. self.app.inform.emit("[ERROR_NOTCL] Only Gerber, Excellon and Geometry objects can be mirrored.")
  352. return
  353. axis = self.mirror_axis.get_value()
  354. mode = self.axis_location.get_value()
  355. if mode == "point":
  356. try:
  357. px, py = self.point_entry.get_value()
  358. except Exception as e:
  359. log.debug("DblSidedTool.on_mirror_geo() --> %s" % str(e))
  360. self.app.inform.emit("[WARNING_NOTCL] There are no Point coordinates in the Point field. "
  361. "Add coords and try again ...")
  362. return
  363. else:
  364. selection_index_box = self.box_combo.currentIndex()
  365. model_index_box = self.app.collection.index(selection_index_box, 0, self.box_combo.rootModelIndex())
  366. try:
  367. bb_obj = model_index_box.internalPointer().obj
  368. except Exception as e:
  369. log.debug("DblSidedTool.on_mirror_geo() --> %s" % str(e))
  370. self.app.inform.emit("[WARNING_NOTCL] There is no Box object loaded ...")
  371. return
  372. xmin, ymin, xmax, ymax = bb_obj.bounds()
  373. px = 0.5 * (xmin + xmax)
  374. py = 0.5 * (ymin + ymax)
  375. fcobj.mirror(axis, [px, py])
  376. self.app.object_changed.emit(fcobj)
  377. fcobj.plot()
  378. self.app.inform.emit("[success] Excellon %s was mirrored..." % str(fcobj.options['name']))
  379. def on_mirror_geo(self):
  380. selection_index = self.geo_object_combo.currentIndex()
  381. # fcobj = self.app.collection.object_list[selection_index]
  382. model_index = self.app.collection.index(selection_index, 0, self.geo_object_combo.rootModelIndex())
  383. try:
  384. fcobj = model_index.internalPointer().obj
  385. except Exception as e:
  386. self.app.inform.emit("[WARNING_NOTCL] There is no Geometry object loaded ...")
  387. return
  388. if not isinstance(fcobj, FlatCAMGeometry):
  389. self.app.inform.emit("[ERROR_NOTCL] Only Gerber, Excellon and Geometry objects can be mirrored.")
  390. return
  391. axis = self.mirror_axis.get_value()
  392. mode = self.axis_location.get_value()
  393. if mode == "point":
  394. px, py = self.point_entry.get_value()
  395. else:
  396. selection_index_box = self.box_combo.currentIndex()
  397. model_index_box = self.app.collection.index(selection_index_box, 0, self.box_combo.rootModelIndex())
  398. try:
  399. bb_obj = model_index_box.internalPointer().obj
  400. except Exception as e:
  401. self.app.inform.emit("[WARNING_NOTCL] There is no Box object loaded ...")
  402. return
  403. xmin, ymin, xmax, ymax = bb_obj.bounds()
  404. px = 0.5 * (xmin + xmax)
  405. py = 0.5 * (ymin + ymax)
  406. fcobj.mirror(axis, [px, py])
  407. self.app.object_changed.emit(fcobj)
  408. fcobj.plot()
  409. self.app.inform.emit("[success] Geometry %s was mirrored..." % str(fcobj.options['name']))
  410. def on_point_add(self):
  411. val = self.app.defaults["global_point_clipboard_format"] % (self.app.pos[0], self.app.pos[1])
  412. self.point_entry.set_value(val)
  413. def on_drill_add(self):
  414. self.drill_values += (self.app.defaults["global_point_clipboard_format"] %
  415. (self.app.pos[0], self.app.pos[1])) + ','
  416. self.alignment_holes.set_value(self.drill_values)
  417. def on_toggle_pointbox(self):
  418. if self.axis_location.get_value() == "point":
  419. self.point_entry.show()
  420. self.box_combo.hide()
  421. self.box_combo_type.hide()
  422. self.add_point_button.setDisabled(False)
  423. else:
  424. self.point_entry.hide()
  425. self.box_combo.show()
  426. self.box_combo_type.show()
  427. self.add_point_button.setDisabled(True)
  428. def reset_fields(self):
  429. self.gerber_object_combo.setRootModelIndex(self.app.collection.index(0, 0, QtCore.QModelIndex()))
  430. self.exc_object_combo.setRootModelIndex(self.app.collection.index(1, 0, QtCore.QModelIndex()))
  431. self.geo_object_combo.setRootModelIndex(self.app.collection.index(2, 0, QtCore.QModelIndex()))
  432. self.box_combo.setRootModelIndex(self.app.collection.index(0, 0, QtCore.QModelIndex()))
  433. self.gerber_object_combo.setCurrentIndex(0)
  434. self.exc_object_combo.setCurrentIndex(0)
  435. self.geo_object_combo.setCurrentIndex(0)
  436. self.box_combo.setCurrentIndex(0)
  437. self.box_combo_type.setCurrentIndex(0)
  438. self.drill_values = ""