Skip to content

Commit

Permalink
Update BentShapeRebar.py
Browse files Browse the repository at this point in the history
should solve #203 und #210
  • Loading branch information
balrobs authored and amrit3701 committed Jun 1, 2024
1 parent b4b773f commit 469923f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions BentShapeRebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ def makeBentShapeRebar(
).BentLength = bentLength
rebar.setEditorMode("BentLength", 2)
rebar.addProperty(
"App::PropertyDistance",
"App::PropertyFloat",
"BentAngle",
"RebarDialog",
QT_TRANSLATE_NOOP("App::Property", "Bent Angle of rebar"),
Expand Down Expand Up @@ -682,13 +682,13 @@ def editBentShapeRebar(
def editDialog(vobj):
FreeCADGui.Control.closeDialog()
obj = _BentShapeRebarTaskPanel(vobj.Object)
obj.form.frontCover.setText(str(vobj.Object.FrontCover))
obj.form.l_sideCover.setText(str(vobj.Object.LeftCover))
obj.form.r_sideCover.setText(str(vobj.Object.RightCover))
obj.form.bottomCover.setText(str(vobj.Object.BottomCover))
obj.form.diameter.setText(str(vobj.Object.Diameter))
obj.form.topCover.setText(str(vobj.Object.TopCover))
obj.form.bentLength.setText(str(vobj.Object.BentLength))
obj.form.frontCover.setText(FreeCAD.Units.Quantity(vobj.Object.FrontCover, FreeCAD.Units.Length).UserString)
obj.form.l_sideCover.setText(FreeCAD.Units.Quantity(vobj.Object.LeftCover, FreeCAD.Units.Length).UserString)
obj.form.r_sideCover.setText(FreeCAD.Units.Quantity(vobj.Object.RightCover, FreeCAD.Units.Length).UserString)
obj.form.bottomCover.setText(FreeCAD.Units.Quantity(vobj.Object.BottomCover, FreeCAD.Units.Length).UserString)
obj.form.diameter.setText(FreeCAD.Units.Quantity(vobj.Object.Diameter, FreeCAD.Units.Length).UserString)
obj.form.topCover.setText(FreeCAD.Units.Quantity(vobj.Object.TopCover, FreeCAD.Units.Length).UserString)
obj.form.bentLength.setText(FreeCAD.Units.Quantity(vobj.Object.BentLength, FreeCAD.Units.Length).UserString)
obj.form.bentAngle.setValue(vobj.Object.BentAngle)
obj.form.rounding.setValue(vobj.Object.Rounding)
obj.form.orientationValue.setCurrentIndex(
Expand All @@ -701,7 +701,7 @@ def editDialog(vobj):
obj.form.spacing_radio.setChecked(True)
obj.form.amount.setDisabled(True)
obj.form.spacing.setEnabled(True)
obj.form.spacing.setText(str(vobj.Object.TrueSpacing))
obj.form.spacing.setText(FreeCAD.Units.Quantity(vobj.Object.TrueSpacing, FreeCAD.Units.Length).UserString)
# obj.form.PickSelectedFace.setVisible(False)
FreeCADGui.Control.showDialog(obj)

Expand Down

0 comments on commit 469923f

Please sign in to comment.