* Refactors Navisworks build process for resilience Adds error checking to ensure the Navisworks version is set before build occurs, and improves error handling to avoid empty output directories. Updates file copy logic to handle resource and ribbon files correctly. Ensures that the Navisworks plugin is correctly packaged and deployed. Addresses CNX-2788 * improves fragment collection logic in converter Refines the collection process by ensuring that fragment paths match the length of the identity path before further processing. This change enhances the accuracy of fragment stacking. Relates to ongoing work on instancing. * improves path validation efficiency and clarity Caches array lengths for path validation to enhance performance. Revises validation logic to consolidate checks and streamline code readability. Ensures paths without valid array data are properly skipped. * refactors geometry converter for improved instancing * adds instance handling and path utilities Introduces functionality for discovering and managing instance paths. Enhances path handling with a new record structure for better data management. Implements a registry to track and group instance paths effectively. * replaces DisplayValueExtractor with a new implementation Redefines the DisplayValueExtractor to simplify dependencies by removing unnecessary components. Updates GetDisplayValue method for cleaner logic and ensures it handles null model items more gracefully. * updates geometry conversion registration process Refactors the service registration for geometry conversion to ensure that it retrieves the current settings and registry instance from the service provider. This change supports instancing functionality within the conversion process. * geometry processing with improved instance handling Adds instance registry for managing geometry paths Refactors fragment collection for more efficient processing Clarifies logic for transforming and processing geometries * improves geometry instance processing Enhances the handling of geometry instances by capturing world transformation data and ensuring proper registration. Updates the method for processing path fragments to return instance world data, allowing for improved conversion and registration of instances. Fixes potential logic bottlenecks in instance transformation retrieval. * adds instance fragment registry implementation Introduces a new interface and concrete class for managing instance fragments, including functionality for grouping, conversion tracking, and world coordinates. Improves structure for better management of instance data within the application. * removes old geometry helper methods and adds new functionality Introduces a new structure for axis-aligned bounding boxes, enhancing spatial computations. Implements various geometric transformation methods to support unbaking and processing geometry data. Improves vector comparison and bounding box calculations for improved accuracy. * updates Aabb structure and improves geometry processing Changes Aabb from a struct to a record type, enabling immutability and simpler construction. Enhances geometry processing logic to ensure valid Aabb computation, allowing for improved handling of empty geometries. Throws exceptions for null or invalid input in instance registration, ensuring greater robustness. * adds instancing support and geometry unbaking Implements instancing to optimise geometry handling and enables unbaking geometry for validation of instance detection. Enhances diagnostics reporting for instance grouping and tracking, improving clarity on geometry processing outcomes. * optimises geometry processing and visibility checks Enhances performance by pre-allocating list capacities to reduce resizing overhead. Implements a single-pass filter to improve visibility checks on model items, ensuring only geometries with both visibility and geometry are processed. Cleans up and simplifies the code by removing unnecessary debug logs. * adds diagnostics for instance grouping behaviour Implements a diagnostics class to analyse instance grouping efficiency and effectiveness within the application. Provides methods for generating detailed reports and summaries, aiding in debugging grouping failures and offering recommendations for improvement. * adds geometry cache statistics logging Implements a logging feature for geometry cache performance statistics, providing insights into COM extraction and geometry creation times. Updates the display value extractor to allow access to geometry statistics. Improves diagnostic capabilities by logging additional performance metrics during the geometry conversion process. * improves performance tracking and diagnostics in processing Enhances the timing and diagnostics for model item retrieval, providing detailed performance metrics to identify bottlenecks. Updates user feedback mechanisms during operations to maintain responsiveness. Refines the management of component instances in geometry processing for better efficiency. * addresses memory leaks COM object management in geometry processing Improves memory management with proper release of COM objects in the geometry processing system. Adds safety checks and optimisations within existing methods to prevent memory leaks and enhance performance. Relates to improved instancing capabilities. * removes deprecated settings code and cleans up logic Eliminates the previous implementation of conversion settings, streamlining settings management. Refines the conversion settings factory by removing unused methods and comments, optimising the overall process for better readability and maintenance. Updates the user-related configurations to enhance clarity and usability. * updates primitive processor documentation and comments Clarifies COM interop bottlenecks and performance analysis. Removes outdated optimization recommendations to improve clarity. Adds warnings for performance hotspots affecting vertex processing. * improves event handling and diagnostics in filtering Refines filtering behaviour to ensure consistency across all relevant components, aiding in the correct updating of saved sets. Enhances diagnostic logging throughout path processing, providing better insights into timing and performance. Removes redundant comments to streamline clarity and focus on essential diagnostics. * Refines geometry path handling in converter Improves null handling for geometry paths to prevent potential exceptions. Clarifies performance statistics documentation for better understanding of COM overhead. Enhances comments for the unbaking geometry method to improve code readability. * refactors element selection service for improved integration Moves element selection service to a converter-specific namespace. Updates dependency injection bindings for the element selection service. Streamlines usage by enhancing the functionality of the inherited service while preparing for future connector-specific extensions. * removes deprecated code and improves material handling Eliminates unnecessary COM interop logic for hash ID generation in the unpacker. Refactors material name creation and streamlines object addition to proxies for improved performance and clarity. Introduces a settings manager to efficiently manage visual representation and related settings for model-specific caching. * formatting * fixes CI error CS9113 Replaces a local display value extractor reference with a class-level field for consistency and improved readability. The logging is only during DEBUG session so error was hidden until CI build * refactors element selection service integration Replaces the existing element selection service with a new implementation to improve clarity and maintainability. Updates service registrations and filters to use the refactored service while removing outdated functionality. Incorporates updates to ensure consistent geometry validation checks. * updates selection handling in geometry converter Replaces direct model item usage with a collection for selection handling, improving memory management by adding a dispose call. Enhances overall stability and performance of geometry conversion process. * optimises display values aggregation logic Refactors the method for aggregating display values from sibling bases. Utilises LINQ to streamline the accumulation process, enhancing readability and performance. Maintains functionality while reducing code complexity. * adds null check for item.Model in category extractor Ensures that the extraction process safely handles cases where item.Model is null, preventing potential runtime errors. Improves reliability of the converter's operation. * removes debug diagnostics for instance grouping Eliminates extensive logging and performance measurement related to instance grouping from the codebase. Streamlines the overall code by removing unused functionality related to diagnostics that was not leading to meaningful insights. This improves maintainability and clarity by reducing complexity in the relevant components. * apply Y-up to Z-up transform to instance matrices Instanced objects from Y-up models were incorrectly positioned because instance transforms used the raw Navisworks matrix while geometry vertices had already been converted to Z-up in PrimitiveProcessor. Added TransformMatrixYUpToZUp() which applies P * M * P^-1 conjugation to transform the entire 4x4 matrix to Z-up coordinate space. Applied to both the unbake operation and instance proxy transform when the model is not upright. --------- Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>

