From 0a0a1358cb0dd6c9d20e72783a13a89e95c33ee6 Mon Sep 17 00:00:00 2001 From: Dimitrie Stefanescu Date: Fri, 29 Nov 2024 17:38:03 +0000 Subject: [PATCH 1/2] fix: forces detail level to fine for specific elements --- .../Helpers/DisplayValueExtractor.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Converters/Revit/Speckle.Converters.RevitShared/Helpers/DisplayValueExtractor.cs b/Converters/Revit/Speckle.Converters.RevitShared/Helpers/DisplayValueExtractor.cs index c2fbc6fd9..20f840dbc 100644 --- a/Converters/Revit/Speckle.Converters.RevitShared/Helpers/DisplayValueExtractor.cs +++ b/Converters/Revit/Speckle.Converters.RevitShared/Helpers/DisplayValueExtractor.cs @@ -1,6 +1,7 @@ using Microsoft.Extensions.Logging; using Speckle.Converters.Common; using Speckle.Converters.Common.Objects; +using Speckle.Converters.RevitShared.Extensions; using Speckle.Converters.RevitShared.Settings; using Speckle.Sdk.Common; @@ -98,6 +99,23 @@ IConverterSettingsStore converterSettings //options = ViewSpecificOptions ?? options ?? new Options() { DetailLevel = DetailLevelSetting }; options ??= new DB.Options { DetailLevel = _detailLevelMap[_converterSettings.Current.DetailLevel] }; + // Note: some elements do not get display values (you get invalid solids) unless we force the view detail level to be fine. This is annoying, but it's bad ux: people think the + // elements are not there (they are, just invisible). + if ( + element.Category is not null + && ( + element.Category.GetBuiltInCategory() == DB.BuiltInCategory.OST_PipeFitting + || element.Category.GetBuiltInCategory() == DB.BuiltInCategory.OST_PipeAccessory + || element.Category.GetBuiltInCategory() == DB.BuiltInCategory.OST_PlumbingFixtures +#if REVIT2024_OR_GREATER + || element is DB.Toposolid // note, brought back from 2.x.x. +#endif + ) + ) + { + options.DetailLevel = DB.ViewDetailLevel.Fine; + } + DB.GeometryElement geom; try { From 2cc09d43ac1f0436d59b3380c7c9b0882e91abfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Steinhagen?= Date: Tue, 3 Dec 2024 11:18:51 +0000 Subject: [PATCH 2/2] bjorn/cnx-835-add-converter-projects-and-top-level-converter (#429) * Initial commit - Project setup and basic definitions - Waiting for SDK update * CSiObjectToSpeckleConverter - Abstract TopLevel converter - Requiring a lot of wrappers and addtional steps to get to converted CSiObject * ICSiWrapper with factory * raw conversion placeholders * service registration * root to speckle * type registration and resolution CSiWrapperBase instead of ICSiWrapper correctly resolves all types * Setting up object level converters * some basic conversions * units framework * raw conversion placeholders these are gross (just a poc for first send) * CollectionManager Simple organization * Comments * back to BASE-ics * local * csharpier Missing blank line * newline * AddObjectCollectionToRoot PR comments: - Updated GetAndCreateObjectHostCollection to more descriptive name of AddObjectCollectionToRoot - Removing unnecessary rootObject = childCollection line * cleaning locks --------- Co-authored-by: Claire Kuang --- .../Bindings/CSiSharedSelectionBinding.cs | 32 +- .../Bindings/CSiSharedSendBinding.cs | 85 ++++- .../HostApp/CSiApplicationService.cs | 34 ++ .../HostApp/CSiDocumentModelStore.cs | 79 +++++ ...SharedIdleManager.cs => CSiIdleManager.cs} | 6 +- .../HostApp/CSiSendCollectionManager.cs | 39 +++ .../HostApp/CSiSharedApplicationService.cs | 27 -- .../HostApp/CSiSharedDocumentModelStore.cs | 14 - .../Operations/Send/CSiRootObjectBuilder.cs | 114 +++++++ ...SiSharedPluginBase.cs => CSiPluginBase.cs} | 4 +- .../Plugin/SpeckleFormBase.cs | 2 + .../ServiceRegistration.cs | 13 +- .../Speckle.Connectors.CSiShared.projitems | 11 +- .../Utils/ObjectIdentifiers.cs | 35 ++ .../Plugin/cPlugin.cs | 2 +- .../Speckle.Connectors.ETABS21.csproj | 1 + .../packages.lock.json | 13 + .../Plugin/cPlugin.cs | 2 +- .../Speckle.Connectors.ETABS22.csproj | 1 + .../packages.lock.json | 13 + .../CSiConversionSettings.cs | 3 + .../CSiConversionSettingsFactory.cs | 16 + .../CSiRootToSpeckleConverter.cs | 42 +++ .../CSiToSpeckleUnitConverter.cs | 42 +++ .../CSiWrappers.cs | 79 +++++ .../GlobalUsing.cs | 1 + .../ServiceRegistration.cs | 33 ++ .../Speckle.Converters.CSiShared.projitems | 25 ++ .../Speckle.Converters.CSiShared.shproj | 13 + .../Helpers/DisplayValueExtractor.cs | 49 +++ .../ToSpeckle/Raw/FrameToSpeckleConverter.cs | 58 ++++ .../ToSpeckle/Raw/JointToSpeckleConverter.cs | 41 +++ .../ToSpeckle/Raw/ShellToSpeckleConverter.cs | 70 ++++ .../TopLevel/CSiObjectToSpeckleConverter.cs | 42 +++ .../Speckle.Converters.ETABS21.csproj | 19 ++ .../packages.lock.json | 321 ++++++++++++++++++ .../Speckle.Converters.ETABS22.csproj | 19 ++ .../packages.lock.json | 276 +++++++++++++++ Local.sln | 21 ++ Speckle.Connectors.sln | 23 +- 40 files changed, 1639 insertions(+), 81 deletions(-) create mode 100644 Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiApplicationService.cs create mode 100644 Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiDocumentModelStore.cs rename Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/{CSiSharedIdleManager.cs => CSiIdleManager.cs} (62%) create mode 100644 Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiSendCollectionManager.cs delete mode 100644 Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiSharedApplicationService.cs delete mode 100644 Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiSharedDocumentModelStore.cs create mode 100644 Connectors/CSi/Speckle.Connectors.CSiShared/Operations/Send/CSiRootObjectBuilder.cs rename Connectors/CSi/Speckle.Connectors.CSiShared/Plugin/{CSiSharedPluginBase.cs => CSiPluginBase.cs} (92%) create mode 100644 Connectors/CSi/Speckle.Connectors.CSiShared/Utils/ObjectIdentifiers.cs create mode 100644 Converters/CSi/Speckle.Converters.CSiShared/CSiConversionSettings.cs create mode 100644 Converters/CSi/Speckle.Converters.CSiShared/CSiConversionSettingsFactory.cs create mode 100644 Converters/CSi/Speckle.Converters.CSiShared/CSiRootToSpeckleConverter.cs create mode 100644 Converters/CSi/Speckle.Converters.CSiShared/CSiToSpeckleUnitConverter.cs create mode 100644 Converters/CSi/Speckle.Converters.CSiShared/CSiWrappers.cs create mode 100644 Converters/CSi/Speckle.Converters.CSiShared/GlobalUsing.cs create mode 100644 Converters/CSi/Speckle.Converters.CSiShared/ServiceRegistration.cs create mode 100644 Converters/CSi/Speckle.Converters.CSiShared/Speckle.Converters.CSiShared.projitems create mode 100644 Converters/CSi/Speckle.Converters.CSiShared/Speckle.Converters.CSiShared.shproj create mode 100644 Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/Helpers/DisplayValueExtractor.cs create mode 100644 Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/Raw/FrameToSpeckleConverter.cs create mode 100644 Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/Raw/JointToSpeckleConverter.cs create mode 100644 Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/Raw/ShellToSpeckleConverter.cs create mode 100644 Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/TopLevel/CSiObjectToSpeckleConverter.cs create mode 100644 Converters/CSi/Speckle.Converters.ETABS21/Speckle.Converters.ETABS21.csproj create mode 100644 Converters/CSi/Speckle.Converters.ETABS21/packages.lock.json create mode 100644 Converters/CSi/Speckle.Converters.ETABS22/Speckle.Converters.ETABS22.csproj create mode 100644 Converters/CSi/Speckle.Converters.ETABS22/packages.lock.json diff --git a/Connectors/CSi/Speckle.Connectors.CSiShared/Bindings/CSiSharedSelectionBinding.cs b/Connectors/CSi/Speckle.Connectors.CSiShared/Bindings/CSiSharedSelectionBinding.cs index 2c667686c..5ba75ef41 100644 --- a/Connectors/CSi/Speckle.Connectors.CSiShared/Bindings/CSiSharedSelectionBinding.cs +++ b/Connectors/CSi/Speckle.Connectors.CSiShared/Bindings/CSiSharedSelectionBinding.cs @@ -1,4 +1,5 @@ using Speckle.Connectors.CSiShared.HostApp; +using Speckle.Connectors.CSiShared.Utils; using Speckle.Connectors.DUI.Bindings; using Speckle.Connectors.DUI.Bridge; @@ -8,7 +9,7 @@ public class CSiSharedSelectionBinding : ISelectionBinding { public string Name => "selectionBinding"; public IBrowserBridge Parent { get; } - private readonly ICSiApplicationService _csiApplicationService; // Update selection binding to centralized CSiSharedApplicationService instead of trying to maintain a reference to "sapModel" + private readonly ICSiApplicationService _csiApplicationService; public CSiSharedSelectionBinding(IBrowserBridge parent, ICSiApplicationService csiApplicationService) { @@ -16,9 +17,15 @@ public CSiSharedSelectionBinding(IBrowserBridge parent, ICSiApplicationService c _csiApplicationService = csiApplicationService; } + /// + /// Gets the selection and creates an encoded ID (objectType and objectName). + /// + /// + /// Refer to ObjectIdentifier.cs for more info. + /// public SelectionInfo GetSelection() { - // TODO: Handle better. Enums? ObjectType same in ETABS and SAP + // TODO: Since this is standard across CSi Suite - better stored in an enum? var objectTypeMap = new Dictionary { { 1, "Point" }, @@ -44,8 +51,8 @@ public SelectionInfo GetSelection() var typeKey = objectType[i]; var typeName = objectTypeMap.TryGetValue(typeKey, out var name) ? name : $"Unknown ({typeKey})"; - encodedIds.Add(EncodeObjectIdentifier(typeKey, objectName[i])); - typeCounts[typeName] = (typeCounts.TryGetValue(typeName, out var count) ? count : 0) + 1; // NOTE: Cross-framework compatibility + encodedIds.Add(ObjectIdentifier.Encode(typeKey, objectName[i])); + typeCounts[typeName] = (typeCounts.TryGetValue(typeName, out var count) ? count : 0) + 1; // NOTE: Cross-framework compatibility (net 48 and net8) } var summary = @@ -56,21 +63,4 @@ public SelectionInfo GetSelection() return new SelectionInfo(encodedIds, summary); } - - // NOTE: All API methods are based on the objectType and objectName, not the GUID - // We will obviously manage the GUIDs but for all method calls we need a concatenated version of the objectType and objectName - // Since objectType >= 1 and <= 7, we know first index will always be the objectType - // Remaining string represents objectName and since the user can add any string (provided it is unique), this is safer - // than using a delimiting character (which could clash with user string) - private string EncodeObjectIdentifier(int objectType, string objectName) - { - // Just in case some weird objectType pops up - if (objectType < 1 || objectType > 7) - { - throw new ArgumentException($"Invalid object type: {objectType}. Must be between 1 and 7."); - } - - // Simply prepend the object type as a single character - return $"{objectType}{objectName}"; - } } diff --git a/Connectors/CSi/Speckle.Connectors.CSiShared/Bindings/CSiSharedSendBinding.cs b/Connectors/CSi/Speckle.Connectors.CSiShared/Bindings/CSiSharedSendBinding.cs index 9909f8935..d74bd99d9 100644 --- a/Connectors/CSi/Speckle.Connectors.CSiShared/Bindings/CSiSharedSendBinding.cs +++ b/Connectors/CSi/Speckle.Connectors.CSiShared/Bindings/CSiSharedSendBinding.cs @@ -1,10 +1,22 @@ -using Microsoft.Extensions.Logging; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; using Speckle.Connectors.Common.Cancellation; +using Speckle.Connectors.Common.Operations; +using Speckle.Connectors.CSiShared.HostApp; +using Speckle.Connectors.CSiShared.Utils; using Speckle.Connectors.DUI.Bindings; using Speckle.Connectors.DUI.Bridge; +using Speckle.Connectors.DUI.Exceptions; +using Speckle.Connectors.DUI.Logging; using Speckle.Connectors.DUI.Models; +using Speckle.Connectors.DUI.Models.Card; using Speckle.Connectors.DUI.Models.Card.SendFilter; using Speckle.Connectors.DUI.Settings; +using Speckle.Converters.Common; +using Speckle.Converters.CSiShared; +using Speckle.Sdk; +using Speckle.Sdk.Common; +using Speckle.Sdk.Logging; namespace Speckle.Connectors.CSiShared.Bindings; @@ -21,6 +33,10 @@ public sealed class CSiSharedSendBinding : ISendBinding private readonly CancellationManager _cancellationManager; private readonly IOperationProgressManager _operationProgressManager; private readonly ILogger _logger; + private readonly ICSiApplicationService _csiApplicationService; + private readonly ICSiConversionSettingsFactory _csiConversionSettingsFactory; + private readonly ISpeckleApplication _speckleApplication; + private readonly ISdkActivityFactory _activityFactory; public CSiSharedSendBinding( DocumentModelStore store, @@ -30,7 +46,11 @@ public CSiSharedSendBinding( IServiceProvider serviceProvider, CancellationManager cancellationManager, IOperationProgressManager operationProgressManager, - ILogger logger + ILogger logger, + ICSiConversionSettingsFactory csiConversionSettingsFactory, + ISpeckleApplication speckleApplication, + ISdkActivityFactory activityFactory, + ICSiApplicationService csiApplicationService ) { _store = store; @@ -42,6 +62,10 @@ ILogger logger _logger = logger; Parent = parent; Commands = new SendBindingUICommands(parent); + _csiConversionSettingsFactory = csiConversionSettingsFactory; + _speckleApplication = speckleApplication; + _activityFactory = activityFactory; + _csiApplicationService = csiApplicationService; } public List GetSendFilters() => _sendFilters; @@ -50,8 +74,61 @@ ILogger logger public async Task Send(string modelCardId) { - // placeholder for actual send implementation - await Task.CompletedTask.ConfigureAwait(false); + using var activity = _activityFactory.Start(); + + try + { + if (_store.GetModelById(modelCardId) is not SenderModelCard modelCard) + { + throw new InvalidOperationException("No publish model card was found."); + } + using var scope = _serviceProvider.CreateScope(); + scope + .ServiceProvider.GetRequiredService>() + .Initialize(_csiConversionSettingsFactory.Create(_csiApplicationService.SapModel)); + + CancellationToken cancellationToken = _cancellationManager.InitCancellationTokenSource(modelCardId); + + List wrappers = modelCard + .SendFilter.NotNull() + .RefreshObjectIds() + .Select(DecodeObjectIdentifier) + .ToList(); + + if (wrappers.Count == 0) + { + throw new SpeckleSendFilterException("No objects were found to convert. Please update your publish filter!"); + } + + var sendResult = await scope + .ServiceProvider.GetRequiredService>() + .Execute( + wrappers, + modelCard.GetSendInfo(_speckleApplication.Slug), + _operationProgressManager.CreateOperationProgressEventHandler(Parent, modelCardId, cancellationToken), + cancellationToken + ) + .ConfigureAwait(false); + + await Commands + .SetModelSendResult(modelCardId, sendResult.RootObjId, sendResult.ConversionResults) + .ConfigureAwait(false); + } + catch (OperationCanceledException) + { + return; + } + catch (Exception ex) when (!ex.IsFatal()) + { + _logger.LogModelCardHandledError(ex); + await Commands.SetModelError(modelCardId, ex).ConfigureAwait(false); + } + } + + private ICSiWrapper DecodeObjectIdentifier(string encodedId) + { + var (type, name) = ObjectIdentifier.Decode(encodedId); + return CSiWrapperFactory.Create(type, name); } public void CancelSend(string modelCardId) diff --git a/Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiApplicationService.cs b/Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiApplicationService.cs new file mode 100644 index 000000000..27a034195 --- /dev/null +++ b/Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiApplicationService.cs @@ -0,0 +1,34 @@ +namespace Speckle.Connectors.CSiShared.HostApp; + +/// +/// Create a centralized access point for ETABS and SAP APIs across the entire program. +/// +/// +/// All API methods are based on the objectType and objectName, not the GUID. +/// CSi is already giving us the "sapModel" reference through the plugin interface. No need to attach to running instance. +/// Since objectType is a single int (1, 2 ... 7) we know first index will always be the objectType. +/// Prevent having to pass the "sapModel" around between classes and this ensures consistent access. +/// Name "sapModel" is misleading since it doesn't only apply to SAP2000, but this is the convention in the API, so we keep it. +/// +public interface ICSiApplicationService +{ + cSapModel SapModel { get; } + void Initialize(cSapModel sapModel, cPluginCallback pluginCallback); +} + +public class CSiApplicationService : ICSiApplicationService +{ + public cSapModel SapModel { get; private set; } + private cPluginCallback _pluginCallback; + + public CSiApplicationService() + { + SapModel = null!; + } + + public void Initialize(cSapModel sapModel, cPluginCallback pluginCallback) + { + SapModel = sapModel; + _pluginCallback = pluginCallback; + } +} diff --git a/Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiDocumentModelStore.cs b/Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiDocumentModelStore.cs new file mode 100644 index 000000000..cda75e378 --- /dev/null +++ b/Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiDocumentModelStore.cs @@ -0,0 +1,79 @@ +using System.IO; +using Microsoft.Extensions.Logging; +using Speckle.Connectors.DUI.Models; +using Speckle.Connectors.DUI.Utils; +using Speckle.Sdk; +using Speckle.Sdk.Helpers; +using Speckle.Sdk.Logging; + +namespace Speckle.Connectors.CSiShared.HostApp; + +public class CSiDocumentModelStore : DocumentModelStore +{ + private readonly ISpeckleApplication _speckleApplication; + private readonly ILogger _logger; + private readonly ICSiApplicationService _csiApplicationService; + private string HostAppUserDataPath { get; set; } + private string DocumentStateFile { get; set; } + private string ModelPathHash { get; set; } + + public CSiDocumentModelStore( + IJsonSerializer jsonSerializerSettings, + ISpeckleApplication speckleApplication, + ILogger logger, + ICSiApplicationService csiApplicationService + ) + : base(jsonSerializerSettings) + { + _speckleApplication = speckleApplication; + _logger = logger; + _csiApplicationService = csiApplicationService; + SetPaths(); + LoadState(); + } + + private void SetPaths() + { + ModelPathHash = Crypt.Md5(_csiApplicationService.SapModel.GetModelFilepath(), length: 32); + HostAppUserDataPath = Path.Combine( + SpecklePathProvider.UserSpeckleFolderPath, + "ConnectorsFileData", + _speckleApplication.Slug + ); + DocumentStateFile = Path.Combine(HostAppUserDataPath, $"{ModelPathHash}.json"); + } + + protected override void HostAppSaveState(string modelCardState) + { + try + { + if (!Directory.Exists(HostAppUserDataPath)) + { + Directory.CreateDirectory(HostAppUserDataPath); + } + File.WriteAllText(DocumentStateFile, modelCardState); + } + catch (Exception ex) when (!ex.IsFatal()) + { + _logger.LogError(ex.Message); + } + } + + protected override void LoadState() + { + if (!Directory.Exists(HostAppUserDataPath)) + { + ClearAndSave(); + return; + } + + if (!File.Exists(DocumentStateFile)) + { + ClearAndSave(); + return; + } + + string serializedState = File.ReadAllText(DocumentStateFile); + LoadFromString(serializedState); + } +} diff --git a/Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiSharedIdleManager.cs b/Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiIdleManager.cs similarity index 62% rename from Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiSharedIdleManager.cs rename to Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiIdleManager.cs index accedfd75..081639361 100644 --- a/Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiSharedIdleManager.cs +++ b/Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiIdleManager.cs @@ -2,11 +2,11 @@ namespace Speckle.Connectors.CSiShared.HostApp; -public sealed class CSiSharedIdleManager : AppIdleManager +public sealed class CSiIdleManager : AppIdleManager { private readonly IIdleCallManager _idleCallManager; - public CSiSharedIdleManager(IIdleCallManager idleCallManager) + public CSiIdleManager(IIdleCallManager idleCallManager) : base(idleCallManager) { _idleCallManager = idleCallManager; @@ -14,7 +14,7 @@ public CSiSharedIdleManager(IIdleCallManager idleCallManager) protected override void AddEvent() { - // ETABS specific idle handling can be added here if needed + // TODO: CSi specific idle handling can be added here if needed _idleCallManager.AppOnIdle(() => { }); } } diff --git a/Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiSendCollectionManager.cs b/Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiSendCollectionManager.cs new file mode 100644 index 000000000..472e3fc2d --- /dev/null +++ b/Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiSendCollectionManager.cs @@ -0,0 +1,39 @@ +using Speckle.Converters.Common; +using Speckle.Converters.CSiShared; +using Speckle.Sdk.Models.Collections; + +namespace Speckle.Connectors.CSiShared.HostApp; + +/// +/// We can use the CSiWrappers to create our collection structure. +/// +/// +/// This class manages the collections. If the key (from the path) already exists, this collection is returned. +/// If it doesn't exist, a new collection is created and added to the rootObject. +/// +public class CSiSendCollectionManager +{ + private readonly IConverterSettingsStore _converterSettings; + private readonly Dictionary _collectionCache = new(); + + public CSiSendCollectionManager(IConverterSettingsStore converterSettings) + { + _converterSettings = converterSettings; + } + + // TODO: Frames could be further classified under Columns, Braces and Beams. Same for Shells which could be classified into walls, floors + public Collection AddObjectCollectionToRoot(ICSiWrapper csiObject, Collection rootObject) + { + var path = csiObject.GetType().Name.Replace("Wrapper", ""); // CSiJointWrapper → CSiJoint, CSiFrameWrapper → CSiFrame etc. + + if (_collectionCache.TryGetValue(path, out Collection? collection)) + { + return collection; + } + + Collection childCollection = new(path); + rootObject.elements.Add(childCollection); + _collectionCache[path] = childCollection; + return childCollection; + } +} diff --git a/Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiSharedApplicationService.cs b/Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiSharedApplicationService.cs deleted file mode 100644 index 7bbefbee2..000000000 --- a/Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiSharedApplicationService.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace Speckle.Connectors.CSiShared.HostApp; - -// NOTE: Create a centralized access point for ETABS and SAP APIs across the entire program -// CSi is already giving us the "sapModel" reference through the plugin interface. No need to attach to running instance -// Prevent having to pass the "sapModel" around between classes and this ensures consistent access -public interface ICSiApplicationService -{ - cSapModel SapModel { get; } - void Initialize(cSapModel sapModel, cPluginCallback pluginCallback); -} - -public class CSiApplicationService : ICSiApplicationService -{ - public cSapModel SapModel { get; private set; } - private cPluginCallback _pluginCallback; - - public CSiApplicationService() - { - SapModel = null!; - } - - public void Initialize(cSapModel sapModel, cPluginCallback pluginCallback) - { - SapModel = sapModel; - _pluginCallback = pluginCallback; - } -} diff --git a/Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiSharedDocumentModelStore.cs b/Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiSharedDocumentModelStore.cs deleted file mode 100644 index 0117155b2..000000000 --- a/Connectors/CSi/Speckle.Connectors.CSiShared/HostApp/CSiSharedDocumentModelStore.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Speckle.Connectors.DUI.Models; -using Speckle.Connectors.DUI.Utils; - -namespace Speckle.Connectors.CSiShared.HostApp; - -public class CSiSharedDocumentModelStore : DocumentModelStore -{ - public CSiSharedDocumentModelStore(IJsonSerializer jsonSerializerSettings) - : base(jsonSerializerSettings) { } - - protected override void HostAppSaveState(string modelCardState) => throw new NotImplementedException(); - - protected override void LoadState() => throw new NotImplementedException(); -} diff --git a/Connectors/CSi/Speckle.Connectors.CSiShared/Operations/Send/CSiRootObjectBuilder.cs b/Connectors/CSi/Speckle.Connectors.CSiShared/Operations/Send/CSiRootObjectBuilder.cs new file mode 100644 index 000000000..a5cb5c58c --- /dev/null +++ b/Connectors/CSi/Speckle.Connectors.CSiShared/Operations/Send/CSiRootObjectBuilder.cs @@ -0,0 +1,114 @@ +using Microsoft.Extensions.Logging; +using Speckle.Connectors.Common.Builders; +using Speckle.Connectors.Common.Caching; +using Speckle.Connectors.Common.Conversion; +using Speckle.Connectors.Common.Operations; +using Speckle.Connectors.CSiShared.HostApp; +using Speckle.Converters.Common; +using Speckle.Converters.CSiShared; +using Speckle.Sdk; +using Speckle.Sdk.Logging; +using Speckle.Sdk.Models; +using Speckle.Sdk.Models.Collections; + +namespace Speckle.Connectors.CSiShared.Builders; + +public class CSiRootObjectBuilder : IRootObjectBuilder +{ + private readonly IRootToSpeckleConverter _rootToSpeckleConverter; + private readonly ISendConversionCache _sendConversionCache; + private readonly IConverterSettingsStore _converterSettings; + private readonly CSiSendCollectionManager _sendCollectionManager; + private readonly ILogger _logger; + private readonly ISdkActivityFactory _activityFactory; + private readonly ICSiApplicationService _csiApplicationService; + + public CSiRootObjectBuilder( + IRootToSpeckleConverter rootToSpeckleConverter, + ISendConversionCache sendConversionCache, + IConverterSettingsStore converterSettings, + CSiSendCollectionManager sendCollectionManager, + ILogger logger, + ISdkActivityFactory activityFactory, + ICSiApplicationService csiApplicationService + ) + { + _sendConversionCache = sendConversionCache; + _converterSettings = converterSettings; + _sendCollectionManager = sendCollectionManager; + _rootToSpeckleConverter = rootToSpeckleConverter; + _logger = logger; + _activityFactory = activityFactory; + _csiApplicationService = csiApplicationService; + } + + public async Task Build( + IReadOnlyList csiObjects, + SendInfo sendInfo, + IProgress onOperationProgressed, + CancellationToken cancellationToken = default + ) + { + using var activity = _activityFactory.Start("Build"); + + string modelFileName = _csiApplicationService.SapModel.GetModelFilename(false) ?? "Unnamed model"; + Collection rootObjectCollection = new() { name = modelFileName }; + rootObjectCollection["units"] = _converterSettings.Current.SpeckleUnits; + + List results = new(csiObjects.Count); + int count = 0; + + using (var _ = _activityFactory.Start("Convert all")) + { + foreach (ICSiWrapper csiObject in csiObjects) + { + using var _2 = _activityFactory.Start("Convert"); + cancellationToken.ThrowIfCancellationRequested(); + + var result = ConvertCSiObject(csiObject, rootObjectCollection, sendInfo.ProjectId); + results.Add(result); + + count++; + onOperationProgressed.Report(new("Converting", (double)count / csiObjects.Count)); + } + } + + if (results.All(x => x.Status == Status.ERROR)) + { + throw new SpeckleException("Failed to convert all objects."); + } + + await Task.Yield(); + return new RootObjectBuilderResult(rootObjectCollection, results); + } + + private SendConversionResult ConvertCSiObject(ICSiWrapper csiObject, Collection typeCollection, string projectId) + { + string applicationId = $"{csiObject.ObjectType}{csiObject.Name}"; // TODO: NO! Use GUID + string sourceType = csiObject.GetType().Name; + + try + { + Base converted; + if (_sendConversionCache.TryGetValue(projectId, applicationId, out ObjectReference? value)) + { + converted = value; + } + else + { + converted = _rootToSpeckleConverter.Convert(csiObject); + } + + var collection = _sendCollectionManager.AddObjectCollectionToRoot(csiObject, typeCollection); + collection.elements ??= new List(); + collection.elements.Add(converted); + + return new(Status.SUCCESS, applicationId, sourceType, converted); + } + catch (Exception ex) when (!ex.IsFatal()) + { + _logger.LogError(ex, sourceType); + return new(Status.ERROR, applicationId, sourceType, null, ex); + } + } +} diff --git a/Connectors/CSi/Speckle.Connectors.CSiShared/Plugin/CSiSharedPluginBase.cs b/Connectors/CSi/Speckle.Connectors.CSiShared/Plugin/CSiPluginBase.cs similarity index 92% rename from Connectors/CSi/Speckle.Connectors.CSiShared/Plugin/CSiSharedPluginBase.cs rename to Connectors/CSi/Speckle.Connectors.CSiShared/Plugin/CSiPluginBase.cs index 39c5f0a2b..28be43ebf 100644 --- a/Connectors/CSi/Speckle.Connectors.CSiShared/Plugin/CSiSharedPluginBase.cs +++ b/Connectors/CSi/Speckle.Connectors.CSiShared/Plugin/CSiPluginBase.cs @@ -1,7 +1,7 @@ namespace Speckle.Connectors.CSiShared; [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "")] -public abstract class CSiSharedPluginBase : cPluginContract, IDisposable +public abstract class CSiPluginBase : cPluginContract, IDisposable { private const string s_modality = "Non-Modal"; private SpeckleFormBase? _panel; @@ -50,7 +50,7 @@ public void Dispose() GC.SuppressFinalize(this); } - ~CSiSharedPluginBase() + ~CSiPluginBase() { Dispose(false); } diff --git a/Connectors/CSi/Speckle.Connectors.CSiShared/Plugin/SpeckleFormBase.cs b/Connectors/CSi/Speckle.Connectors.CSiShared/Plugin/SpeckleFormBase.cs index da7b7bde2..12ad13f2e 100644 --- a/Connectors/CSi/Speckle.Connectors.CSiShared/Plugin/SpeckleFormBase.cs +++ b/Connectors/CSi/Speckle.Connectors.CSiShared/Plugin/SpeckleFormBase.cs @@ -3,6 +3,7 @@ using Speckle.Connectors.Common; using Speckle.Connectors.CSiShared.HostApp; using Speckle.Connectors.DUI.WebView; +using Speckle.Converters.CSiShared; using Speckle.Sdk.Host; namespace Speckle.Connectors.CSiShared; @@ -21,6 +22,7 @@ protected SpeckleFormBase() var services = new ServiceCollection(); services.Initialize(HostApplications.ETABS, GetVersion()); services.AddCSi(); + services.AddCSiConverters(); Container = services.BuildServiceProvider(); diff --git a/Connectors/CSi/Speckle.Connectors.CSiShared/ServiceRegistration.cs b/Connectors/CSi/Speckle.Connectors.CSiShared/ServiceRegistration.cs index ce63063fc..994d0c75d 100644 --- a/Connectors/CSi/Speckle.Connectors.CSiShared/ServiceRegistration.cs +++ b/Connectors/CSi/Speckle.Connectors.CSiShared/ServiceRegistration.cs @@ -1,6 +1,9 @@ using Microsoft.Extensions.DependencyInjection; using Speckle.Connectors.Common; +using Speckle.Connectors.Common.Builders; +using Speckle.Connectors.Common.Operations; using Speckle.Connectors.CSiShared.Bindings; +using Speckle.Connectors.CSiShared.Builders; using Speckle.Connectors.CSiShared.Filters; using Speckle.Connectors.CSiShared.HostApp; using Speckle.Connectors.DUI; @@ -9,6 +12,7 @@ using Speckle.Connectors.DUI.Models; using Speckle.Connectors.DUI.Models.Card.SendFilter; using Speckle.Connectors.DUI.WebView; +using Speckle.Converters.CSiShared; namespace Speckle.Connectors.CSiShared; @@ -20,10 +24,10 @@ public static IServiceCollection AddCSi(this IServiceCollection services) services.AddSingleton(); services.AddConnectorUtils(); - services.AddDUI(); + services.AddDUI(); services.AddDUIView(); - services.AddSingleton(); + services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); @@ -31,12 +35,15 @@ public static IServiceCollection AddCSi(this IServiceCollection services) services.AddSingleton(sp => sp.GetRequiredService()); services.AddSingleton(); - services.AddSingleton(); + services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); services.AddScoped(); + services.AddScoped(); + services.AddScoped, CSiRootObjectBuilder>(); + services.AddScoped>(); services.RegisterTopLevelExceptionHandler(); diff --git a/Connectors/CSi/Speckle.Connectors.CSiShared/Speckle.Connectors.CSiShared.projitems b/Connectors/CSi/Speckle.Connectors.CSiShared/Speckle.Connectors.CSiShared.projitems index 846da425e..e49c115ee 100644 --- a/Connectors/CSi/Speckle.Connectors.CSiShared/Speckle.Connectors.CSiShared.projitems +++ b/Connectors/CSi/Speckle.Connectors.CSiShared/Speckle.Connectors.CSiShared.projitems @@ -13,14 +13,17 @@ - + + + Form - - - + + + + diff --git a/Connectors/CSi/Speckle.Connectors.CSiShared/Utils/ObjectIdentifiers.cs b/Connectors/CSi/Speckle.Connectors.CSiShared/Utils/ObjectIdentifiers.cs new file mode 100644 index 000000000..443893e7c --- /dev/null +++ b/Connectors/CSi/Speckle.Connectors.CSiShared/Utils/ObjectIdentifiers.cs @@ -0,0 +1,35 @@ +namespace Speckle.Connectors.CSiShared.Utils; + +/// +/// ObjectIdentifier based on concatenating the objectType and objectName. CSi is annoying, we can't use GUIDs. +/// +/// +/// All API methods are based on the objectType and objectName, not the GUID. +/// We will obviously manage the GUIDs but for all method calls we need a concatenated version of the objectType and objectName. +/// Since objectType is a single int (1, 2 ... 7) we know first index will always be the objectType. +/// This int gets used by the CSiWrapperFactory to create the CSiWrappers. +/// +public static class ObjectIdentifier +{ + public static string Encode(int objectType, string objectName) + { + if (objectType < 1 || objectType > 7) // Both ETABS and SAP2000 APIs have the same returns for objectType + { + throw new ArgumentException($"Invalid object type: {objectType}. Must be between 1 and 7."); + } + return $"{objectType}{objectName}"; + } + + public static (int type, string name) Decode(string encodedId) + { + if (string.IsNullOrEmpty(encodedId) || encodedId.Length < 2) // Superfluous. But rather safe than sorry + { + throw new ArgumentException($"Invalid encoded ID: {encodedId}"); + } + + int objectType = int.Parse(encodedId[0].ToString()); + string objectName = encodedId[1..]; + + return (objectType, objectName); + } +} diff --git a/Connectors/CSi/Speckle.Connectors.ETABS21/Plugin/cPlugin.cs b/Connectors/CSi/Speckle.Connectors.ETABS21/Plugin/cPlugin.cs index 0807f7294..eb7f18b63 100644 --- a/Connectors/CSi/Speckle.Connectors.ETABS21/Plugin/cPlugin.cs +++ b/Connectors/CSi/Speckle.Connectors.ETABS21/Plugin/cPlugin.cs @@ -6,7 +6,7 @@ namespace Speckle.Connectors.ETABS21; [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "")] -public class cPlugin : CSiSharedPluginBase +public class cPlugin : CSiPluginBase { protected override SpeckleFormBase CreateForm() => new SpeckleForm(); } diff --git a/Connectors/CSi/Speckle.Connectors.ETABS21/Speckle.Connectors.ETABS21.csproj b/Connectors/CSi/Speckle.Connectors.ETABS21/Speckle.Connectors.ETABS21.csproj index e21c1fe97..6d295e8b5 100644 --- a/Connectors/CSi/Speckle.Connectors.ETABS21/Speckle.Connectors.ETABS21.csproj +++ b/Connectors/CSi/Speckle.Connectors.ETABS21/Speckle.Connectors.ETABS21.csproj @@ -13,6 +13,7 @@ + diff --git a/Connectors/CSi/Speckle.Connectors.ETABS21/packages.lock.json b/Connectors/CSi/Speckle.Connectors.ETABS21/packages.lock.json index d47cfef84..0e4b4a12b 100644 --- a/Connectors/CSi/Speckle.Connectors.ETABS21/packages.lock.json +++ b/Connectors/CSi/Speckle.Connectors.ETABS21/packages.lock.json @@ -289,6 +289,19 @@ "speckle.connectors.logging": { "type": "Project" }, + "speckle.converters.common": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )", + "Speckle.Objects": "[3.1.0-dev.203, )" + } + }, + "speckle.converters.etabs21": { + "type": "Project", + "dependencies": { + "Speckle.Converters.Common": "[1.0.0, )" + } + }, "Microsoft.Extensions.DependencyInjection": { "type": "CentralTransitive", "requested": "[2.2.0, )", diff --git a/Connectors/CSi/Speckle.Connectors.ETABS22/Plugin/cPlugin.cs b/Connectors/CSi/Speckle.Connectors.ETABS22/Plugin/cPlugin.cs index eba957e39..d6ab41c8d 100644 --- a/Connectors/CSi/Speckle.Connectors.ETABS22/Plugin/cPlugin.cs +++ b/Connectors/CSi/Speckle.Connectors.ETABS22/Plugin/cPlugin.cs @@ -6,7 +6,7 @@ namespace Speckle.Connectors.ETABS22; [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "")] -public class cPlugin : CSiSharedPluginBase +public class cPlugin : CSiPluginBase { protected override SpeckleFormBase CreateForm() => new SpeckleForm(); } diff --git a/Connectors/CSi/Speckle.Connectors.ETABS22/Speckle.Connectors.ETABS22.csproj b/Connectors/CSi/Speckle.Connectors.ETABS22/Speckle.Connectors.ETABS22.csproj index 99a43915c..9705a4de9 100644 --- a/Connectors/CSi/Speckle.Connectors.ETABS22/Speckle.Connectors.ETABS22.csproj +++ b/Connectors/CSi/Speckle.Connectors.ETABS22/Speckle.Connectors.ETABS22.csproj @@ -13,6 +13,7 @@ + diff --git a/Connectors/CSi/Speckle.Connectors.ETABS22/packages.lock.json b/Connectors/CSi/Speckle.Connectors.ETABS22/packages.lock.json index 2b72494fb..df71add36 100644 --- a/Connectors/CSi/Speckle.Connectors.ETABS22/packages.lock.json +++ b/Connectors/CSi/Speckle.Connectors.ETABS22/packages.lock.json @@ -245,6 +245,19 @@ "speckle.connectors.logging": { "type": "Project" }, + "speckle.converters.common": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )", + "Speckle.Objects": "[3.1.0-dev.203, )" + } + }, + "speckle.converters.etabs22": { + "type": "Project", + "dependencies": { + "Speckle.Converters.Common": "[1.0.0, )" + } + }, "Microsoft.Extensions.DependencyInjection": { "type": "CentralTransitive", "requested": "[2.2.0, )", diff --git a/Converters/CSi/Speckle.Converters.CSiShared/CSiConversionSettings.cs b/Converters/CSi/Speckle.Converters.CSiShared/CSiConversionSettings.cs new file mode 100644 index 000000000..1fb310342 --- /dev/null +++ b/Converters/CSi/Speckle.Converters.CSiShared/CSiConversionSettings.cs @@ -0,0 +1,3 @@ +namespace Speckle.Converters.CSiShared; + +public record CSiConversionSettings(cSapModel SapModel, string SpeckleUnits); diff --git a/Converters/CSi/Speckle.Converters.CSiShared/CSiConversionSettingsFactory.cs b/Converters/CSi/Speckle.Converters.CSiShared/CSiConversionSettingsFactory.cs new file mode 100644 index 000000000..89aade283 --- /dev/null +++ b/Converters/CSi/Speckle.Converters.CSiShared/CSiConversionSettingsFactory.cs @@ -0,0 +1,16 @@ +using Speckle.Converters.Common; +using Speckle.InterfaceGenerator; + +namespace Speckle.Converters.CSiShared; + +[GenerateAutoInterface] +public class CSiConversionSettingsFactory( + IHostToSpeckleUnitConverter unitsConverter, + IConverterSettingsStore settingsStore +) : ICSiConversionSettingsFactory +{ + public CSiConversionSettings Current => settingsStore.Current; + + public CSiConversionSettings Create(cSapModel document) => + new(document, unitsConverter.ConvertOrThrow(document.GetPresentUnits())); +} diff --git a/Converters/CSi/Speckle.Converters.CSiShared/CSiRootToSpeckleConverter.cs b/Converters/CSi/Speckle.Converters.CSiShared/CSiRootToSpeckleConverter.cs new file mode 100644 index 000000000..f99a75692 --- /dev/null +++ b/Converters/CSi/Speckle.Converters.CSiShared/CSiRootToSpeckleConverter.cs @@ -0,0 +1,42 @@ +using Microsoft.Extensions.Logging; +using Speckle.Converters.Common; +using Speckle.Converters.Common.Objects; +using Speckle.Converters.Common.Registration; +using Speckle.Sdk.Common.Exceptions; +using Speckle.Sdk.Models; + +namespace Speckle.Converters.CSiShared; + +public class CSiRootToSpeckleConverter : IRootToSpeckleConverter +{ + private readonly IConverterManager _toSpeckle; + private readonly IConverterSettingsStore _settingsStore; + private readonly ILogger _logger; + + public CSiRootToSpeckleConverter( + IConverterManager toSpeckle, + IConverterSettingsStore settingsStore, + ILogger logger + ) + { + _toSpeckle = toSpeckle; + _settingsStore = settingsStore; + _logger = logger; + } + + public Base Convert(object target) + { + if (target is not ICSiWrapper wrapper) + { + throw new ValidationException($"Target object is not a CSiWrapper. It's a ${target.GetType()}"); + } + + Type type = target.GetType(); + var objectConverter = _toSpeckle.ResolveConverter(type, true); + + Base result = objectConverter.Convert(target); + result.applicationId = $"{wrapper.ObjectType}{wrapper.Name}"; + + return result; + } +} diff --git a/Converters/CSi/Speckle.Converters.CSiShared/CSiToSpeckleUnitConverter.cs b/Converters/CSi/Speckle.Converters.CSiShared/CSiToSpeckleUnitConverter.cs new file mode 100644 index 000000000..ab8e3df92 --- /dev/null +++ b/Converters/CSi/Speckle.Converters.CSiShared/CSiToSpeckleUnitConverter.cs @@ -0,0 +1,42 @@ +using Speckle.Converters.Common; +using Speckle.Sdk.Common; +using Speckle.Sdk.Common.Exceptions; + +namespace Speckle.Converters.CSiShared; + +/// +/// Convert CSi eUnits enumeration to Speckle units. +/// +/// +/// CSi GetPresentUnits() valid for both SAP 2000 and ETABS. +/// Represents units transmitted through API calls and not necessarily those displayed in GUI. +/// +public class CSiToSpeckleUnitConverter : IHostToSpeckleUnitConverter +{ + private readonly Dictionary _unitMapping = new Dictionary(); + + public CSiToSpeckleUnitConverter() + { + _unitMapping[eUnits.lb_in_F] = Units.Inches; + _unitMapping[eUnits.lb_ft_F] = Units.Feet; + _unitMapping[eUnits.kip_in_F] = Units.Inches; + _unitMapping[eUnits.kip_ft_F] = Units.Feet; + _unitMapping[eUnits.kN_mm_C] = Units.Millimeters; + _unitMapping[eUnits.kN_m_C] = Units.Meters; + _unitMapping[eUnits.kgf_mm_C] = Units.Millimeters; + _unitMapping[eUnits.kgf_m_C] = Units.Meters; + _unitMapping[eUnits.N_mm_C] = Units.Millimeters; + _unitMapping[eUnits.N_m_C] = Units.Meters; + _unitMapping[eUnits.Ton_mm_C] = Units.Millimeters; + _unitMapping[eUnits.Ton_m_C] = Units.Meters; + _unitMapping[eUnits.kN_cm_C] = Units.Centimeters; + _unitMapping[eUnits.kgf_cm_C] = Units.Centimeters; + _unitMapping[eUnits.N_cm_C] = Units.Centimeters; + _unitMapping[eUnits.Ton_cm_C] = Units.Centimeters; + } + + public string ConvertOrThrow(eUnits hostUnit) => + _unitMapping.TryGetValue(hostUnit, out string? value) + ? value + : throw new UnitNotSupportedException($"The Unit System \"{hostUnit}\" is unsupported."); +} diff --git a/Converters/CSi/Speckle.Converters.CSiShared/CSiWrappers.cs b/Converters/CSi/Speckle.Converters.CSiShared/CSiWrappers.cs new file mode 100644 index 000000000..d8aa5b7a1 --- /dev/null +++ b/Converters/CSi/Speckle.Converters.CSiShared/CSiWrappers.cs @@ -0,0 +1,79 @@ +namespace Speckle.Converters.CSiShared; + +public interface ICSiWrapper +{ + string Name { get; set; } + int ObjectType { get; } +} + +/// +/// Based on GetSelected() returns of objectType and objectName, we need to create a CSiWrapper object. +/// +/// +/// Creating a class that can be used to pass a type to the converter. +/// Since the API only provides a framework for us to query the model, we don't get instances. +/// The types are the same for both SAP 2000 and ETABS. +/// +public abstract class CSiWrapperBase : ICSiWrapper +{ + public required string Name { get; set; } + public abstract int ObjectType { get; } +} + +public class CSiJointWrapper : CSiWrapperBase +{ + public override int ObjectType => 1; +} + +public class CSiFrameWrapper : CSiWrapperBase +{ + public override int ObjectType => 2; +} + +public class CSiCableWrapper : CSiWrapperBase +{ + public override int ObjectType => 3; +} + +public class CSiTendonWrapper : CSiWrapperBase +{ + public override int ObjectType => 4; +} + +public class CSiShellWrapper : CSiWrapperBase +{ + public override int ObjectType => 5; +} + +public class CSiSolidWrapper : CSiWrapperBase +{ + public override int ObjectType => 6; +} + +public class CSiLinkWrapper : CSiWrapperBase +{ + public override int ObjectType => 7; +} + +/// +/// ObjectType specific wrappers created during bindings. +/// +/// +/// Switch statements based off of the objectType int return. +/// Used in the connectors and allows converters to be resolved effectively. +/// +public static class CSiWrapperFactory +{ + public static ICSiWrapper Create(int objectType, string name) => + objectType switch + { + 1 => new CSiJointWrapper { Name = name }, + 2 => new CSiFrameWrapper { Name = name }, + 3 => new CSiCableWrapper { Name = name }, + 4 => new CSiTendonWrapper { Name = name }, + 5 => new CSiShellWrapper { Name = name }, + 6 => new CSiSolidWrapper { Name = name }, + 7 => new CSiLinkWrapper { Name = name }, + _ => throw new ArgumentOutOfRangeException(nameof(objectType), $"Unsupported object type: {objectType}") + }; +} diff --git a/Converters/CSi/Speckle.Converters.CSiShared/GlobalUsing.cs b/Converters/CSi/Speckle.Converters.CSiShared/GlobalUsing.cs new file mode 100644 index 000000000..2209f341b --- /dev/null +++ b/Converters/CSi/Speckle.Converters.CSiShared/GlobalUsing.cs @@ -0,0 +1 @@ +global using CSiAPIv1; diff --git a/Converters/CSi/Speckle.Converters.CSiShared/ServiceRegistration.cs b/Converters/CSi/Speckle.Converters.CSiShared/ServiceRegistration.cs new file mode 100644 index 000000000..aa6819e91 --- /dev/null +++ b/Converters/CSi/Speckle.Converters.CSiShared/ServiceRegistration.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using Microsoft.Extensions.DependencyInjection; +using Speckle.Converters.Common; +using Speckle.Converters.Common.Registration; +using Speckle.Converters.CSiShared.ToSpeckle.Helpers; +using Speckle.Converters.CSiShared.ToSpeckle.TopLevel; +using Speckle.Sdk; + +namespace Speckle.Converters.CSiShared; + +public static class ServiceRegistration +{ + public static IServiceCollection AddCSiConverters(this IServiceCollection serviceCollection) + { + var converterAssembly = Assembly.GetExecutingAssembly(); + + serviceCollection.AddTransient(); + serviceCollection.AddScoped(); + + // TODO: Property extractor + + serviceCollection.AddRootCommon(converterAssembly); + serviceCollection.AddApplicationConverters(converterAssembly); + serviceCollection.AddScoped< + IConverterSettingsStore, + ConverterSettingsStore + >(); + + serviceCollection.AddMatchingInterfacesAsTransient(converterAssembly); + + return serviceCollection; + } +} diff --git a/Converters/CSi/Speckle.Converters.CSiShared/Speckle.Converters.CSiShared.projitems b/Converters/CSi/Speckle.Converters.CSiShared/Speckle.Converters.CSiShared.projitems new file mode 100644 index 000000000..0a27119d4 --- /dev/null +++ b/Converters/CSi/Speckle.Converters.CSiShared/Speckle.Converters.CSiShared.projitems @@ -0,0 +1,25 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + 1b5c5fb2-3b22-4371-9aa5-3edf3b4d62de + + + Speckle.Converters.CSiShared + + + + + + + + + + + + + + + + diff --git a/Converters/CSi/Speckle.Converters.CSiShared/Speckle.Converters.CSiShared.shproj b/Converters/CSi/Speckle.Converters.CSiShared/Speckle.Converters.CSiShared.shproj new file mode 100644 index 000000000..2de5c6157 --- /dev/null +++ b/Converters/CSi/Speckle.Converters.CSiShared/Speckle.Converters.CSiShared.shproj @@ -0,0 +1,13 @@ + + + + 1b5c5fb2-3b22-4371-9aa5-3edf3b4d62de + 14.0 + + + + + + + + diff --git a/Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/Helpers/DisplayValueExtractor.cs b/Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/Helpers/DisplayValueExtractor.cs new file mode 100644 index 000000000..248d21465 --- /dev/null +++ b/Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/Helpers/DisplayValueExtractor.cs @@ -0,0 +1,49 @@ +using Speckle.Converters.Common.Objects; +using Speckle.Objects.Geometry; +using Speckle.Sdk.Models; + +namespace Speckle.Converters.CSiShared.ToSpeckle.Helpers; + +public class DisplayValueExtractor +{ + private readonly ITypedConverter _jointConverter; + private readonly ITypedConverter _frameConverter; + private readonly ITypedConverter _shellConverter; + + public DisplayValueExtractor( + ITypedConverter jointConverter, + ITypedConverter frameConverter, + ITypedConverter shellConverter + ) + { + _jointConverter = jointConverter; + _frameConverter = frameConverter; + _shellConverter = shellConverter; + } + + public IEnumerable GetDisplayValue(ICSiWrapper wrapper) + { + return wrapper switch + { + CSiJointWrapper joint => ExtractJoint(joint), + CSiFrameWrapper frame => ExtractFrame(frame), + CSiShellWrapper shell => ExtractShell(shell), + _ => Enumerable.Empty() + }; + } + + private IEnumerable ExtractJoint(CSiJointWrapper target) + { + yield return _jointConverter.Convert(target); + } + + private IEnumerable ExtractFrame(CSiFrameWrapper target) + { + yield return _frameConverter.Convert(target); + } + + private IEnumerable ExtractShell(CSiShellWrapper target) + { + yield return _shellConverter.Convert(target); + } +} diff --git a/Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/Raw/FrameToSpeckleConverter.cs b/Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/Raw/FrameToSpeckleConverter.cs new file mode 100644 index 000000000..9655c60cb --- /dev/null +++ b/Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/Raw/FrameToSpeckleConverter.cs @@ -0,0 +1,58 @@ +using Speckle.Converters.Common; +using Speckle.Converters.Common.Objects; +using Speckle.Objects.Geometry; + +namespace Speckle.Converters.CSiShared.ToSpeckle.Raw; + +// NOTE: This is HORRIBLE but serves just as a poc! We need point caching and weak referencing to joint objects +public class FrameToSpeckleConverter : ITypedConverter +{ + private readonly IConverterSettingsStore _settingsStore; + private readonly ITypedConverter _pointConverter; + + public FrameToSpeckleConverter( + IConverterSettingsStore settingsStore, + ITypedConverter pointConverter + ) + { + _settingsStore = settingsStore; + _pointConverter = pointConverter; + } + + public Line Convert(CSiFrameWrapper target) // NOTE: THIS IS TEMPORARY POC + { + // frame points + string startPoint = "", + endPoint = ""; + if (_settingsStore.Current.SapModel.FrameObj.GetPoints(target.Name, ref startPoint, ref endPoint) != 0) + { + throw new ArgumentException($"Failed to convert frame {target.Name}"); + } + + // start point coordinates + double startX = 0, + startY = 0, + startZ = 0; + if (_settingsStore.Current.SapModel.PointObj.GetCoordCartesian(startPoint, ref startX, ref startY, ref startZ) != 0) + { + throw new ArgumentException($"Failed to convert point {startPoint}"); + } + + // end point coordinates + double endX = 0, + endY = 0, + endZ = 0; + if (_settingsStore.Current.SapModel.PointObj.GetCoordCartesian(endPoint, ref endX, ref endY, ref endZ) != 0) + { + throw new ArgumentException($"Failed to convert point {endPoint}"); + } + + // Create and return the line + return new() + { + start = new Point(startX, startY, startZ, _settingsStore.Current.SpeckleUnits), + end = new Point(endX, endY, endZ, _settingsStore.Current.SpeckleUnits), + units = _settingsStore.Current.SpeckleUnits + }; + } +} diff --git a/Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/Raw/JointToSpeckleConverter.cs b/Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/Raw/JointToSpeckleConverter.cs new file mode 100644 index 000000000..b82da95e9 --- /dev/null +++ b/Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/Raw/JointToSpeckleConverter.cs @@ -0,0 +1,41 @@ +using Speckle.Converters.Common; +using Speckle.Converters.Common.Objects; +using Speckle.Objects.Geometry; + +namespace Speckle.Converters.CSiShared.ToSpeckle.Raw; + +// NOTE: This is HORRIBLE but serves just as a poc! +public class JointToSpeckleConverter : ITypedConverter +{ + private readonly IConverterSettingsStore _settingStore; + + public JointToSpeckleConverter(IConverterSettingsStore settingStore) + { + _settingStore = settingStore; + } + + public Point Convert(CSiJointWrapper target) // NOTE: This is just a temporary POC + { + string applicationId = ""; + + _ = _settingStore.Current.SapModel.PointObj.GetGUID(target.Name, ref applicationId); + + double pointX = 0; + double pointY = 0; + double pointZ = 0; + + int result = _settingStore.Current.SapModel.PointObj.GetCoordCartesian( + target.Name, + ref pointX, + ref pointY, + ref pointZ + ); + + if (result != 0) + { + throw new ArgumentException($"Failed to convert {target.Name} to {typeof(Point)}"); + } + + return new(pointX, pointY, pointZ, _settingStore.Current.SpeckleUnits, applicationId); + } +} diff --git a/Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/Raw/ShellToSpeckleConverter.cs b/Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/Raw/ShellToSpeckleConverter.cs new file mode 100644 index 000000000..461bf0b47 --- /dev/null +++ b/Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/Raw/ShellToSpeckleConverter.cs @@ -0,0 +1,70 @@ +using Speckle.Converters.Common; +using Speckle.Converters.Common.Objects; +using Speckle.Objects.Geometry; + +namespace Speckle.Converters.CSiShared.ToSpeckle.Raw; + +// NOTE: This is HORRIBLE but serves just as a poc! We need point caching and weak referencing to joint objects +public class ShellToSpeckleConverter : ITypedConverter +{ + private readonly IConverterSettingsStore _settingsStore; + + public ShellToSpeckleConverter(IConverterSettingsStore settingsStore) + { + _settingsStore = settingsStore; + } + + public Mesh Convert(CSiShellWrapper target) + { + int numberPoints = 0; + string[] pointNames = Array.Empty(); + int result = _settingsStore.Current.SapModel.AreaObj.GetPoints(target.Name, ref numberPoints, ref pointNames); + + if (result != 0) + { + throw new ArgumentException($"Failed to convert {target.Name} to Speckle Mesh"); + } + + // List to store vertices defining a face + List vertices = new List(); + List faces = new List(); + + // How many vertices to define a face? + faces.Add(numberPoints); + + // Lopp through points to get coordinates + // TODO: This is gross! + foreach (string pointName in pointNames) + { + double pointX = 0; + double pointY = 0; + double pointZ = 0; + + result = _settingsStore.Current.SapModel.PointObj.GetCoordCartesian( + pointName, + ref pointX, + ref pointY, + ref pointZ + ); + + if (result != 0) + { + throw new ArgumentException($"Failed to retrieve coordinate of vertex point name {pointName}."); + } + + // Add vertex info + vertices.Add(pointX); + vertices.Add(pointY); + vertices.Add(pointZ); + + // TODO: Check normals direction? + } + + return new Mesh() + { + vertices = vertices, + faces = faces, + units = _settingsStore.Current.SpeckleUnits + }; + } +} diff --git a/Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/TopLevel/CSiObjectToSpeckleConverter.cs b/Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/TopLevel/CSiObjectToSpeckleConverter.cs new file mode 100644 index 000000000..d387b4cc5 --- /dev/null +++ b/Converters/CSi/Speckle.Converters.CSiShared/ToSpeckle/TopLevel/CSiObjectToSpeckleConverter.cs @@ -0,0 +1,42 @@ +using Speckle.Converters.Common; +using Speckle.Converters.Common.Objects; +using Speckle.Converters.CSiShared.ToSpeckle.Helpers; +using Speckle.Sdk.Models; + +namespace Speckle.Converters.CSiShared.ToSpeckle.TopLevel; + +[NameAndRankValue(nameof(CSiWrapperBase), NameAndRankValueAttribute.SPECKLE_DEFAULT_RANK)] +public class CSiObjectToSpeckleConverter : IToSpeckleTopLevelConverter +{ + private readonly IConverterSettingsStore _settingsStore; + private readonly DisplayValueExtractor _displayValueExtractor; + + // TODO: _propertyExtractor + + public CSiObjectToSpeckleConverter( + IConverterSettingsStore settingsStore, + DisplayValueExtractor displayValueExtractor + // TODO: _propertyExtractor + ) + { + _settingsStore = settingsStore; + _displayValueExtractor = displayValueExtractor; + // TODO: _property_extractor + } + + public Base Convert(object target) => Convert((CSiWrapperBase)target); + + private Base Convert(CSiWrapperBase target) + { + var result = new Base + { + ["name"] = target.Name, + ["type"] = target.GetType().ToString().Split('.').Last().Replace("Wrapper", ""), // CSiJointWrapper → CSiJoint, CSiFrameWrapper → CSiFrame etc. + ["units"] = _settingsStore.Current.SpeckleUnits, + // TODO: properties + ["displayValue"] = _displayValueExtractor.GetDisplayValue(target).ToList() + }; + + return result; + } +} diff --git a/Converters/CSi/Speckle.Converters.ETABS21/Speckle.Converters.ETABS21.csproj b/Converters/CSi/Speckle.Converters.ETABS21/Speckle.Converters.ETABS21.csproj new file mode 100644 index 000000000..7803e3924 --- /dev/null +++ b/Converters/CSi/Speckle.Converters.ETABS21/Speckle.Converters.ETABS21.csproj @@ -0,0 +1,19 @@ + + + + net48 + enable + enable + + + + + + + + + + + + + diff --git a/Converters/CSi/Speckle.Converters.ETABS21/packages.lock.json b/Converters/CSi/Speckle.Converters.ETABS21/packages.lock.json new file mode 100644 index 000000000..29676a680 --- /dev/null +++ b/Converters/CSi/Speckle.Converters.ETABS21/packages.lock.json @@ -0,0 +1,321 @@ +{ + "version": 2, + "dependencies": { + ".NETFramework,Version=v4.8": { + "Microsoft.NETFramework.ReferenceAssemblies": { + "type": "Direct", + "requested": "[1.0.3, )", + "resolved": "1.0.3", + "contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==", + "dependencies": { + "Microsoft.NETFramework.ReferenceAssemblies.net48": "1.0.3" + } + }, + "Microsoft.SourceLink.GitHub": { + "type": "Direct", + "requested": "[8.0.0, )", + "resolved": "8.0.0", + "contentHash": "G5q7OqtwIyGTkeIOAc3u2ZuV/kicQaec5EaRnc0pIeSnh9LUjj+PYQrJYBURvDt7twGl2PKA7nSN0kz1Zw5bnQ==", + "dependencies": { + "Microsoft.Build.Tasks.Git": "8.0.0", + "Microsoft.SourceLink.Common": "8.0.0" + } + }, + "PolySharp": { + "type": "Direct", + "requested": "[1.14.1, )", + "resolved": "1.14.1", + "contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ==" + }, + "Speckle.CSI.API": { + "type": "Direct", + "requested": "[1.30.0, )", + "resolved": "1.30.0", + "contentHash": "4S5Udr+YDU43YgB+TXgnPtGioRj1hDnucHlr42ikr72h1yQwzmkC2HwWJibjZD+sOrAke67q1N8geIqJj9Ss4Q==" + }, + "Speckle.InterfaceGenerator": { + "type": "Direct", + "requested": "[0.9.6, )", + "resolved": "0.9.6", + "contentHash": "HKH7tYrYYlCK1ct483hgxERAdVdMtl7gUKW9ijWXxA1UsYR4Z+TrRHYmzZ9qmpu1NnTycSrp005NYM78GDKV1w==" + }, + "GraphQL.Client": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "8yPNBbuVBpTptivyAlak4GZvbwbUcjeQTL4vN1HKHRuOykZ4r7l5fcLS6vpyPyLn0x8FsL31xbOIKyxbmR9rbA==", + "dependencies": { + "GraphQL.Client.Abstractions": "6.0.0", + "GraphQL.Client.Abstractions.Websocket": "6.0.0", + "System.Net.WebSockets.Client.Managed": "1.0.22", + "System.Reactive": "5.0.0" + } + }, + "GraphQL.Client.Abstractions": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "h7uzWFORHZ+CCjwr/ThAyXMr0DPpzEANDa4Uo54wqCQ+j7qUKwqYTgOrb1W40sqbvNaZm9v/X7It31SUw0maHA==", + "dependencies": { + "GraphQL.Primitives": "6.0.0" + } + }, + "GraphQL.Client.Abstractions.Websocket": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "Nr9bPf8gIOvLuXpqEpqr9z9jslYFJOvd0feHth3/kPqeR3uMbjF5pjiwh4jxyMcxHdr8Pb6QiXkV3hsSyt0v7A==", + "dependencies": { + "GraphQL.Client.Abstractions": "6.0.0" + } + }, + "GraphQL.Primitives": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "yg72rrYDapfsIUrul7aF6wwNnTJBOFvuA9VdDTQpPa8AlAriHbufeXYLBcodKjfUdkCnaiggX1U/nEP08Zb5GA==" + }, + "Microsoft.Bcl.AsyncInterfaces": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==", + "dependencies": { + "System.Threading.Tasks.Extensions": "4.5.4" + } + }, + "Microsoft.Build.Tasks.Git": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ==" + }, + "Microsoft.CSharp": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA==" + }, + "Microsoft.Data.Sqlite": { + "type": "Transitive", + "resolved": "7.0.5", + "contentHash": "KGxbPeWsQMnmQy43DSBxAFtHz3l2JX8EWBSGUCvT3CuZ8KsuzbkqMIJMDOxWtG8eZSoCDI04aiVQjWuuV8HmSw==", + "dependencies": { + "Microsoft.Data.Sqlite.Core": "7.0.5", + "SQLitePCLRaw.bundle_e_sqlite3": "2.1.4" + } + }, + "Microsoft.Data.Sqlite.Core": { + "type": "Transitive", + "resolved": "7.0.5", + "contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==", + "dependencies": { + "SQLitePCLRaw.core": "2.1.4" + } + }, + "Microsoft.Extensions.Configuration": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "nOP8R1mVb/6mZtm2qgAJXn/LFm/2kMjHDAg/QJLFG6CuWYJtaD3p1BwQhufBVvRzL9ceJ/xF0SQ0qsI2GkDQAA==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "2.2.0" + } + }, + "Microsoft.Extensions.Configuration.Abstractions": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "65MrmXCziWaQFrI0UHkQbesrX5wTwf9XPjY5yFm/VkgJKFJ5gqvXRoXjIZcf2wLi5ZlwGz/oMYfyURVCWbM5iw==", + "dependencies": { + "Microsoft.Extensions.Primitives": "2.2.0" + } + }, + "Microsoft.Extensions.Configuration.Binder": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "vJ9xvOZCnUAIHcGC3SU35r3HKmHTVIeHzo6u/qzlHAqD8m6xv92MLin4oJntTvkpKxVX3vI1GFFkIQtU3AdlsQ==", + "dependencies": { + "Microsoft.Extensions.Configuration": "2.2.0" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "f9hstgjVmr6rmrfGSpfsVOl2irKAgr1QjrSi3FgnS7kulxband50f2brRLwySAQTADPZeTdow0mpSMcoAdadCw==" + }, + "Microsoft.Extensions.Options": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "UpZLNLBpIZ0GTebShui7xXYh6DmBHjWM8NxGxZbdQh/bPZ5e6YswqI+bru6BnEL5eWiOdodsXtEz3FROcgi/qg==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0", + "Microsoft.Extensions.Primitives": "2.2.0", + "System.ComponentModel.Annotations": "4.5.0" + } + }, + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "azyQtqbm4fSaDzZHD/J+V6oWMFaf2tWP4WEGIYePLCMw3+b2RQdj9ybgbQyjCshcitQKQ4lEDOZjmSlTTrHxUg==", + "dependencies": { + "System.Memory": "4.5.1", + "System.Runtime.CompilerServices.Unsafe": "4.5.1" + } + }, + "Microsoft.NETFramework.ReferenceAssemblies.net48": { + "type": "Transitive", + "resolved": "1.0.3", + "contentHash": "zMk4D+9zyiEWByyQ7oPImPN/Jhpj166Ky0Nlla4eXlNL8hI/BtSJsgR8Inldd4NNpIAH3oh8yym0W2DrhXdSLQ==" + }, + "Microsoft.SourceLink.Common": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw==" + }, + "Speckle.DoubleNumerics": { + "type": "Transitive", + "resolved": "4.0.1", + "contentHash": "MzEQ1Im0zTja+tEsdRIk/WlPiKqb22NmTOJcR1ZKm/mz46pezyyID3/wRz6vJUELMpSLnG7LhsxBL+nxbr7V0w==" + }, + "Speckle.Newtonsoft.Json": { + "type": "Transitive", + "resolved": "13.0.2", + "contentHash": "g1BejUZwax5PRfL6xHgLEK23sqHWOgOj9hE7RvfRRlN00AGt8GnPYt8HedSK7UB3HiRW8zCA9Pn0iiYxCK24BA==" + }, + "SQLitePCLRaw.bundle_e_sqlite3": { + "type": "Transitive", + "resolved": "2.1.4", + "contentHash": "EWI1olKDjFEBMJu0+3wuxwziIAdWDVMYLhuZ3Qs84rrz+DHwD00RzWPZCa+bLnHCf3oJwuFZIRsHT5p236QXww==", + "dependencies": { + "SQLitePCLRaw.lib.e_sqlite3": "2.1.4", + "SQLitePCLRaw.provider.dynamic_cdecl": "2.1.4" + } + }, + "SQLitePCLRaw.core": { + "type": "Transitive", + "resolved": "2.1.4", + "contentHash": "inBjvSHo9UDKneGNzfUfDjK08JzlcIhn1+SP5Y3m6cgXpCxXKCJDy6Mka7LpgSV+UZmKSnC8rTwB0SQ0xKu5pA==", + "dependencies": { + "System.Memory": "4.5.3" + } + }, + "SQLitePCLRaw.lib.e_sqlite3": { + "type": "Transitive", + "resolved": "2.1.4", + "contentHash": "2C9Q9eX7CPLveJA0rIhf9RXAvu+7nWZu1A2MdG6SD/NOu26TakGgL1nsbc0JAspGijFOo3HoN79xrx8a368fBg==" + }, + "SQLitePCLRaw.provider.dynamic_cdecl": { + "type": "Transitive", + "resolved": "2.1.4", + "contentHash": "ZsaKKhgYF9B1fvcnOGKl3EycNAwd9CRWX7v0rEfuPWhQQ5Jjpvf2VEHahiLIGHio3hxi3EIKFJw9KvyowWOUAw==", + "dependencies": { + "SQLitePCLRaw.core": "2.1.4" + } + }, + "System.Buffers": { + "type": "Transitive", + "resolved": "4.4.0", + "contentHash": "AwarXzzoDwX6BgrhjoJsk6tUezZEozOT5Y9QKF94Gl4JK91I4PIIBkBco9068Y9/Dra8Dkbie99kXB8+1BaYKw==" + }, + "System.ComponentModel.Annotations": { + "type": "Transitive", + "resolved": "4.5.0", + "contentHash": "UxYQ3FGUOtzJ7LfSdnYSFd7+oEv6M8NgUatatIN2HxNtDdlcvFAf+VIq4Of9cDMJEJC0aSRv/x898RYhB4Yppg==" + }, + "System.Memory": { + "type": "Transitive", + "resolved": "4.5.3", + "contentHash": "3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==", + "dependencies": { + "System.Buffers": "4.4.0", + "System.Numerics.Vectors": "4.4.0", + "System.Runtime.CompilerServices.Unsafe": "4.5.2" + } + }, + "System.Net.WebSockets.Client.Managed": { + "type": "Transitive", + "resolved": "1.0.22", + "contentHash": "WqEOxPlXjuZrIjUtXNE9NxEfU/n5E35iV2PtoZdJSUC4tlrqwHnTee+wvMIM4OUaJWmwrymeqcgYrE0IkGAgLA==", + "dependencies": { + "System.Buffers": "4.4.0", + "System.Numerics.Vectors": "4.4.0" + } + }, + "System.Numerics.Vectors": { + "type": "Transitive", + "resolved": "4.4.0", + "contentHash": "UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==" + }, + "System.Reactive": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==", + "dependencies": { + "System.Threading.Tasks.Extensions": "4.5.4" + } + }, + "System.Runtime.CompilerServices.Unsafe": { + "type": "Transitive", + "resolved": "4.5.3", + "contentHash": "3TIsJhD1EiiT0w2CcDMN/iSSwnNnsrnbzeVHSKkaEgV85txMprmuO+Yq2AdSbeVGcg28pdNDTPK87tJhX7VFHw==" + }, + "System.Threading.Tasks.Extensions": { + "type": "Transitive", + "resolved": "4.5.4", + "contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "4.5.3" + } + }, + "speckle.converters.common": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )", + "Speckle.Objects": "[3.1.0-dev.203, )" + } + }, + "Microsoft.Extensions.Logging": { + "type": "CentralTransitive", + "requested": "[2.2.0, )", + "resolved": "2.2.0", + "contentHash": "Nxqhadc9FCmFHzU+fz3oc8sFlE6IadViYg8dfUdGzJZ2JUxnCsRghBhhOWdM4B2zSZqEc+0BjliBh/oNdRZuig==", + "dependencies": { + "Microsoft.Extensions.Configuration.Binder": "2.2.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0", + "Microsoft.Extensions.Logging.Abstractions": "2.2.0", + "Microsoft.Extensions.Options": "2.2.0" + } + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "CentralTransitive", + "requested": "[2.2.0, )", + "resolved": "2.2.0", + "contentHash": "B2WqEox8o+4KUOpL7rZPyh6qYjik8tHi2tN8Z9jZkHzED8ElYgZa/h6K+xliB435SqUcWT290Fr2aa8BtZjn8A==" + }, + "Speckle.Objects": { + "type": "CentralTransitive", + "requested": "[3.1.0-dev.203, )", + "resolved": "3.1.0-dev.203", + "contentHash": "7FiT0ouWGcUDln2iJt75psiLZzZ0GaDBgR8meFEIdxJKuhq0QmIX4ll9uwsRsmt9vFJBasvdYpkZqppAH70l3A==", + "dependencies": { + "Speckle.Sdk": "3.1.0-dev.203" + } + }, + "Speckle.Sdk": { + "type": "CentralTransitive", + "requested": "[3.1.0-dev.203, )", + "resolved": "3.1.0-dev.203", + "contentHash": "vCqzyfPw2T1WeON4mdU5o59lde262EoGYIYyULI4PE+JdJGaqr8sy9TucSL8BpSc5QRHfS8S6osINYp0/kSRSw==", + "dependencies": { + "GraphQL.Client": "6.0.0", + "Microsoft.Bcl.AsyncInterfaces": "5.0.0", + "Microsoft.CSharp": "4.7.0", + "Microsoft.Data.Sqlite": "7.0.5", + "Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0", + "Microsoft.Extensions.Logging": "2.2.0", + "Speckle.DoubleNumerics": "4.0.1", + "Speckle.Newtonsoft.Json": "13.0.2", + "Speckle.Sdk.Dependencies": "3.1.0-dev.203" + } + }, + "Speckle.Sdk.Dependencies": { + "type": "CentralTransitive", + "requested": "[3.1.0-dev.203, )", + "resolved": "3.1.0-dev.203", + "contentHash": "jbA6aj1PEkQLpyexUcvGgMHlkjsGCJa1DQndBIPiH3awbOVxzsXc5Yufq17fnI4CkAcMvagp8RE+yEc89l8MAw==" + } + } + } +} \ No newline at end of file diff --git a/Converters/CSi/Speckle.Converters.ETABS22/Speckle.Converters.ETABS22.csproj b/Converters/CSi/Speckle.Converters.ETABS22/Speckle.Converters.ETABS22.csproj new file mode 100644 index 000000000..20610d5ca --- /dev/null +++ b/Converters/CSi/Speckle.Converters.ETABS22/Speckle.Converters.ETABS22.csproj @@ -0,0 +1,19 @@ + + + + net8.0-windows + enable + enable + + + + + + + + + + + + + diff --git a/Converters/CSi/Speckle.Converters.ETABS22/packages.lock.json b/Converters/CSi/Speckle.Converters.ETABS22/packages.lock.json new file mode 100644 index 000000000..45521324c --- /dev/null +++ b/Converters/CSi/Speckle.Converters.ETABS22/packages.lock.json @@ -0,0 +1,276 @@ +{ + "version": 2, + "dependencies": { + "net8.0-windows7.0": { + "Microsoft.NETFramework.ReferenceAssemblies": { + "type": "Direct", + "requested": "[1.0.3, )", + "resolved": "1.0.3", + "contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==", + "dependencies": { + "Microsoft.NETFramework.ReferenceAssemblies.net461": "1.0.3" + } + }, + "Microsoft.SourceLink.GitHub": { + "type": "Direct", + "requested": "[8.0.0, )", + "resolved": "8.0.0", + "contentHash": "G5q7OqtwIyGTkeIOAc3u2ZuV/kicQaec5EaRnc0pIeSnh9LUjj+PYQrJYBURvDt7twGl2PKA7nSN0kz1Zw5bnQ==", + "dependencies": { + "Microsoft.Build.Tasks.Git": "8.0.0", + "Microsoft.SourceLink.Common": "8.0.0" + } + }, + "PolySharp": { + "type": "Direct", + "requested": "[1.14.1, )", + "resolved": "1.14.1", + "contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ==" + }, + "Speckle.CSI.API": { + "type": "Direct", + "requested": "[2.4.0, )", + "resolved": "2.4.0", + "contentHash": "/n3qIBeamiYlWm77/2+dDPYExm/MoDEtnu5IPB2G9Dei06wMgkdBefaSDKWnh3u4iuyha6TvrBZgVGosUylRDg==" + }, + "Speckle.InterfaceGenerator": { + "type": "Direct", + "requested": "[0.9.6, )", + "resolved": "0.9.6", + "contentHash": "HKH7tYrYYlCK1ct483hgxERAdVdMtl7gUKW9ijWXxA1UsYR4Z+TrRHYmzZ9qmpu1NnTycSrp005NYM78GDKV1w==" + }, + "GraphQL.Client": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "8yPNBbuVBpTptivyAlak4GZvbwbUcjeQTL4vN1HKHRuOykZ4r7l5fcLS6vpyPyLn0x8FsL31xbOIKyxbmR9rbA==", + "dependencies": { + "GraphQL.Client.Abstractions": "6.0.0", + "GraphQL.Client.Abstractions.Websocket": "6.0.0", + "System.Reactive": "5.0.0" + } + }, + "GraphQL.Client.Abstractions": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "h7uzWFORHZ+CCjwr/ThAyXMr0DPpzEANDa4Uo54wqCQ+j7qUKwqYTgOrb1W40sqbvNaZm9v/X7It31SUw0maHA==", + "dependencies": { + "GraphQL.Primitives": "6.0.0" + } + }, + "GraphQL.Client.Abstractions.Websocket": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "Nr9bPf8gIOvLuXpqEpqr9z9jslYFJOvd0feHth3/kPqeR3uMbjF5pjiwh4jxyMcxHdr8Pb6QiXkV3hsSyt0v7A==", + "dependencies": { + "GraphQL.Client.Abstractions": "6.0.0" + } + }, + "GraphQL.Primitives": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "yg72rrYDapfsIUrul7aF6wwNnTJBOFvuA9VdDTQpPa8AlAriHbufeXYLBcodKjfUdkCnaiggX1U/nEP08Zb5GA==" + }, + "Microsoft.Build.Tasks.Git": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ==" + }, + "Microsoft.CSharp": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA==" + }, + "Microsoft.Data.Sqlite": { + "type": "Transitive", + "resolved": "7.0.5", + "contentHash": "KGxbPeWsQMnmQy43DSBxAFtHz3l2JX8EWBSGUCvT3CuZ8KsuzbkqMIJMDOxWtG8eZSoCDI04aiVQjWuuV8HmSw==", + "dependencies": { + "Microsoft.Data.Sqlite.Core": "7.0.5", + "SQLitePCLRaw.bundle_e_sqlite3": "2.1.4" + } + }, + "Microsoft.Data.Sqlite.Core": { + "type": "Transitive", + "resolved": "7.0.5", + "contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==", + "dependencies": { + "SQLitePCLRaw.core": "2.1.4" + } + }, + "Microsoft.Extensions.Configuration": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "nOP8R1mVb/6mZtm2qgAJXn/LFm/2kMjHDAg/QJLFG6CuWYJtaD3p1BwQhufBVvRzL9ceJ/xF0SQ0qsI2GkDQAA==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "2.2.0" + } + }, + "Microsoft.Extensions.Configuration.Abstractions": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "65MrmXCziWaQFrI0UHkQbesrX5wTwf9XPjY5yFm/VkgJKFJ5gqvXRoXjIZcf2wLi5ZlwGz/oMYfyURVCWbM5iw==", + "dependencies": { + "Microsoft.Extensions.Primitives": "2.2.0" + } + }, + "Microsoft.Extensions.Configuration.Binder": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "vJ9xvOZCnUAIHcGC3SU35r3HKmHTVIeHzo6u/qzlHAqD8m6xv92MLin4oJntTvkpKxVX3vI1GFFkIQtU3AdlsQ==", + "dependencies": { + "Microsoft.Extensions.Configuration": "2.2.0" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "f9hstgjVmr6rmrfGSpfsVOl2irKAgr1QjrSi3FgnS7kulxband50f2brRLwySAQTADPZeTdow0mpSMcoAdadCw==" + }, + "Microsoft.Extensions.Options": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "UpZLNLBpIZ0GTebShui7xXYh6DmBHjWM8NxGxZbdQh/bPZ5e6YswqI+bru6BnEL5eWiOdodsXtEz3FROcgi/qg==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0", + "Microsoft.Extensions.Primitives": "2.2.0", + "System.ComponentModel.Annotations": "4.5.0" + } + }, + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "azyQtqbm4fSaDzZHD/J+V6oWMFaf2tWP4WEGIYePLCMw3+b2RQdj9ybgbQyjCshcitQKQ4lEDOZjmSlTTrHxUg==", + "dependencies": { + "System.Memory": "4.5.1", + "System.Runtime.CompilerServices.Unsafe": "4.5.1" + } + }, + "Microsoft.NETFramework.ReferenceAssemblies.net461": { + "type": "Transitive", + "resolved": "1.0.3", + "contentHash": "AmOJZwCqnOCNp6PPcf9joyogScWLtwy0M1WkqfEQ0M9nYwyDD7EX9ZjscKS5iYnyvteX7kzSKFCKt9I9dXA6mA==" + }, + "Microsoft.SourceLink.Common": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw==" + }, + "Speckle.DoubleNumerics": { + "type": "Transitive", + "resolved": "4.0.1", + "contentHash": "MzEQ1Im0zTja+tEsdRIk/WlPiKqb22NmTOJcR1ZKm/mz46pezyyID3/wRz6vJUELMpSLnG7LhsxBL+nxbr7V0w==" + }, + "Speckle.Newtonsoft.Json": { + "type": "Transitive", + "resolved": "13.0.2", + "contentHash": "g1BejUZwax5PRfL6xHgLEK23sqHWOgOj9hE7RvfRRlN00AGt8GnPYt8HedSK7UB3HiRW8zCA9Pn0iiYxCK24BA==" + }, + "SQLitePCLRaw.bundle_e_sqlite3": { + "type": "Transitive", + "resolved": "2.1.4", + "contentHash": "EWI1olKDjFEBMJu0+3wuxwziIAdWDVMYLhuZ3Qs84rrz+DHwD00RzWPZCa+bLnHCf3oJwuFZIRsHT5p236QXww==", + "dependencies": { + "SQLitePCLRaw.lib.e_sqlite3": "2.1.4", + "SQLitePCLRaw.provider.e_sqlite3": "2.1.4" + } + }, + "SQLitePCLRaw.core": { + "type": "Transitive", + "resolved": "2.1.4", + "contentHash": "inBjvSHo9UDKneGNzfUfDjK08JzlcIhn1+SP5Y3m6cgXpCxXKCJDy6Mka7LpgSV+UZmKSnC8rTwB0SQ0xKu5pA==", + "dependencies": { + "System.Memory": "4.5.3" + } + }, + "SQLitePCLRaw.lib.e_sqlite3": { + "type": "Transitive", + "resolved": "2.1.4", + "contentHash": "2C9Q9eX7CPLveJA0rIhf9RXAvu+7nWZu1A2MdG6SD/NOu26TakGgL1nsbc0JAspGijFOo3HoN79xrx8a368fBg==" + }, + "SQLitePCLRaw.provider.e_sqlite3": { + "type": "Transitive", + "resolved": "2.1.4", + "contentHash": "CSlb5dUp1FMIkez9Iv5EXzpeq7rHryVNqwJMWnpq87j9zWZexaEMdisDktMsnnrzKM6ahNrsTkjqNodTBPBxtQ==", + "dependencies": { + "SQLitePCLRaw.core": "2.1.4" + } + }, + "System.ComponentModel.Annotations": { + "type": "Transitive", + "resolved": "4.5.0", + "contentHash": "UxYQ3FGUOtzJ7LfSdnYSFd7+oEv6M8NgUatatIN2HxNtDdlcvFAf+VIq4Of9cDMJEJC0aSRv/x898RYhB4Yppg==" + }, + "System.Memory": { + "type": "Transitive", + "resolved": "4.5.3", + "contentHash": "3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==" + }, + "System.Reactive": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==" + }, + "System.Runtime.CompilerServices.Unsafe": { + "type": "Transitive", + "resolved": "4.5.1", + "contentHash": "Zh8t8oqolRaFa9vmOZfdQm/qKejdqz0J9kr7o2Fu0vPeoH3BL1EOXipKWwkWtLT1JPzjByrF19fGuFlNbmPpiw==" + }, + "speckle.converters.common": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )", + "Speckle.Objects": "[3.1.0-dev.203, )" + } + }, + "Microsoft.Extensions.Logging": { + "type": "CentralTransitive", + "requested": "[2.2.0, )", + "resolved": "2.2.0", + "contentHash": "Nxqhadc9FCmFHzU+fz3oc8sFlE6IadViYg8dfUdGzJZ2JUxnCsRghBhhOWdM4B2zSZqEc+0BjliBh/oNdRZuig==", + "dependencies": { + "Microsoft.Extensions.Configuration.Binder": "2.2.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0", + "Microsoft.Extensions.Logging.Abstractions": "2.2.0", + "Microsoft.Extensions.Options": "2.2.0" + } + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "CentralTransitive", + "requested": "[2.2.0, )", + "resolved": "2.2.0", + "contentHash": "B2WqEox8o+4KUOpL7rZPyh6qYjik8tHi2tN8Z9jZkHzED8ElYgZa/h6K+xliB435SqUcWT290Fr2aa8BtZjn8A==" + }, + "Speckle.Objects": { + "type": "CentralTransitive", + "requested": "[3.1.0-dev.203, )", + "resolved": "3.1.0-dev.203", + "contentHash": "7FiT0ouWGcUDln2iJt75psiLZzZ0GaDBgR8meFEIdxJKuhq0QmIX4ll9uwsRsmt9vFJBasvdYpkZqppAH70l3A==", + "dependencies": { + "Speckle.Sdk": "3.1.0-dev.203" + } + }, + "Speckle.Sdk": { + "type": "CentralTransitive", + "requested": "[3.1.0-dev.203, )", + "resolved": "3.1.0-dev.203", + "contentHash": "vCqzyfPw2T1WeON4mdU5o59lde262EoGYIYyULI4PE+JdJGaqr8sy9TucSL8BpSc5QRHfS8S6osINYp0/kSRSw==", + "dependencies": { + "GraphQL.Client": "6.0.0", + "Microsoft.CSharp": "4.7.0", + "Microsoft.Data.Sqlite": "7.0.5", + "Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0", + "Microsoft.Extensions.Logging": "2.2.0", + "Speckle.DoubleNumerics": "4.0.1", + "Speckle.Newtonsoft.Json": "13.0.2", + "Speckle.Sdk.Dependencies": "3.1.0-dev.203" + } + }, + "Speckle.Sdk.Dependencies": { + "type": "CentralTransitive", + "requested": "[3.1.0-dev.203, )", + "resolved": "3.1.0-dev.203", + "contentHash": "jbA6aj1PEkQLpyexUcvGgMHlkjsGCJa1DQndBIPiH3awbOVxzsXc5Yufq17fnI4CkAcMvagp8RE+yEc89l8MAw==" + } + } + } +} \ No newline at end of file diff --git a/Local.sln b/Local.sln index 89f3b16cc..4fcb17378 100644 --- a/Local.sln +++ b/Local.sln @@ -208,6 +208,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ETABS21", "ETABS21", "{FCCE EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Connectors.ETABS21", "Connectors\CSi\Speckle.Connectors.ETABS21\Speckle.Connectors.ETABS21.csproj", "{1696F113-7F6B-49D6-A4EF-15751C7600F9}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Converters.ETABS21", "Converters\CSi\Speckle.Converters.ETABS21\Speckle.Converters.ETABS21.csproj", "{3B81B220-92E3-43FC-86C6-1E6DBEEB1917}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Converters.ETABS22", "Converters\CSi\Speckle.Converters.ETABS22\Speckle.Converters.ETABS22.csproj", "{5E924B13-B3E8-4724-9BA7-CE82E39866EB}" +EndProject +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Speckle.Converters.CSiShared", "Converters\CSi\Speckle.Converters.CSiShared\Speckle.Converters.CSiShared.shproj", "{1B5C5FB2-3B22-4371-9AA5-3EDF3B4D62DE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -533,6 +539,18 @@ Global {1696F113-7F6B-49D6-A4EF-15751C7600F9}.Local|Any CPU.Build.0 = Debug|Any CPU {1696F113-7F6B-49D6-A4EF-15751C7600F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {1696F113-7F6B-49D6-A4EF-15751C7600F9}.Release|Any CPU.Build.0 = Release|Any CPU + {3B81B220-92E3-43FC-86C6-1E6DBEEB1917}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B81B220-92E3-43FC-86C6-1E6DBEEB1917}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B81B220-92E3-43FC-86C6-1E6DBEEB1917}.Local|Any CPU.ActiveCfg = Debug|Any CPU + {3B81B220-92E3-43FC-86C6-1E6DBEEB1917}.Local|Any CPU.Build.0 = Debug|Any CPU + {3B81B220-92E3-43FC-86C6-1E6DBEEB1917}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B81B220-92E3-43FC-86C6-1E6DBEEB1917}.Release|Any CPU.Build.0 = Release|Any CPU + {5E924B13-B3E8-4724-9BA7-CE82E39866EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5E924B13-B3E8-4724-9BA7-CE82E39866EB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5E924B13-B3E8-4724-9BA7-CE82E39866EB}.Local|Any CPU.ActiveCfg = Debug|Any CPU + {5E924B13-B3E8-4724-9BA7-CE82E39866EB}.Local|Any CPU.Build.0 = Debug|Any CPU + {5E924B13-B3E8-4724-9BA7-CE82E39866EB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5E924B13-B3E8-4724-9BA7-CE82E39866EB}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -626,6 +644,9 @@ Global {A8E949B8-AA55-4909-99F0-8B551791A1F8} = {D2638AC8-28B2-4667-A47B-3FAB9F900E6F} {FCCE9A47-05D8-41CB-A8EE-586FC5B69545} = {1F11635B-410A-4B16-A909-99CE3CCEF52E} {1696F113-7F6B-49D6-A4EF-15751C7600F9} = {FCCE9A47-05D8-41CB-A8EE-586FC5B69545} + {3B81B220-92E3-43FC-86C6-1E6DBEEB1917} = {FCCE9A47-05D8-41CB-A8EE-586FC5B69545} + {5E924B13-B3E8-4724-9BA7-CE82E39866EB} = {F2A1E5FC-CFEF-4590-BF0D-BE7B9F74E567} + {1B5C5FB2-3B22-4371-9AA5-3EDF3B4D62DE} = {D2638AC8-28B2-4667-A47B-3FAB9F900E6F} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {EE253116-7070-4E9A-BCE8-2911C251B8C8} diff --git a/Speckle.Connectors.sln b/Speckle.Connectors.sln index c2d19b073..374f90147 100644 --- a/Speckle.Connectors.sln +++ b/Speckle.Connectors.sln @@ -203,6 +203,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ETABS21", "ETABS21", "{DA6A EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Connectors.ETABS21", "Connectors\CSi\Speckle.Connectors.ETABS21\Speckle.Connectors.ETABS21.csproj", "{115D6106-1801-484A-B4E5-BCC94B6E5C7F}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.ETABS21", "Converters\CSi\Speckle.Converters.ETABS21\Speckle.Converters.ETABS21.csproj", "{791E3288-8001-4D54-8EAB-03D1D7F51044}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.ETABS22", "Converters\CSi\Speckle.Converters.ETABS22\Speckle.Converters.ETABS22.csproj", "{D61ECD90-3D17-4AF0-8B1A-0E0AD302DFF9}" +EndProject +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Speckle.Converters.CSiShared", "Converters\CSi\Speckle.Converters.CSiShared\Speckle.Converters.CSiShared.shproj", "{1B5C5FB2-3B22-4371-9AA5-3EDF3B4D62DE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -510,6 +516,18 @@ Global {115D6106-1801-484A-B4E5-BCC94B6E5C7F}.Local|Any CPU.Build.0 = Debug|Any CPU {115D6106-1801-484A-B4E5-BCC94B6E5C7F}.Release|Any CPU.ActiveCfg = Release|Any CPU {115D6106-1801-484A-B4E5-BCC94B6E5C7F}.Release|Any CPU.Build.0 = Release|Any CPU + {791E3288-8001-4D54-8EAB-03D1D7F51044}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {791E3288-8001-4D54-8EAB-03D1D7F51044}.Debug|Any CPU.Build.0 = Debug|Any CPU + {791E3288-8001-4D54-8EAB-03D1D7F51044}.Local|Any CPU.ActiveCfg = Debug|Any CPU + {791E3288-8001-4D54-8EAB-03D1D7F51044}.Local|Any CPU.Build.0 = Debug|Any CPU + {791E3288-8001-4D54-8EAB-03D1D7F51044}.Release|Any CPU.ActiveCfg = Release|Any CPU + {791E3288-8001-4D54-8EAB-03D1D7F51044}.Release|Any CPU.Build.0 = Release|Any CPU + {D61ECD90-3D17-4AF0-8B1A-0E0AD302DFF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D61ECD90-3D17-4AF0-8B1A-0E0AD302DFF9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D61ECD90-3D17-4AF0-8B1A-0E0AD302DFF9}.Local|Any CPU.ActiveCfg = Debug|Any CPU + {D61ECD90-3D17-4AF0-8B1A-0E0AD302DFF9}.Local|Any CPU.Build.0 = Debug|Any CPU + {D61ECD90-3D17-4AF0-8B1A-0E0AD302DFF9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D61ECD90-3D17-4AF0-8B1A-0E0AD302DFF9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -603,6 +621,9 @@ Global {A8E949B8-AA55-4909-99F0-8B551791A1F8} = {181F0468-B7A7-4CD7-ABD1-7F32B3ABB991} {DA6A607B-C267-4B2E-9C8A-F50B2F1BBFE0} = {073F40A8-6C95-41C1-A2F3-369FFFCB9520} {115D6106-1801-484A-B4E5-BCC94B6E5C7F} = {DA6A607B-C267-4B2E-9C8A-F50B2F1BBFE0} + {791E3288-8001-4D54-8EAB-03D1D7F51044} = {DA6A607B-C267-4B2E-9C8A-F50B2F1BBFE0} + {D61ECD90-3D17-4AF0-8B1A-0E0AD302DFF9} = {C6CD9332-874A-49DA-BEB6-3FAA5A700793} + {1B5C5FB2-3B22-4371-9AA5-3EDF3B4D62DE} = {181F0468-B7A7-4CD7-ABD1-7F32B3ABB991} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {EE253116-7070-4E9A-BCE8-2911C251B8C8} @@ -613,6 +634,7 @@ Global Connectors\Tekla\Speckle.Connector.TeklaShared\Speckle.Connectors.TeklaShared.projitems*{025c85f8-f741-4600-bc46-5fead754b65d}*SharedItemsImports = 5 Connectors\CSi\Speckle.Connectors.CsiShared\Speckle.Connectors.CsiShared.projitems*{115d6106-1801-484a-b4e5-bcc94b6e5c7f}*SharedItemsImports = 5 Converters\Revit\Speckle.Converters.RevitShared\Speckle.Converters.RevitShared.projitems*{19424b55-058c-4e9c-b86f-700aef9eaec3}*SharedItemsImports = 5 + Converters\CSi\Speckle.Converters.CSiShared\Speckle.Converters.CSiShared.projitems*{1b5c5fb2-3b22-4371-9aa5-3edf3b4d62de}*SharedItemsImports = 13 Connectors\Rhino\Speckle.Connectors.RhinoShared\Speckle.Connectors.RhinoShared.projitems*{1e2644a9-6b31-4350-8772-ceaad6ee0b21}*SharedItemsImports = 5 Connectors\Tekla\Speckle.Connector.TeklaShared\Speckle.Connectors.TeklaShared.projitems*{2319c00f-b268-4e4c-9f88-6b379e2bbd22}*SharedItemsImports = 5 Converters\Autocad\Speckle.Converters.AutocadShared\Speckle.Converters.AutocadShared.projitems*{25172c49-7aa4-4739-bb07-69785094c379}*SharedItemsImports = 5 @@ -666,7 +688,6 @@ Global Connectors\Autocad\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems*{c70ebb84-ba5b-4f2f-819e-25e0985ba13c}*SharedItemsImports = 5 Connectors\Autocad\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems*{ca8eae01-ab9f-4ec1-b6f3-73721487e9e1}*SharedItemsImports = 5 Connectors\Autocad\Speckle.Connectors.Civil3dShared\Speckle.Connectors.Civil3dShared.projitems*{ca8eae01-ab9f-4ec1-b6f3-73721487e9e1}*SharedItemsImports = 5 - Converters\CSi\Speckle.Converters.CSiShared\Speckle.Converters.CSiShared.projitems*{d096fab7-af65-40fa-a41c-8c45c74400f3}*SharedItemsImports = 13 Converters\Revit\Speckle.Converters.RevitShared.Tests\Speckle.Converters.RevitShared.Tests.projitems*{d8069a23-ad2e-4c9e-8574-7e8c45296a46}*SharedItemsImports = 5 Converters\Revit\Speckle.Converters.RevitShared\Speckle.Converters.RevitShared.projitems*{d8069a23-ad2e-4c9e-8574-7e8c45296a46}*SharedItemsImports = 5 Converters\Autocad\Speckle.Converters.AutocadShared\Speckle.Converters.AutocadShared.projitems*{db31e57b-60fc-49be-91e0-1374290bcf03}*SharedItemsImports = 5