PathEngrave is not working right now. It seems that during some larger refactoring at here obj.StepDown was renamed to obj.OpStepDown at opSetDefaultValues but is still referred as obj.StepDown elsewhere. This generates an error when trying to create engraving op.
Fix is available here:
https://github.com/pekkaroi/FreeCAD/com ... 7ddd6d36f9
PathEngrave typo makes it not run?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: PathEngrave typo makes it not run?
The way it's supposed to work is that OpStepDown gets assigned the value that the OP calculates. The actual value used is defined by the expression assigned to StepDown (the default expression is just to use "OpStepDown"). So the current implementation is correct, or should be.roivai wrote: ↑Mon Dec 04, 2017 6:22 pm PathEngrave is not working right now. It seems that during some larger refactoring at here obj.StepDown was renamed to obj.OpStepDown at opSetDefaultValues but is still referred as obj.StepDown elsewhere. This generates an error when trying to create engraving op.
Fix is available here:
https://github.com/pekkaroi/FreeCAD/com ... 7ddd6d36f9
What is it that doesn't work?
Re: PathEngrave typo makes it not run?
When trying to add engrave op, I get this:
Code: Select all
Running the Python command 'Path_Engrave' failed:
Traceback (most recent call last):
File "/home/pekka/builds/FreeCAD/freecad-build2/Mod/Path/PathScripts/PathOpGui.py", line 957, in Activated
return Create(self.res)
File "/home/pekka/builds/FreeCAD/freecad-build2/Mod/Path/PathScripts/PathOpGui.py", line 923, in Create
obj = res.objFactory(res.name)
File "/home/pekka/builds/FreeCAD/freecad-build2/Mod/Path/PathScripts/PathEngrave.py", line 198, in Create
proxy = ObjectEngrave(obj)
File "/home/pekka/builds/FreeCAD/freecad-build2/Mod/Path/PathScripts/PathOp.py", line 152, in __init__
if self.setDefaultValues(obj):
File "/home/pekka/builds/FreeCAD/freecad-build2/Mod/Path/PathScripts/PathOp.py", line 276, in setDefaultValues
self.opSetDefaultValues(obj)
File "/home/pekka/builds/FreeCAD/freecad-build2/Mod/Path/PathScripts/PathEngrave.py", line 193, in opSetDefaultValues
obj.OpStepDown = obj.OpStartDepth.Value - obj.OpFinalDepth.Value
'FeaturePython' object has no attribute 'OpStepDown'
Re: PathEngrave typo makes it not run?
<strike>That's bad - it should be "OpToolDiameter" - my bad.</strike>
EDIT: not, it shouldn't be OpToolDiameter - which obviously should be the Tool diameter - doh!
The idea was that the constraint values are not being set by the OP anymore, unless the user wants to use that value (through an expression).
EDIT: not, it shouldn't be OpToolDiameter - which obviously should be the Tool diameter - doh!
The idea was that the constraint values are not being set by the OP anymore, unless the user wants to use that value (through an expression).
Re: PathEngrave typo makes it not run?
OK - I'm more confused than ever.
But good, you know now and my way of fixing it was totally wrong, so I silently remove that branch and try to study how SetupSheet works.
But good, you know now and my way of fixing it was totally wrong, so I silently remove that branch and try to study how SetupSheet works.
Re: PathEngrave typo makes it not run?
One of the problems is that assigning a value to StepDown can have "interesting" effects if there is also an expression assigned to the property. The way expressions work is that they assign a value to the property during "recompute". So depending an who set the value last (the expression or setDefaultValues) that's the value being used by the OP.
I think the best solution here would be to remove that line entirely and leave it up to the user to set a StepDown value or expression that gives the desired behaviour.
I think the best solution here would be to remove that line entirely and leave it up to the user to set a StepDown value or expression that gives the desired behaviour.
Re: PathEngrave typo makes it not run?
Removed the offending code: PR-1138