-
Notifications
You must be signed in to change notification settings - Fork 102
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
model breaking after switching to freecad 1.0 #194
Comments
I guess we need to add some backward compatibility functions. Can you post the file, so we can work on this? |
gear_small.zip |
Do you also have the file where you didn't manually updated from teeth -> num_teeth (the origin file which worked with an older version of freecad.gears? The version you posted have already gears which are not processed by the gear-workbench anymore. I am sorry for this inconviniece. We made the change from teeth to num_teeth because of consistency, but i didn't expect it to make that much trouble. There are several issues:
|
if you pull the latest master (update the freecad.gears addon) the hole-properties shouldn't be a problem anymore. But I guess you will still run into the teeth->num_teeth issue. @wwmayer do you have an idea how to replace an obj in the tree by an updated obj. Nearly all the properties stay the same, only one read-only property needs to be updated as it is now not computed by an expression anymore. |
You don't have to replace objects in the tree. Instead the Python feature class has to implement the additional method Here some example code: This is the initial implementation of MyFeature.
Here you use it in a document and save it to a project file
Now you have decided to change the property name.
But if you load the old project file it still uses the old property
So, add the method onDocumentRestored to handle this case
Load the old project file again
|
Here are the original files created with FreeCAD v0.21 |
I have a model which i created with freecad 0.21 and an older version of fc.gears (can't remember which one i had, as this problem occured after updating to the latest version).
I then opened it in freecad 1.0 and updated all my workbenches (including this one)
Upon recomputing the model i got an error on all my gears:
I then notice that the property had changed name to num_teeth but the expression for dw remained
After manually updating the expression, i get lots of new errors which i don't understand
I tried uninstalling the workbench and installing again but no luck
The text was updated successfully, but these errors were encountered: