Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit mismatch on keyboard editing attachment angle #74

Open
regularfry opened this issue Jun 6, 2023 · 1 comment
Open

Unit mismatch on keyboard editing attachment angle #74

regularfry opened this issue Jun 6, 2023 · 1 comment
Labels
bug freecad bug bug needing a fix in FreeCAD itself

Comments

@regularfry
Copy link

If you:

  1. Make a body
  2. Pick an edge on that body
  3. click Attached Placement
  4. Select Z tangent to edge mode (or Inertial CS, as long as it's not Deactivated)
  5. Focus the Around x-axis input field, selecting all the text in the field
  6. 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.

@DeepSOIC DeepSOIC added the freecad bug bug needing a fix in FreeCAD itself label Jun 6, 2023
@DeepSOIC
Copy link
Owner

DeepSOIC commented Jun 6, 2023

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.

@DeepSOIC DeepSOIC added the bug label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug freecad bug bug needing a fix in FreeCAD itself
Projects
None yet
Development

No branches or pull requests

2 participants