Skip to content

Commit

Permalink
Simplified
Browse files Browse the repository at this point in the history
  • Loading branch information
alelom committed Dec 16, 2020
1 parent 3a0e898 commit f1c26c5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Rhinoceros_Engine/Convert/FromRhino.cs
Original file line number Diff line number Diff line change
Expand Up @@ -674,11 +674,13 @@ private static BHG.ICurve ToBHoMTrimCurve(this RHG.Curve curve)
public static BHG.IGeometry FromRhino(this object obj)
{
BHG.IGeometry geom = obj as BHG.IGeometry;
if (geom == null && obj != null)
Engine.Reflection.Compute.RecordError($"No conversion could be found between {obj.GetType().IToText()} and Rhino geometry.");
else

if (geom != null)
return geom;

if (obj != null)
Engine.Reflection.Compute.RecordError($"No conversion could be found between {obj.GetType().IToText()} and Rhino geometry.");

return null;
}

Expand Down

0 comments on commit f1c26c5

Please sign in to comment.