Speckle | Sharp | Connectors
Speckle is the first AEC data hub that connects with your favorite AEC tools. Speckle exists to overcome the challenges of working in a fragmented industry where communication, creative workflows, and the exchange of data are often hindered by siloed software and processes. It is here to make the industry better.
.NET Desktop UI, Connectors, and Converters
Repo structure
This repo is the home of our next-generation Speckle .NET projects:
- Desktop UI
DUI3: our next generation Desktop User Interface for all connectors.
- Speckle Connectors
Autocad Connector: for Autodesk AutoCAD and Civil3D 2022+Rhino Connector: for McNeel Rhino 7+Revit Connector: for Autodesk Revit 2022+Tekla Connector: for Trimble Tekla 2024
- Speckle Converters
Autocad Converter: for Autodesk AutoCAD 2022+Civil3d Converter: for Autodesk Civil3D 2022+Rhino Converter: for McNeel Rhino 7+Revit Converter: for Autodesk Revit 2023+Tekla Converter: for Trimble Tekla 2024
- SDK
SDK: Autofac module, connector utilities, and dependency injection.
Other repos
Make sure to also check and ⭐️ these other Speckle next generation repositories:
speckle-sharp-sdk: our csharp SDK for next gen connectors and developmentspeckle-sketchup: Sketchup connectorspeckle-powerbi: PowerBi connector- and more connectors & tooling!
Developing and Debugging
Developing
It is recommended that you use Jetbrains Rider (version 2024.3 or greater) or Visual Studio 2022 (version 17.13 or greater) The project requires version 8.0.4xx of the .NET SDK. You can download the latest version from https://dotnet.microsoft.com/en-us/download/dotnet/8.0
From there you can open the main Speckle.Connectors.sln solution and build the project
For good development experience and environment setup, you the commands are avaible needed.
Formatting
We're using CSharpier to format our code. You can install Csharpier in a few ways:
- Install CSharpier as a local tool and reformat from CLI
dotnet tool install csharpier dotnet csharpier - Install CSharpier as a global tool and reformat from CLI
dotnet tool install csharpier -g dotnet csharpier - Install the CSharpier extension for Visual Studio or Rider.
For best DX, we recommend turning on CSharpier'sreformat on savesetting if you've installed it in your IDE.
Clean Locks
We're using npm package locks to store exact and versioned dependency trees. Occasionally you will need to clean your local package-lock files, eg when switching between Speckle.Connectors.sln and Local.sln.
Run this command in CLI to delete all package.lock.json files before a restore:
.\build.ps1 clean-locks
Deep Clean
To make sure your local environment is ready for a clean build, run this command to delete all bin and obj directories and restore all projects:
.\build.ps1 deep-clean
Deep Clean Local
This is for users of the Local.sln solution:
To make sure your local environment is ready for a clean build, run this command to delete all bin and obj directories and restore all projects:
.\build.ps1 deep-clean-local
Local development with SDK changes
If you'd like to make changes to the speckle-sharp-sdk side-by-side with changes to this repo's projects, use **Local.sln**.
This solution includes the Core and Objects projects from the speckle-sharp-sdk repo, and uses a new Configuration to create a build directory alongside Debug and Release.
Warning
Using
Local.slnwill modify all your package locks. Don't check these in! Revert with theclean-lockscommand or use the regular solution to revert once your changes are made.
Switching to SLNX
SLNX was introduced with .NET 9 (in May 2024), Visual Studio 17.13 and Rider 2024.3. The older SLNs being used remain for now but will be removed when .NET 10 is introduced to the repo. SLNXs specific to certain host apps are being generated from the main SLN to allow for faster developmenet.
https://devblogs.microsoft.com/dotnet/introducing-slnx-support-dotnet-cli/
https://devblogs.microsoft.com/visualstudio/new-simpler-solution-file-format/
Security and Licensing
Security
For any security vulnerabilities or concerns, please contact us directly at security[at]speckle.systems.
License
Unless otherwise described, the code in this repository is licensed under the Apache-2.0 License. Please note that some modules, extensions or code herein might be otherwise licensed. This is indicated either in the root of the containing folder under a different license file, or in the respective file's header. If you have any questions, don't hesitate to get in touch with us via email.