Fix unwanted conversion from Rhino when expected input type is Rhino #610
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issues addressed by this PR
Closes #502
A few rare components are actually expecting a Rhino type. The
FromGoo
method was a bit too eager to convert from Rhino regardless of the expected type. The simple fix in this PR corrects that.Test files
https://burohappold.sharepoint.com/:u:/r/sites/BHoM/02_Current/12_Scripts/02_Pull%20Request/BHoM/Grasshopper_Toolkit/%23502-FromRhinoBug.gh?csf=1&web=1&e=ZMEIif
The top
FromRhino
is supposed to fail because it is expecting a Rhino sphere but receive a Rhino Brep instead. I appreciate this was the original focus of the issue but this is something to do with the Grasshopper Sphere component, not with the BHoM. TheFromRhino(object)
component works perfectly fine with this spherical Brep (and is showing in the Rhino viewport) though so all is good in the world 😉 .While checking this, I realised that other
FromRhino
components were not working either (e.g.FromRhino(Line)
). So this ended up being the focus on this PR.