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

"Send To Python Console" from tree view sends wrong information for some elements of the linked part #42

Closed
abetis opened this issue Sep 11, 2020 · 8 comments

Comments

@abetis
Copy link

abetis commented Sep 11, 2020

Don't know if it's related to links and can't explain why the feature works for most of the entries, but not for "LCS_Origin" and "Variables"...

I use Assembly4 file where main document name is "roller", which have linked part named "m4x12_allen_screw_1".
The "roller" has child objects:
Parts - empty group
Model - part object that has all the linked objects in that entry

Inside the "Model" there are:
Origin - coordinate
LCS_Origin - coordinate
Constraints - group
Variables
m4x12_allen_screw_1 - link to m4x12_allen_screw document

inside the "m4x12_allen_screw_1" there is the same structure as in the "Model"...

If I right click and select "Send To Python Console" option on different items in the tree, I would expect to see matching code appearing in the python code, which is ok for all the entries, but not for the m4x12_allen_screw_1::LCS_Origin for some reason.

Right click on Model produce:

  • "obj = App.getDocument("roller").getObject("Model")" --> good
    Right click on Model::Variables produce:
  • "obj = App.getDocument("roller").getObject("Variables")" --> good
    Right click on Model::LCS_Origin produce:
  • "obj = App.getDocument("roller").getObject("LCS_Origin")" --> good
    Right click on Model::m4x12_allen_screw_1 produce:
  • "obj = App.getDocument("roller").getObject("m4x12_allen_screw_1")" --> good
    Right click on m4x12_allen_screw_1::PartBody (imported STEP) produce:
  • "obj = App.getDocument("m4x12_allen_screw").getObject("Part__Feature")" --> good
    Right click on m4x12_allen_screw_1::Variables produce:
  • "obj = App.getDocument("roller").getObject("Variables")" --> bad
    Right click on m4x12_allen_screw_1::LCS_Origin produce:
  • "obj = App.getDocument("roller").getObject("LCS_Origin")" --> bad

OS: Ubuntu 18.04.5 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22292 (Git)
Build type: Release
Branch: master
Hash: f09d48d
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

@realthunder
Copy link
Owner

Can you post your testing file?

@abetis
Copy link
Author

abetis commented Sep 12, 2020

I've prepared some files to separate from a larger project.
The ZIP include the needed files, open the test.FCStd, it links to the shaft and spacer.
test.zip

@realthunder
Copy link
Owner

This bug was already fixed in my branch. But you are using the upstream FreeCAD. I have just submitted a PR there.

@abetis
Copy link
Author

abetis commented Sep 12, 2020

Thanks

@luzpaz
Copy link
Collaborator

luzpaz commented Jan 14, 2022

@realthunder this ticket can be closed

@luzpaz
Copy link
Collaborator

luzpaz commented Jan 18, 2022

@abetis care to close this ticket?

@abetis
Copy link
Author

abetis commented Jan 18, 2022 via email

@luzpaz
Copy link
Collaborator

luzpaz commented Jan 18, 2022

@abetis please close it, i have no permissions to 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants