-
Notifications
You must be signed in to change notification settings - Fork 35
Ondrej Michal Add options to dialog #71
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
Conversation
to create model or use existing one, to delete results, and to reset model. Added Model class to initModel to be able to first load models from RFEM and then offer them in dialogue. clientModel is now class variable of Model class.
| if __name__ == '__main__': | ||
| l = float(input('Length of the cantilever in m: ')) | ||
| f = float(input('Force in kN: ')) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding Model class definition
Model(model_name='Demo1')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solved
| input('Press Enter to exit...') | ||
| sys.exit() | ||
|
|
||
| # RFEM 6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding Model class definition
Model(model_name='Cantilever')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solved
Examples/DesignSituations_Test.py
Outdated
| from RFEM.LoadCasesAndCombinations.designSituation import * | ||
|
|
||
| if __name__ == '__main__': | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding Model Class definition
Model(model_name='DesignSituations_Test')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corrected.
Error: Invalid design situation type.' still persist. Out of the scope of this code review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Björn is taking care of that error. @Bjoern-Steinhagen
| if __name__ == '__main__': | ||
| clientModel.service.begin_modification('new') | ||
| Model.clientModel.service.begin_modification('new') | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding Model Class definition
Model(model_name='FreeLoad_test')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solved
Examples/GlobalParameters_Test.py
Outdated
| from RFEM.initModel import * | ||
|
|
||
| if __name__ == '__main__': | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding Model Class definition
Model(model_name = 'GlobalParameters_test'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solved
suds.WebFault: Server raised fault: 'Enumeration item 'DEFINITION_TYPE_OPTIMIZATION' not found.' still persist.
RFEM/BasicObjects/material.py
Outdated
| from RFEM.initModel import clearAtributes, Model | ||
|
|
||
| class Material(): | ||
| class Material(Model): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to inherit Model class. Importing is enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inheritance removed
| clientModel = cModel | ||
| class Model(): | ||
| clientModel = None | ||
| def __init__(self, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solved
| cModel.service.reset() | ||
|
|
||
| Model.clientModel = cModel | ||
| print('Geometry...') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print("Ready!") looks better than print('Geometry...'). Should we discuss it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well we can print what ever we agree on. By this messages I wanted to comunicate to user, which part of script is running. If Ready seems more appropriate, we can change it. Maybe we should vote on things like that. There is no 100% correct solution.
UnitTests/test_basicObjects.py
Outdated
|
|
||
|
|
||
| def test_material(): | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Model(model_name = 'basicobjects_test')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solved
main.py
Outdated
| clientModel.service.begin_modification('new') | ||
| print('Geometry...') | ||
|
|
||
| Model(hall_width_L, hall_height_h_o, hall_height_h_m, number_frames, frame_spacing, new_model, model_name, delete, reset) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acc. to previous suggestions, line 28 should be change as;
Model(new_model, model_name, delete, reset)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solved
pull request #71
dogukankaratas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Conflicts should be solven.
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |

US-8506: Web Services: Python: Improvement in initialization of connection with RFEM6
Description:
Purpose of this task is to add new options to input dialogue to enable use already existing models in RFEM or create new one. Edit name of the new model. If existing one is selected then enable deleting results and reset of the model. This envolves changes in initModle.py file to enable loading of existing models befor showing dialogue and then effective use of clientModel ( by creating Model class).