33__Name__ = 'BoxCreator'
44__Comment__ = 'Creates a box with interlocked notches'
55__Author__ = 'christi'
6- __Version__ = '1.3.2 '
7- __Date__ = '2020-02-08 '
6+ __Version__ = '1.3.3 '
7+ __Date__ = '2020-03-10 '
88__License__ = 'LGPL-3.0-or-later'
9- __Web__ = 'https://github.com/chbergmann/boxcreator '
9+ __Web__ = 'https://forum.freecadweb.org/viewtopic.php?t=31795 '
1010__Wiki__ = ''
1111__Icon__ = ''
1212__Help__ = 'Try it out and play with it. It should be self explanatory'
@@ -20,7 +20,7 @@ import os
2020
2121import FreeCAD as app
2222import FreeCADGui as gui
23- from PySide import QtGui
23+ from PySide import QtGui # Special FreeCAD's PySide.
2424from FreeCAD import Vector
2525
2626from boxcreator import boxcreator
@@ -73,6 +73,8 @@ class BoxcreatorDialog():
7373 gui.Selection.clearSelection()
7474 gui.Selection.addSelection(box)
7575 gui.SendMsgToActiveView('ViewFit')
76+ del self.widget
77+ del self.form
7678
7779 def compartmentX(self):
7880 self.createCompartment(Vector(1,0,0))
@@ -95,7 +97,7 @@ class BoxcreatorDialog():
9597 self.form.checkBoxBack.isChecked()]
9698 offset = self.form.compartmentOffset.value()
9799 boxsize = Vector(self.form.doubleSpinBoxWidth.value(), self.form.doubleSpinBoxLength.value(), self.form.doubleSpinBoxHeight.value())
98- compartment = boxcreator.create_compartment(box, direction, offset, materialWidth, notchWidth, drawSides, boxsize, app.activeDocument() )
100+ compartment = boxcreator.create_compartment(box, direction, offset, materialWidth, notchWidth, drawSides, boxsize)
99101 if compartment:
100102 gui.Selection.clearSelection()
101103 gui.Selection.addSelection(compartment)
0 commit comments