From f8f9566ef4f1f263d32224ce00d1e1f088c5d77f Mon Sep 17 00:00:00 2001 From: Alan Rynne Date: Wed, 22 Nov 2023 12:16:45 +0100 Subject: [PATCH] feat(gh): Add support for TextEntity conversion both ways. (#3057) TextEntity cannot be fetched from Rhino, but can be created through a Python/C# script. It also cannot be baked from Grasshopper, so users are left the responsibility of knowing what to do with these. Since they're convertible, you can always plug them into a "Deconstruct Speckle Object" to get their inner info. --- .../ConverterRhinoGhShared/ConverterRhinoGh.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Objects/Converters/ConverterRhinoGh/ConverterRhinoGhShared/ConverterRhinoGh.cs b/Objects/Converters/ConverterRhinoGh/ConverterRhinoGhShared/ConverterRhinoGh.cs index 876058992f..6911aba549 100644 --- a/Objects/Converters/ConverterRhinoGh/ConverterRhinoGhShared/ConverterRhinoGh.cs +++ b/Objects/Converters/ConverterRhinoGh/ConverterRhinoGhShared/ConverterRhinoGh.cs @@ -610,6 +610,7 @@ public bool CanConvertToSpeckle(object @object) case RH.Extrusion _: case RH.Brep _: case RH.NurbsSurface _: + case RH.TextEntity _: return true; #if GRASSHOPPER @@ -623,7 +624,6 @@ public bool CanConvertToSpeckle(object @object) case ViewInfo _: case InstanceDefinition _: case InstanceObject _: - case RH.TextEntity _: case RH.Dimension _: case Layer _: return true; @@ -657,6 +657,7 @@ public bool CanConvertToNative(Base @object) case Brep _: case Surface _: case Element1D _: + case Text _: return true; #if GRASSHOPPER case Interval _: @@ -676,7 +677,6 @@ public bool CanConvertToNative(Base @object) case GridLine _: case Alignment _: case Level _: - case Text _: case Dimension _: case Collection c when !c.collectionType.ToLower().Contains("model"): return true;