-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Navisworks proj cleanup #443
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## jsdb/navisworks #443 +/- ##
===============================================
Coverage 9.43% 9.43%
===============================================
Files 223 223
Lines 4207 4207
Branches 487 487
===============================================
Hits 397 397
Misses 3794 3794
Partials 16 16 ☔ View full report in Codecov by Sentry. |
adamhathcock
added a commit
that referenced
this pull request
Dec 17, 2024
* Navisworks Connector Init * Build crap * Moar Init * WIP - not yet working * Minor fixes * Fix missing constuctors * unfix * Test commit * Test commit * Handle Document Events * Document Model Store * Proper implementation * package updates * updated to dev * Document Events binding ??? * registration order * Minimised events subscribed and handle new document state to clear models * Stub Send command * Refactor Connector class to change access modifier of Container property The commit modifies the access modifier of the Container property in the Connector class from public to private. This change improves encapsulation and ensures that the property can only be accessed within the class itself. * Fix NavisworksDocumentStore model list initialization and document validation The commit fixes the initialization of the Models list in the NavisworksDocumentStore class. Instead of assigning an empty array, it now uses the Clear() method to clear the existing models. Additionally, the commit improves the document validation logic by checking if critical properties are accessible before considering the document valid. It also handles cases where the document is disposed. These changes ensure proper initialization of model lists and accurate document validation in NavisworksDocumentStore. * Effectively debouncing on the SDI changes events * Get Selected Objects * ElementSelectionExtension is a collection of helpers to aid the resolution of intent * [Navisworks] Manage document and model state changes - Refactor NavisworksDocumentEvents to manage both document and model state change notifications - Update comments to reflect the new functionality - Rename SubscribeToEvents method to SubscribeToDocumentModelEvents for clarity - Add HandleDocumentModelCountChanging and HandleDocumentModelCountChanged methods to track model count changes - Update OnDocumentModelCountChanged method name to NotifyValidModelStateChange for clarity - Update UnsubscribeFromEvents method name to UnsubscribeFromDocumentModelEvents for clarity - Remove unused constants from NavisworksDocumentStore class * Update Navisworks API references and fix typos - Update references to `Autodesk.Navisworks.Api` namespace to `NAV` namespace - Fix typo in file name: `GlobalUsings.cs` renamed to `GlobalUsing.cs` - Update references to `ModelItem` type from `Autodesk.Navisworks.Api` namespace to `NAV.ModelItem` - Update references to `Document` type from `Autodesk.Navisworks.Api` namespace to `NAV.Document` - Update references to database related types from `Autodesk.Navisworks.Api.Data` namespace to `NAV.Data` - Add new file: NavisworksRootObjectBuilder.cs - Remove unused using statements * Add Navisworks2024 converter dependencies and update project references - Added "Objects.Converter.Navisworks2024" to the packages.lock.json file with dependencies on "Speckle.Converters.Common" and "Speckle.Navisworks.API" - Updated the Speckle.Connectors.Navisworks2024.csproj file to include a reference to "Speckle.Converters.Navisworks2024.csproj" and "Speckle.Converters.Common.csproj" - Added "speckle.converters.common" to the packages.lock.json file with dependencies on "Microsoft.Extensions.Logging.Abstractions" and "Speckle.Objects" - Renamed files: - NavisworksConversionSettings.cs -> NavisworksConversionSettingsFactory.cs - GlobalUsings.cs -> GlobalUsing.cs - NavisworksConversionSettings.cs -> Settings/NavisworksConversionSettings.cs - NavisworksConversionSettings.cs -> Services/NavisworksToSpeckleUnitConverter.cs - NavisworksConversionSettings.cs -> ToSpeckle/NavisworksRootToSpeckleConverter.cs * feat: Add NavisworksSendBinding changes - Added Microsoft.Extensions.DependencyInjection and Microsoft.Extensions.Logging namespaces - Added Speckle.Connectors.Common.Operations namespace - Added Speckle.Connectors.DUI.Exceptions, Speckle.Connectors.DUI.Logging, and Speckle.Connectors.DUI.Models.Card namespaces - Added Speckle.Sdk and Speckle.Sdk.Common namespaces - Updated constructor of NavisworksSendBinding class to include additional parameters - Updated Send method in NavisworksSendBinding class to include try-catch block for handling exceptions during send operation - Updated CancelSend method in NavisworksSendBinding class to call the cancellation manager's CancelOperation method with the modelCardId parameter - Added ResolveIndexPathToModelItem method in ElementSelectionExtension class to resolve the model item path from an index path string - Added ResolveGeometryLeafNodes method in ElementSelectionExtension class to resolve geometry leaf nodes from a model item - Updated Send method in NavisworksSendBinding class to use the resolved model items for sending data * Update namespace in Navisworks plugin files - Update namespace from "Speckle.Connector.Navisworks.NavisPlugin" to "Speckle.Connector.Navisworks.Plugin" in Commands.cs, DockableConnectorPane.cs, and NavisworksRibbon.xaml.cs files. * Add Navisworks sending operations and converters - Added sending operations for Navisworks models - Registered the root object builder and send operation for Navisworks model items - Added Navisworks converters to the service registration - Updated the NavisworksRootToSpeckleConverter to handle null targets and validate target type before conversion * Add folder to project items - Added a new folder to the project items in the Navisworks converter. - The folder includes the necessary files for extensions, global using, service registration, and conversion settings factory. * Refactor NavisworksConversionSettings class to use properties instead of fields - Convert fields to properties in NavisworksConversionSettings class - Update constructor to initialize properties instead of fields * Add Navisworks conversion settings factory and store initialization - Add `INavisworksConversionSettingsFactory` to the constructor of `NavisworksSendBinding` - Initialize `_conversionSettingsFactory` in the constructor of `NavisworksSendBinding` - Initialize the conversion settings store with `_conversionSettingsFactory.Create(NavisworksApp.ActiveDocument)` * Change element selection path separator from '.' to '/' in ElementSelectionExtension.cs This commit updates the code in ElementSelectionExtension.cs to change the default separator used for resolving a Navisworks model item's unique index path representation. The previous separator was '.', and it has been changed to '/'. This change ensures consistency and compatibility with other parts of the codebase that rely on this representation. * Add Navisworks model item to Speckle converter - Add `ModelItemToSpeckleConverter.cs` file for converting Navisworks model items to Speckle objects. - Update `GlobalUsing.cs` to include `SSM` namespace. - Update project file `Speckle.Converters.NavisworksShared.projitems` to include the new converter file. * Update Speckle.Objects and Speckle.Sdk versions to 3.1.0-dev.200 - Updated the requested and resolved versions of Speckle.Objects and Speckle.Sdk to 3.1.0-dev.200 in packages.lock.json files for Connectors/Navisworks/Speckle.Connectors.Navisworks2024 and Converters/Navisworks/Speckle.Converters.Navisworks2024 directories. - Also updated the contentHash values for both packages. Note: This commit updates the versions of Speckle.Objects and Speckle.Sdk to 3.1.0-dev.200 in the mentioned directories' packages.lock.json files, along with their respective contentHash values being updated as well. * Add Navisworks and 2024 projects, along with their connectors and converters This commit adds the Navisworks project, along with the 2024 project. It also includes the connectors and converters for both projects. * Add Navisworks conversion settings and modes This commit adds new files for Navisworks conversion settings and modes. - The `ConversionModes.cs` file defines enums for representation mode and origin mode used during conversion. - The `NavisworksConversionSettings.cs` file represents the settings used for Navisworks conversions, including properties such as document, units, origin mode, hidden elements, visual representation mode, and more. - A new factory class `NavisworksConversionSettingsFactory.cs` is added to create instances of the conversion settings with calculated values based on the active document. - A new file `GeometryHelpers.cs` which contains a static class `GeometryHelpers`. The class provides a method `VectorMatch` that compares two vectors to determine if they are approximately equal within a given tolerance. The method takes in two vectors and an optional tolerance value, and returns true if the vectors match within the tolerance, otherwise false. * Add ArrayExtensions.cs for converting arrays to generic type arrays This commit adds a new file, ArrayExtensions.cs, which contains an extension method for converting arrays to generic type arrays. The method uses the `Array.Copy` function to copy the elements of the original array into a new array of the specified generic type. This allows for more flexibility when working with arrays in the codebase. Specifically Navisworks heavily uses 1* indexed arrays which are a pain to access generically. * Delete Navisworks converters This commit deletes two files: ModelItemToSpeckleConverter.cs and NavisworksRootToSpeckleConverter.cs. These files contained code related to converting Navisworks models to Speckle format. The deletion of these files indicates that the functionality provided by these converters is no longer needed or has been replaced by other methods. * Add new classes for double-precision geometric primitives and transformation matrices - Added `Primitives.cs` file containing definitions for `PointD`, `TriangleD`, and `LineD` classes with double-precision vertex storage - Added `TransformMatrix.cs` file containing a class for 4x4 transformation matrices - Updated project items to include the new files in the build process * Add NavisworksObject and NavisworksGeometryObject classes This commit adds the NavisworksObject and NavisworksGeometryObject classes to handle non-geometry and geometry-based Speckle objects converted from Navisworks. These classes implement the INavisworksObject interface, which provides methods for adding properties to objects and retrieving property values by key. The NavisworksObject class represents a non-geometry object with a name property and a dictionary of properties, while the NavisworksGeometryObject class represents a geometry-based object with a displayValue property, name property, and a dictionary of properties. * Add ClassPropertiesExtractor, DisplayValueExtractor, and PropertySetsExtractor classes - Added ClassPropertiesExtractor class to extract class properties from a NAV.ModelItem - Added DisplayValueExtractor class to extract display values from a NAV.ModelItem - Added PropertySetsExtractor class to extract property sets from a NAV.ModelItem * feat: Add ExcludeProperties option to NavisworksConversionSettings This commit adds a new boolean property, ExcludeProperties, to the NavisworksConversionSettings class. This property allows users to specify whether properties should be excluded from the output. The default value is set to false. Changes: - Added ExcludeProperties boolean property to NavisworksConversionSettings - Updated NavisworksConversionSettingsFactory to include _excludeProperties field and pass it to the NavisworksConversionSettings constructor * feat: Add ModelItemTopLevelConverterToSpeckle This commit adds the `ModelItemTopLevelConverterToSpeckle` class, which converts Navisworks `ModelItem` objects to Speckle Base objects. The converter extracts display values, class properties, and property sets from the Navisworks object and creates a corresponding Speckle Base object. * Add ModelPropertiesExtractor to NavisworksShared This commit adds the ModelPropertiesExtractor class to the NavisworksShared project. The ModelPropertiesExtractor is responsible for extracting model properties from a NAV.Model and adding them to a dictionary. These properties include Creator, Filename, Source Filename, Units, Transform, Guid, and Source Guid. The extracted properties are then added to the navisworks object as key-value pairs. * Refactor PropertyHelpers to handle property conversion and sanitization - Refactored `PropertyHelpers` class to be static - Added a dictionary of type handlers for converting property values - Implemented `ConvertPropertyValue` method to convert property values based on their data type - Added support for handling different data types, including boolean, string, integer, double, datetime, named constant, and 3D point - Implemented `SanitizePropertyName` method to replace invalid characters in property names with underscores - Added `IsCategoryToBeSkipped` method to determine if a property category should be skipped during processing * feat: Add property set extraction logic This commit adds logic to extract property sets from a NAV.ModelItem. It iterates through the property categories and properties, skipping certain categories as needed. Each property is added to a dictionary with its sanitized name as the key and its converted value based on Speckle units. The resulting property sets are stored in a dictionary with the sanitized category name as the key. * Refactor ModelItemTopLevelConverterToSpeckle: Add IRootToSpeckleConverter interface This commit adds the `IRootToSpeckleConverter` interface to the `ModelItemTopLevelConverterToSpeckle` class. It also modifies the `Convert` method to handle null target objects and updates the implementation of the `CreateNonGeometryObject` method. * Add Navisworks 2020 - 2025 In addition to 2024 * Update DocumentModelStore.cs - Made `HostAppSaveState` and `LoadState` methods public - Updated method signatures to reflect changes * Add BoundingBoxToSpeckleRawConverter This commit adds the BoundingBoxToSpeckleRawConverter class, which is responsible for converting NAV.BoundingBox3D objects to Box objects. It includes methods for converting the target object and a nullable version of it. The converter uses settings from the IConverterSettingsStore interface to set up the base plane and create the bounding box with appropriate units and intervals. * Fix null reference exception in NavisworksRootObjectBuilder.cs The code change fixes a null reference exception that occurs when checking if `navisworksModelItems` is empty or null. If it is, a `SpeckleException` is thrown with the message "No objects to convert". Additionally, a check for `sendInfo` being null has been added before continuing with the conversion process. The progress of the conversion is reported using the `onOperationProgressed` callback. * Refactor NavisworksBasicConnectorBinding and NavisworksSendBinding - Simplify AddModel method in NavisworksBasicConnectorBinding - Remove unused import statements in NavisworksSendBinding - Update initialization of conversion settings in NavisworksSendBinding * Update NavisworksServiceRegistration.cs - Removed unused using statements - Updated AddDUI method to use NavisworksDocumentModelStore - Updated DocumentModelStore registration to use NavisworksDocumentModelStore * Refactor NavisworksDocumentModelStore to updated API - Clear the store and save when models are removed - Load state from the database when models are added - Rename methods for clarity: ReadFromFile() -> LoadState(), WriteToFile() -> HostAppSaveState() - Improve exception handling and error messages * Refactor data extractors in Navisworks converter - Make `GetClassProperties`, `GetDisplayValue`, `GetModelProperties`, and `GetPropertySets` methods internal - Remove unused using statements * Update GlobalUsing.cs: Remove unnecessary global using statement The commit removes an unnecessary global using statement in the GlobalUsing.cs file. This change helps to clean up the code and improve readability. * Add NavisworksPrimitiveProcessor and PrimitiveProcessor classes - Added NavisworksPrimitiveProcessor class with methods for processing Navisworks primitives - Added PrimitiveProcessor class with methods for processing generic primitives - Updated the constructor of PrimitiveProcessor to accept an additional parameter for local to world transformation - Updated the Line, Point, and Triangle methods in both classes to use the new transformation logic * feat: Add internal modifier to VectorMatch method - Changed the access modifier of the VectorMatch method in GeometryHelpers class from public to internal. feat: Add sealed modifier to NavisworksObject and NavisworksGeometryObject classes - Added the sealed modifier to the NavisworksObject and NavisworksGeometryObject classes in NavisworksObjects.cs file. refactor: Rename enum values in ConversionModes.cs - Renamed the enum values MODEL_ORIGIN, PROJECT_BASE_ORIGIN, and BOUNDING_BOX_ORIGIN to MODELORIGIN, PROJECTBASEORIGIN, and BOUNDINGBOXORIGIN respectively in ConversionModes.cs file. refactor: Update CreateGeometryObject method signature - Updated the CreateGeometryObject method signature in ModelItemTopLevelConverterToSpeckle.cs file by making it static and using DisplayValueExtractor.GetDisplayValue instead of _displayValueExtractor.GetDisplayValue. * Change origin mode constants to use camel case and update related calculations - Update the origin mode constant from "MODEL_ORIGIN" to "MODELORIGIN" - Update the origin mode constant from "PROJECT_BASE_ORIGIN" to "PROJECTBASEORIGIN" - Update the origin mode constant from "BOUNDING_BOX_ORIGIN" to "BOUNDINGBOXORIGIN" - Update the calculation of the transformation vector based on the new origin mode constants * Add NavisworksPrimitiveProcessor and BoundingBoxToSpeckleRawConverter The commit adds two new files: NavisworksPrimitiveProcessor.cs and BoundingBoxToSpeckleRawConverter.cs to the project. These files are included in the compilation process. * Add support for Speckle connectors in Navisworks versions 2020 to 2025. - Added runtime requirements and component entries for Navisworks versions 2020 to 2025. - Each component entry includes the module name and app description. * Add database transaction for table creation in NavisworksDocumentModelStore.cs This commit adds a database transaction to ensure the existence of the required table before performing any operations in NavisworksDocumentModelStore.cs. This helps maintain data integrity and prevents errors related to missing tables. * Update Navisworks connectors to include Speckle.Connectors.DUI dependency. - Added "Speckle.Connectors.DUI" as a dependency in the Navisworks2020, Navisworks2021, Navisworks2022, Navisworks2023, and Navisworks2024 packages. - Updated project references in the Navisworks2024 package to include the "Speckle.Connectors.DUI" project. - Added "Speckle.Connectors.DUI" as a dependency in the Navisworks2025 package. - Renamed "NavisworksServiceRegistration.cs" to "NavisworksConnectorServiceRegistration.cs". - Updated project references in the NavisworksConverters for 2020 and 2021 packages to include the "Speckle.Connectors.DUI" project. * Refactor NavisworksSendBinding constructor parameters and dependencies - Changed the type of `_conversionSettingsFactory` parameter in `NavisworksSendBinding` constructor from `INavisworksConversionSettingsFactory` to `NavisworksConversionSettingsFactory`. - Removed duplicate initialization of `Parent` and `Commands` properties in the `NavisworksSendBinding` constructor. - Moved the call to `SubscribeToNavisworksEvents()` after initializing `_conversionSettingsFactory`. Register additional services for Navisworks connector - Added registration for `ToSpeckleSettingsManager`. - Added registration for `IOperationProgressManager`. Refactor NavisworksRootObjectBuilder - Updated access to `_converterSettings.Current.SpeckleUnits` to `_converterSettings.Current.Derived.SpeckleUnits`. Update DockableConnectorPane.cs - Updated the call to `services.AddNavisworksConverters()` to use the correct method name, which is now `services.AddNavisworksConverter()`. Refactor ClassPropertiesExtractor, ModelPropertiesExtractor, and PropertySetsExtractor - Updated access to `_settingsStore.Current.ExcludeProperties` to use `_settingsStore.Current.User.ExcludeProperties`. Register additional services for Navisworks converter - Added registration for `IToSpeckleSettingsManager`. - Added registration for `INavisworksConversionSettingsFactory`. * Bruh!! - Update the type of _conversionSettingsFactory field from NavisworksConversionSettingsFactory to INavisworksConversionSettingsFactory. - Update the type of conversionSettingsFactory parameter in the constructor from NavisworksConversionSettingsFactory to INavisworksConversionSettingsFactory. * Add NavisworksRootObjectBuilder and related settings classes for sending operations Add NavisworksRootObjectBuilder and related settings classes for sending operations - Added NavisworksRootObjectBuilder class for sending operations - Added ConvertHiddenElementsSetting class for sending operations - Added IncludeInternalPropertiesSetting class for sending operations - Added OriginModeSetting class for sending operations - Added VisualRepresentationSetting class for sending operations * Refactor conversion mode and origin mode enums - Renamed "ACTIVE" to "Active" - Renamed "ORIGINAL" to "Original" - Renamed "PERMANENT" to "Permanent" - Renamed "MODELORIGIN" to "ModelOrigin" - Renamed "PROJECTBASEORIGIN" to "ProjectBasePoint" - Renamed "BOUNDINGBOXORIGIN" to "BoundingBoxCenter" Updated the NavisworksConversionSettingsFactory class: - Updated references and imports - Updated switch cases for originMode enum with new names * feat: Add new settings to NavisworksSendBinding and remove unused import - Added new settings to the `GetSendSettings()` method in `NavisworksSendBinding` class. - Removed unused import of `Speckle.Connector.Navisworks.Settings` in `NavisworksConverterServiceRegistration.cs`. * Update Navisworks connector service registration and settings manager - Updated the service registration in `NavisworksConnectorServiceRegistration.cs` to use `ToSpeckleSettingsManagerNavisworks` instead of `ToSpeckleSettingsManager`. - Renamed `ToSpeckleSettingsManager.cs` to `ToSpeckleSettingsManagerNavisworks.cs` in the send operations settings folder. - Updated the project file `Speckle.Connectors.NavisworksShared.projitems` to include the renamed file. - Added a new dependency on `speckle.connectors.dui.webview`, which includes dependencies on `Microsoft.Web.WebView2` and `Speckle.Connectors.DUI`. - Updated the conversion settings factory in `NavisworksConversionSettingsFactory.cs` to use `IToSpeckleSettingsManagerNavisworks` instead of `IToSpeckleSettingsManager`. * Add project references to DUI and Navisworks converters in Navisworks connectors - Added a project reference to `Speckle.Connectors.DUI` in the Navisworks 2020, 2021, 2022, 2023, and 2025 connector projects. - Added project references to the respective Navisworks converter projects in the Navisworks 2020, 2021, 2022, 2023, and 2025 connector projects. - Removed a compile include for `NavisworksSelectionFilter.cs` from the shared Navisworks converter projitems file. - Added a compile include for `NavisworksSelectionFilter.cs` in the send filters folder of the shared Navisworks converter projitems file. * here we go again This commit adds support for Navisworks conversion settings in the SendBinding class. It introduces a new interface, IToSpeckleSettingsManagerNavisworks, and implements it in the ToSpeckleSettingsManagerNavisworks class. The NavisworksSendBinding constructor now takes an additional parameter of type IToSpeckleSettingsManagerNavisworks. In addition, some file and namespace renaming has been done to align with the changes made. * FFS - Cyclical relationships or missing assemblies * FFS - Removed references to Navisworks2020, Navisworks2021, Navisworks2022, Navisworks2023, and Navisworks2025 connectors in packages.lock.json files - Commented out project references to Navisworks2020, Navisworks2021, Navisworks2022, Navisworks2023, and Navisworks2025 connectors in csproj files - Updated project reference for shared converter in shproj file * Update NavisworksConnectorServiceRegistration.cs - Update the registration of ToSpeckleSettingsManagerNavisworks to use the interface IToSpeckleSettingsManagerNavisworks instead of the concrete class ToSpeckleSettingsManagerNavisworks. * Update NavisworksSendBinding to use ToSpeckleSettingsManagerNavisworks instead of IToSpeckleSettingsManagerNavisworks for conversion settings retrieval. Update NavisworksSendBinding to use ToSpeckleSettingsManagerNavisworks instead of IToSpeckleSettingsManagerNavisworks for conversion settings retrieval. This commit updates the NavisworksSendBinding code to replace the usage of IToSpeckleSettingsManagerNavisworks with ToSpeckleSettingsManagerNavisworks for retrieving conversion settings. This change ensures consistency and improves the overall functionality of the code. * Refactor NavisworksObjects.cs: Improve object representation and property handling - Rename `NavisworksObject` to `NavisworksModelItem` - Remove unused properties and suppress style warnings - Add required parameters to constructors for `name` and `displayValue` - Update property accessors for `elements`, `displayValue`, and `name` - Improve implementation of `AddProperty` and `GetProperty` methods * Refactor display value extraction and object creation in Navisworks converter - Refactored the `GetDisplayValue` method in `DisplayValueExtractor.cs` to be an instance method instead of static. - Updated the `CreateGeometryObject` method in `ModelItemTopLevelConverterToSpeckle.cs` to use an instance of `DisplayValueExtractor`. - Changed the return type of `CreateNonGeometryObject` method in `ModelItemTopLevelConverterToSpeckle.cs` to match the updated class name. These changes improve code organization and maintainability. * Update Speckle SDK and Objects to version 3.1.0-dev.203 in Navisworks connectors for versions 2020, 2021, 2022, and 2023. * Refactor NavisworksRootObjectBuilder.cs: Improve initialization of root object collection - Initialize root object collection with name and units in a more concise way - Improve readability and maintainability of the code * Fix logger import in NavisworksRootObjectBuilder.cs The commit fixes an issue with the logger import in the NavisworksRootObjectBuilder.cs file. The incorrect namespace was causing a compilation error. This change ensures that the correct namespace is used for the logger, resolving the compilation error and allowing for proper logging functionality. * Refactor ClassPropertiesExtractor to simplify GetClassProperties method The GetClassProperties method in the ClassPropertiesExtractor class has been refactored to improve readability and reduce unnecessary code. The if statement that checks for exclusion of properties has been removed, as it is no longer needed. Instead, the ExtractClassProperties method is directly returned. This change simplifies the logic and improves code maintainability. * Fix static method in DisplayValueExtractor The commit fixes a bug in the DisplayValueExtractor class where the GetDisplayValue method was not declared as static. This caused a compilation error. The fix makes the method static, allowing it to be called without an instance of the class. * Add BasePropertyHandler, HierarchicalPropertyHandler, IPropertyHandler, and StandardPropertyHandler classes for handling property assignment in Navisworks conversion. - Added IPropertyHandler interface to define the contract for handling property assignment to Speckle objects. - Added BasePropertyHandler class to provide common functionality for property assignment. - Added StandardPropertyHandler class to handle standard property assignment without any merging or hierarchy processing. - Added HierarchicalPropertyHandler class to handle property assignment with hierarchy merging for objects that require ancestor properties. * Refactor class hierarchy and method signatures for Navisworks conversion - Make `GetClassProperties` method in `ClassPropertiesExtractor` static - Remove `classPropertiesExtractor` parameter from constructors in `BasePropertyHandler`, `HierarchicalPropertyHandler`, and `StandardPropertyHandler` - Update references to `classPropertiesExtractor.GetClassProperties(modelItem)` to use the static method `ClassPropertiesExtractor.GetClassProperties(modelItem)` - Rename private field `_properties` in classes implementing `INavisworksObject` to `Properties` - Rename public property `elements` in class `NavisworksModelItem` to `Elements` - Rename public property `displayValue` in class `NavisworksModelGeometry` to lowercase (`displayvalue`) - Add missing using statements * Add ElementSelectionHelper class for working with Navisworks ModelItem selections. This commit adds a new file, ElementSelectionHelper.cs, which contains a static class called ElementSelectionHelper. This class provides extension methods for working with Navisworks ModelItem selections. The class includes the following significant changes: - Added ResolveModelItemToIndexPath method: This method takes a Navisworks ModelItem and resolves it to its unique index path representation. The resulting string represents the model item's path, including the model index and a hierarchical path identifier separated by a specified separator. - Added ResolveIndexPathToModelItem method: This method takes an index path string and resolves it to a Navisworks ModelItem. It splits the index path into parts, assigns the first part to the modelIndex variable as an integer, and joins the remaining parts as the pathId string. - Added IsElementVisible method: This method determines whether a Navisworks ModelItem and all its ancestors are visible. It checks the visibility status for each item in the item's ancestorsAndSelf collection and returns true if none of them are hidden. - Added ResolveGeometryLeafNodes method: This method takes a Navisworks ModelItem and returns a list of all its descendants (including itself) that have geometry. These changes enhance functionality related to working with Navisworks ModelItems in Speckle.Converter.NavisworksShared.Helpers namespace. * WIP on jsdb/navisworks WIP on jsdb/navisworks - Replaced `ModelItemTopLevelConverterToSpeckle` with `NavisworksRootToSpeckleConverter` in `NavisworksConverterServiceRegistration.cs` - Added new files to the project: `BasePropertyHandler.cs`, `HieraerchicalPropertyHandler.cs`, `IPropertyHandler.cs`, and `StandardPrpertyHandler.cs` - Updated the file path in the project items XML - Modified `NavisworksRootToSpeckleConverter.cs` to use the updated method name * Update Speckle.Objects to version 3.1.0-dev.205 in Navisworks connectors for versions 2020, 2021, and 2022. - Update Speckle.Objects to version 3.1.0-dev.205 - Update Speckle.Sdk to version 3.1.0-dev.205 - Update Speckle.Sdk.Dependencies to version 3.1.0-dev.205 * Fix reserved term replacement in PropertyHelpers.cs The commit fixes a bug in the PropertyHelpers.cs file where the reserved term "Item" was not being replaced correctly. The replacement has been changed from "Item_" to "Item". * Refactor property handlers and model objects - Remove unused code in ClassPropertiesExtractor.cs - Refactor PropertySetsExtractor.cs to use dependency injection for settingsStore - Refactor BasePropertyHandler.cs to include classPropertiesExtractor parameter - Rename HieraerchicalPropertyHandler.cs to HierarchicalPropertyHandler.cs - Rename StandardPrpertyHandler.cs to StandardPropertyHandler.cs - Update NavisworksConverterServiceRegistration.cs to register the new property handlers * Refactor model item name retrieval logic in ModelItemTopLevelConverterToSpeckle.cs - Refactored the GetObjectName method to improve readability and maintainability. - Updated the logic to retrieve the target object's display name, cycling through parent objects if necessary. - Added a fallback case to return "Unnamed model item" if no valid display name is found. * Whitespace in property name conversion to _ in PropertyHelpers.cs The code change fixes a bug in the `PropertyHelpers.cs` file where property names were not being converted correctly. The regular expression used to replace characters now includes whitespace characters as well. This ensures that all invalid characters are replaced with underscores, allowing for proper conversion of property names. * Add GeometryNodeMerger class to handle merging of sibling geometry nodes. - Added `GeometryNodeMerger` class to handle grouping and merging of sibling geometry nodes. - Updated `NavisworksRootObjectBuilderExtensions` to use `GeometryNodeMerger` for grouping and merging. - Updated `NavisworksRootObjectBuilder` to use `ClassPropertiesExtractor` and `PropertySetsExtractor`. - Refactored code in `NavisworksRootObjectBuilder.Build()` method to improve readability and maintainability. * modify GeometryNodeMerger.cs and NavisworksRootObjectBuilder.cs - Modified GeometryNodeMerger.cs to only group anonymous geometry nodes - Modified NavisworksRootObjectBuilder.cs to refactor the Build method, handle grouped nodes first, and set the final elements list * Initialize root collection, convert and store model items, process and merge grouped nodes, add remaining non-grouped nodes, finalize and return. * Add NavisworksMaterialUnpacker class for unpacking render materials This commit adds a new file, NavisworksMaterialUnpacker.cs, which contains the implementation of the NavisworksMaterialUnpacker class. This class is responsible for unpacking render materials from Navisworks objects. The NavisworksMaterialUnpacker class includes methods such as UnpackRenderMaterial and ConvertRenderColorAndTransparencyToSpeckle, which handle the extraction and conversion of render material properties. Additionally, the project file Speckle.Connectors.NavisworksShared.projitems has been updated to include the newly added NavisworksMaterialUnpacker.cs file. * Add `NavisworksMaterialUnpacker` to `NavisworksRootObjectBuilder` constructor - Add `NavisworksMaterialUnpacker` to the service collection in `NavisworksConnectorServiceRegistration.cs`. - Update the constructor of `NavisworksRootObjectBuilder` to include dependencies for `IRootToSpeckleConverter`, `ISendConversionCache`, `IConverterSettingsStore<NavisworksConversionSettings>`, `ILogger<NavisworksRootObjectBuilder>`, `ISdkActivityFactory`, and `NavisworksMaterialUnpacker`. This commit adds the registration of the `NavisworksMaterialUnpacker` class to the service collection in order to enable dependency injection. It also updates the constructor of the `NavisworksRootObjectBuilder` class to include all necessary dependencies for its functionality. * Update Speckle.Objects to version 3.1.0-dev.212 in Navisworks connectors for versions 2020, 2021, and 2022. The commit updates the packages.lock.json file for the Navisworks connectors for versions 2020, 2021, and 2022. It changes the requested and resolved version of Speckle.Objects from 3.1.0-dev.205 to 3.1.0-dev.212 * Add NavisworksObject to finalElements in NavisworksRootObjectBuilder This commit adds the NavisworksObject class to the finalElements list in the NavisworksRootObjectBuilder. The NavisworksObject contains properties such as name, displayValue, properties, and units. This change improves the functionality of the code by including additional information for each element in the finalElements list. * Add applicationId to NavisworksRootObjectBuilder This commit adds the applicationId property to the NavisworksRootObjectBuilder class in order to include it in the finalElements list. This change ensures that the applicationId is properly assigned and included when building Navisworks objects for sending. * RunOnMainThreadAsync implemented - Refactored GetDocumentInfo method in NavisworksBasicConnectorBinding to run on the main thread using Parent.RunOnMainThreadAsync - Refactored HighlightObjects method in NavisworksBasicConnectorBinding to run on the main thread using Parent.RunOnMainThreadAsync - Refactored OnSelectionChange method in NavisworksSelectionBinding to use async/await and run UpdateSelectionAsync on the main thread using Parent.RunOnMainThreadAsync - Added async/await to Send method in NavisworksSendBinding and refactored code inside it to use async/await for better readability - Extracted common logic into separate methods in NavisworksSendBinding: GetModelCard, InitializeConverterSettings, GetNavisworksModelItems, ExecuteSendOperation - Added cancellation support to CancelSend method in NavisworksSendBinding by calling _cancellationManager.CancelOperation with modelCardId as argument - Refactored ProcessModelStateChange method in NavisworksDocumentEvents to use async/await and added check for _finalModelCount value * Restore DocumentModelStore.cs accessibility - not sure when that changed - Change access modifiers of HostAppSaveState and LoadState methods to protected - Update method comments to reflect changes in access modifiers * Refactor NavisworksConnectorServiceRegistration and NavisworksDocumentEvents - Added NavisworksMaterialUnpacker to service collection - Updated registration of DocumentModelStore in service collection - Updated references to DocumentModelStore with NavisworksDocumentModelStore in NavisworksDocumentEvents - Renamed HostAppSaveState method to protected override method in NavisworksDocumentModelStore - Added public method ReloadState as a wrapper for LoadState in NavisworksDocumentModelStore * Delete Navisworks solution file The commit deletes the Navisworks solution file, which is no longer needed. * Delete packages.lock.json * Remove Navisworks 2025 * Reset Navisworks project references and project names - Updated the project reference for "Navisworks" in Local.sln to use a new GUID - Updated the project reference for "2024" in Local.sln to use a new GUID - Updated the project reference for "Shared" in Local.sln to use a new GUID - Updated the project reference for "Speckle.Connectors.NavisworksShared" in Local.sln to use a new GUID - Updated the project reference for "Speckle.Converters.NavisworksShared" in Local.sln to use a new GUID - Updated the project name and GUID for "Navisworks" in Speckle.Connectors.sln - Updated the project name and GUID for "Shared" in Speckle.Connectors.sln * Update Microsoft.Web.WebView2 package to version 1.0.2088.41 in Autocad connectors for versions 2022, 2023, 2024, and 2025. This commit updates the Microsoft.Web.WebView2 package in the Autocad connectors for versions 2022, 2023, 2024, and 2025 from version 1.0.1938.49 to version 1.0.2088.41. This change ensures compatibility with the latest version of the package and includes necessary bug fixes or improvements related to web view functionality in the connectors. * Reset Navisworks project references and project names - Updated the project reference for "Navisworks" in Local.sln to use a new GUID - Updated the project reference for "2024" in Local.sln to use a new GUID - Updated the project reference for "Shared" in Local.sln to use a new GUID - Updated the project reference for "Speckle.Connectors.NavisworksShared" in Local.sln to use a new GUID - Updated the project reference for "Speckle.Converters.NavisworksShared" in Local.sln to use a new GUID - Updated the project name and GUID for "Navisworks" in Speckle.Connectors.sln - Updated the project name and GUID for "Shared" in Speckle.Connectors.sln * Update Microsoft.Web.WebView2 version to [1.0.1938.49, ) in Autocad and Civil3d connectors This commit updates the version of Microsoft.Web.WebView2 to [1.0.1938.49, ) in the Autocad and Civil3d connectors packages.lock.json files. The previous version was 1.0.2088.41, and the contentHash has also been updated accordingly. Note: This commit message is exactly 50 characters long, as per the requirement for a short description less than 50 characters. * Refactor to avoid the early disposal of COM objects - Remove the `GeometryNodeMerger` class from service registration in `NavisworksConnectorServiceRegistration.cs` - Change the access modifier of `UnpackRenderMaterial` method in `NavisworksMaterialUnpacker.cs` to internal - Change the access modifier of `ConvertRenderColorAndTransparencyToSpeckle` method in `NavisworksMaterialUnpacker.cs` to private static - Change the access modifier of `GroupSiblingGeometryNodes` method in `GeometryNodeMerger.cs` to public static - Add null checks for parameters in methods: - GetClassProperties in ClassPropertiesExtractor.cs - GetPropertySets and AssignProperties in BasePropertyHandler.cs - AssignClassProperties and ExtractClassProperties in ClassPropertiesExtractor.cs - GetPropertySets in PropertySetsExtractor.cs - AssignPropertySets, AssignModelProperties, and ExtractModelProperties in ModelPropertiesExtractor.cs - NavisworksRootObjectBuilder constructor * feat: Add geometry conversion functionality - Added `DisplayValueExtractor` class for extracting display values from Navisworks model items - Added `GeometryToSpeckleConverter` class for converting Navisworks geometry to Speckle SDK models - Updated dependencies in `NavisworksConverterServiceRegistration.cs` to include the new classes * Rename GeomtryNodeMerger.cs to GeometryNodeMerger.cs This commit renames the file GeomtryNodeMerger.cs to GeometryNodeMerger.cs. * Remove redundant code shared by both projects - Updated NavisworksSelectionBinding to include IElementSelectionService as a dependency in the constructor. - Updated NavisworksSendBinding to include IElementSelectionService as a dependency in the constructor. - Removed ElementSelectionExtension.cs file. - Added ElementSelectionService.cs file which includes methods for getting model item path, resolving model item from path, checking visibility of model items, and getting geometry nodes. * Navisworks proj cleanup (#443) * Clean up projects and locks for all Navisworks * Fix nuget error * Fixed Local SLN and removed some runtime IDs * add back RuntimeIdentifier * Fix lock files for NW * Update to SDK 3.1.0-218 * update locks --------- Co-authored-by: oguzhankoral <oguzhankoral@gmail.com> Co-authored-by: Adam Hathcock <adam@hathcock.uk> Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
adamhathcock
added a commit
that referenced
this pull request
Dec 20, 2024
* Navisworks Connector Init * Build crap * Moar Init * WIP - not yet working * Minor fixes * Fix missing constuctors * unfix * Test commit * Test commit * Remove Dataflow usage * format and remove dep * merge fixes * Fix serializer * Add MainThreadContext * add some main context detection * add RevitMainThreadContext * remove revit async? * Handle Document Events * Document Model Store * Proper implementation * package updates * updated to dev * Document Events binding ??? * registration order * Minimised events subscribed and handle new document state to clear models * Stub Send command * Refactor Connector class to change access modifier of Container property The commit modifies the access modifier of the Container property in the Connector class from public to private. This change improves encapsulation and ensures that the property can only be accessed within the class itself. * Fix NavisworksDocumentStore model list initialization and document validation The commit fixes the initialization of the Models list in the NavisworksDocumentStore class. Instead of assigning an empty array, it now uses the Clear() method to clear the existing models. Additionally, the commit improves the document validation logic by checking if critical properties are accessible before considering the document valid. It also handles cases where the document is disposed. These changes ensure proper initialization of model lists and accurate document validation in NavisworksDocumentStore. * Effectively debouncing on the SDI changes events * Get Selected Objects * ElementSelectionExtension is a collection of helpers to aid the resolution of intent * [Navisworks] Manage document and model state changes - Refactor NavisworksDocumentEvents to manage both document and model state change notifications - Update comments to reflect the new functionality - Rename SubscribeToEvents method to SubscribeToDocumentModelEvents for clarity - Add HandleDocumentModelCountChanging and HandleDocumentModelCountChanged methods to track model count changes - Update OnDocumentModelCountChanged method name to NotifyValidModelStateChange for clarity - Update UnsubscribeFromEvents method name to UnsubscribeFromDocumentModelEvents for clarity - Remove unused constants from NavisworksDocumentStore class * formatting * use mainThreadContext * Use more MainThreadContext * Update Navisworks API references and fix typos - Update references to `Autodesk.Navisworks.Api` namespace to `NAV` namespace - Fix typo in file name: `GlobalUsings.cs` renamed to `GlobalUsing.cs` - Update references to `ModelItem` type from `Autodesk.Navisworks.Api` namespace to `NAV.ModelItem` - Update references to `Document` type from `Autodesk.Navisworks.Api` namespace to `NAV.Document` - Update references to database related types from `Autodesk.Navisworks.Api.Data` namespace to `NAV.Data` - Add new file: NavisworksRootObjectBuilder.cs - Remove unused using statements * Add Navisworks2024 converter dependencies and update project references - Added "Objects.Converter.Navisworks2024" to the packages.lock.json file with dependencies on "Speckle.Converters.Common" and "Speckle.Navisworks.API" - Updated the Speckle.Connectors.Navisworks2024.csproj file to include a reference to "Speckle.Converters.Navisworks2024.csproj" and "Speckle.Converters.Common.csproj" - Added "speckle.converters.common" to the packages.lock.json file with dependencies on "Microsoft.Extensions.Logging.Abstractions" and "Speckle.Objects" - Renamed files: - NavisworksConversionSettings.cs -> NavisworksConversionSettingsFactory.cs - GlobalUsings.cs -> GlobalUsing.cs - NavisworksConversionSettings.cs -> Settings/NavisworksConversionSettings.cs - NavisworksConversionSettings.cs -> Services/NavisworksToSpeckleUnitConverter.cs - NavisworksConversionSettings.cs -> ToSpeckle/NavisworksRootToSpeckleConverter.cs * feat: Add NavisworksSendBinding changes - Added Microsoft.Extensions.DependencyInjection and Microsoft.Extensions.Logging namespaces - Added Speckle.Connectors.Common.Operations namespace - Added Speckle.Connectors.DUI.Exceptions, Speckle.Connectors.DUI.Logging, and Speckle.Connectors.DUI.Models.Card namespaces - Added Speckle.Sdk and Speckle.Sdk.Common namespaces - Updated constructor of NavisworksSendBinding class to include additional parameters - Updated Send method in NavisworksSendBinding class to include try-catch block for handling exceptions during send operation - Updated CancelSend method in NavisworksSendBinding class to call the cancellation manager's CancelOperation method with the modelCardId parameter - Added ResolveIndexPathToModelItem method in ElementSelectionExtension class to resolve the model item path from an index path string - Added ResolveGeometryLeafNodes method in ElementSelectionExtension class to resolve geometry leaf nodes from a model item - Updated Send method in NavisworksSendBinding class to use the resolved model items for sending data * Update namespace in Navisworks plugin files - Update namespace from "Speckle.Connector.Navisworks.NavisPlugin" to "Speckle.Connector.Navisworks.Plugin" in Commands.cs, DockableConnectorPane.cs, and NavisworksRibbon.xaml.cs files. * Add Navisworks sending operations and converters - Added sending operations for Navisworks models - Registered the root object builder and send operation for Navisworks model items - Added Navisworks converters to the service registration - Updated the NavisworksRootToSpeckleConverter to handle null targets and validate target type before conversion * Add folder to project items - Added a new folder to the project items in the Navisworks converter. - The folder includes the necessary files for extensions, global using, service registration, and conversion settings factory. * Refactor NavisworksConversionSettings class to use properties instead of fields - Convert fields to properties in NavisworksConversionSettings class - Update constructor to initialize properties instead of fields * Add Navisworks conversion settings factory and store initialization - Add `INavisworksConversionSettingsFactory` to the constructor of `NavisworksSendBinding` - Initialize `_conversionSettingsFactory` in the constructor of `NavisworksSendBinding` - Initialize the conversion settings store with `_conversionSettingsFactory.Create(NavisworksApp.ActiveDocument)` * Change element selection path separator from '.' to '/' in ElementSelectionExtension.cs This commit updates the code in ElementSelectionExtension.cs to change the default separator used for resolving a Navisworks model item's unique index path representation. The previous separator was '.', and it has been changed to '/'. This change ensures consistency and compatibility with other parts of the codebase that rely on this representation. * Add Navisworks model item to Speckle converter - Add `ModelItemToSpeckleConverter.cs` file for converting Navisworks model items to Speckle objects. - Update `GlobalUsing.cs` to include `SSM` namespace. - Update project file `Speckle.Converters.NavisworksShared.projitems` to include the new converter file. * some rearranging * renaming * Revit needs new run async * merge fixes * gather on worker, convert on main * Update Speckle.Objects and Speckle.Sdk versions to 3.1.0-dev.200 - Updated the requested and resolved versions of Speckle.Objects and Speckle.Sdk to 3.1.0-dev.200 in packages.lock.json files for Connectors/Navisworks/Speckle.Connectors.Navisworks2024 and Converters/Navisworks/Speckle.Converters.Navisworks2024 directories. - Also updated the contentHash values for both packages. Note: This commit updates the versions of Speckle.Objects and Speckle.Sdk to 3.1.0-dev.200 in the mentioned directories' packages.lock.json files, along with their respective contentHash values being updated as well. * operations know threading but not host apps * Add Navisworks and 2024 projects, along with their connectors and converters This commit adds the Navisworks project, along with the 2024 project. It also includes the connectors and converters for both projects. * rhino options * revit can receive * autocad in progress * need to yield for UI thread async * revamp yield * Found APIContext and removed it * ArcGIS runs all workers on MCT thread * Refactor ThreadContext and ArcGIS saving is always on a worker * Revit threading is simplier? * ArcGIS can not always go to the queued task * format * fix tekla compile errors * update etabs * thread context * autocad threading? * Add Navisworks conversion settings and modes This commit adds new files for Navisworks conversion settings and modes. - The `ConversionModes.cs` file defines enums for representation mode and origin mode used during conversion. - The `NavisworksConversionSettings.cs` file represents the settings used for Navisworks conversions, including properties such as document, units, origin mode, hidden elements, visual representation mode, and more. - A new factory class `NavisworksConversionSettingsFactory.cs` is added to create instances of the conversion settings with calculated values based on the active document. - A new file `GeometryHelpers.cs` which contains a static class `GeometryHelpers`. The class provides a method `VectorMatch` that compares two vectors to determine if they are approximately equal within a given tolerance. The method takes in two vectors and an optional tolerance value, and returns true if the vectors match within the tolerance, otherwise false. * Add ArrayExtensions.cs for converting arrays to generic type arrays This commit adds a new file, ArrayExtensions.cs, which contains an extension method for converting arrays to generic type arrays. The method uses the `Array.Copy` function to copy the elements of the original array into a new array of the specified generic type. This allows for more flexibility when working with arrays in the codebase. Specifically Navisworks heavily uses 1* indexed arrays which are a pain to access generically. * Delete Navisworks converters This commit deletes two files: ModelItemToSpeckleConverter.cs and NavisworksRootToSpeckleConverter.cs. These files contained code related to converting Navisworks models to Speckle format. The deletion of these files indicates that the functionality provided by these converters is no longer needed or has been replaced by other methods. * Add new classes for double-precision geometric primitives and transformation matrices - Added `Primitives.cs` file containing definitions for `PointD`, `TriangleD`, and `LineD` classes with double-precision vertex storage - Added `TransformMatrix.cs` file containing a class for 4x4 transformation matrices - Updated project items to include the new files in the build process * Add NavisworksObject and NavisworksGeometryObject classes This commit adds the NavisworksObject and NavisworksGeometryObject classes to handle non-geometry and geometry-based Speckle objects converted from Navisworks. These classes implement the INavisworksObject interface, which provides methods for adding properties to objects and retrieving property values by key. The NavisworksObject class represents a non-geometry object with a name property and a dictionary of properties, while the NavisworksGeometryObject class represents a geometry-based object with a displayValue property, name property, and a dictionary of properties. * Add ClassPropertiesExtractor, DisplayValueExtractor, and PropertySetsExtractor classes - Added ClassPropertiesExtractor class to extract class properties from a NAV.ModelItem - Added DisplayValueExtractor class to extract display values from a NAV.ModelItem - Added PropertySetsExtractor class to extract property sets from a NAV.ModelItem * feat: Add ExcludeProperties option to NavisworksConversionSettings This commit adds a new boolean property, ExcludeProperties, to the NavisworksConversionSettings class. This property allows users to specify whether properties should be excluded from the output. The default value is set to false. Changes: - Added ExcludeProperties boolean property to NavisworksConversionSettings - Updated NavisworksConversionSettingsFactory to include _excludeProperties field and pass it to the NavisworksConversionSettings constructor * feat: Add ModelItemTopLevelConverterToSpeckle This commit adds the `ModelItemTopLevelConverterToSpeckle` class, which converts Navisworks `ModelItem` objects to Speckle Base objects. The converter extracts display values, class properties, and property sets from the Navisworks object and creates a corresponding Speckle Base object. * Add ModelPropertiesExtractor to NavisworksShared This commit adds the ModelPropertiesExtractor class to the NavisworksShared project. The ModelPropertiesExtractor is responsible for extracting model properties from a NAV.Model and adding them to a dictionary. These properties include Creator, Filename, Source Filename, Units, Transform, Guid, and Source Guid. The extracted properties are then added to the navisworks object as key-value pairs. * Refactor PropertyHelpers to handle property conversion and sanitization - Refactored `PropertyHelpers` class to be static - Added a dictionary of type handlers for converting property values - Implemented `ConvertPropertyValue` method to convert property values based on their data type - Added support for handling different data types, including boolean, string, integer, double, datetime, named constant, and 3D point - Implemented `SanitizePropertyName` method to replace invalid characters in property names with underscores - Added `IsCategoryToBeSkipped` method to determine if a property category should be skipped during processing * feat: Add property set extraction logic This commit adds logic to extract property sets from a NAV.ModelItem. It iterates through the property categories and properties, skipping certain categories as needed. Each property is added to a dictionary with its sanitized name as the key and its converted value based on Speckle units. The resulting property sets are stored in a dictionary with the sanitized category name as the key. * Refactor ModelItemTopLevelConverterToSpeckle: Add IRootToSpeckleConverter interface This commit adds the `IRootToSpeckleConverter` interface to the `ModelItemTopLevelConverterToSpeckle` class. It also modifies the `Convert` method to handle null target objects and updates the implementation of the `CreateNonGeometryObject` method. * Add Navisworks 2020 - 2025 In addition to 2024 * Update DocumentModelStore.cs - Made `HostAppSaveState` and `LoadState` methods public - Updated method signatures to reflect changes * Add BoundingBoxToSpeckleRawConverter This commit adds the BoundingBoxToSpeckleRawConverter class, which is responsible for converting NAV.BoundingBox3D objects to Box objects. It includes methods for converting the target object and a nullable version of it. The converter uses settings from the IConverterSettingsStore interface to set up the base plane and create the bounding box with appropriate units and intervals. * Fix null reference exception in NavisworksRootObjectBuilder.cs The code change fixes a null reference exception that occurs when checking if `navisworksModelItems` is empty or null. If it is, a `SpeckleException` is thrown with the message "No objects to convert". Additionally, a check for `sendInfo` being null has been added before continuing with the conversion process. The progress of the conversion is reported using the `onOperationProgressed` callback. * Refactor NavisworksBasicConnectorBinding and NavisworksSendBinding - Simplify AddModel method in NavisworksBasicConnectorBinding - Remove unused import statements in NavisworksSendBinding - Update initialization of conversion settings in NavisworksSendBinding * Update NavisworksServiceRegistration.cs - Removed unused using statements - Updated AddDUI method to use NavisworksDocumentModelStore - Updated DocumentModelStore registration to use NavisworksDocumentModelStore * Refactor NavisworksDocumentModelStore to updated API - Clear the store and save when models are removed - Load state from the database when models are added - Rename methods for clarity: ReadFromFile() -> LoadState(), WriteToFile() -> HostAppSaveState() - Improve exception handling and error messages * Refactor data extractors in Navisworks converter - Make `GetClassProperties`, `GetDisplayValue`, `GetModelProperties`, and `GetPropertySets` methods internal - Remove unused using statements * Update GlobalUsing.cs: Remove unnecessary global using statement The commit removes an unnecessary global using statement in the GlobalUsing.cs file. This change helps to clean up the code and improve readability. * Add NavisworksPrimitiveProcessor and PrimitiveProcessor classes - Added NavisworksPrimitiveProcessor class with methods for processing Navisworks primitives - Added PrimitiveProcessor class with methods for processing generic primitives - Updated the constructor of PrimitiveProcessor to accept an additional parameter for local to world transformation - Updated the Line, Point, and Triangle methods in both classes to use the new transformation logic * feat: Add internal modifier to VectorMatch method - Changed the access modifier of the VectorMatch method in GeometryHelpers class from public to internal. feat: Add sealed modifier to NavisworksObject and NavisworksGeometryObject classes - Added the sealed modifier to the NavisworksObject and NavisworksGeometryObject classes in NavisworksObjects.cs file. refactor: Rename enum values in ConversionModes.cs - Renamed the enum values MODEL_ORIGIN, PROJECT_BASE_ORIGIN, and BOUNDING_BOX_ORIGIN to MODELORIGIN, PROJECTBASEORIGIN, and BOUNDINGBOXORIGIN respectively in ConversionModes.cs file. refactor: Update CreateGeometryObject method signature - Updated the CreateGeometryObject method signature in ModelItemTopLevelConverterToSpeckle.cs file by making it static and using DisplayValueExtractor.GetDisplayValue instead of _displayValueExtractor.GetDisplayValue. * Change origin mode constants to use camel case and update related calculations - Update the origin mode constant from "MODEL_ORIGIN" to "MODELORIGIN" - Update the origin mode constant from "PROJECT_BASE_ORIGIN" to "PROJECTBASEORIGIN" - Update the origin mode constant from "BOUNDING_BOX_ORIGIN" to "BOUNDINGBOXORIGIN" - Update the calculation of the transformation vector based on the new origin mode constants * Add NavisworksPrimitiveProcessor and BoundingBoxToSpeckleRawConverter The commit adds two new files: NavisworksPrimitiveProcessor.cs and BoundingBoxToSpeckleRawConverter.cs to the project. These files are included in the compilation process. * Add support for Speckle connectors in Navisworks versions 2020 to 2025. - Added runtime requirements and component entries for Navisworks versions 2020 to 2025. - Each component entry includes the module name and app description. * Add database transaction for table creation in NavisworksDocumentModelStore.cs This commit adds a database transaction to ensure the existence of the required table before performing any operations in NavisworksDocumentModelStore.cs. This helps maintain data integrity and prevents errors related to missing tables. * Update Navisworks connectors to include Speckle.Connectors.DUI dependency. - Added "Speckle.Connectors.DUI" as a dependency in the Navisworks2020, Navisworks2021, Navisworks2022, Navisworks2023, and Navisworks2024 packages. - Updated project references in the Navisworks2024 package to include the "Speckle.Connectors.DUI" project. - Added "Speckle.Connectors.DUI" as a dependency in the Navisworks2025 package. - Renamed "NavisworksServiceRegistration.cs" to "NavisworksConnectorServiceRegistration.cs". - Updated project references in the NavisworksConverters for 2020 and 2021 packages to include the "Speckle.Connectors.DUI" project. * Refactor NavisworksSendBinding constructor parameters and dependencies - Changed the type of `_conversionSettingsFactory` parameter in `NavisworksSendBinding` constructor from `INavisworksConversionSettingsFactory` to `NavisworksConversionSettingsFactory`. - Removed duplicate initialization of `Parent` and `Commands` properties in the `NavisworksSendBinding` constructor. - Moved the call to `SubscribeToNavisworksEvents()` after initializing `_conversionSettingsFactory`. Register additional services for Navisworks connector - Added registration for `ToSpeckleSettingsManager`. - Added registration for `IOperationProgressManager`. Refactor NavisworksRootObjectBuilder - Updated access to `_converterSettings.Current.SpeckleUnits` to `_converterSettings.Current.Derived.SpeckleUnits`. Update DockableConnectorPane.cs - Updated the call to `services.AddNavisworksConverters()` to use the correct method name, which is now `services.AddNavisworksConverter()`. Refactor ClassPropertiesExtractor, ModelPropertiesExtractor, and PropertySetsExtractor - Updated access to `_settingsStore.Current.ExcludeProperties` to use `_settingsStore.Current.User.ExcludeProperties`. Register additional services for Navisworks converter - Added registration for `IToSpeckleSettingsManager`. - Added registration for `INavisworksConversionSettingsFactory`. * Bruh!! - Update the type of _conversionSettingsFactory field from NavisworksConversionSettingsFactory to INavisworksConversionSettingsFactory. - Update the type of conversionSettingsFactory parameter in the constructor from NavisworksConversionSettingsFactory to INavisworksConversionSettingsFactory. * Add NavisworksRootObjectBuilder and related settings classes for sending operations Add NavisworksRootObjectBuilder and related settings classes for sending operations - Added NavisworksRootObjectBuilder class for sending operations - Added ConvertHiddenElementsSetting class for sending operations - Added IncludeInternalPropertiesSetting class for sending operations - Added OriginModeSetting class for sending operations - Added VisualRepresentationSetting class for sending operations * Refactor conversion mode and origin mode enums - Renamed "ACTIVE" to "Active" - Renamed "ORIGINAL" to "Original" - Renamed "PERMANENT" to "Permanent" - Renamed "MODELORIGIN" to "ModelOrigin" - Renamed "PROJECTBASEORIGIN" to "ProjectBasePoint" - Renamed "BOUNDINGBOXORIGIN" to "BoundingBoxCenter" Updated the NavisworksConversionSettingsFactory class: - Updated references and imports - Updated switch cases for originMode enum with new names * feat: Add new settings to NavisworksSendBinding and remove unused import - Added new settings to the `GetSendSettings()` method in `NavisworksSendBinding` class. - Removed unused import of `Speckle.Connector.Navisworks.Settings` in `NavisworksConverterServiceRegistration.cs`. * Update Navisworks connector service registration and settings manager - Updated the service registration in `NavisworksConnectorServiceRegistration.cs` to use `ToSpeckleSettingsManagerNavisworks` instead of `ToSpeckleSettingsManager`. - Renamed `ToSpeckleSettingsManager.cs` to `ToSpeckleSettingsManagerNavisworks.cs` in the send operations settings folder. - Updated the project file `Speckle.Connectors.NavisworksShared.projitems` to include the renamed file. - Added a new dependency on `speckle.connectors.dui.webview`, which includes dependencies on `Microsoft.Web.WebView2` and `Speckle.Connectors.DUI`. - Updated the conversion settings factory in `NavisworksConversionSettingsFactory.cs` to use `IToSpeckleSettingsManagerNavisworks` instead of `IToSpeckleSettingsManager`. * Add project references to DUI and Navisworks converters in Navisworks connectors - Added a project reference to `Speckle.Connectors.DUI` in the Navisworks 2020, 2021, 2022, 2023, and 2025 connector projects. - Added project references to the respective Navisworks converter projects in the Navisworks 2020, 2021, 2022, 2023, and 2025 connector projects. - Removed a compile include for `NavisworksSelectionFilter.cs` from the shared Navisworks converter projitems file. - Added a compile include for `NavisworksSelectionFilter.cs` in the send filters folder of the shared Navisworks converter projitems file. * here we go again This commit adds support for Navisworks conversion settings in the SendBinding class. It introduces a new interface, IToSpeckleSettingsManagerNavisworks, and implements it in the ToSpeckleSettingsManagerNavisworks class. The NavisworksSendBinding constructor now takes an additional parameter of type IToSpeckleSettingsManagerNavisworks. In addition, some file and namespace renaming has been done to align with the changes made. * FFS - Cyclical relationships or missing assemblies * FFS - Removed references to Navisworks2020, Navisworks2021, Navisworks2022, Navisworks2023, and Navisworks2025 connectors in packages.lock.json files - Commented out project references to Navisworks2020, Navisworks2021, Navisworks2022, Navisworks2023, and Navisworks2025 connectors in csproj files - Updated project reference for shared converter in shproj file * Update NavisworksConnectorServiceRegistration.cs - Update the registration of ToSpeckleSettingsManagerNavisworks to use the interface IToSpeckleSettingsManagerNavisworks instead of the concrete class ToSpeckleSettingsManagerNavisworks. * Update NavisworksSendBinding to use ToSpeckleSettingsManagerNavisworks instead of IToSpeckleSettingsManagerNavisworks for conversion settings retrieval. Update NavisworksSendBinding to use ToSpeckleSettingsManagerNavisworks instead of IToSpeckleSettingsManagerNavisworks for conversion settings retrieval. This commit updates the NavisworksSendBinding code to replace the usage of IToSpeckleSettingsManagerNavisworks with ToSpeckleSettingsManagerNavisworks for retrieving conversion settings. This change ensures consistency and improves the overall functionality of the code. * merge fixes * Refactor NavisworksObjects.cs: Improve object representation and property handling - Rename `NavisworksObject` to `NavisworksModelItem` - Remove unused properties and suppress style warnings - Add required parameters to constructors for `name` and `displayValue` - Update property accessors for `elements`, `displayValue`, and `name` - Improve implementation of `AddProperty` and `GetProperty` methods * Refactor display value extraction and object creation in Navisworks converter - Refactored the `GetDisplayValue` method in `DisplayValueExtractor.cs` to be an instance method instead of static. - Updated the `CreateGeometryObject` method in `ModelItemTopLevelConverterToSpeckle.cs` to use an instance of `DisplayValueExtractor`. - Changed the return type of `CreateNonGeometryObject` method in `ModelItemTopLevelConverterToSpeckle.cs` to match the updated class name. These changes improve code organization and maintainability. * Update Speckle SDK and Objects to version 3.1.0-dev.203 in Navisworks connectors for versions 2020, 2021, 2022, and 2023. * remove more async * clean up * can build agian * Use valuetask * fmt * fix up some bridge execution to be sync * Refactor NavisworksRootObjectBuilder.cs: Improve initialization of root object collection - Initialize root object collection with name and units in a more concise way - Improve readability and maintainability of the code * Fix logger import in NavisworksRootObjectBuilder.cs The commit fixes an issue with the logger import in the NavisworksRootObjectBuilder.cs file. The incorrect namespace was causing a compilation error. This change ensures that the correct namespace is used for the logger, resolving the compilation error and allowing for proper logging functionality. * Refactor ClassPropertiesExtractor to simplify GetClassProperties method The GetClassProperties method in the ClassPropertiesExtractor class has been refactored to improve readability and reduce unnecessary code. The if statement that checks for exclusion of properties has been removed, as it is no longer needed. Instead, the ExtractClassProperties method is directly returned. This change simplifies the logic and improves code maintainability. * Fix static method in DisplayValueExtractor The commit fixes a bug in the DisplayValueExtractor class where the GetDisplayValue method was not declared as static. This caused a compilation error. The fix makes the method static, allowing it to be called without an instance of the class. * Add BasePropertyHandler, HierarchicalPropertyHandler, IPropertyHandler, and StandardPropertyHandler classes for handling property assignment in Navisworks conversion. - Added IPropertyHandler interface to define the contract for handling property assignment to Speckle objects. - Added BasePropertyHandler class to provide common functionality for property assignment. - Added StandardPropertyHandler class to handle standard property assignment without any merging or hierarchy processing. - Added HierarchicalPropertyHandler class to handle property assignment with hierarchy merging for objects that require ancestor properties. * Refactor class hierarchy and method signatures for Navisworks conversion - Make `GetClassProperties` method in `ClassPropertiesExtractor` static - Remove `classPropertiesExtractor` parameter from constructors in `BasePropertyHandler`, `HierarchicalPropertyHandler`, and `StandardPropertyHandler` - Update references to `classPropertiesExtractor.GetClassProperties(modelItem)` to use the static method `ClassPropertiesExtractor.GetClassProperties(modelItem)` - Rename private field `_properties` in classes implementing `INavisworksObject` to `Properties` - Rename public property `elements` in class `NavisworksModelItem` to `Elements` - Rename public property `displayValue` in class `NavisworksModelGeometry` to lowercase (`displayvalue`) - Add missing using statements * Add ElementSelectionHelper class for working with Navisworks ModelItem selections. This commit adds a new file, ElementSelectionHelper.cs, which contains a static class called ElementSelectionHelper. This class provides extension methods for working with Navisworks ModelItem selections. The class includes the following significant changes: - Added ResolveModelItemToIndexPath method: This method takes a Navisworks ModelItem and resolves it to its unique index path representation. The resulting string represents the model item's path, including the model index and a hierarchical path identifier separated by a specified separator. - Added ResolveIndexPathToModelItem method: This method takes an index path string and resolves it to a Navisworks ModelItem. It splits the index path into parts, assigns the first part to the modelIndex variable as an integer, and joins the remaining parts as the pathId string. - Added IsElementVisible method: This method determines whether a Navisworks ModelItem and all its ancestors are visible. It checks the visibility status for each item in the item's ancestorsAndSelf collection and returns true if none of them are hidden. - Added ResolveGeometryLeafNodes method: This method takes a Navisworks ModelItem and returns a list of all its descendants (including itself) that have geometry. These changes enhance functionality related to working with Navisworks ModelItems in Speckle.Converter.NavisworksShared.Helpers namespace. * cleanup * WIP on jsdb/navisworks WIP on jsdb/navisworks - Replaced `ModelItemTopLevelConverterToSpeckle` with `NavisworksRootToSpeckleConverter` in `NavisworksConverterServiceRegistration.cs` - Added new files to the project: `BasePropertyHandler.cs`, `HieraerchicalPropertyHandler.cs`, `IPropertyHandler.cs`, and `StandardPrpertyHandler.cs` - Updated the file path in the project items XML - Modified `NavisworksRootToSpeckleConverter.cs` to use the updated method name * Update Speckle.Objects to version 3.1.0-dev.205 in Navisworks connectors for versions 2020, 2021, and 2022. - Update Speckle.Objects to version 3.1.0-dev.205 - Update Speckle.Sdk to version 3.1.0-dev.205 - Update Speckle.Sdk.Dependencies to version 3.1.0-dev.205 * Fix reserved term replacement in PropertyHelpers.cs The commit fixes a bug in the PropertyHelpers.cs file where the reserved term "Item" was not being replaced correctly. The replacement has been changed from "Item_" to "Item". * Refactor property handlers and model objects - Remove unused code in ClassPropertiesExtractor.cs - Refactor PropertySetsExtractor.cs to use dependency injection for settingsStore - Refactor BasePropertyHandler.cs to include classPropertiesExtractor parameter - Rename HieraerchicalPropertyHandler.cs to HierarchicalPropertyHandler.cs - Rename StandardPrpertyHandler.cs to StandardPropertyHandler.cs - Update NavisworksConverterServiceRegistration.cs to register the new property handlers * Refactor model item name retrieval logic in ModelItemTopLevelConverterToSpeckle.cs - Refactored the GetObjectName method to improve readability and maintainability. - Updated the logic to retrieve the target object's display name, cycling through parent objects if necessary. - Added a fallback case to return "Unnamed model item" if no valid display name is found. * Whitespace in property name conversion to _ in PropertyHelpers.cs The code change fixes a bug in the `PropertyHelpers.cs` file where property names were not being converted correctly. The regular expression used to replace characters now includes whitespace characters as well. This ensures that all invalid characters are replaced with underscores, allowing for proper conversion of property names. * Add GeometryNodeMerger class to handle merging of sibling geometry nodes. - Added `GeometryNodeMerger` class to handle grouping and merging of sibling geometry nodes. - Updated `NavisworksRootObjectBuilderExtensions` to use `GeometryNodeMerger` for grouping and merging. - Updated `NavisworksRootObjectBuilder` to use `ClassPropertiesExtractor` and `PropertySetsExtractor`. - Refactored code in `NavisworksRootObjectBuilder.Build()` method to improve readability and maintainability. * modify GeometryNodeMerger.cs and NavisworksRootObjectBuilder.cs - Modified GeometryNodeMerger.cs to only group anonymous geometry nodes - Modified NavisworksRootObjectBuilder.cs to refactor the Build method, handle grouped nodes first, and set the final elements list * add some non async paths for progress * format * remove needless selection * Initialize root collection, convert and store model items, process and merge grouped nodes, add remaining non-grouped nodes, finalize and return. * Add NavisworksMaterialUnpacker class for unpacking render materials This commit adds a new file, NavisworksMaterialUnpacker.cs, which contains the implementation of the NavisworksMaterialUnpacker class. This class is responsible for unpacking render materials from Navisworks objects. The NavisworksMaterialUnpacker class includes methods such as UnpackRenderMaterial and ConvertRenderColorAndTransparencyToSpeckle, which handle the extraction and conversion of render material properties. Additionally, the project file Speckle.Connectors.NavisworksShared.projitems has been updated to include the newly added NavisworksMaterialUnpacker.cs file. * Add `NavisworksMaterialUnpacker` to `NavisworksRootObjectBuilder` constructor - Add `NavisworksMaterialUnpacker` to the service collection in `NavisworksConnectorServiceRegistration.cs`. - Update the constructor of `NavisworksRootObjectBuilder` to include dependencies for `IRootToSpeckleConverter`, `ISendConversionCache`, `IConverterSettingsStore<NavisworksConversionSettings>`, `ILogger<NavisworksRootObjectBuilder>`, `ISdkActivityFactory`, and `NavisworksMaterialUnpacker`. This commit adds the registration of the `NavisworksMaterialUnpacker` class to the service collection in order to enable dependency injection. It also updates the constructor of the `NavisworksRootObjectBuilder` class to include all necessary dependencies for its functionality. * Update Speckle.Objects to version 3.1.0-dev.212 in Navisworks connectors for versions 2020, 2021, and 2022. The commit updates the packages.lock.json file for the Navisworks connectors for versions 2020, 2021, and 2022. It changes the requested and resolved version of Speckle.Objects from 3.1.0-dev.205 to 3.1.0-dev.212 * Add NavisworksObject to finalElements in NavisworksRootObjectBuilder This commit adds the NavisworksObject class to the finalElements list in the NavisworksRootObjectBuilder. The NavisworksObject contains properties such as name, displayValue, properties, and units. This change improves the functionality of the code by including additional information for each element in the finalElements list. * Add applicationId to NavisworksRootObjectBuilder This commit adds the applicationId property to the NavisworksRootObjectBuilder class in order to include it in the finalElements list. This change ensures that the applicationId is properly assigned and included when building Navisworks objects for sending. * RunOnMainThreadAsync implemented - Refactored GetDocumentInfo method in NavisworksBasicConnectorBinding to run on the main thread using Parent.RunOnMainThreadAsync - Refactored HighlightObjects method in NavisworksBasicConnectorBinding to run on the main thread using Parent.RunOnMainThreadAsync - Refactored OnSelectionChange method in NavisworksSelectionBinding to use async/await and run UpdateSelectionAsync on the main thread using Parent.RunOnMainThreadAsync - Added async/await to Send method in NavisworksSendBinding and refactored code inside it to use async/await for better readability - Extracted common logic into separate methods in NavisworksSendBinding: GetModelCard, InitializeConverterSettings, GetNavisworksModelItems, ExecuteSendOperation - Added cancellation support to CancelSend method in NavisworksSendBinding by calling _cancellationManager.CancelOperation with modelCardId as argument - Refactored ProcessModelStateChange method in NavisworksDocumentEvents to use async/await and added check for _finalModelCount value * Restore DocumentModelStore.cs accessibility - not sure when that changed - Change access modifiers of HostAppSaveState and LoadState methods to protected - Update method comments to reflect changes in access modifiers * Refactor NavisworksConnectorServiceRegistration and NavisworksDocumentEvents - Added NavisworksMaterialUnpacker to service collection - Updated registration of DocumentModelStore in service collection - Updated references to DocumentModelStore with NavisworksDocumentModelStore in NavisworksDocumentEvents - Renamed HostAppSaveState method to protected override method in NavisworksDocumentModelStore - Added public method ReloadState as a wrapper for LoadState in NavisworksDocumentModelStore * Delete Navisworks solution file The commit deletes the Navisworks solution file, which is no longer needed. * Delete packages.lock.json * Remove Navisworks 2025 * Reset Navisworks project references and project names - Updated the project reference for "Navisworks" in Local.sln to use a new GUID - Updated the project reference for "2024" in Local.sln to use a new GUID - Updated the project reference for "Shared" in Local.sln to use a new GUID - Updated the project reference for "Speckle.Connectors.NavisworksShared" in Local.sln to use a new GUID - Updated the project reference for "Speckle.Converters.NavisworksShared" in Local.sln to use a new GUID - Updated the project name and GUID for "Navisworks" in Speckle.Connectors.sln - Updated the project name and GUID for "Shared" in Speckle.Connectors.sln * Update Microsoft.Web.WebView2 package to version 1.0.2088.41 in Autocad connectors for versions 2022, 2023, 2024, and 2025. This commit updates the Microsoft.Web.WebView2 package in the Autocad connectors for versions 2022, 2023, 2024, and 2025 from version 1.0.1938.49 to version 1.0.2088.41. This change ensures compatibility with the latest version of the package and includes necessary bug fixes or improvements related to web view functionality in the connectors. * Reset Navisworks project references and project names - Updated the project reference for "Navisworks" in Local.sln to use a new GUID - Updated the project reference for "2024" in Local.sln to use a new GUID - Updated the project reference for "Shared" in Local.sln to use a new GUID - Updated the project reference for "Speckle.Connectors.NavisworksShared" in Local.sln to use a new GUID - Updated the project reference for "Speckle.Converters.NavisworksShared" in Local.sln to use a new GUID - Updated the project name and GUID for "Navisworks" in Speckle.Connectors.sln - Updated the project name and GUID for "Shared" in Speckle.Connectors.sln * Update Microsoft.Web.WebView2 version to [1.0.1938.49, ) in Autocad and Civil3d connectors This commit updates the version of Microsoft.Web.WebView2 to [1.0.1938.49, ) in the Autocad and Civil3d connectors packages.lock.json files. The previous version was 1.0.2088.41, and the contentHash has also been updated accordingly. Note: This commit message is exactly 50 characters long, as per the requirement for a short description less than 50 characters. * Refactor to avoid the early disposal of COM objects - Remove the `GeometryNodeMerger` class from service registration in `NavisworksConnectorServiceRegistration.cs` - Change the access modifier of `UnpackRenderMaterial` method in `NavisworksMaterialUnpacker.cs` to internal - Change the access modifier of `ConvertRenderColorAndTransparencyToSpeckle` method in `NavisworksMaterialUnpacker.cs` to private static - Change the access modifier of `GroupSiblingGeometryNodes` method in `GeometryNodeMerger.cs` to public static - Add null checks for parameters in methods: - GetClassProperties in ClassPropertiesExtractor.cs - GetPropertySets and AssignProperties in BasePropertyHandler.cs - AssignClassProperties and ExtractClassProperties in ClassPropertiesExtractor.cs - GetPropertySets in PropertySetsExtractor.cs - AssignPropertySets, AssignModelProperties, and ExtractModelProperties in ModelPropertiesExtractor.cs - NavisworksRootObjectBuilder constructor * feat: Add geometry conversion functionality - Added `DisplayValueExtractor` class for extracting display values from Navisworks model items - Added `GeometryToSpeckleConverter` class for converting Navisworks geometry to Speckle SDK models - Updated dependencies in `NavisworksConverterServiceRegistration.cs` to include the new classes * Rename GeomtryNodeMerger.cs to GeometryNodeMerger.cs This commit renames the file GeomtryNodeMerger.cs to GeometryNodeMerger.cs. * Remove redundant code shared by both projects - Updated NavisworksSelectionBinding to include IElementSelectionService as a dependency in the constructor. - Updated NavisworksSendBinding to include IElementSelectionService as a dependency in the constructor. - Removed ElementSelectionExtension.cs file. - Added ElementSelectionService.cs file which includes methods for getting model item path, resolving model item from path, checking visibility of model items, and getting geometry nodes. * fix lock files * cannot make null valuetasks * merge fixes * update to latest SDK * scope the classes correctly for the deserialization process * Navisworks proj cleanup (#443) * Clean up projects and locks for all Navisworks * Fix nuget error * Fixed Local SLN and removed some runtime IDs * add back RuntimeIdentifier * We shouldn't be using ConfigureAwait false * Fix lock files for NW * Rhino doesn't need explicit run on main threads? * add back layers and materials on ui thread with comment * Update to SDK 3.1.0-218 * update locks * rationalize NW and usage of cancellation token * format * remove .ConfigureAwait(false) * Remove ValueTask and fix ArcGIS doc saving * run events on the correct thread * format * Remove usage of sync context --------- Co-authored-by: Jonathon Broughton <jonathon@stardotbmp.com> Co-authored-by: oguzhankoral <oguzhankoral@gmail.com> Co-authored-by: Jonathon Broughton <760691+jsdbroughton@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Did: