137 f_cover = self.form.frontCover.text()
138 f_cover = FreeCAD.Units.Quantity(f_cover).Value
139 cover = self.form.bottomCover.text()
140 cover = FreeCAD.Units.Quantity(cover).Value
141 lb_cover = self.form.l_sideCover.text()
142 lb_cover = FreeCAD.Units.Quantity(lb_cover).Value
143 rt_cover = self.form.r_sideCover.text()
144 rt_cover = FreeCAD.Units.Quantity(rt_cover).Value
145 orientation = self.form.orientation.currentText()
146 coverAlong = self.form.coverAlong.currentText()
147 diameter = self.form.diameter.text()
148 diameter = FreeCAD.Units.Quantity(diameter).Value
149 amount_check = self.form.amount_radio.isChecked()
150 spacing_check = self.form.spacing_radio.isChecked()
153 amount = self.form.amount.value()
154 rebar =
makeStraightRebar(f_cover, (coverAlong, cover), rt_cover, lb_cover, diameter,
True, amount, orientation, self.
SelectedObj, self.
FaceName)
156 spacing = self.form.spacing.text()
157 spacing = FreeCAD.Units.Quantity(spacing).Value
158 rebar =
makeStraightRebar(f_cover, (coverAlong, cover), rt_cover, lb_cover, diameter,
False, spacing, orientation, self.
SelectedObj, self.
FaceName)
161 amount = self.form.amount.value()
162 rebar =
editStraightRebar(self.
Rebar, f_cover, (coverAlong, cover), rt_cover, lb_cover, diameter,
True, amount, orientation, self.
SelectedObj, self.
FaceName)
164 spacing = self.form.spacing.text()
165 spacing = FreeCAD.Units.Quantity(spacing).Value
166 rebar =
editStraightRebar(self.
Rebar, f_cover, (coverAlong, cover), rt_cover, lb_cover, diameter,
False, spacing, orientation, self.
SelectedObj, self.
FaceName)
169 FreeCAD.ActiveDocument.recompute()
171 if signal == int(QtGui.QDialogButtonBox.Apply):
174 FreeCADGui.Control.closeDialog(self)
def editStraightRebar(Rebar, f_cover, coverAlong, rt_cover, lb_cover, diameter, amount_spacing_check, amount_spacing_value, orientation, structure=None, facename=None)
def accept(self, signal=None)
def makeStraightRebar(f_cover, coverAlong, rt_cover, lb_cover, diameter, amount_spacing_check, amount_spacing_value, orientation="Horizontal", structure=None, facename=None)