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

Part -> Origin -> Axis/Planes missing -> the Origin property "OriginFeatures" list is empty when adding a Part container in Realthunder, which breaks the model when opening the file in FreeCAD #436

Open
roberto-di-paolo opened this issue Jun 2, 2022 · 3 comments

Comments

@roberto-di-paolo
Copy link

roberto-di-paolo commented Jun 2, 2022

Hi,

Please have a look at this thread in the FreeCAD forum for details: [https://forum.freecadweb.org/viewtopic.php?f=44&t=68986]

Relates to below errors when opening a Realthunder20220430 file in the Master FreeCAD28909:

  1. "Origin" doesn't contain feature with role "XY_Plane" (or similar) -> scenario when something is attached to this Origin axis/planes (test file in the FreeCAD forum)
  2. "Recompute failed!" -> scenario when even nothing is attached (test file in the FreeCAD forum)

Root cause: Empty Origin property "OrginFeatures" list which works within Realthunder, but breaks the model in FreeCAD

<Property name="OriginFeatures" type="App::PropertyLinkList" status="201326592">
<LinkList count="0">
</LinkList>
</Property>

App.ActiveDocument.Origin.OriginFeatures.__add__ salvages such a file so it can also be opened in FreeCAD. However, this method seems only to work from within Realthunder and not from within FreeCAD:

<Property name="OriginFeatures" type="App::PropertyLinkList" status="201326593">
<LinkList count="6">
<Link value="X_Axis002"/>
<Link value="Y_Axis002"/>
<Link value="Z_Axis002"/>
<Link value="XY_Plane002"/>
<Link value="XZ_Plane002"/>
<Link value="YZ_Plane002"/>
</LinkList>
</Property>

Is this a bug or it is related to evolving future features?

FreeCAD:
OS: Ubuntu 20.04.4 LTS (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.28909 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 2084652)
Hash: 20846523c9d8219ec0fe33c499a64e700d2266b6
Python 3.9.12, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: English/United States (en_US)

Realthunder:
OS: Ubuntu 20.04.4 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 2022.430.28641 (Git) AppImage
Build type: Release
Branch: LinkStage3
Hash: a770454
Python version: 3.9.12
Qt version: 5.12.9
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United States (en_US)

@roberto-di-paolo roberto-di-paolo changed the title Part -> Origin -> Axis/Planes missing -> Property "OriginFeatures" list is empty when adding a part container in Realthunder, which breaks the model when opening the file in FreeCAD Part -> Origin -> Axis/Planes missing -> the Origin property "OriginFeatures" list is empty when adding a part container in Realthunder, which breaks the model when opening the file in FreeCAD Jun 2, 2022
@roberto-di-paolo roberto-di-paolo changed the title Part -> Origin -> Axis/Planes missing -> the Origin property "OriginFeatures" list is empty when adding a part container in Realthunder, which breaks the model when opening the file in FreeCAD Part -> Origin -> Axis/Planes missing -> the Origin property "OriginFeatures" list is empty when adding a Part container in Realthunder, which breaks the model when opening the file in FreeCAD Jun 2, 2022
@realthunder
Copy link
Owner

This is a feature of this branch to only create the origin features on demand.

You can turn off this feature to make the file compatible with upstream using the preference option as shown below

image

@roberto-di-paolo
Copy link
Author

roberto-di-paolo commented Jun 2, 2022

Thank you for your answer. Indeed, I tried it and yes, as you said.

Allow me to follow up for better understanding:

  1. This feels like a compatibility switch with some consequences - also regarding attachments. So there must be some benefits of going the route of having the OriginFeatures list empty?

  2. Are there any plans to have an official migration path for documents that went the one or the other route? Because, right now, changing the preferences has no effect on already existing objects. I will try to migrate some of my files manually with this OriginFeatures.__add__ hack, however, a somehow more robust approach would be highly appreciated.

  3. Maybe it is worth to consider a more verbose explication in the preferences what the consequences of this option are? -> legacy compatibility mode?

Anyway, thank you for what you are doing. I would probably not even be using FreeCAD at all if there was no Realthunder version. Your improvements are making a huge difference in usability!

realthunder added a commit that referenced this issue Jun 5, 2022
Added button 'Apply to existing objects' in 'Preferences -> General ->
Objects'

Related #436
@roberto-di-paolo
realthunder added a commit that referenced this issue Jun 21, 2022
Added button 'Apply to existing objects' in 'Preferences -> General ->
Objects'

Related #436
@discip
Copy link

discip commented Oct 5, 2022

@roberto-di-paolo
Please close this issue as your initial concern seems to have been resolved. 😊

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