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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming a grounded part by removing the "lock" character breaks the assembly #12789

Closed
2 tasks done
Tracked by #12907
furgo16 opened this issue Mar 6, 2024 · 7 comments 路 Fixed by #12406
Closed
2 tasks done
Tracked by #12907

Renaming a grounded part by removing the "lock" character breaks the assembly #12789

furgo16 opened this issue Mar 6, 2024 · 7 comments 路 Fixed by #12406
Labels
Bug This issue or PR is related to a bug WB Assembly Related to the Integrated Assembly Workbench

Comments

@furgo16
Copy link
Contributor

furgo16 commented Mar 6, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

When adding a part as grounded, it gets a name with a "lock" (馃敀) character appended. If that character is removed, the assembly is broken.

Steps to reproduce:

  1. Rename the part in the Data properties panel, and remove the lock character
  2. Try to add a fixed joint => there is initially an error shown on the report panel:
    10:47:46  Running the Python command 'Assembly_CreateJointFixed' failed:
    Traceback (most recent call last):
      File "/snap/freecad/946/usr/Mod/Assembly/CommandCreateJoint.py", line 92, in Activated activateJoint(0)
      File "/snap/freecad/946/usr/Mod/Assembly/CommandCreateJoint.py", line 54, in activateJoint Gui.Control.showDialog(panel)
    
    Active task dialog found
  3. If then Undo is clicked to restore the name back, lots of new errors ensue:
    Captura de pantalla de 2024-03-06 10-50-52
    Shortened traceback here, but there are about a thousand instances of this repeated message:
    Active task dialog found<class 'RuntimeError'>
    10:48:47  Traceback (most recent call last):
    10:48:47    File "/snap/freecad/946/usr/Mod/Assembly/JointObject.py", line 1376, in moveMouse
    10:48:47      self.joint.ViewObject.Proxy.showPreviewJCS(False)
    10:48:47  RuntimeError: Object has been removed from document
    10:48:47  <class 'RuntimeError'>

There seems to be some logic relying on the name of the grounded part. If that is the case, the assumption that the name will not be changed by users seems rather unsafe.

Full version info

OS: Ubuntu Core 22 (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.36285 (Git) Snap 946
Build type: Release
Branch: main
Hash: b7a46805040662019c54089a96b3f43caf008e16
Python 3.10.12, Qt 5.15.10, Coin 4.0.0, Vtk 7.1.1, OCC 7.7.1
Installed mods: 
  * BIM 2021.12.0
  * Curves 0.6.23
  * ExplodedAssembly
  * BillOfMaterials 0.0.5.6
  * Ondsel-Lens 2024.1.22.01
  * Assembly4 0.50.7

Subproject(s) affected?

Assembly

Anything else?

File to reproduce =>
Box lock bug.zip

Code of Conduct

  • I agree to follow this project's Code of Conduct
@maxwxyz maxwxyz added Bug This issue or PR is related to a bug WB Assembly Related to the Integrated Assembly Workbench labels Mar 6, 2024
@maxwxyz
Copy link
Collaborator

maxwxyz commented Mar 6, 2024

Related:

@PaddleStroke this lock icon as part of the name seems to be conflicting.
@obelisk79 DWG: would there be a better option to display grounded parts an an assembly?

@obelisk79
Copy link
Contributor

It seems that moving that lock indicator to be a true icon rather than part of the name/label would resolve much of the unwanted behavior.

@PaddleStroke
Copy link
Contributor

The lock character has to go. I have not found the best solution yet.

@pierreporte
Copy link

Related to #12141? This is partially about not using the displayed text as the name of the part and replacing it with an attribute modified elsewhere.

@furgo16
Copy link
Contributor Author

furgo16 commented Mar 6, 2024

Related to #12141?

After reading, I don't think the two issues are related, other than they both refer to a component's name. Thanks everyone!

@adrianinsaval
Copy link
Member

I think we need to start thinking about displaying multiple icons for an item in the tree. Overlays are too crowded and hard to understand

@obelisk79
Copy link
Contributor

I think we need to start thinking about displaying multiple icons for an item in the tree. Overlays are too crowded and hard to understand

I'm not sure what you are trying to say, would you mind explaining what you mean so I can understand? Here or on discord?

@furgo16 furgo16 changed the title [Problem] Renaming a grounded part by removing the "lock" character breaks the assembly Renaming a grounded part by removing the "lock" character breaks the assembly Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This issue or PR is related to a bug WB Assembly Related to the Integrated Assembly Workbench
Projects
None yet
6 participants