FreeCAD-Reinforcement
FreeCAD-Reinforcement copied to clipboard
Port `BentShape` rebar to QT5
After selecting face of structure element, when user click on BentShape
rebar button, it gives below error:
Running the Python command 'Arch_Rebar_BentShape' failed:
Traceback (most recent call last):
File "/Users/amritpal/Library/Preferences/FreeCAD/Mod/FreeCAD-Reinforcement/RebarTools.py", line 120, in Activated
BentShapeRebar.CommandBentShapeRebar()
File "/Users/amritpal/Library/Preferences/FreeCAD/Mod/FreeCAD-Reinforcement/BentShapeRebar.py", line 362, in CommandBentShapeRebar
FreeCADGui.Control.showDialog(_BentShapeRebarTaskPanel())
File "/Users/amritpal/Library/Preferences/FreeCAD/Mod/FreeCAD-Reinforcement/BentShapeRebar.py", line 116, in __init__
self.form.orientation.addItems(["Bottom", "Top", "Right", "Left"])
'builtin_function_or_method' object has no attribute 'addItems'Traceback (most recent call last):
This error because of PyQt5. In PyQt5 orientation
object has no addItems
attribute. You may take help of other rebars to fix this.
FreeCAD detail:
OS: macOS 10.14
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.Unknown
Build type: Release
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/India (en_IN)
This error because of PyQt5. In PyQt5
orientation
object has noaddItems
attribute. You may take help of other rebars to fix this.
This issue has been fixed in commit https://github.com/SurajDadral/FreeCAD-Reinforcement/commit/d006c0aea3482b86efee1bb610e80f360addbcec
But there are still other errors, which I will try to fix.
@SurajDadral You probably also need to update in the BentShapeRebar.ui
file. Change orientation
to orientationValue
.
@SurajDadral You probably also need to update in the
BentShapeRebar.ui
file. Changeorientation
toorientationValue
.
BentShapeRebar.ui
file already have orientationValue
instead of orientation
.
One more issue has been solved and now it seems that BentShapeRebar is working fine. Here is the PR: https://github.com/amrit3701/FreeCAD-Reinforcement/pull/11
One issue is still there: sketch.addGeometry(Part.LineSegment(points[1], points[2]), False) <class 'Part.OCCError'>: Both points are equal
And is also discussed on FreeCAD at: https://forum.freecadweb.org/viewtopic.php?t=22760&start=220#p186068