-
Notifications
You must be signed in to change notification settings - Fork 13
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
Result_Engine, Graphics_Engine: Add DisplayMeshResults, MapResults, and methods for GradientOptions #2355
Result_Engine, Graphics_Engine: Add DisplayMeshResults, MapResults, and methods for GradientOptions #2355
Conversation
Removing draft status now on these PRs as they have now been fully implemented, and with #2367 there is now, from my point of view, no reason not to merge these pull requests. Unit tests have been added for This will fail all checks until #2354 is merged - not sure what the proper way is to create PRs spanning multiple projects in the same repository. |
@IsakLarbornBH I feel this PR has become a bit mammoth looking at the commit history and the comments in the original issue regarding related PRs. It might be worth us having a catch up next sprint to go through this and get it ready so we can make sure this gets adequate reviewing resource from @IsakNaslundBh and others? 😄 |
@FraserGreenroyd For sure, though it was always going to be a pretty big one. Although most of the commits are tiny edits, or adding and then removing temporary workarounds I had to use before I had migrated everything, so the commit history is a bit inflated and not as bad as it may seem at first glance. Still though, definitely worth it to have a catch-up! This PR is going to take some work to review, and we should start early on that so we can be sure to get it merged in 4.2. |
Hand up here from me.
I say it is better to combine this branch with #2354 and close this PR. Also happy to be part of any discussion if deemed necessary to move this forward |
[PreviousVersion("4.2", "BH.Engine.Graphics.Query.AutoRange(BH.oM.Graphics.GradientOptions, System.Collections.Generic.IEnumerable<System.Double>)")] | ||
[PreviousVersion("4.2", "BH.Engine.Graphics.Query.CenteringOptions(BH.oM.Graphics.GradientOptions)")] | ||
[PreviousVersion("4.2", "BH.Engine.Graphics.Query.DefaultGradient(BH.oM.Graphics.GradientOptions, System.String)")] | ||
public static GradientOptions ApplyGradientOptions(this GradientOptions gradientOptions, IEnumerable<double> allValues = null, string defaultGradient = "BlueToRed") |
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.
Are there really 3 previous versions?
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.
Originally they were 3 separate methods doing three steps of the process, but they were made in a very particular way and essentially had to be used together in a certain order, so I merged them into one. I doubt anybody was calling them from the UI anyway, so versioning might not be necessary, but if they were it does actually make sense to version them all to this merged one since it's made in such a way as to not override manually set parameters.
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.
OK. Yes I have seen them in the StructuralEnginnering_Toolkit. Lets see of the versioning check likes that, I've not tried it before. If not the MessageForDeleted
in the versioning json file may be an option if they are not that widely used.
}*/ | ||
|
||
/***************************************************/ | ||
|
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.
Any good reason to keep this commented out private method? Or should it be cleaned out?
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.
This is @IsakNaslundBh who attempted to create a more optimised replacement for my calls to PropertyValue, but we never got it to work and when I read up about it later I got the impression that it wouldn't work in this case, though it was a while ago and I don't remember the details. Personally I haven't noticed the PropertyValue calls slowing this method down one bit, so I'd be happy to 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.
I think you can delete this. If the performance becomes a problem, a separate PR will target this.
@BHoMBot check core |
@IsakLarbornBH to confirm, check |
@BHoMBot check compliance |
40314f0
to
e33ffd1
Compare
Unfortunately had to locally rebase and force push this as well due to github complaining about conflicts. Rebase locally went with 0 hickups and no conflicts showing up. Not sure why Github did not like it, but hopefully will be fixed now. |
@BHoMBot check required |
@IsakNaslundBh to confirm, the following checks are now queued:
|
@BHoMBot check copyright-compliance |
@IsakNaslundBh to confirm, the following checks are now queued:
There are 12 requests in the queue ahead of you. |
@BHoMBot check dataset-compliance |
@IsakNaslundBh to confirm, the following checks are now queued:
There are 14 requests in the queue ahead of you. |
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-approving after testing again.
Local rebase did not throw up any conflicts, so think previous approvals are still safe as well!
FAO: @FraserGreenroyd The check they wish to have dispensation on is null-handling. If you are providing dispensation on this occasion, please reply with:
|
@BHoMBot this is a CI/CD instruction. I am authorising dispensation to be granted on check ref. 2717219160 |
@IsakNaslundBh I have now provided a passing check on reference |
@BHoMBot check ready-to-merge |
@IsakNaslundBh to confirm, the following checks are now queued:
|
NOTE: Depends on
Issues addressed by this PR
Closes #2318
Closes #2319
Result_Engine:
Adds DisplayMeshResults, which displays IMeshResults on IMeshes, and MapResults, which maps IResults to IBHoMObjects using common identifiers such as object IDs.
Graphics_Engine:
Adds methods for dealing with GradientOptions objects from BHoM/BHoM#1232.
All methods added have been adapted from methods that were previously in the StructuralEngineering_Toolkit.
Test files
A messy but functional test file can be found here. This will allow you to push a simple test model to Robot, execute an analysis and then pull the results. You can of course use it with your own Robot file and just pull the results from that, if you prefer.
MeshResult Test.zip
If you don't want to use Robot, here is a simpler test file with some internalised FEMeshes and results:
MeshResult Internalised.zip
Note that both of these contain the
DisplayMeshResultsWorkaround
method which has been removed since #2367 is now merged, fixing the issue that was being worked around.Unit tests have been added for DisplayMeshResults, which calls MapResults and all the GradientOptions methods.
Additional comments
This pull request is one in a series that should, to minimise disruption, be merged on the same day.