147 f_cover = self.form.frontCover.text()
148 f_cover = FreeCAD.Units.Quantity(f_cover).Value
149 b_cover = self.form.bottomCover.text()
150 b_cover = FreeCAD.Units.Quantity(b_cover).Value
151 l_cover = self.form.l_sideCover.text()
152 l_cover = FreeCAD.Units.Quantity(l_cover).Value
153 r_cover = self.form.r_sideCover.text()
154 r_cover = FreeCAD.Units.Quantity(r_cover).Value
155 t_cover = self.form.topCover.text()
156 t_cover = FreeCAD.Units.Quantity(t_cover).Value
157 bentLength = self.form.bentLength.text()
158 bentLength = FreeCAD.Units.Quantity(bentLength).Value
159 bentAngle = self.form.bentAngle.value()
160 diameter = self.form.diameter.text()
161 diameter = FreeCAD.Units.Quantity(diameter).Value
162 rounding = self.form.rounding.value()
163 orientation = self.form.orientation.currentText()
164 amount_check = self.form.amount_radio.isChecked()
165 spacing_check = self.form.spacing_radio.isChecked()
168 amount = self.form.amount.value()
169 rebar =
makeBentShapeRebar(f_cover, b_cover, l_cover, r_cover, diameter, t_cover, bentLength, bentAngle, rounding,
True, amount, orientation, self.
SelectedObj, self.
FaceName)
171 spacing = self.form.spacing.text()
172 spacing = FreeCAD.Units.Quantity(spacing).Value
173 rebar =
makeBentShapeRebar(f_cover, b_cover, l_cover, r_cover, diameter, t_cover, bentLength, bentAngle, rounding,
False, spacing, orientation, self.
SelectedObj, self.
FaceName)
176 amount = self.form.amount.value()
177 rebar =
editBentShapeRebar(self.
Rebar, f_cover, b_cover, l_cover, r_cover, diameter, t_cover, bentLength, bentAngle, rounding,
True, amount, orientation, self.
SelectedObj, self.
FaceName)
179 spacing = self.form.spacing.text()
180 spacing = FreeCAD.Units.Quantity(spacing).Value
181 rebar =
editBentShapeRebar(self.
Rebar, f_cover, b_cover, l_cover, r_cover, diameter, t_cover, bentLength, bentAngle, rounding,
False, spacing, orientation, self.
SelectedObj, self.
FaceName)
182 if self.CustomSpacing:
183 rebar.CustomSpacing = self.CustomSpacing
184 FreeCAD.ActiveDocument.recompute()
186 if signal == int(QtGui.QDialogButtonBox.Apply):
189 FreeCADGui.Control.closeDialog(self)
def accept(self, signal=None)
def editBentShapeRebar(Rebar, f_cover, b_cover, l_cover, r_cover, diameter, t_cover, bentLength, bentAngle, rounding, amount_spacing_check, amount_spacing_value, orientation, structure=None, facename=None)
def makeBentShapeRebar(f_cover, b_cover, l_cover, r_cover, diameter, t_cover, bentLength, bentAngle, rounding, amount_spacing_check, amount_spacing_value, orientation="Bottom Left", structure=None, facename=None)