-
Notifications
You must be signed in to change notification settings - Fork 10
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
Allow Multiple Logic Requests #474
base: develop
Are you sure you want to change the base?
Conversation
…hsets of IBHoMObjects
… RECURSION AND REFLECTION
… adjust recursion calls
@Chrisshort92 , @peterjamesnugent , @IsakNaslundBh, I've had the chance to finish the pull request for issue #465. Also for this one, a pull request to be reviewed in the next sprint moving forward BHoM 7.4, not now ;) Thanks guys! ;) |
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.
Functionality tested with files provided, all working as expected. Approved for merge
@BHoMBot Check required |
@Chrisshort92 to confirm, the following actions are now queued:
There are 39 requests in the queue ahead of you. |
Turned the getEtabsId() method name (from the DynamicComparer private class) into GetEtabsId(), based on BHoM method's naming convention.
@Chrisshort92 , I've gone through the code compliance checks above and I've modified the code as per following commit 655b110 |
@BHoMBot Check required |
@GCRA101 to confirm, the following actions are now queued:
There are 85 requests in the queue ahead of you. |
The check |
The check |
The check |
The check |
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.
Re-tested code changes from @GCRA101, functionality working as expected, approved for merge.
@peterjamesnugent to confirm, the following actions are now queued:
There are 19 requests in the queue ahead of you. |
The check |
The check |
The check |
@peterjamesnugent, |
@BHoMBot check required |
@GCRA101 to confirm, the following actions are now queued:
|
@BHoMBot check copyright-compliance |
@GCRA101 to confirm, the following actions are now queued:
There are 28 requests in the queue ahead of you. |
@BHoMBot check required |
@GCRA101 to confirm, the following actions are now queued:
There are 14 requests in the queue ahead of you. |
Please be advised that the check with reference 32166477143 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 1318 additional annotations waiting, made up of 1318 errors and 0 warnings. |
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.
Recurring theme of unchanged files popping up in the PRs, can we make sure they are removed.
On the DynamicComparer
I feel like we can just use the comparers defined in the adatper rather than trying to rewrite those.
// For physical objects, use Id as it is never null | ||
if (objType == typeof(Node) || objType == typeof(Bar) || objType == typeof(Panel) || objType == typeof(RigidLink) || objType == typeof(FEMesh)) | ||
return GetEtabsId(obj1).Id.ToString() == GetEtabsId(obj2).Id.ToString(); | ||
// For all other items, use Name as it is never null | ||
if (objType == typeof(ISectionProperty) || objType == typeof(IMaterialFragment) || objType == typeof(ISurfaceProperty) || | ||
objType == typeof(Loadcase) || objType == typeof(LoadCombination) || objType == typeof(ILoad) || objType == typeof(LinkConstraint) || | ||
objType == typeof(Level) || objType == typeof(Grid)) | ||
return obj1.Name.ToString() == obj2.Name.ToString(); |
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.
We already have all these comparers defined in the Adapter - can we not make sure of that rather than rewriting it here:
ETABS_Toolkit/Etabs_Adapter/Types/Comparer.cs
Lines 57 to 62 in edc11e0
{typeof(Node), new BH.Engine.Structure.NodeDistanceComparer(3) }, | |
{typeof(Bar), new BH.Engine.Structure.BarEndNodesDistanceComparer(3) }, | |
{typeof(ISectionProperty), new NameOrDescriptionComparer() }, | |
{typeof(IMaterialFragment), new NameOrDescriptionComparer() }, | |
{typeof(ISurfaceProperty), new NameOrDescriptionComparer() }, | |
{typeof(BH.oM.Adapters.ETABS.Elements.Diaphragm), new BHoMObjectNameComparer() }, |
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.
@peterjamesnugent, thanks for the comment.
It would be great to reuse it yeah.
Only thing is that there are some objects that are not dealt with by the Adapter Comparer (e.g. Level, FEMesh,LoadCase...) - see screenshot below.
Can we add them in 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.
Yes, I don't think that's an issue adding them to the Comparer.cs
- most of them will be NameOrDescriptionComparer()
anyway.
Can you add to the test script, trying to push two objects with the same name for each type you add (just to test that we are not breaking anything).
@BHoMBot check installer |
@Chrisshort92 to confirm, the following actions are now queued:
|
Issues addressed by this PR
Closes #465
ETABS Toolkit now can allow to pull objects from ETABS based on FilterRequests, SelectedRequest and multiple LogicalRequests.
Test files
Grasshopper File
https://burohappold.sharepoint.com/:u:/r/sites/BHoM/02_Current/12_Scripts/02_Pull%20Request/BHoM/ETABS_Toolkit/%23474-AllowMultipleLogicRequests/[TestScript.gh](https://burohappold.sharepoint.com/:u:/r/sites/BHoM/02_Current/12_Scripts/02_Pull%20Request/BHoM/ETABS_Toolkit/%23474-AllowMultipleLogicRequests/TestScript.gh?csf=1&web=1&e=93kD0Q)?csf=1&web=1&e=93kD0Q
ETABS File
https://burohappold.sharepoint.com/:u:/r/sites/BHoM/02_Current/12_Scripts/02_Pull%20Request/BHoM/ETABS_Toolkit/%23474-AllowMultipleLogicRequests/Test%20ETABS%20Model.EDB?csf=1&web=1&e=IRUEie
Changelog