-
Notifications
You must be signed in to change notification settings - Fork 35
Steel hall development #37
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
…Software/RFEM_Python_Client into ExamplesAndDocumentation
Examples/Hall/hall.py
Outdated
| i = 1 | ||
| while i <= n-1: | ||
| j = (i-1) * 5 | ||
| Member(int(4*n+i), MemberType.TYPE_BEAM, j+2, j+7, 0.0, 2, 2) |
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.
If we change the "n" input to integer, then the data type conversion here becomes redundant and we can remove it. Same comment applies to line 97
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.
done
Examples/Hall/hall.py
Outdated
| #vertical bracing | ||
| # add a question about repeating in every block, one yes one no, only beginning and end | ||
|
|
||
| BracingV = input('Would you like to include vertical bracing?\n') |
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.
Possibly add: 'Would you like to include vertical bracing? (Y/N)' so that the user knows what to input. German user may say, 'ja' for example which won't work
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.
done
| # add a question about repeating in every block, one yes one no, only beginning and end | ||
|
|
||
| BracingV = input('Would you like to include vertical bracing?\n') | ||
| if BracingV.lower() == 'yes' or BracingV.lower() == 'y': |
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.
Clever use of .lower()! :)
Examples/Hall/hall.py
Outdated
|
|
||
| BracingV = input('Would you like to include vertical bracing?\n') | ||
| if BracingV.lower() == 'yes' or BracingV.lower() == 'y': | ||
| BracingV_C1 = input('Would you like to repeat a vertical bracing in every block?\n') |
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.
Same comment as line 103 Include: "(Y/N)" at input end
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.
done
| BracingV = input('Would you like to include vertical bracing?\n') | ||
| if BracingV.lower() == 'yes' or BracingV.lower() == 'y': | ||
| BracingV_C1 = input('Would you like to repeat a vertical bracing in every block?\n') | ||
| if BracingV_C1.lower() == 'yes' or BracingV_C1.lower() == 'y': |
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.
Same comment as line 103 Include: "(Y/N)" at input end
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.
done
Examples/Hall/hall.py
Outdated
| Section (3, 'IPE 80',3) | ||
| i = 1 | ||
| while i <= n-1: | ||
| k = int(n*4+(n-1)*2) |
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.
If we change the "n" input to integer, then the data type conversion here becomes redundant and we can remove 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.
done
Examples/Hall/hall.py
Outdated
| i = 1 | ||
| while i <= n-1: | ||
| k = int(n*4+(n-1)*2) | ||
| if i == 1 or i == int(n-1): |
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.
If we change the "n" input to integer, then the data type conversion here becomes redundant and we can remove 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.
done
Examples/Hall/hall.py
Outdated
| Member(k+4+4*(i-1), MemberType.TYPE_TENSION, (i-1)*5+4, (i-1)*5+10, 0.0, 3, 3) | ||
| print(k+1+4*(i-1), k+2+4*(i-1), k+3+4*(i-1), k+4+4*(i-1)) | ||
| i += 1 | ||
| BracingV_C3 = input('Would you like to repeat a vertical bracing in even/odd blocks?\n') # MAKE IT MORE GENERAL! |
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.
Include "(Y/N)" guidance for user
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.
done
Examples/Hall/hall.py
Outdated
| Material (3, 'EN AW-3004 H14') | ||
| Section (3, 'IPE 80',3) | ||
| i = 1 | ||
| j = int(4*n + 3*(n-1)) |
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.
If we change the "n" input to integer, then the data type conversion here becomes redundant and we can remove 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.
done
Examples/Hall/hall.py
Outdated
| j = int(4*n + 3*(n-1)) | ||
| while i <= n-1: | ||
| if i% 2 != 0: | ||
| k = int(n*4+(n-1)*2) |
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.
If we change the "n" input to integer, then the data type conversion here becomes redundant and we can remove 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.
done
Examples/Hall/hall.py
Outdated
| #horizontal bracing | ||
| # add a question about repeating in every block, one yes one no, only beginning and end | ||
|
|
||
| member_count = int(n*4+(n-1)*2) |
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.
If we change the "n" input to integer, then the data type conversion here becomes redundant and we can remove 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.
done
Examples/Hall/hall.py
Outdated
| member_count = int(n*4+(n-1)*2) | ||
| BracingH = input('Would you like to include horizontal bracing?\n') | ||
| if BracingV.lower() == 'yes' or BracingV.lower() == 'y': | ||
| member_count += (int(n)-1)*4 |
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.
If we change the "n" input to integer, then the data type conversion here becomes redundant and we can remove 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.
done
| i = 1 | ||
| while i <= n-1: | ||
| j = (i-1) * 5 | ||
| Member(int(member_count+1+4*(i-1)), MemberType.TYPE_BEAM, j+2, j+8, 0.0, 3, 3) |
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.
If we change the "n" input to integer, then the data type conversion here becomes redundant and we can remove it. Applies to all proceeding lines of code
Examples/Hall/hall.py
Outdated
| Member(k+4+4*(i-1), MemberType.TYPE_TENSION, (i-1)*5+4, (i-1)*5+10, 0.0, 3, 3) | ||
| print(k+1+4*(i-1), k+2+4*(i-1), k+3+4*(i-1), k+4+4*(i-1)) | ||
| i += 1 | ||
| BracingV_C2 = input('Would you like to repeat a vertical bracing only in the first and last block?\n') |
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.
Include "(Y/N)" guidance for user
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.
done
Examples/Hall/hall.py
Outdated
| # add a question about repeating in every block, one yes one no, only beginning and end | ||
|
|
||
| member_count = int(n*4+(n-1)*2) | ||
| BracingH = input('Would you like to include horizontal bracing?\n') |
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.
Include "(Y/N)" guidance for user
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.
done
| print(int(member_count+1+4*(i-1)),int(member_count+2+4*(i-1)),int(member_count+3+4*(i-1)),int(member_count+4+4*(i-1))) | ||
| i += 1 | ||
|
|
||
| print("Preparing...") |
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.
Nothing is being executed to RFEM between the two print statements, is the "preparing" necessary?
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.
I was thinking as a sign to the user that the script is being processed..what do you think?
|
|
||
| print("Preparing...") | ||
| print('Ready!') | ||
| clientModel.service.finish_modification() |
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.
Should we run an analysis? Even if it's just self-weight
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.
not sure, let's discuss it
| i = 1 | ||
| j = int(4*n + 3*(n-1)) | ||
| while i <= n-1: | ||
| if i% 2 != 0: |
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.
Clever! :)
|
|
||
| if __name__ == '__main__': | ||
|
|
||
| l = float(input('Length of the clear span in m: ')) |
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.
Bad indentation. If loop indentation should rearrange.
|
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) |
No description provided.