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

App: Fix GeoFeature::getGlobalPlacement when rootObj is Link #18437

Merged
merged 1 commit into from
Jan 19, 2025

Conversation

kadet1090
Copy link
Member

@kadet1090 kadet1090 commented Dec 11, 2024

This fixes a case when in case of rootObj being Link placement was not calculated correctly due to not changing of the document. While for original use it was fine as this was mostly used in case where there was defined non-link root for general case Links can be root objects of the document.

partial fix for #18093

@PaddleStroke FYI

This could use backport.

This fixes a case when in case of rootObj being Link placement was not
calculated correctly due to not changing of the document. While for
original use it was fine as this was mostly used in case where there was
defined non-link root for general case Links can be root objects of the
document.
@github-actions github-actions bot added the Mod: Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD label Dec 11, 2024
@PaddleStroke
Copy link
Contributor

Indeed in assembly this case never happened. As the root was always assembly.
Looks good to me.

@maxwxyz maxwxyz added the Needs backport Needs backport to 1.0.1 label Dec 12, 2024
@Rexbas
Copy link
Contributor

Rexbas commented Dec 12, 2024

I can confirm that this partially fixes #18093, the Link2.FCStd in the zip file in that issue now works as expected with the align to selection tool and measure tool. However, the LinkTransform.FCStd does not work yet so let's keep the issue open when this is merged.

@kadet1090
Copy link
Member Author

@Rexbas I have found the issue:
image

Placement for the Pad (not Body), is different from origin. That shouldn't be the case. I think that correct way here would be to close your issue end open one that is describing the issue with bad Placements on body features, what do you think?

@Rexbas
Copy link
Contributor

Rexbas commented Dec 12, 2024

Hmm, interesting. Did you change an option to see the placement of the Pad in the property view? When I select the Pad in the tree view I don't see the placement in the property view...

@kadet1090
Copy link
Member Author

Did you change an option to see the placement of the Pad in the property view?

Yes, you need to check enable hidden (available in context menu) to see it.

@Rexbas
Copy link
Contributor

Rexbas commented Dec 12, 2024

Thank you, I don't think the placement of the Pad causes the Links with Link Transform = true to behave bad. The 90 degree angle of the Pad does not explain the 30 degree angle error when aligning to the Link.

Instead, I think when Link Transform = true, the Link "inherits" the global(?) placement of the referenced object and applies its own placement on top of it. Whereas a Link with Link Transform = false, only applies its own placement.

@Rexbas
Copy link
Contributor

Rexbas commented Jan 4, 2025

Hey @kadet1090, you still working on this? Lets get this merged because it is an improvement. It doesn't matter that it only half fixes the issue, we will fix the other half another day 😃

@kadet1090 kadet1090 marked this pull request as ready for review January 4, 2025 16:44
@kadet1090
Copy link
Member Author

Ah yes, I found even more problems with that implementation but in the end all were related to link transform so it seems safe to merge. Thanks for the ping!

@maxwxyz
Copy link
Collaborator

maxwxyz commented Jan 11, 2025

Is it now fully fixing #18093 after latest changes?

@Rexbas
Copy link
Contributor

Rexbas commented Jan 11, 2025

No, only part of it.

@maxwxyz maxwxyz added the approved PR has approved reviews label Jan 19, 2025
@chennes chennes merged commit 49b304a into FreeCAD:main Jan 19, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved PR has approved reviews Mod: Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD Needs backport Needs backport to 1.0.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants