Lattice2
Lattice2 copied to clipboard
Unit mismatch on keyboard editing attachment angle
If you:
- Make a body
- Pick an edge on that body
- click
Attached Placement
- Select
Z tangent to edge
mode (orInertial CS
, as long as it's notDeactivated
) - Focus the
Around x-axis
input field, selecting all the text in the field - Press the
9
key (as though to type "90")
On 0.20.2 the Report view pops up with this message:
15:13:22 Traceback (most recent call last):
15:13:22 File "/Applications/FreeCAD.app/Contents/Resources/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py", line 265, in <lambda>
15:13:22 QtCore.QObject.connect(self.attachmentOffsetEdits[i], QtCore.SIGNAL('valueChanged(double)'), lambda val, i=i: self.attachmentOffsetChanged(i,val))
15:13:22 File "/Applications/FreeCAD.app/Contents/Resources/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py", line 394, in attachmentOffsetChanged
15:13:22 roll = Q(self.form.attachmentOffsetRoll.text()).getValueAs(deg)
15:13:22 ValueError: Unit mismatch
You get another backtrace in the Report view for each keypress.
I've checked whether anything similar happens for, for instance, attaching a datum plane to an edge, and it doesn't. This seems to be specific to Lattice2 in that other instances of the attachment editor don't seem to check for units on each keypress (or if they do, they swallow the error).
Now, on a relatively recent FreeCAD build from the master
branch (f0560ac2
if you want to play along) it's worse, because this interacts badly with the new so-called "Non-Intrusive" notifications. If I do the same on that build, I get both the report view popping up, and a new error window which, because it's trying to show repeated backtraces, is big enough to cover half the screen, completely obscuring the combo view in its default location and, on my screen, the body itself in the 3d view. And because the notification display is supposed to go away on its own, there's no affordance to get rid of it. It's extremely jarring.
yep, i know, the unit police is acting too harsh here. It is not entirely Lattice2-specific, i will have to make a fix into FreeCAD itself. I can monkey-patch it. Sorry, i can't promise to fix it soon.