diff --git a/ConnectorRhino/ConnectorRhino/ConnectorRhinoShared/UI/ConnectorBindingsRhino.Receive.cs b/ConnectorRhino/ConnectorRhino/ConnectorRhinoShared/UI/ConnectorBindingsRhino.Receive.cs index 1ab4cd80f6..bf808fad9a 100644 --- a/ConnectorRhino/ConnectorRhino/ConnectorRhinoShared/UI/ConnectorBindingsRhino.Receive.cs +++ b/ConnectorRhino/ConnectorRhino/ConnectorRhinoShared/UI/ConnectorBindingsRhino.Receive.cs @@ -37,6 +37,7 @@ public override async Task ReceiveStream(StreamState state, Progres converter.ReceiveMode = state.ReceiveMode; // set converter settings + bool settingsChanged = CurrentSettings != state.Settings; CurrentSettings = state.Settings; var settings = GetSettingsDict(CurrentSettings); converter.SetConverterSettings(settings); @@ -44,7 +45,7 @@ public override async Task ReceiveStream(StreamState state, Progres Commit commit = await ConnectorHelpers.GetCommitFromState(state, progress.CancellationToken); state.LastCommit = commit; - if (SelectedReceiveCommit != commit.id) + if (SelectedReceiveCommit != commit.id || settingsChanged) // clear storage if receiving a new commit, or if settings have changed!! { ClearStorage(); SelectedReceiveCommit = commit.id; @@ -69,7 +70,6 @@ public override async Task ReceiveStream(StreamState state, Progres () => { RhinoDoc.ActiveDoc.Notes += "%%%" + commitLayerName; // give converter a way to access commit layer info - // create preview objects if they don't already exist if (Preview.Count == 0) { @@ -335,7 +335,7 @@ ApplicationObject CreateApplicationObject(Base current, string containerId) ApplicationObject NewAppObj() { var speckleType = current.speckle_type - .Split(new[] { ':' }, StringSplitOptions.RemoveEmptyEntries) + .Split(new[] { '.' }, StringSplitOptions.RemoveEmptyEntries) .LastOrDefault(); return new ApplicationObject(current.id, speckleType) diff --git a/Objects/Converters/ConverterRhinoGh/ConverterRhinoGhShared/ConverterRhinoGh.BuiltElements.cs b/Objects/Converters/ConverterRhinoGh/ConverterRhinoGhShared/ConverterRhinoGh.BuiltElements.cs index 396ab7495a..785db3d1fc 100644 --- a/Objects/Converters/ConverterRhinoGh/ConverterRhinoGhShared/ConverterRhinoGh.BuiltElements.cs +++ b/Objects/Converters/ConverterRhinoGh/ConverterRhinoGhShared/ConverterRhinoGh.BuiltElements.cs @@ -17,6 +17,14 @@ namespace Objects.Converter.RhinoGh; public partial class ConverterRhinoGh { + // parameters + public Tuple ParameterToNative(RV.Parameter parameter) + { + var name = parameter.name; + var val = parameter.value?.ToString() ?? string.Empty; + return new Tuple(name, val); + } + // views public View3D ViewToSpeckle(ViewInfo view) { diff --git a/Objects/Converters/ConverterRhinoGh/ConverterRhinoGhShared/ConverterRhinoGh.Other.cs b/Objects/Converters/ConverterRhinoGh/ConverterRhinoGhShared/ConverterRhinoGh.Other.cs index 435e45de7d..5db065c0d3 100644 --- a/Objects/Converters/ConverterRhinoGh/ConverterRhinoGhShared/ConverterRhinoGh.Other.cs +++ b/Objects/Converters/ConverterRhinoGh/ConverterRhinoGhShared/ConverterRhinoGh.Other.cs @@ -24,7 +24,7 @@ namespace Objects.Converter.RhinoGh; public partial class ConverterRhinoGh { - // display, render, and parameters + // display, render public RH.ObjectAttributes DisplayStyleToNative(DisplayStyle display) { var attributes = new RH.ObjectAttributes(); @@ -241,13 +241,6 @@ public Other.RenderMaterial RenderMaterialToSpeckle(Rhino.Render.RenderMaterial return renderMaterial; } - public Tuple ParameterToNative(Objects.BuiltElements.Revit.Parameter parameter) - { - var name = parameter.name; - var val = parameter.value.ToString(); - return new Tuple(name, val); - } - // hatch public Hatch[] HatchToNative(Other.Hatch hatch) { diff --git a/Objects/Converters/ConverterRhinoGh/ConverterRhinoGhShared/ConverterRhinoGh.cs b/Objects/Converters/ConverterRhinoGh/ConverterRhinoGhShared/ConverterRhinoGh.cs index 491862f616..97539977cd 100644 --- a/Objects/Converters/ConverterRhinoGh/ConverterRhinoGhShared/ConverterRhinoGh.cs +++ b/Objects/Converters/ConverterRhinoGh/ConverterRhinoGhShared/ConverterRhinoGh.cs @@ -670,7 +670,6 @@ public bool CanConvertToNative(Base @object) #else // This types are not supported in GH! case Pointcloud _: - case Collection _: case ModelCurve _: case DirectShape _: case View3D _: @@ -679,7 +678,9 @@ public bool CanConvertToNative(Base @object) case Level _: case Text _: case Dimension _: + case Collection c when !c.collectionType.ToLower().Contains("model"): return true; + #endif default: