Compare commits

..

1 Commits

Author SHA1 Message Date
Jedd Morgan 95a55ab104 Test a change in Revit
.NET Build and Publish / build-windows (push) Has been cancelled
.NET Build and Publish / build-linux (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
2025-03-14 13:55:35 +00:00
202 changed files with 1596 additions and 5461 deletions
+3 -1
View File
@@ -1,7 +1,9 @@
name: .NET Build
on:
pull_request
pull_request: # Run build on every pull request that is not to main
branches-ignore:
- main
jobs:
build:
+44 -13
View File
@@ -29,48 +29,79 @@ public static class Affected
}
}
public static async Task<IEnumerable<string>> GetTestProjects()
public static async Task<string[]> GetSolutions()
{
await ComputeAffected();
var projFile = Path.Combine(Root, AFFECTED_PROJECT);
if (File.Exists(projFile))
{
Console.WriteLine("Affected project file: " + projFile);
return [projFile];
}
Console.WriteLine("Using solutions: " + string.Join(',', Consts.Solutions));
return Consts.Solutions;
}
public static async Task<IEnumerable<string>> GetProjects()
{
await ComputeAffected();
var projFile = Path.Combine(Root, AFFECTED_PROJECT);
if (File.Exists(projFile))
{
var references = GetAffectedProjects();
return references.Where(x => x.Contains("Tests"));
return references.Where(x => x.EndsWith(".Tests.csproj"));
}
return Glob.Files(Root, "**/*.Tests.csproj");
}
public static async Task<ProjectGroup[]> GetAffectedProjectGroups()
public static async Task<InstallerProject[]> GetInstallerProjects()
{
await ComputeAffected();
var projFile = Path.Combine(Root, AFFECTED_PROJECT);
if (File.Exists(projFile))
{
var references = GetAffectedProjects().ToList();
var groups = new List<ProjectGroup>();
foreach (var projectGroup in Consts.ProjectGroups)
var projs = new List<InstallerProject>();
foreach (var referencePath in references)
{
Console.WriteLine($"Candidate project: {referencePath}");
}
foreach (var manifest in Consts.InstallerManifests)
{
var assets = new List<InstallerAsset>();
foreach (var referencePath in references)
{
if (projectGroup.Projects.Any(x => x.ProjectPath.Contains(referencePath)))
foreach (var proj in manifest.Projects)
{
groups.Add(projectGroup);
break;
if (proj.ProjectPath.Contains(referencePath))
{
assets.Add(proj);
}
}
}
if (assets.Count > 0)
{
projs.Add(manifest with { Projects = assets });
}
}
foreach (var group in groups)
foreach (var proj in projs.SelectMany(x => x.Projects))
{
Console.WriteLine("Affected project group being built: " + group.HostAppSlug);
Console.WriteLine("Affected project being built: " + proj);
}
return groups.ToArray();
if (projs.Count > 0)
{
return projs.ToArray();
}
}
Console.WriteLine("Using all project groups: " + string.Join(',', Consts.ProjectGroups));
return Consts.ProjectGroups;
Console.WriteLine("Using all installer manifests: " + string.Join(',', Consts.InstallerManifests));
return Consts.InstallerManifests;
}
private static bool s_affectedComputed;
+3 -4
View File
@@ -4,7 +4,7 @@ public static class Consts
{
public static readonly string[] Solutions = ["Speckle.Connectors.sln"];
public static readonly ProjectGroup[] ProjectGroups =
public static readonly InstallerProject[] InstallerManifests =
{
new("arcgis", [new("Connectors/ArcGIS/Speckle.Connectors.ArcGIS3", "net6.0-windows")]),
new(
@@ -49,8 +49,7 @@ public static class Consts
new("Connectors/Navisworks/Speckle.Connectors.Navisworks2022", "net48"),
new("Connectors/Navisworks/Speckle.Connectors.Navisworks2023", "net48"),
new("Connectors/Navisworks/Speckle.Connectors.Navisworks2024", "net48"),
new("Connectors/Navisworks/Speckle.Connectors.Navisworks2025", "net48"),
new("Connectors/Navisworks/Speckle.Connectors.Navisworks2026", "net48")
new("Connectors/Navisworks/Speckle.Connectors.Navisworks2025", "net48")
]
),
new(
@@ -70,7 +69,7 @@ public static class Consts
};
}
public readonly record struct ProjectGroup(string HostAppSlug, IReadOnlyList<InstallerAsset> Projects)
public readonly record struct InstallerProject(string HostAppSlug, IReadOnlyList<InstallerAsset> Projects)
{
public override string ToString() => $"{HostAppSlug}";
}
+24 -32
View File
@@ -17,7 +17,6 @@ const string CLEAN_LOCKS = "clean-locks";
const string CHECK_SOLUTIONS = "check-solutions";
const string DEEP_CLEAN = "deep-clean";
const string DEEP_CLEAN_LOCAL = "deep-clean-local";
const string DETECT_AFFECTED = "detect-affected";
//need to pass arguments
/*var arguments = new List<string>();
@@ -132,18 +131,6 @@ Target(
}
);
Target(
DETECT_AFFECTED,
DependsOn(RESTORE_TOOLS),
async () =>
{
foreach (var group in await Affected.GetAffectedProjectGroups())
{
Console.WriteLine("Affected project group being built: " + group.HostAppSlug);
}
}
);
Target(
FORMAT,
DependsOn(RESTORE_TOOLS),
@@ -155,30 +142,34 @@ Target(
Target(
RESTORE,
DependsOn(FORMAT, DETECT_AFFECTED),
Consts.Solutions,
async s =>
DependsOn(FORMAT),
async () =>
{
var version = await Versions.ComputeVersion();
var fileVersion = await Versions.ComputeFileVersion();
Console.WriteLine($"Restoring: {s} - Version: {version} & {fileVersion}");
await RunAsync("dotnet", $"restore \"{s}\" --locked-mode");
foreach (var s in await Affected.GetSolutions())
{
Console.WriteLine($"Restoring: {s} - Version: {version} & {fileVersion}");
await RunAsync("dotnet", $"restore \"{s}\" --locked-mode");
}
}
);
Target(
BUILD,
DependsOn(RESTORE),
Consts.Solutions,
async s =>
async () =>
{
var version = await Versions.ComputeVersion();
var fileVersion = await Versions.ComputeFileVersion();
Console.WriteLine($"Restoring: {s} - Version: {version} & {fileVersion}");
await RunAsync(
"dotnet",
$"build \"{s}\" -c Release --no-restore -warnaserror -p:Version={version} -p:FileVersion={fileVersion} -v:m"
);
foreach (var s in await Affected.GetSolutions())
{
Console.WriteLine($"Restoring: {s} - Version: {version} & {fileVersion}");
await RunAsync(
"dotnet",
$"build \"{s}\" -c Release --no-restore -warnaserror -p:Version={version} -p:FileVersion={fileVersion} -v:m"
);
}
}
);
@@ -189,9 +180,9 @@ Target(
DependsOn(BUILD, CHECK_SOLUTIONS),
async () =>
{
foreach (var s in await Affected.GetTestProjects())
foreach (var file in await Affected.GetProjects())
{
await RunAsync("dotnet", $"test \"{s}\" -c Release --no-build --no-restore --verbosity=minimal");
await RunAsync("dotnet", $"test \"{file}\" -c Release --no-build --no-restore --verbosity=minimal");
}
}
);
@@ -239,16 +230,16 @@ Target(
async () =>
{
var version = await Versions.ComputeVersion();
foreach (var group in await Affected.GetAffectedProjectGroups())
foreach (var x in await Affected.GetInstallerProjects())
{
Console.WriteLine($"Zipping: {group.HostAppSlug} as {version}");
Console.WriteLine($"Zipping: {x} as {version}");
var outputDir = Path.Combine(".", "output");
var slugDir = Path.Combine(outputDir, group.HostAppSlug);
var slugDir = Path.Combine(outputDir, x.HostAppSlug);
Directory.CreateDirectory(outputDir);
Directory.CreateDirectory(slugDir);
foreach (var asset in group.Projects)
foreach (var asset in x.Projects)
{
var fullPath = Path.Combine(".", asset.ProjectPath, "bin", "Release", asset.TargetName);
if (!Directory.Exists(fullPath))
@@ -272,10 +263,11 @@ Target(
}
}
var outputPath = Path.Combine(outputDir, $"{group.HostAppSlug}.zip");
var outputPath = Path.Combine(outputDir, $"{x.HostAppSlug}.zip");
File.Delete(outputPath);
Console.WriteLine($"Zipping: '{slugDir}' to '{outputPath}'");
ZipFile.CreateFromDirectory(slugDir, outputPath);
// Directory.Delete(slugDir, true);
}
string githubEnv = Environment.GetEnvironmentVariable("GITHUB_ENV") ?? "Unset";
@@ -67,8 +67,6 @@ public class BasicConnectorBinding : IBasicConnectorBinding
public void RemoveModel(ModelCard model) => _store.RemoveModel(model);
public void RemoveModels(List<ModelCard> models) => _store.RemoveModels(models);
public async Task HighlightObjects(IReadOnlyList<string> objectIds)
{
await HighlightObjectsOnView(objectIds.Select(x => new ObjectID(x)).ToList());
@@ -221,21 +221,14 @@
"resolved": "4.5.1",
"contentHash": "Zh8t8oqolRaFa9vmOZfdQm/qKejdqz0J9kr7o2Fu0vPeoH3BL1EOXipKWwkWtLT1JPzjByrF19fGuFlNbmPpiw=="
},
"speckle.common.meshtriangulation": {
"type": "Project",
"dependencies": {
"LibTessDotNet": "[1.1.15, )",
"Speckle.DoubleNumerics": "[4.1.0, )"
}
},
"speckle.connectors.common": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -243,8 +236,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -261,7 +254,6 @@
"type": "Project",
"dependencies": {
"Esri.ArcGISPro.Extensions30": "[3.2.0.49743, )",
"Speckle.Common.MeshTriangulation": "[1.0.0, )",
"Speckle.Converters.Common": "[1.0.0, )"
}
},
@@ -269,15 +261,9 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"LibTessDotNet": {
"type": "CentralTransitive",
"requested": "[1.1.15, )",
"resolved": "1.1.15",
"contentHash": "KuA7N3Nv/lIeawJdQBQJR6oqWD9KETHLbWzBqapwFs+Tby+R5I4crkKujKMm5bXcSuFZ8LNtflFQVadsWCbBjg=="
},
"Microsoft.Extensions.DependencyInjection": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
@@ -313,18 +299,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -334,14 +320,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
},
"net6.0-windows7.0/win-x64": {
@@ -11,7 +11,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2022.0.2" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2022.0.2" />
</ItemGroup>
<ItemGroup>
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -294,7 +294,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -338,18 +338,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -359,14 +359,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -11,7 +11,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" />
</ItemGroup>
<ItemGroup>
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -294,7 +294,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -338,18 +338,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -359,14 +359,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -11,7 +11,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2024.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2024.0.0" />
</ItemGroup>
<ItemGroup>
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -295,7 +295,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -339,18 +339,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -360,14 +360,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -13,7 +13,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2025.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2025.0.0" />
<FrameworkReference Include="Microsoft.WindowsDesktop.App"/>
</ItemGroup>
<ItemGroup>
@@ -215,9 +215,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -225,8 +225,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -251,7 +251,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -295,18 +295,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
@@ -315,14 +315,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
},
"net8.0-windows7.0/win-x64": {
@@ -79,8 +79,6 @@ public class AutocadBasicConnectorBinding : IBasicConnectorBinding
public void RemoveModel(ModelCard model) => _store.RemoveModel(model);
public void RemoveModels(List<ModelCard> models) => _store.RemoveModels(models);
public async Task HighlightObjects(IReadOnlyList<string> objectIds)
{
// POC: Will be addressed to move it into AutocadContext!
@@ -10,8 +10,8 @@
<StartProgram>$(ProgramW6432)\Autodesk\AutoCAD $(Civil3DVersion)\acad.exe</StartProgram>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2022.0.2" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Civil3D.API" VersionOverride="2022.0.2" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" />
<PackageReference Include="Speckle.Civil3D.API" />
</ItemGroup>
<ItemGroup>
@@ -268,9 +268,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -278,8 +278,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -304,7 +304,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -348,18 +348,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -369,14 +369,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -11,8 +11,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Civil3D.API" VersionOverride="2023.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" />
<PackageReference Include="Speckle.Civil3D.API" VersionOverride="2023.0.0" />
</ItemGroup>
<ItemGroup>
@@ -268,9 +268,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -278,8 +278,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -304,7 +304,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -348,18 +348,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -369,14 +369,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -11,8 +11,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2024.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Civil3D.API" VersionOverride="2024.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2024.0.0" />
<PackageReference Include="Speckle.Civil3D.API" VersionOverride="2024.0.0" />
</ItemGroup>
<ItemGroup>
@@ -268,9 +268,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -278,8 +278,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -304,7 +304,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -348,18 +348,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -369,14 +369,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -13,8 +13,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2025.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Civil3d.API" VersionOverride="2025.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2025.0.0" />
<PackageReference Include="Speckle.Civil3d.API" VersionOverride="2025.0.0" />
<FrameworkReference Include="Microsoft.WindowsDesktop.App" />
</ItemGroup>
<ItemGroup>
@@ -224,9 +224,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -234,8 +234,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -261,7 +261,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -305,18 +305,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
@@ -325,14 +325,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
},
"net8.0-windows7.0/win-x64": {
@@ -65,9 +65,6 @@ public class CsiSharedBasicConnectorBinding : IBasicConnectorBinding
public void RemoveModel(ModelCard model) =>
_topLevelExceptionHandler.CatchUnhandled(() => _threadContext.RunOnThread(() => _store.RemoveModel(model), true));
public void RemoveModels(List<ModelCard> models) =>
_topLevelExceptionHandler.CatchUnhandled(() => _threadContext.RunOnThread(() => _store.RemoveModels(models), true));
public Task HighlightModel(string modelCardId) => Task.CompletedTask;
public Task HighlightObjects(IReadOnlyList<string> objectIds) => Task.CompletedTask;
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -287,7 +287,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"speckle.converters.etabs21": {
@@ -337,18 +337,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -358,14 +358,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -215,9 +215,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -225,8 +225,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -243,7 +243,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"speckle.converters.etabs22": {
@@ -293,18 +293,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
@@ -313,14 +313,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -16,7 +16,7 @@
<ItemGroup>
<Reference Include="WindowsFormsIntegration"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2020.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2020.0.0"/>
</ItemGroup>
<ItemGroup>
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -287,7 +287,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"speckle.converters.navisworks2020": {
@@ -339,18 +339,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -360,14 +360,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
},
".NETFramework,Version=v4.8/win-x64": {
@@ -16,7 +16,7 @@
<ItemGroup>
<Reference Include="WindowsFormsIntegration"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2021.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2021.0.0"/>
</ItemGroup>
<ItemGroup>
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -287,7 +287,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"speckle.converters.navisworks2021": {
@@ -339,18 +339,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -360,14 +360,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
},
".NETFramework,Version=v4.8/win-x64": {
@@ -16,7 +16,7 @@
<ItemGroup>
<Reference Include="WindowsFormsIntegration"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2022.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2022.0.0"/>
</ItemGroup>
<ItemGroup>
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -287,7 +287,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"speckle.converters.navisworks2022": {
@@ -339,18 +339,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -360,14 +360,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
},
".NETFramework,Version=v4.8/win-x64": {
@@ -16,7 +16,7 @@
<ItemGroup>
<Reference Include="WindowsFormsIntegration"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2023.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2023.0.0"/>
</ItemGroup>
<ItemGroup>
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -287,7 +287,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"speckle.converters.navisworks2023": {
@@ -339,18 +339,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -360,14 +360,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
},
".NETFramework,Version=v4.8/win-x64": {
@@ -16,7 +16,7 @@
<ItemGroup>
<Reference Include="WindowsFormsIntegration"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2024.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2024.0.0"/>
</ItemGroup>
<ItemGroup>
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -287,7 +287,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"speckle.converters.navisworks2024": {
@@ -339,18 +339,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -360,14 +360,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
},
".NETFramework,Version=v4.8/win-x64": {
@@ -16,7 +16,7 @@
<ItemGroup>
<Reference Include="WindowsFormsIntegration"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2025.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2025.0.0"/>
<PackageReference Include="Microsoft.Web.WebView2" VersionOverride="1.0.2045.28" />
</ItemGroup>
@@ -265,9 +265,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -275,8 +275,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -293,7 +293,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"speckle.converters.navisworks2025": {
@@ -339,18 +339,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -360,14 +360,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
},
".NETFramework,Version=v4.8/win-x64": {
@@ -1,9 +0,0 @@
{
"profiles": {
"Speckle.Connector.Navisworks2026": {
"commandName": "Executable",
"executablePath": "C:\\Program Files\\Autodesk\\Navisworks Manage 2026\\Roamer.exe",
"commandLineArgs": " -licensing AdLM"
}
}
}
@@ -1,29 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<FileAlignment>512</FileAlignment>
<NavisworksBuildNumber>v23</NavisworksBuildNumber>
<NavisworksVersion>2026</NavisworksVersion>
<DefineConstants>$(DefineConstants);TRACE;NAVIS2026;NAVIS</DefineConstants>
<Configurations>Debug;Release;Local</Configurations>
</PropertyGroup>
<Import Project="..\Speckle.Connectors.NavisworksShared\Speckle.Connectors.NavisworksShared.projitems" Label="Shared"/>
<ItemGroup>
<Reference Include="WindowsFormsIntegration"/>
<PackageReference Include="Speckle.Navisworks.API" VersionOverride="2026.0.1" ExcludeAssets="runtime"/>
<PackageReference Include="Microsoft.Web.WebView2" VersionOverride="1.0.2365.46" />
<PackageReference Include="System.Reactive" VersionOverride="6.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Converters\Navisworks\Speckle.Converters.Navisworks2026\Speckle.Converters.Navisworks2026.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj"/>
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj"/>
</ItemGroup>
</Project>
@@ -1,389 +0,0 @@
{
"version": 2,
"dependencies": {
".NETFramework,Version=v4.8": {
"Microsoft.NETFramework.ReferenceAssemblies": {
"type": "Direct",
"requested": "[1.0.3, )",
"resolved": "1.0.3",
"contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==",
"dependencies": {
"Microsoft.NETFramework.ReferenceAssemblies.net48": "1.0.3"
}
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[8.0.0, )",
"resolved": "8.0.0",
"contentHash": "G5q7OqtwIyGTkeIOAc3u2ZuV/kicQaec5EaRnc0pIeSnh9LUjj+PYQrJYBURvDt7twGl2PKA7nSN0kz1Zw5bnQ==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "8.0.0",
"Microsoft.SourceLink.Common": "8.0.0"
}
},
"Microsoft.Web.WebView2": {
"type": "Direct",
"requested": "[1.0.2365.46, )",
"resolved": "1.0.2365.46",
"contentHash": "8L/Wv1r6NRSYpaaywBE/zcjDShTlTCEqBgsrB0xPQ11umziTtSNTu/rcLVazoQhHfVnQvX/fruMtdJCiPTDuyQ=="
},
"PolySharp": {
"type": "Direct",
"requested": "[1.14.1, )",
"resolved": "1.14.1",
"contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ=="
},
"Speckle.InterfaceGenerator": {
"type": "Direct",
"requested": "[0.9.6, )",
"resolved": "0.9.6",
"contentHash": "HKH7tYrYYlCK1ct483hgxERAdVdMtl7gUKW9ijWXxA1UsYR4Z+TrRHYmzZ9qmpu1NnTycSrp005NYM78GDKV1w=="
},
"Speckle.Navisworks.API": {
"type": "Direct",
"requested": "[2026.0.1, )",
"resolved": "2026.0.1",
"contentHash": "IjIxv+EGmEVYquljXMCNxdBY7kGBeMxEecIdXvyzBj3dLLhJjqpmyfA2Yheq4pfK4AmE6LWZ5mQyD+39onApRw=="
},
"System.Reactive": {
"type": "Direct",
"requested": "[6.0.0, )",
"resolved": "6.0.0",
"contentHash": "31kfaW4ZupZzPsI5PVe77VhnvFF55qgma7KZr/E0iFTs6fmdhhG8j0mgEx620iLTey1EynOkEfnyTjtNEpJzGw==",
"dependencies": {
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"GraphQL.Client": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "8yPNBbuVBpTptivyAlak4GZvbwbUcjeQTL4vN1HKHRuOykZ4r7l5fcLS6vpyPyLn0x8FsL31xbOIKyxbmR9rbA==",
"dependencies": {
"GraphQL.Client.Abstractions": "6.0.0",
"GraphQL.Client.Abstractions.Websocket": "6.0.0",
"System.Net.WebSockets.Client.Managed": "1.0.22",
"System.Reactive": "5.0.0"
}
},
"GraphQL.Client.Abstractions": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "h7uzWFORHZ+CCjwr/ThAyXMr0DPpzEANDa4Uo54wqCQ+j7qUKwqYTgOrb1W40sqbvNaZm9v/X7It31SUw0maHA==",
"dependencies": {
"GraphQL.Primitives": "6.0.0"
}
},
"GraphQL.Client.Abstractions.Websocket": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "Nr9bPf8gIOvLuXpqEpqr9z9jslYFJOvd0feHth3/kPqeR3uMbjF5pjiwh4jxyMcxHdr8Pb6QiXkV3hsSyt0v7A==",
"dependencies": {
"GraphQL.Client.Abstractions": "6.0.0"
}
},
"GraphQL.Primitives": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "yg72rrYDapfsIUrul7aF6wwNnTJBOFvuA9VdDTQpPa8AlAriHbufeXYLBcodKjfUdkCnaiggX1U/nEP08Zb5GA=="
},
"Microsoft.Bcl.AsyncInterfaces": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==",
"dependencies": {
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ=="
},
"Microsoft.CSharp": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA=="
},
"Microsoft.Data.Sqlite": {
"type": "Transitive",
"resolved": "7.0.5",
"contentHash": "KGxbPeWsQMnmQy43DSBxAFtHz3l2JX8EWBSGUCvT3CuZ8KsuzbkqMIJMDOxWtG8eZSoCDI04aiVQjWuuV8HmSw==",
"dependencies": {
"Microsoft.Data.Sqlite.Core": "7.0.5",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
"resolved": "7.0.5",
"contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.Extensions.Configuration": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "nOP8R1mVb/6mZtm2qgAJXn/LFm/2kMjHDAg/QJLFG6CuWYJtaD3p1BwQhufBVvRzL9ceJ/xF0SQ0qsI2GkDQAA==",
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "65MrmXCziWaQFrI0UHkQbesrX5wTwf9XPjY5yFm/VkgJKFJ5gqvXRoXjIZcf2wLi5ZlwGz/oMYfyURVCWbM5iw==",
"dependencies": {
"Microsoft.Extensions.Primitives": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Binder": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "vJ9xvOZCnUAIHcGC3SU35r3HKmHTVIeHzo6u/qzlHAqD8m6xv92MLin4oJntTvkpKxVX3vI1GFFkIQtU3AdlsQ==",
"dependencies": {
"Microsoft.Extensions.Configuration": "2.2.0"
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "f9hstgjVmr6rmrfGSpfsVOl2irKAgr1QjrSi3FgnS7kulxband50f2brRLwySAQTADPZeTdow0mpSMcoAdadCw=="
},
"Microsoft.Extensions.Options": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "UpZLNLBpIZ0GTebShui7xXYh6DmBHjWM8NxGxZbdQh/bPZ5e6YswqI+bru6BnEL5eWiOdodsXtEz3FROcgi/qg==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Primitives": "2.2.0",
"System.ComponentModel.Annotations": "4.5.0"
}
},
"Microsoft.Extensions.Primitives": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "azyQtqbm4fSaDzZHD/J+V6oWMFaf2tWP4WEGIYePLCMw3+b2RQdj9ybgbQyjCshcitQKQ4lEDOZjmSlTTrHxUg==",
"dependencies": {
"System.Memory": "4.5.1",
"System.Runtime.CompilerServices.Unsafe": "4.5.1"
}
},
"Microsoft.NETFramework.ReferenceAssemblies.net48": {
"type": "Transitive",
"resolved": "1.0.3",
"contentHash": "zMk4D+9zyiEWByyQ7oPImPN/Jhpj166Ky0Nlla4eXlNL8hI/BtSJsgR8Inldd4NNpIAH3oh8yym0W2DrhXdSLQ=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
},
"Speckle.Newtonsoft.Json": {
"type": "Transitive",
"resolved": "13.0.2",
"contentHash": "g1BejUZwax5PRfL6xHgLEK23sqHWOgOj9hE7RvfRRlN00AGt8GnPYt8HedSK7UB3HiRW8zCA9Pn0iiYxCK24BA=="
},
"SQLitePCLRaw.bundle_e_sqlite3": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "EWI1olKDjFEBMJu0+3wuxwziIAdWDVMYLhuZ3Qs84rrz+DHwD00RzWPZCa+bLnHCf3oJwuFZIRsHT5p236QXww==",
"dependencies": {
"SQLitePCLRaw.lib.e_sqlite3": "2.1.4",
"SQLitePCLRaw.provider.dynamic_cdecl": "2.1.4"
}
},
"SQLitePCLRaw.core": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "inBjvSHo9UDKneGNzfUfDjK08JzlcIhn1+SP5Y3m6cgXpCxXKCJDy6Mka7LpgSV+UZmKSnC8rTwB0SQ0xKu5pA==",
"dependencies": {
"System.Memory": "4.5.3"
}
},
"SQLitePCLRaw.lib.e_sqlite3": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "2C9Q9eX7CPLveJA0rIhf9RXAvu+7nWZu1A2MdG6SD/NOu26TakGgL1nsbc0JAspGijFOo3HoN79xrx8a368fBg=="
},
"SQLitePCLRaw.provider.dynamic_cdecl": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "ZsaKKhgYF9B1fvcnOGKl3EycNAwd9CRWX7v0rEfuPWhQQ5Jjpvf2VEHahiLIGHio3hxi3EIKFJw9KvyowWOUAw==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"System.Buffers": {
"type": "Transitive",
"resolved": "4.4.0",
"contentHash": "AwarXzzoDwX6BgrhjoJsk6tUezZEozOT5Y9QKF94Gl4JK91I4PIIBkBco9068Y9/Dra8Dkbie99kXB8+1BaYKw=="
},
"System.ComponentModel.Annotations": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "UxYQ3FGUOtzJ7LfSdnYSFd7+oEv6M8NgUatatIN2HxNtDdlcvFAf+VIq4Of9cDMJEJC0aSRv/x898RYhB4Yppg=="
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==",
"dependencies": {
"System.Buffers": "4.4.0",
"System.Numerics.Vectors": "4.4.0",
"System.Runtime.CompilerServices.Unsafe": "4.5.2"
}
},
"System.Net.WebSockets.Client.Managed": {
"type": "Transitive",
"resolved": "1.0.22",
"contentHash": "WqEOxPlXjuZrIjUtXNE9NxEfU/n5E35iV2PtoZdJSUC4tlrqwHnTee+wvMIM4OUaJWmwrymeqcgYrE0IkGAgLA==",
"dependencies": {
"System.Buffers": "4.4.0",
"System.Numerics.Vectors": "4.4.0"
}
},
"System.Numerics.Vectors": {
"type": "Transitive",
"resolved": "4.4.0",
"contentHash": "UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ=="
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "3TIsJhD1EiiT0w2CcDMN/iSSwnNnsrnbzeVHSKkaEgV85txMprmuO+Yq2AdSbeVGcg28pdNDTPK87tJhX7VFHw=="
},
"System.Threading.Tasks.Extensions": {
"type": "Transitive",
"resolved": "4.5.4",
"contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "4.5.3"
}
},
"speckle.connectors.common": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
}
},
"speckle.connectors.dui": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
}
},
"speckle.connectors.dui.webview": {
"type": "Project",
"dependencies": {
"Microsoft.Web.WebView2": "[1.0.1938.49, )",
"Speckle.Connectors.DUI": "[1.0.0, )"
}
},
"speckle.connectors.logging": {
"type": "Project"
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
}
},
"speckle.converters.navisworks2026": {
"type": "Project",
"dependencies": {
"Speckle.Connectors.DUI": "[1.0.0, )",
"Speckle.Converters.Common": "[1.0.0, )",
"Speckle.Navisworks.API": "[2026.0.1, )",
"System.Reactive": "[6.0.0, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "MZtBIwfDFork5vfjpJdG5g8wuJFt7d/y3LOSVVtDK/76wlbtz6cjltfKHqLx2TKVqTj5/c41t77m1+h20zqtPA==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Logging": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "Nxqhadc9FCmFHzU+fz3oc8sFlE6IadViYg8dfUdGzJZ2JUxnCsRghBhhOWdM4B2zSZqEc+0BjliBh/oNdRZuig==",
"dependencies": {
"Microsoft.Extensions.Configuration.Binder": "2.2.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging.Abstractions": "2.2.0",
"Microsoft.Extensions.Options": "2.2.0"
}
},
"Microsoft.Extensions.Logging.Abstractions": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "B2WqEox8o+4KUOpL7rZPyh6qYjik8tHi2tN8Z9jZkHzED8ElYgZa/h6K+xliB435SqUcWT290Fr2aa8BtZjn8A=="
},
"Speckle.DoubleNumerics": {
"type": "CentralTransitive",
"requested": "[4.1.0, )",
"resolved": "4.1.0",
"contentHash": "20DtS+FsDRsOD9+AU3TwNFZ0qrKo5f6f7B5ZR9wStsIHHHC9k7DpjbCvuNtmnSjx54MD+TJC7wV2f5iyGVPj1A=="
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
"Microsoft.CSharp": "4.7.0",
"Microsoft.Data.Sqlite": "7.0.5",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
}
},
".NETFramework,Version=v4.8/win-x64": {
"Microsoft.Web.WebView2": {
"type": "Direct",
"requested": "[1.0.2365.46, )",
"resolved": "1.0.2365.46",
"contentHash": "8L/Wv1r6NRSYpaaywBE/zcjDShTlTCEqBgsrB0xPQ11umziTtSNTu/rcLVazoQhHfVnQvX/fruMtdJCiPTDuyQ=="
},
"SQLitePCLRaw.lib.e_sqlite3": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "2C9Q9eX7CPLveJA0rIhf9RXAvu+7nWZu1A2MdG6SD/NOu26TakGgL1nsbc0JAspGijFOo3HoN79xrx8a368fBg=="
}
}
}
}
@@ -50,8 +50,6 @@ public class NavisworksBasicConnectorBinding : IBasicConnectorBinding
public void RemoveModel(ModelCard model) => _store.RemoveModel(model);
public void RemoveModels(List<ModelCard> models) => _store.RemoveModels(models);
public Task HighlightModel(string modelCardId) => Task.CompletedTask;
public async Task HighlightObjects(IReadOnlyList<string> objectIds) =>
@@ -38,8 +38,7 @@ public class NavisworksSelectionBinding : ISelectionBinding
{
// Ensure there is an active document and a valid selection
var activeDocument = NavisworksApp.ActiveDocument;
var selection = activeDocument?.CurrentSelection?.SelectedItems ?? [];
if (selection.Count == 0)
if (activeDocument == null || activeDocument.CurrentSelection.SelectedItems.IsEmpty)
{
// Return an empty list if no valid selection exists
return new SelectionInfo([], "No selection available");
@@ -47,8 +46,8 @@ public class NavisworksSelectionBinding : ISelectionBinding
// Ensure only visible elements are processed by filtering using IsElementVisible
var selectedObjectsIds = new HashSet<string>(
selection
.Where(_selectionService.IsVisible) // Exclude hidden elements
activeDocument
.CurrentSelection.SelectedItems.Where(_selectionService.IsVisible) // Exclude hidden elements
.Select(_selectionService.GetModelItemPath) // Resolve to index paths
);
@@ -106,21 +106,9 @@ public class NavisworksSendBinding : ISendBinding
using var cancellationItem = _cancellationManager.GetCancellationItem(modelCardId);
var progress = _operationProgressManager.CreateOperationProgressEventHandler(
Parent,
modelCard.ModelCardId.NotNull(),
cancellationItem.Token
);
var navisworksModelItems = GetNavisworksModelItems(modelCard);
var navisworksModelItems = await GetNavisworksModelItems(modelCard, progress);
var sendResult = await ExecuteSendOperation(
scope,
modelCard,
navisworksModelItems,
progress,
cancellationItem.Token
);
var sendResult = await ExecuteSendOperation(scope, modelCard, navisworksModelItems, cancellationItem.Token);
await Commands.SetModelSendResult(modelCardId, sendResult.RootObjId, sendResult.ConversionResults);
}
@@ -135,16 +123,12 @@ public class NavisworksSendBinding : ISendBinding
_logger.LogModelCardHandledError(ex);
await Commands.SetModelError(modelCardId, ex);
}
finally
{
// otherwise the id of the operation persists on the cancellation manager and triggers 'Operations cancelled because of document swap!' message to UI.
_cancellationManager.CancelOperation(modelCardId);
}
}
private SenderModelCard GetModelCard(string modelCardId) =>
_store.GetModelById(modelCardId) as SenderModelCard
?? throw new InvalidOperationException("No publish model card was found.");
_store.GetModelById(modelCardId) is not SenderModelCard modelCard
? throw new InvalidOperationException("No publish model card was found.")
: modelCard;
private void InitializeConverterSettings(IServiceScope scope, SenderModelCard modelCard) =>
scope
@@ -159,10 +143,7 @@ public class NavisworksSendBinding : ISendBinding
)
);
private async Task<List<NAV.ModelItem>> GetNavisworksModelItems(
SenderModelCard modelCard,
IProgress<CardProgress> onOperationProgressed
)
private List<NAV.ModelItem> GetNavisworksModelItems(SenderModelCard modelCard)
{
var selectedPaths = modelCard.SendFilter.NotNull().RefreshObjectIds();
var convertHiddenElementsSetting =
@@ -175,19 +156,13 @@ public class NavisworksSendBinding : ISendBinding
{
throw new SpeckleSendFilterException(message);
}
onOperationProgressed.Report(new CardProgress("Getting selection...", null));
await Task.CompletedTask;
var modelItems = new List<NAV.ModelItem>();
double count = 0;
foreach (var path in selectedPaths)
{
onOperationProgressed.Report(new CardProgress("Getting selection...", count / selectedPaths.Count));
await Task.CompletedTask;
var modelItem = _selectionService.GetModelItemFromPath(path);
modelItems.AddRange(_selectionService.GetGeometryNodes(modelItem).Where(_selectionService.IsVisible));
count++;
}
var modelItems = selectedPaths
.Select(_selectionService.GetModelItemFromPath)
.SelectMany(_selectionService.GetGeometryNodes)
.Where(_selectionService.IsVisible)
.ToList();
return modelItems.Count == 0 ? throw new SpeckleSendFilterException(message) : modelItems;
}
@@ -195,7 +170,6 @@ public class NavisworksSendBinding : ISendBinding
IServiceScope scope,
SenderModelCard modelCard,
List<NAV.ModelItem> navisworksModelItems,
IProgress<CardProgress> onOperationProgressed,
CancellationToken token
) =>
await scope
@@ -203,7 +177,7 @@ public class NavisworksSendBinding : ISendBinding
.Execute(
navisworksModelItems,
modelCard.GetSendInfo(_speckleApplication.ApplicationAndVersion),
onOperationProgressed,
_operationProgressManager.CreateOperationProgressEventHandler(Parent, modelCard.ModelCardId.NotNull(), token),
token
);
@@ -1,31 +1,23 @@
using Speckle.InterfaceGenerator;
using static Speckle.Converter.Navisworks.Helpers.ElementSelectionHelper;
using static Speckle.Converter.Navisworks.Helpers.ElementSelectionHelper;
namespace Speckle.Connector.Navisworks.Services;
[GenerateAutoInterface]
public interface IElementSelectionService
{
string GetModelItemPath(NAV.ModelItem modelItem);
NAV.ModelItem GetModelItemFromPath(string path);
bool IsVisible(NAV.ModelItem modelItem);
IReadOnlyCollection<NAV.ModelItem> GetGeometryNodes(NAV.ModelItem modelItem);
}
public class ElementSelectionService : IElementSelectionService
{
private readonly Dictionary<Guid, bool> _visibleCache = new();
public string GetModelItemPath(NAV.ModelItem modelItem) => ResolveModelItemToIndexPath(modelItem);
public NAV.ModelItem GetModelItemFromPath(string path) => ResolveIndexPathToModelItem(path);
public bool IsVisible(NAV.ModelItem modelItem)
{
var key = modelItem.InstanceGuid;
if (_visibleCache.TryGetValue(key, out var isVisible))
{
return isVisible;
}
//same as ElementSelectionHelper.IsElementVisible
foreach (var item in modelItem.AncestorsAndSelf)
{
_visibleCache[item.InstanceGuid] = !item.IsHidden;
}
return _visibleCache[key];
}
public bool IsVisible(NAV.ModelItem modelItem) => IsElementVisible(modelItem);
public IEnumerable<NAV.ModelItem> GetGeometryNodes(NAV.ModelItem modelItem) => ResolveGeometryLeafNodes(modelItem);
public IReadOnlyCollection<NAV.ModelItem> GetGeometryNodes(NAV.ModelItem modelItem) =>
ResolveGeometryLeafNodes(modelItem);
}
@@ -22,7 +22,6 @@ public class NavisworksSavedSetsFilter : DiscriminatedObject, ISendFilterSelect
public string Id { get; set; } = "navisworksSavedSets";
public string Name { get; set; } = "Saved Sets";
public string Type { get; set; } = "Select";
public string? Summary { get; set; }
public bool IsDefault { get; set; }
public List<string> SelectedObjectIds { get; set; } = [];
@@ -3,12 +3,6 @@
<ApplicationPackage SchemaVersion="1.0" AutodeskProduct="Navisworks" Name="Speckle for Navisworks"
Description="Welcome to Multiplayer BIM." AppVersion="0.1.0" FriendlyVersion="0.1.0">
<CompanyDetails Name="Speckle"/>
<Components>
<RuntimeRequirements OS="Win64" Platform="NAVMAN|NAVSIM" SeriesMin="Nw23" SeriesMax="Nw23"/>
<ComponentEntry AppName="SpeckleNavisworks" AppType="ManagedPlugin" Version="0.1.0"
ModuleName="./Contents/2026/Speckle.Connectors.Navisworks2026.dll"
AppDescription="Speckle.Connector.Navisworks2026"/>
</Components>
<Components>
<RuntimeRequirements OS="Win64" Platform="NAVMAN|NAVSIM" SeriesMin="Nw22" SeriesMax="Nw22"/>
<ComponentEntry AppName="SpeckleNavisworks" AppType="ManagedPlugin" Version="0.1.0"
@@ -287,9 +287,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -297,8 +297,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.logging": {
@@ -308,7 +308,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"speckle.converters.revit2022": {
@@ -353,11 +353,11 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Revit.API": {
@@ -368,9 +368,9 @@
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -380,14 +380,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -287,9 +287,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -297,8 +297,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.logging": {
@@ -308,7 +308,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"speckle.converters.revit2023": {
@@ -353,11 +353,11 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Revit.API": {
@@ -368,9 +368,9 @@
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -380,14 +380,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -287,9 +287,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -297,8 +297,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.logging": {
@@ -308,7 +308,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"speckle.converters.revit2024": {
@@ -353,11 +353,11 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Revit.API": {
@@ -368,9 +368,9 @@
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -380,14 +380,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -237,9 +237,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -247,8 +247,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.logging": {
@@ -258,7 +258,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"speckle.converters.revit2025": {
@@ -303,11 +303,11 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Revit.API": {
@@ -318,9 +318,9 @@
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
@@ -329,14 +329,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
},
"net8.0-windows7.0/win-x64": {
@@ -82,8 +82,6 @@ internal sealed class BasicConnectorBindingRevit : IBasicConnectorBinding
public void RemoveModel(ModelCard model) => _store.RemoveModel(model);
public void RemoveModels(List<ModelCard> models) => _store.RemoveModels(models);
public async Task HighlightModel(string modelCardId)
{
var model = _store.GetModelById(modelCardId);
@@ -72,10 +72,9 @@ internal sealed class RevitReceiveBinding : IReceiveBinding
.ServiceProvider.GetRequiredService<IConverterSettingsStore<RevitConversionSettings>>()
.Initialize(
_revitConversionSettingsFactory.Create(
DetailLevelType.Coarse, // TODO figure out
DetailLevelType.Coarse, //TODO figure out
null,
false,
true
false
)
);
// Receive host objects
@@ -1,3 +1,4 @@
using System.Collections.Concurrent;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.ExtensibleStorage;
using Microsoft.Extensions.DependencyInjection;
@@ -5,7 +6,6 @@ using Microsoft.Extensions.Logging;
using Speckle.Connectors.Common.Caching;
using Speckle.Connectors.Common.Cancellation;
using Speckle.Connectors.Common.Operations;
using Speckle.Connectors.Common.Threading;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Exceptions;
@@ -41,8 +41,6 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
private readonly IRevitConversionSettingsFactory _revitConversionSettingsFactory;
private readonly ISpeckleApplication _speckleApplication;
private readonly ITopLevelExceptionHandler _topLevelExceptionHandler;
private readonly LinkedModelHandler _linkedModelHandler;
private readonly IThreadContext _threadContext;
/// <summary>
/// Used internally to aggregate the changed objects' id. Note we're using a concurrent dictionary here as the expiry check method is not thread safe, and this was causing problems. See:
@@ -50,7 +48,7 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
/// As to why a concurrent dictionary, it's because it's the cheapest/easiest way to do so.
/// https://stackoverflow.com/questions/18922985/concurrent-hashsett-in-net-framework
/// </summary>
private ConcurrentHashSet<ElementId> ChangedObjectIds { get; set; } = new();
private ConcurrentDictionary<ElementId, byte> ChangedObjectIds { get; set; } = new();
public RevitSendBinding(
IAppIdleManager idleManager,
@@ -66,9 +64,7 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
ElementUnpacker elementUnpacker,
IRevitConversionSettingsFactory revitConversionSettingsFactory,
ISpeckleApplication speckleApplication,
ITopLevelExceptionHandler topLevelExceptionHandler,
LinkedModelHandler linkedModelHandler,
IThreadContext threadContext
ITopLevelExceptionHandler topLevelExceptionHandler
)
: base("sendBinding", bridge)
{
@@ -85,8 +81,6 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
_revitConversionSettingsFactory = revitConversionSettingsFactory;
_speckleApplication = speckleApplication;
_topLevelExceptionHandler = topLevelExceptionHandler;
_linkedModelHandler = linkedModelHandler;
_threadContext = threadContext;
Commands = new SendBindingUICommands(bridge);
// TODO expiry events
@@ -97,6 +91,8 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
_store.DocumentChanged += (_, _) => topLevelExceptionHandler.FireAndForget(async () => await OnDocumentChanged());
}
private async Task OnDocumentStoreChangedEvent(object _) => await Commands.NotifyDocumentChanged();
public List<ISendFilter> GetSendFilters() =>
[
new RevitSelectionFilter() { IsDefault = true },
@@ -108,8 +104,7 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
[
new DetailLevelSetting(DetailLevelType.Medium),
new ReferencePointSetting(ReferencePointType.InternalOrigin),
new SendParameterNullOrEmptyStringsSetting(false),
new LinkedModelsSetting(true)
new SendParameterNullOrEmptyStringsSetting(false)
];
public void CancelSend(string modelCardId) => _cancellationManager.CancelOperation(modelCardId);
@@ -136,23 +131,23 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
_revitConversionSettingsFactory.Create(
_toSpeckleSettingsManager.GetDetailLevelSetting(modelCard),
_toSpeckleSettingsManager.GetReferencePointSetting(modelCard),
_toSpeckleSettingsManager.GetSendParameterNullOrEmptyStringsSetting(modelCard),
_toSpeckleSettingsManager.GetLinkedModelsSetting(modelCard)
_toSpeckleSettingsManager.GetSendParameterNullOrEmptyStringsSetting(modelCard)
)
);
var elementsByTransform = await RefreshElementsIdsOnSender(modelCard.NotNull());
List<Element> elements = await RefreshElementsOnSender(modelCard.NotNull());
List<ElementId> elementIds = elements.Select(el => el.Id).ToList();
if (elementsByTransform.Count == 0)
if (elementIds.Count == 0)
{
// Handle as CARD ERROR in this function
throw new SpeckleSendFilterException("No objects were found to convert. Please update your publish filter!");
}
var sendResult = await scope
.ServiceProvider.GetRequiredService<SendOperation<DocumentToConvert>>()
.ServiceProvider.GetRequiredService<SendOperation<ElementId>>()
.Execute(
elementsByTransform,
elementIds,
modelCard.GetSendInfo(_speckleApplication.ApplicationAndVersion),
_operationProgressManager.CreateOperationProgressEventHandler(Parent, modelCardId, cancellationItem.Token),
cancellationItem.Token
@@ -182,76 +177,28 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
}
}
private async Task<List<DocumentToConvert>> RefreshElementsIdsOnSender(SenderModelCard modelCard)
private async Task<List<Element>> RefreshElementsOnSender(SenderModelCard modelCard)
{
var activeUIDoc =
_revitContext.UIApplication.NotNull().ActiveUIDocument
?? throw new SpeckleException("Unable to retrieve active UI document");
if (modelCard.SendFilter.NotNull() is IRevitSendFilter viewFilter)
if (modelCard.SendFilter is IRevitSendFilter viewFilter)
{
viewFilter.SetContext(_revitContext);
}
var selectedObjects = await _threadContext.RunOnMainAsync(
() => Task.FromResult(modelCard.SendFilter.NotNull().RefreshObjectIds())
);
var selectedObjects = modelCard.SendFilter.NotNull().RefreshObjectIds();
var allElements = selectedObjects
List<Element> elements = selectedObjects
.Select(uid => activeUIDoc.Document.GetElement(uid))
.Where(el => el is not null)
.ToList();
// split elements between main model and linked models
var elementsOnMainModel = allElements.Where(el => el is not RevitLinkInstance).ToList();
var linkedModels = allElements.OfType<RevitLinkInstance>().ToList();
// create context for main document elements
List<DocumentToConvert> documentElementContexts = [new(null, activeUIDoc.Document, elementsOnMainModel)];
// get the linked models setting - this decision belongs at this level
bool includeLinkedModels = _toSpeckleSettingsManager.GetLinkedModelsSetting(modelCard);
// ⚠️ process linked models - RevitSendBinding controls the flow based on settings!
// If setting not enabled, we won't unpack (see if-else block)
if (linkedModels.Count > 0)
{
var linkedDocumentContexts = new List<DocumentToConvert>();
foreach (var linkedModel in linkedModels)
{
var linkedDoc = linkedModel.GetLinkDocument();
if (linkedDoc == null)
{
continue;
}
var transform = linkedModel.GetTotalTransform().Inverse;
// decision about whether to process elements is made here, not in the handler
// only collects elements from linked models when the setting is enabled
if (includeLinkedModels)
{
// handler is only responsible for element collection mechanics
var linkedElements = _linkedModelHandler.GetLinkedModelElements(modelCard.SendFilter, linkedDoc, transform);
linkedDocumentContexts.Add(new(transform, linkedDoc, linkedElements));
}
// ⚠️ when disabled, still adds empty contexts to maintain warning generation in RevitRootObjectBuilder
// this approach (to signal that warnings are needed) relies on empty element lists which smells and is a bit of an implicit mechanism
// buuuuut, it works (for now 👀).
else
{
linkedDocumentContexts.Add(new(transform, linkedDoc, new List<Element>()));
}
}
documentElementContexts.AddRange(linkedDocumentContexts);
}
// update ID map
if (modelCard.SendFilter is not null && modelCard.SendFilter.IdMap is not null)
{
var newSelectedObjectIds = new List<string>();
foreach (Element element in allElements)
foreach (Element element in elements)
{
modelCard.SendFilter.IdMap[element.Id.ToString()] = element.UniqueId;
newSelectedObjectIds.Add(element.UniqueId);
@@ -265,7 +212,7 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
);
}
return documentElementContexts;
return elements;
}
/// <summary>
@@ -294,17 +241,17 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
foreach (ElementId elementId in addedElementIds)
{
ChangedObjectIds.Add(elementId);
ChangedObjectIds[elementId] = 1;
}
foreach (ElementId elementId in deletedElementIds)
{
ChangedObjectIds.Add(elementId);
ChangedObjectIds[elementId] = 1;
}
foreach (ElementId elementId in modifiedElementIds)
{
ChangedObjectIds.Add(elementId);
ChangedObjectIds[elementId] = 1;
}
if (addedElementIds.Count > 0)
@@ -325,7 +272,7 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
var selectedObjects = sender.SendFilter.NotNull().SelectedObjectIds;
objectIds.AddRange(selectedObjects);
}
var unpackedObjectIds = _elementUnpacker.GetUnpackedElementIds(objectIds);
var unpackedObjectIds = _elementUnpacker.GetUnpackedElementIds(objectIds.ToList());
_sendConversionCache.EvictObjects(unpackedObjectIds);
}
@@ -371,7 +318,7 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
{
foreach (var sender in _store.GetSenders().ToList())
{
await RefreshElementsIdsOnSender(sender);
await RefreshElementsOnSender(sender);
}
}
@@ -380,7 +327,7 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
/// </summary>
private async Task CheckFilterExpiration()
{
// NOTE: below code seems like more make sense in terms of performance, but it causes unmanaged exception on Revit
// NOTE: below code seems like more make sense in terms of performance but it causes unmanaged exception on Revit
// using var viewCollector = new FilteredElementCollector(RevitContext.UIApplication?.ActiveUIDocument.Document);
// var views = viewCollector.OfClass(typeof(View)).Cast<View>().Select(v => v.Id).ToList();
// var intersection = ChangedObjectIds.Keys.Intersect(views).ToList();
@@ -390,7 +337,9 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
// }
if (
ChangedObjectIds.Any(e => _revitContext.UIApplication.NotNull().ActiveUIDocument.Document.GetElement(e) is View)
ChangedObjectIds.Keys.Any(e =>
_revitContext.UIApplication.NotNull().ActiveUIDocument.Document.GetElement(e) is View
)
)
{
await Commands.RefreshSendFilters();
@@ -409,7 +358,7 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
}
var objUniqueIds = new List<string>();
var changedIds = ChangedObjectIds.ToList();
var changedIds = ChangedObjectIds.Keys.ToList();
// Handling type changes: if an element's type is changed, we need to mark as changed all objects that have that type.
// Step 1: get any changed types
@@ -417,10 +366,10 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding
.Select(e => doc.GetElement(e))
.OfType<ElementType>()
.Select(el => el.Id)
.ToHashSet(); // ToHashSet() for faster Contains
.ToArray();
// Step 2: Find all elements of the changed types, and add them to the changed ids list.
if (elementTypeIdsList.Count != 0)
if (elementTypeIdsList.Length != 0)
{
using var collector = new FilteredElementCollector(doc);
var collectorElements = collector
@@ -56,16 +56,15 @@ internal sealed class SelectionBinding : RevitBaseBinding, ISelectionBinding, ID
}
var activeUIDoc = _revitContext.UIApplication.ActiveUIDocument.NotNull();
var doc = activeUIDoc.Document;
// POC: this was also being called on shutdown
// probably the bridge needs to be able to know if the plugin has been terminated
// also on termination the OnSelectionChanged event needs unwinding
var selectionIds = activeUIDoc.Selection.GetElementIds();
//reduce allocates by allocating what we need.
var selectionUniqueIds = new List<string>(selectionIds.Count);
selectionUniqueIds.AddRange(selectionIds.Select(eid => doc.GetElement(eid).UniqueId));
return new SelectionInfo(selectionUniqueIds, $"{selectionIds.Count} objects selected.");
var selectionIds = activeUIDoc
.Selection.GetElementIds()
.Select(eid => activeUIDoc.Document.GetElement(eid).UniqueId.ToString())
.ToList();
return new SelectionInfo(selectionIds, $"{selectionIds.Count} objects selected.");
}
public void Dispose()
@@ -48,20 +48,18 @@ public static class ServiceRegistration
serviceCollection.AddSingleton<IAppIdleManager, RevitIdleManager>();
// send operation and dependencies
serviceCollection.AddScoped<SendOperation<DocumentToConvert>>();
serviceCollection.AddScoped<SendOperation<ElementId>>();
serviceCollection.AddScoped<ElementUnpacker>();
serviceCollection.AddScoped<SendCollectionManager>();
serviceCollection.AddScoped<IRootObjectBuilder<DocumentToConvert>, RevitRootObjectBuilder>();
serviceCollection.AddScoped<IRootObjectBuilder<ElementId>, RevitRootObjectBuilder>();
serviceCollection.AddSingleton<ISendConversionCache, SendConversionCache>();
serviceCollection.AddSingleton<ToSpeckleSettingsManager>();
serviceCollection.AddSingleton<LinkedModelHandler>();
// receive operation and dependencies
serviceCollection.AddScoped<IHostObjectBuilder, RevitHostObjectBuilder>();
serviceCollection.AddScoped<ITransactionManager, TransactionManager>();
serviceCollection.AddScoped<RevitGroupBaker>();
serviceCollection.AddScoped<RevitMaterialBaker>();
serviceCollection.AddScoped<RevitViewManager>();
serviceCollection.AddSingleton<RevitUtils>();
serviceCollection.AddSingleton<IFailuresPreprocessor, HideWarningsFailuresPreprocessor>();
serviceCollection.AddSingleton(DefaultTraversal.CreateTraversalFunc());
@@ -1,5 +0,0 @@
using Autodesk.Revit.DB;
namespace Speckle.Connectors.Revit.HostApp;
public record DocumentToConvert(Transform? Transform, Document Doc, List<Element> Elements);
@@ -1,8 +1,6 @@
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Architecture;
using Speckle.Converters.Common;
using Speckle.Converters.RevitShared.Helpers;
using Speckle.Converters.RevitShared.Settings;
namespace Speckle.Connectors.Revit.HostApp;
@@ -12,12 +10,10 @@ namespace Speckle.Connectors.Revit.HostApp;
public class ElementUnpacker
{
private readonly RevitContext _revitContext;
private readonly IConverterSettingsStore<RevitConversionSettings> _converterSettings;
public ElementUnpacker(RevitContext revitContext, IConverterSettingsStore<RevitConversionSettings> converterSettings)
public ElementUnpacker(RevitContext revitContext)
{
_revitContext = revitContext;
_converterSettings = converterSettings;
}
/// <summary>
@@ -25,21 +21,18 @@ public class ElementUnpacker
/// This method will also "pack" curtain walls if necessary (ie, if mullions or panels are selected without their parent curtain wall, they are sent independently; if the parent curtain wall is selected, they will be removed out as the curtain wall will include all its children).
/// </summary>
/// <param name="selectionElements"></param>
/// <param name="doc"> We use the nullable document (happiness level 5/10) for the sake of linked models - bc we use this function in 2 different places <br/>
/// 1- RootObjectBuilder with linked model document - otherwise we cannot unpack elements from correct document.<br/>
/// 2- Evicting the cache while introducing the settings</param>
/// <returns></returns>
public IEnumerable<Element> UnpackSelectionForConversion(IEnumerable<Element> selectionElements, Document? doc = null)
public IEnumerable<Element> UnpackSelectionForConversion(IEnumerable<Element> selectionElements)
{
// Note: steps kept separate on purpose.
// Step 1: unpack groups
var atomicObjects = UnpackElements(selectionElements, doc);
var atomicObjects = UnpackElements(selectionElements);
// Step 2: pack curtain wall elements, once we know the full extent of our flattened item list.
// The behaviour we're looking for:
// If parent wall is part of selection, does not select individual elements out. Otherwise, selects individual elements (Panels, Mullions) as atomic objects.
// NOTE: this also conditionally "packs" stacked wall elements if their parent is present. See detailed note inside the function.
return PackCurtainWallElementsAndStackedWalls(atomicObjects, doc);
return PackCurtainWallElementsAndStackedWalls(atomicObjects);
}
/// <summary>
@@ -50,52 +43,38 @@ public class ElementUnpacker
/// <remarks>
/// This is used to invalidate object ids in the send conversion cache when the selected object id is only the parent element id
/// </remarks>
public IEnumerable<string> GetUnpackedElementIds(IEnumerable<string> objectIds)
public IEnumerable<string> GetUnpackedElementIds(List<string> objectIds)
{
var doc = _revitContext.UIApplication?.ActiveUIDocument.Document!;
var docElements = doc.GetElements(objectIds);
return UnpackSelectionForConversion(docElements).Select(o => o.UniqueId).ToList();
}
// We use the nullable document (happiness level 5/10) for the sake of linked models - bc we use this function in 2 different places
// 1- RootObjectBuilder with linked model document - otherwise we cannot unpack elements from correct document.
// 2- Evicting the cache while introducing the settings
private List<Element> UnpackElements(IEnumerable<Element> elements, Document? doc = null)
private List<Element> UnpackElements(IEnumerable<Element> elements)
{
var unpackedElements = new List<Element>(); // note: could be a hashset/map so we prevent duplicates (?)
if (doc == null)
{
doc = _revitContext.UIApplication?.ActiveUIDocument.Document!;
}
var doc = _revitContext.UIApplication?.ActiveUIDocument.Document!;
foreach (var element in elements)
{
// UNPACK: Groups
if (element is Group g)
{
// When a group is from a linked model, GetMemberIds may behave differently
// We add null checks to handle cases where elements can't be properly resolved
// POC: this might screw up generating hosting rel generation here, because nested families in groups get flattened out by GetMemberIds().
var groupElements = g.GetMemberIds().Select(doc.GetElement).Where(el => el != null);
var groupElements = g.GetMemberIds().Select(doc.GetElement);
unpackedElements.AddRange(UnpackElements(groupElements));
}
else if (element is BaseArray baseArray)
{
// For arrays, collect both copied and original members with null checks
// This handles cases where some elements might not resolve in linked contexts
var arrayElements = baseArray.GetCopiedMemberIds().Select(doc.GetElement).Where(el => el != null);
var originalElements = baseArray.GetOriginalMemberIds().Select(doc.GetElement).Where(el => el != null);
var arrayElements = baseArray.GetCopiedMemberIds().Select(doc.GetElement);
var originalElements = baseArray.GetOriginalMemberIds().Select(doc.GetElement);
unpackedElements.AddRange(UnpackElements(arrayElements));
unpackedElements.AddRange(UnpackElements(originalElements));
}
// UNPACK: Family instances (as they potentially have nested families inside)
else if (element is FamilyInstance familyInstance)
{
var familyElements = familyInstance
.GetSubComponentIds()
.Select(doc.GetElement)
.Where(el => el != null)
.ToArray();
var familyElements = familyInstance.GetSubComponentIds().Select(doc.GetElement).ToArray();
if (familyElements.Length != 0)
{
@@ -106,7 +85,7 @@ public class ElementUnpacker
}
else if (element is MultistoryStairs multistoryStairs)
{
var stairs = multistoryStairs.GetAllStairsIds().Select(doc.GetElement).Where(el => el != null);
var stairs = multistoryStairs.GetAllStairsIds().Select(doc.GetElement);
unpackedElements.AddRange(UnpackElements(stairs));
}
else
@@ -116,22 +95,13 @@ public class ElementUnpacker
}
// Why filtering for duplicates? Well, well, well... it's related to the comment above on groups: if a group
// contains a nested family, GetMemberIds() will return... duplicates of the exploded family components.
// Add null check before GroupBy to prevent NullReferenceException when processing linked models with groups
// This ensures we don't try to access .Id on any null elements that might have been added during the unpacking process
return unpackedElements.Where(el => el != null).GroupBy(el => el.Id).Select(g => g.First()).ToList(); // no disinctBy in here sadly.
return unpackedElements.GroupBy(el => el.Id).Select(g => g.First()).ToList(); // no disinctBy in here sadly.
}
// We use the nullable document (happiness level 5/10) for the sake of linked models - bc we use this function in 2 different places
// 1- RootObjectBuilder with linked model document - otherwise we cannot unpack elements from correct document.
// 2- Evicting the cache while introducing the settings
private List<Element> PackCurtainWallElementsAndStackedWalls(List<Element> elements, Document? doc = null)
private List<Element> PackCurtainWallElementsAndStackedWalls(List<Element> elements)
{
var ids = elements.Select(el => el.Id).ToArray();
if (doc == null)
{
doc = _revitContext.UIApplication?.ActiveUIDocument.Document!;
}
var doc = _revitContext.UIApplication?.ActiveUIDocument.Document!;
elements.RemoveAll(element =>
(element is Mullion { Host: not null } m && ids.Contains(m.Host.Id))
|| (element is Panel { Host: not null } p && ids.Contains(p.Host.Id))
@@ -1,211 +0,0 @@
using System.IO;
using Autodesk.Revit.DB;
using Speckle.Connectors.DUI.Models.Card.SendFilter;
using Speckle.Connectors.RevitShared;
using Speckle.Connectors.RevitShared.Operations.Send.Filters;
using Speckle.Converters.RevitShared.Helpers;
using Speckle.Sdk;
using Speckle.Sdk.Common;
namespace Speckle.Connectors.Revit.HostApp;
/// <summary>
/// Handles unpacking elements inside linked models.
/// This class is responsible for the mechanics of retrieving elements from linked documents
/// based on different filter types, but not for making decisions about whether linked models
/// should be processed (which is the responsibility of the calling code)!
/// </summary>
public class LinkedModelHandler
{
private readonly RevitContext _revitContext;
public Dictionary<string, string> LinkedModelDisplayNames { get; } = new();
public LinkedModelHandler(RevitContext revitContext)
{
_revitContext = revitContext;
}
/// <summary>
/// Gets elements from a linked document based on the provided send filter.
/// This method handles the specifics of element collection but doesn't make decisions
/// about whether the linked model should be processed - that's the caller's responsibility.
/// </summary>
public List<Element> GetLinkedModelElements(ISendFilter sendFilter, Document linkedDocument, Transform? transform)
{
// send mode → Categories
if (sendFilter is RevitCategoriesFilter categoryFilter && categoryFilter.SelectedCategories is not null)
{
var categoryIds = categoryFilter
.SelectedCategories.Select(c => ElementIdHelper.GetElementId(c))
.OfType<ElementId>()
.ToList();
if (categoryIds.Count > 0)
{
return GetElementsByCategory(linkedDocument, categoryIds);
}
return new List<Element>();
}
// send mode → Views (taken from the legacy code)
if (sendFilter is RevitViewsFilter viewFilter && viewFilter.GetView() != null)
{
RevitLinkInstance linkInstance = FindLinkInstanceForDocument(
linkedDocument.PathName,
_revitContext.UIApplication.NotNull().ActiveUIDocument.Document,
transform
);
#if REVIT2024_OR_GREATER
// revit 2024 and 2025 we can use the three-parameter constructor to get only visible elements
using var viewCollector = new FilteredElementCollector(
_revitContext.UIApplication.ActiveUIDocument.Document,
viewFilter.GetView().NotNull().Id,
linkInstance.Id
);
return viewCollector.WhereElementIsNotElementType().ToElements().ToList();
#else
// 🚨 LIMITATION: in Revit 2023 and below, we can only check if the entire linked model is visible,
// not individual elements within it. If the linked model is visible, all its elements will be included.
// constructor overload pertaining to searching and filtering visible elements from a revit link only added 2024.
if (linkInstance.IsHidden(viewFilter.GetView().NotNull()))
{
return new List<Element>(); // if the linked model is hidden, return no elements
}
// 💩 fallback to getting all elements if the linked model is visible
return GetAllElementsForLinkedModelSelection(linkedDocument);
#endif
}
// send mode → Selection
return GetAllElementsForLinkedModelSelection(linkedDocument);
}
/// <summary>
/// Prepares display names for linked model documents based on filename
/// </summary>
public void PrepareLinkedModelNames(IReadOnlyList<DocumentToConvert> documentElementContexts)
{
LinkedModelDisplayNames.Clear();
// Group linked models by filename
var linkedModels = documentElementContexts
.Where(ctx => ctx.Doc.IsLinked)
.GroupBy(ctx => Path.GetFileNameWithoutExtension(ctx.Doc.PathName))
.ToDictionary(g => g.Key, g => g.ToList());
// Create a unique key for each instance
foreach (var group in linkedModels)
{
string baseName = group.Key;
var instances = group.Value;
// Single instance - just use the base name
if (instances.Count == 1)
{
string id = GetIdFromDocumentToConvert(instances[0]);
LinkedModelDisplayNames[id] = baseName;
}
// Multiple instances - add numbering
else
{
for (int i = 0; i < instances.Count; i++)
{
string id = GetIdFromDocumentToConvert(instances[i]);
LinkedModelDisplayNames[id] = $"{baseName}_{i + 1}";
}
}
}
}
public string GetIdFromDocumentToConvert(DocumentToConvert documentToConvert) =>
documentToConvert.Doc.GetHashCode() + "-" + (documentToConvert.Transform?.GetHashCode() ?? 0);
/// <summary>
/// Gets elements from a document that belong to the specified categories.
/// </summary>
private List<Element> GetElementsByCategory(Document linkedDoc, List<ElementId> categoryIds)
{
using var multicategoryFilter = new ElementMulticategoryFilter(categoryIds);
using var collector = new FilteredElementCollector(linkedDoc);
return collector
.WhereElementIsNotElementType()
.WhereElementIsViewIndependent()
.WherePasses(multicategoryFilter)
.ToList();
}
// Helper method to generate a simple hash for a transform
// transformedElement.applicationId = ${applicationId}-t{transformHash}
public string GetTransformHash(Transform transform)
{
// create a simplified representation of the transform
string json =
$@"{{
""origin"": [{transform.Origin.X:F2}, {transform.Origin.Y:F2}, {transform.Origin.Z:F2}],
""basis"": [{transform.BasisX.X:F1}, {transform.BasisY.Y:F1}, {transform.BasisZ.Z:F1}]
}}";
byte[] jsonBytes = System.Text.Encoding.UTF8.GetBytes(json);
#pragma warning disable CA1850
using (var sha256 = System.Security.Cryptography.SHA256.Create())
{
byte[] hashBytes = sha256.ComputeHash(jsonBytes);
// keep only the first 8 characters for a short but unique hash
return BitConverter.ToString(hashBytes).Replace("-", "").ToLowerInvariant()[..8];
}
#pragma warning restore CA1850
}
/// <summary>
/// Retrieves all elements from the linked document when using selection filters.
/// When a linked model is selected in the main document, we include all elements
/// from that linked model since the selection is of the entire linked instance.
/// </summary>
private List<Element> GetAllElementsForLinkedModelSelection(Document linkedDoc)
{
using var collector = new FilteredElementCollector(linkedDoc);
return collector.WhereElementIsNotElementType().WhereElementIsViewIndependent().ToList();
}
/// <summary>
/// Finds a specific RevitLinkInstance that corresponds to a linked document with a matching transform.
/// </summary>
/// <param name="linkedDocumentPath">The file path of the linked document</param>
/// <param name="transform">The transform to match (expected to already be an inverse transform).
/// When provided with multiple instances of the same linked document, this is used to find the specific instance.</param>
/// <param name="mainDocument">The main Revit document containing the link instances</param>
/// <returns>The matching RevitLinkInstance, or the first available instance if no match is found</returns>
private RevitLinkInstance FindLinkInstanceForDocument(
string linkedDocumentPath,
Document mainDocument,
Transform? transform
)
{
using var collector = new FilteredElementCollector(mainDocument);
var linkInstances = collector
.OfClass(typeof(RevitLinkInstance))
.Cast<RevitLinkInstance>()
.Where(link => link.GetLinkDocument()?.PathName == linkedDocumentPath)
.ToList();
// if no transform or only one instance, just return the first
if (transform == null || linkInstances.Count <= 1)
{
return linkInstances.FirstOrDefault()
?? throw new SpeckleException($"No link instance found for {linkedDocumentPath}");
}
// a match consists of not only the linked document path name but the transformation too (think linked instances)
// precompute our target hash once
string targetHash = GetTransformHash(transform);
// directly find the matching instance
var matchingInstance = linkInstances.FirstOrDefault(link =>
GetTransformHash(link.GetTotalTransform().Inverse) == targetHash
);
// return matching with a fallback to first (main) instance in case something goes funky with the hash
return matchingInstance ?? linkInstances.First();
}
}
@@ -1,32 +0,0 @@
using Autodesk.Revit.DB;
namespace Speckle.Connectors.Revit.HostApp;
/// <summary>
/// Handles Revit Views per Send/Receive, e.g. determines whether the View is supported for specific operation.
/// </summary>
public class RevitViewManager
{
/// <summary>
/// Determine if the View is supported for Receive operation. Currently only 3d view or horizontal 2d views are supported.
/// Views like Section, Elevation, ViewSheet etc. are not supported
/// </summary>
public bool IsSupportedReceiveView(View activeView)
{
switch (activeView.ViewType)
{
case ViewType.ThreeD:
case ViewType.FloorPlan:
case ViewType.AreaPlan:
case ViewType.CeilingPlan:
return true;
case ViewType.Detail:
return IsHorizontalView(activeView);
default:
return false;
}
}
private bool IsHorizontalView(View activeView) => Math.Abs(activeView.ViewDirection.Z - 1) < 0.00001;
}
@@ -1,8 +1,6 @@
using System.IO;
using Autodesk.Revit.DB;
using Speckle.Converters.Common;
using Speckle.Converters.RevitShared.Settings;
using Speckle.Sdk;
using Speckle.Sdk.Models.Collections;
namespace Speckle.Connectors.Revit.HostApp;
@@ -15,8 +13,6 @@ public class SendCollectionManager
private readonly IConverterSettingsStore<RevitConversionSettings> _converterSettings;
private readonly Dictionary<string, Collection> _collectionCache = new();
private readonly Dictionary<ElementId, (string name, Dictionary<string, object?> props)> _levelCache = new(); // stores level id and its properties
private readonly Dictionary<string, Collection> _linkedModelCollections = new(); // cache for linked model collections
private Collection? _mainModelCollection; // collection for main model elements
public SendCollectionManager(IConverterSettingsStore<RevitConversionSettings> converterSettings)
{
@@ -24,72 +20,18 @@ public class SendCollectionManager
}
/// <summary>
/// Returns the element's host collection based on level, category and optional type if the main model only is sent.
/// The host collection is placed on the provided root object.
/// If linked models are being sent, nested collections are sent under the provided root object.
/// Returns the element's host collection based on level, category and optional type. Additionally, places the host collection on the provided root object.
/// Note, it's not nice we're mutating the root object in this function.
/// </summary>
/// <param name="element"></param>
/// <param name="rootObject"></param>
/// <returns></returns>
public Collection GetAndCreateObjectHostCollection(
Element element,
Collection rootObject,
bool sendWithLinkedModels,
string? modelDisplayName = null
)
public Collection GetAndCreateObjectHostCollection(Element element, Collection rootObject)
{
var doc = _converterSettings.Current.Document;
var path = new List<string>();
// Get model path and name
string modelPath = doc.PathName;
string modelName = Path.GetFileNameWithoutExtension(modelPath);
bool isLinkedModel = doc.IsLinked;
// Set up the correct hierarchy based on whether we have linked models or not
Collection startingCollection;
if (sendWithLinkedModels) // this arg comes from RevitRootObjectBuilder and check is setting enabled and linked models present
{
// if we're sending linked models, create a nested structure
// for the main model
if (!isLinkedModel)
{
// create main model collection if it doesn't exist yet
if (_mainModelCollection == null)
{
_mainModelCollection = new Collection(rootObject.name);
rootObject.elements.Add(_mainModelCollection);
}
startingCollection = _mainModelCollection;
}
// for linked models
else
{
// Use display name from settings if available, otherwise use original name
string displayName = modelDisplayName ?? modelName;
// Check if we already have a collection for this model display name
if (!_linkedModelCollections.TryGetValue(displayName, out Collection? linkedModelCollection))
{
// First time seeing this model with this display name
linkedModelCollection = new Collection(displayName);
rootObject.elements.Add(linkedModelCollection);
_linkedModelCollections[displayName] = linkedModelCollection;
}
startingCollection = linkedModelCollection;
}
}
else
{
// if we don't have linked models, use the root directly
startingCollection = rootObject;
}
// get the level and its properties
// Step 0: get the level and its properties
string levelName = "No Level";
Dictionary<string, object?> levelProperties = new();
if (element.LevelId != ElementId.InvalidElementId)
@@ -101,20 +43,15 @@ public class SendCollectionManager
}
else
{
try
{
var level = (Level)doc.GetElement(element.LevelId);
levelName = level.Name;
levelProperties.Add("elevation", level.Elevation);
levelProperties.Add("units", _converterSettings.Current.SpeckleUnits);
_levelCache.Add(element.LevelId, (levelName, levelProperties));
}
// the exception is swallowed since if an exception occurs, we fall back to "No Level" for the element
catch (Exception e) when (!e.IsFatal()) { }
var level = (Level)doc.GetElement(element.LevelId);
levelName = level.Name;
levelProperties.Add("elevation", level.Elevation);
levelProperties.Add("units", _converterSettings.Current.SpeckleUnits);
_levelCache.Add(element.LevelId, (levelName, levelProperties));
}
}
// create path components. Currently, this is
// Step 1: create path components. Currently, this is
// level > category > type
path.Add(levelName);
path.Add(element.Category?.Name ?? "No category");
@@ -132,23 +69,19 @@ public class SendCollectionManager
path.Add("No type");
}
// Use the collection's name for cache keys to ensure proper separation
string modelIdentifier = startingCollection.name;
// create a model-specific key for the collection cache
string fullPathName = $"{modelIdentifier}:{string.Join(":", path)}";
string fullPathName = string.Concat(path);
if (_collectionCache.TryGetValue(fullPathName, out Collection? value))
{
return value;
}
string flatPathName = modelIdentifier;
Collection previousCollection = startingCollection;
string flatPathName = "";
Collection previousCollection = rootObject;
for (int i = 0; i < path.Count; i++)
{
var pathItem = path[i];
flatPathName += ":" + pathItem;
flatPathName += pathItem;
Collection childCollection;
if (_collectionCache.TryGetValue(flatPathName, out Collection? collection))
{
@@ -157,7 +90,8 @@ public class SendCollectionManager
else
{
childCollection = new Collection(pathItem);
// add properties to level collection
// add props if it's the 1st path item, representing level
// if the structure ever changes from level > category > type, this needs to be changed
if (i == 0 && levelProperties.Count > 0)
{
childCollection["properties"] = levelProperties;
@@ -33,7 +33,6 @@ public sealed class RevitHostObjectBuilder(
RevitGroupBaker groupManager,
RevitMaterialBaker materialBaker,
RootObjectUnpacker rootObjectUnpacker,
RevitViewManager viewManager,
ILogger<RevitHostObjectBuilder> logger,
IThreadContext threadContext,
RevitToHostCacheSingleton revitToHostCacheSingleton,
@@ -62,13 +61,6 @@ public sealed class RevitHostObjectBuilder(
CancellationToken cancellationToken
)
{
// ignore Receive in any other views (e.g. Section, Elevation, ViewSheet etc.)
View activeView = converterSettings.Current.Document.ActiveView;
if (!viewManager.IsSupportedReceiveView(activeView))
{
throw new ConversionException($"Receive in '{activeView.ViewType}' View is not supported");
}
var baseGroupName = $"Project {projectName}: Model {modelName}"; // TODO: unify this across connectors!
onOperationProgressed.Report(new("Converting", null));
@@ -209,16 +201,6 @@ public sealed class RevitHostObjectBuilder(
new(Status.SUCCESS, localToGlobalMap.AtomicObject, directShapes.UniqueId, "Direct Shape")
);
}
else if (result is List<string> elementsIds)
{
// This is the case when conversion returns not a GeometryObject, but Documentation elements (Annotations, Details etc.)
// If Regions were a part of DataObject, it can return more than 1 native shape
foreach (var elementId in elementsIds)
{
conversionResults.Add(new(Status.SUCCESS, localToGlobalMap.AtomicObject, elementId, "Filled Region"));
bakedObjectIds.Add(elementId);
}
}
else
{
throw new ConversionException($"Failed to cast {result.GetType()} to direct shape definition wrapper.");
@@ -16,7 +16,6 @@ public class RevitCategoriesFilter : DiscriminatedObject, ISendFilter, IRevitSen
private Document? _doc;
public string Id { get; set; } = "revitCategories";
public string Name { get; set; } = "Categories";
public string Type { get; set; } = "Custom";
public string? Summary { get; set; }
public bool IsDefault { get; set; }
public List<string> SelectedObjectIds { get; set; } = new();
@@ -41,17 +40,12 @@ public class RevitCategoriesFilter : DiscriminatedObject, ISendFilter, IRevitSen
/// <exception cref="SpeckleSendFilterException">Whenever no view is found.</exception>
public List<string> RefreshObjectIds()
{
var objectIds = new List<string>();
if (SelectedCategories is null)
{
return [];
return objectIds;
}
// ⚠️ this is ugly, BUT we need to preserve RevitLinkInstances regardless of category.
// these get unpacked later in the RefreshElementsIdsOnSender, so if we don't do this, they'll get filtered out here
using var linkCollector = new FilteredElementCollector(_doc);
var linkInstanceIds = linkCollector.OfClass(typeof(RevitLinkInstance)).Select(link => link.UniqueId).ToList();
// get elements that match the selected categories (excluding RevitLinkInstance objects)
var elementIds = SelectedCategories.Select(c => ElementIdHelper.GetElementId(c)).Where(e => e is not null).ToList();
using var categoryFilter = new ElementMulticategoryFilter(elementIds);
@@ -61,11 +55,7 @@ public class RevitCategoriesFilter : DiscriminatedObject, ISendFilter, IRevitSen
.WhereElementIsViewIndependent()
.WherePasses(categoryFilter)
.ToList();
// combine both sets
var objectIds = elements.Select(e => e.UniqueId).ToList();
objectIds.AddRange(linkInstanceIds);
objectIds = elements.Select(e => e.UniqueId).ToList();
SelectedObjectIds = objectIds;
return objectIds;
}
@@ -12,7 +12,6 @@ public class RevitViewsFilter : DiscriminatedObject, ISendFilter, IRevitSendFilt
private Document? _doc;
public string Id { get; set; } = "revitViews";
public string Name { get; set; } = "Views";
public string Type { get; set; } = "Custom";
public string? Summary { get; set; }
public bool IsDefault { get; set; }
public string? SelectedView { get; set; }
@@ -54,9 +53,10 @@ public class RevitViewsFilter : DiscriminatedObject, ISendFilter, IRevitSendFilt
/// <exception cref="SpeckleSendFilterException">Whenever no view is found.</exception>
public List<string> RefreshObjectIds()
{
var objectIds = new List<string>();
if (SelectedView is null)
{
return [];
return objectIds;
}
// Paşa Bilal wants it like this... (three dots = important meaning for ogu)
@@ -75,8 +75,8 @@ public class RevitViewsFilter : DiscriminatedObject, ISendFilter, IRevitSendFilt
throw new SpeckleSendFilterException("View not found, please update your model send filter.");
}
using var viewCollector = new FilteredElementCollector(_doc, view.Id);
var elementsInView = viewCollector.ToElements();
var objectIds = elementsInView.Select(e => e.UniqueId).ToList();
List<Element> elementsInView = viewCollector.ToElements().ToList();
objectIds = elementsInView.Select(e => e.UniqueId).ToList();
SelectedObjectIds = objectIds;
return objectIds;
}
@@ -12,7 +12,6 @@ using Speckle.Converters.Common;
using Speckle.Converters.RevitShared.Helpers;
using Speckle.Converters.RevitShared.Settings;
using Speckle.Sdk;
using Speckle.Sdk.Common;
using Speckle.Sdk.Models;
using Speckle.Sdk.Models.Collections;
@@ -26,22 +25,20 @@ public class RevitRootObjectBuilder(
IThreadContext threadContext,
SendCollectionManager sendCollectionManager,
ILogger<RevitRootObjectBuilder> logger,
RevitToSpeckleCacheSingleton revitToSpeckleCacheSingleton,
LinkedModelHandler linkedModelHandler
) : IRootObjectBuilder<DocumentToConvert>
RevitToSpeckleCacheSingleton revitToSpeckleCacheSingleton
) : IRootObjectBuilder<ElementId>
{
// POC: SendSelection and RevitConversionContextStack should be interfaces, former needs interfaces
public Task<RootObjectBuilderResult> Build(
IReadOnlyList<DocumentToConvert> documentElementContexts,
IReadOnlyList<ElementId> objects,
SendInfo sendInfo,
IProgress<CardProgress> onOperationProgressed,
CancellationToken ct = default
) =>
threadContext.RunOnMainAsync(
() => Task.FromResult(BuildSync(documentElementContexts, sendInfo, onOperationProgressed, ct))
);
) => threadContext.RunOnMainAsync(() => Task.FromResult(BuildSync(objects, sendInfo, onOperationProgressed, ct)));
private RootObjectBuilderResult BuildSync(
IReadOnlyList<DocumentToConvert> documentElementContexts,
IReadOnlyList<ElementId> objects,
SendInfo sendInfo,
IProgress<CardProgress> onOperationProgressed,
CancellationToken cancellationToken
@@ -54,187 +51,96 @@ public class RevitRootObjectBuilder(
throw new SpeckleException("Family Environment documents are not supported.");
}
// init the root
// 0 - Init the root
Collection rootObject =
new() { name = converterSettings.Current.Document.PathName.Split('\\').Last().Split('.').First() };
rootObject["units"] = converterSettings.Current.SpeckleUnits;
var filteredDocumentsToConvert = new List<DocumentToConvert>();
bool sendWithLinkedModels = converterSettings.Current.SendLinkedModels;
List<SendConversionResult> results = new();
// Prepare linked model display names if needed
if (sendWithLinkedModels)
var revitElements = new List<Element>();
List<SendConversionResult> results = new(revitElements.Count);
// Convert ids to actual revit elements
foreach (var id in objects)
{
linkedModelHandler.PrepareLinkedModelNames(documentElementContexts);
}
foreach (var documentElementContext in documentElementContexts)
{
// add appropriate warnings for linked documents
if (documentElementContext.Doc.IsLinked && !sendWithLinkedModels)
var el = converterSettings.Current.Document.GetElement(id);
if (el == null)
{
results.Add(
new(
Status.WARNING,
documentElementContext.Doc.PathName,
typeof(RevitLinkInstance).ToString(),
null,
new SpeckleException("Enable linked model support from the settings to send this object")
)
);
continue;
}
// filter for valid elements
// if send linked models setting is disabled List<Elements> will be empty, and we won't enter foreach loop
var elementsInTransform = new List<Element>();
foreach (var el in documentElementContext.Elements)
if (el.Category == null)
{
if (el == null || el.Category == null)
{
continue;
}
elementsInTransform.Add(el);
continue;
}
// only add contexts with elements
if (elementsInTransform.Count > 0)
{
filteredDocumentsToConvert.Add(documentElementContext with { Elements = elementsInTransform });
}
revitElements.Add(el);
}
// TODO: check the exception!!!!
if (filteredDocumentsToConvert.Count == 0)
if (revitElements.Count == 0)
{
throw new SpeckleSendFilterException("No objects were found. Please update your publish filter!");
}
// Unpack groups (& other complex data structures)
var atomicObjectsByDocumentAndTransform = new List<DocumentToConvert>();
var atomicObjectCount = 0;
foreach (var filteredDocumentToConvert in filteredDocumentsToConvert)
{
using (
converterSettings.Push(currentSettings => currentSettings with { Document = filteredDocumentToConvert.Doc })
)
{
var atomicObjects = elementUnpacker
.UnpackSelectionForConversion(filteredDocumentToConvert.Elements, filteredDocumentToConvert.Doc)
.ToList();
atomicObjectsByDocumentAndTransform.Add(filteredDocumentToConvert with { Elements = atomicObjects });
atomicObjectCount += atomicObjects.Count;
}
}
var atomicObjects = elementUnpacker.UnpackSelectionForConversion(revitElements).ToList();
var countProgress = 0;
var cacheHitCount = 0;
var skippedObjectCount = 0;
foreach (var atomicObjectByDocumentAndTransform in atomicObjectsByDocumentAndTransform)
foreach (Element revitElement in atomicObjects)
{
string? modelDisplayName = null;
if (atomicObjectByDocumentAndTransform.Doc.IsLinked)
cancellationToken.ThrowIfCancellationRequested();
string applicationId = revitElement.UniqueId;
string sourceType = revitElement.GetType().Name;
try
{
string id = linkedModelHandler.GetIdFromDocumentToConvert(atomicObjectByDocumentAndTransform);
linkedModelHandler.LinkedModelDisplayNames.TryGetValue(id, out modelDisplayName);
}
// here we do magic for changing the transform and the related document according to model. first one is always the main model.
using (
converterSettings.Push(currentSettings =>
currentSettings with
{
ReferencePointTransform = atomicObjectByDocumentAndTransform.Transform,
Document = atomicObjectByDocumentAndTransform.Doc,
}
)
)
{
var atomicObjects = atomicObjectByDocumentAndTransform.Elements;
foreach (Element revitElement in atomicObjects)
if (!SupportedCategoriesUtils.IsSupportedCategory(revitElement.Category))
{
cancellationToken.ThrowIfCancellationRequested();
string applicationId = revitElement.UniqueId;
string sourceType = revitElement.GetType().Name;
try
{
if (!SupportedCategoriesUtils.IsSupportedCategory(revitElement.Category))
{
var cat = revitElement.Category != null ? revitElement.Category.Name : "No category";
results.Add(
new(
Status.WARNING,
revitElement.UniqueId,
cat,
null,
new SpeckleException($"Category {cat} is not supported.")
)
);
skippedObjectCount++;
continue;
}
Base converted;
bool hasTransform = atomicObjectByDocumentAndTransform.Transform != null;
// non-transformed elements can safely rely on cache
// TODO: Potential here to transform cached objects and NOT reconvert,
// TODO: we wont do !hasTransform here, and re-set application id before this
if (
!hasTransform
&& sendConversionCache.TryGetValue(sendInfo.ProjectId, applicationId, out ObjectReference? value)
var cat = revitElement.Category != null ? revitElement.Category.Name : "No category";
results.Add(
new(
Status.WARNING,
revitElement.UniqueId,
cat,
null,
new SpeckleException($"Category {cat} is not supported.")
)
{
converted = value;
cacheHitCount++;
}
// not in cache means we convert
else
{
// if it has a transform we append transform hash to the applicationId to distinguish the elements from other instances
if (hasTransform)
{
string transformHash = linkedModelHandler.GetTransformHash(
atomicObjectByDocumentAndTransform.Transform.NotNull()
);
applicationId = $"{applicationId}_t{transformHash}";
}
// normal conversions
converted = converter.Convert(revitElement);
converted.applicationId = applicationId;
}
var collection = sendCollectionManager.GetAndCreateObjectHostCollection(
revitElement,
rootObject,
sendWithLinkedModels,
modelDisplayName
);
collection.elements.Add(converted);
results.Add(new(Status.SUCCESS, applicationId, sourceType, converted));
}
catch (Exception ex) when (!ex.IsFatal())
{
logger.LogSendConversionError(ex, sourceType);
results.Add(new(Status.ERROR, applicationId, sourceType, null, ex));
}
onOperationProgressed.Report(new("Converting", (double)++countProgress / atomicObjectCount));
);
skippedObjectCount++;
continue;
}
Base converted;
if (sendConversionCache.TryGetValue(sendInfo.ProjectId, applicationId, out ObjectReference? value))
{
converted = value;
cacheHitCount++;
}
else
{
converted = converter.Convert(revitElement);
converted.applicationId = applicationId;
}
var collection = sendCollectionManager.GetAndCreateObjectHostCollection(revitElement, rootObject);
collection.elements.Add(converted);
results.Add(new(Status.SUCCESS, applicationId, sourceType, converted));
}
catch (Exception ex) when (!ex.IsFatal())
{
logger.LogSendConversionError(ex, sourceType);
results.Add(new(Status.ERROR, applicationId, sourceType, null, ex));
}
onOperationProgressed.Report(new("Converting", (double)++countProgress / atomicObjects.Count));
}
if (results.All(x => x.Status == Status.ERROR) || skippedObjectCount == atomicObjectCount)
if (results.All(x => x.Status == Status.ERROR) || skippedObjectCount == atomicObjects.Count)
{
throw new SpeckleException("Failed to convert all objects.");
}
var idsAndSubElementIds = elementUnpacker.GetElementsAndSubelementIdsFromAtomicObjects(
atomicObjectsByDocumentAndTransform.SelectMany(t => t.Elements).ToList()
);
var idsAndSubElementIds = elementUnpacker.GetElementsAndSubelementIdsFromAtomicObjects(atomicObjects);
var renderMaterialProxies = revitToSpeckleCacheSingleton.GetRenderMaterialProxyListForObjects(idsAndSubElementIds);
rootObject[ProxyKeys.RENDER_MATERIAL] = renderMaterialProxies;
@@ -1,12 +0,0 @@
using Speckle.Connectors.DUI.Settings;
namespace Speckle.Connectors.Revit.Operations.Send.Settings;
public class LinkedModelsSetting(bool value) : ICardSetting
{
public string? Id { get; set; } = "includeLinkedModels";
public string? Title { get; set; } = "Include Linked Models";
public string? Type { get; set; } = "boolean";
public object? Value { get; set; } = value;
public List<string>? Enum { get; set; }
}
@@ -21,7 +21,6 @@ public class ToSpeckleSettingsManager : IToSpeckleSettingsManager
private readonly Dictionary<string, DetailLevelType> _detailLevelCache = new();
private readonly Dictionary<string, Transform?> _referencePointCache = new();
private readonly Dictionary<string, bool?> _sendNullParamsCache = new();
private readonly Dictionary<string, bool?> _sendLinkedModelsCache = new();
public ToSpeckleSettingsManager(
RevitContext revitContext,
@@ -103,24 +102,6 @@ public class ToSpeckleSettingsManager : IToSpeckleSettingsManager
return returnValue;
}
// NOTE: Cache invalidation currently a placeholder until we have more understanding on the sends
// TODO: Evaluate cache invalidation for GetLinkedModelsSetting
public bool GetLinkedModelsSetting(SenderModelCard modelCard)
{
var value = modelCard.Settings?.First(s => s.Id == "includeLinkedModels").Value as bool?;
var returnValue = value != null && value.NotNull();
if (_sendLinkedModelsCache.TryGetValue(modelCard.ModelCardId.NotNull(), out bool? previousValue))
{
if (previousValue != returnValue)
{
EvictCacheForModelCard(modelCard);
}
}
_sendLinkedModelsCache[modelCard.ModelCardId] = returnValue;
return returnValue;
}
private void EvictCacheForModelCard(SenderModelCard modelCard)
{
var objectIds = modelCard.SendFilter != null ? modelCard.SendFilter.NotNull().SelectedObjectIds : [];
@@ -20,12 +20,9 @@
<Compile Include="$(MSBuildThisFileDirectory)Bindings\RevitSendBinding.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ElementIdHelper.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\DocumentModelStorageSchema.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\DocumentToConvert.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\Elements.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\LinkedModelHandler.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\RevitMaterialBaker.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\SupportedCategoriesUtils.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\RevitViewManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Receive\HideWarningsFailuresPreprocessor.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\IdStorageSchema.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\IStorageSchema.cs" />
@@ -43,7 +40,6 @@
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\Filters\RevitSelectionFilter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\Filters\RevitViewsFilter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\RevitRootObjectBuilder.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\Settings\LinkedModelsSetting.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\Settings\SendParameterNullOrEmptyStringsSetting.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\Settings\ToSpeckleSettingsManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\Settings\ReferencePointSetting.cs" />
@@ -268,9 +268,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -278,8 +278,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -296,7 +296,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"speckle.converters.rhino7": {
@@ -347,18 +347,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -368,14 +368,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -268,9 +268,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -278,8 +278,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -296,7 +296,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"speckle.converters.rhino8": {
@@ -347,18 +347,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -368,14 +368,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -72,8 +72,6 @@ public sealed class RhinoBasicConnectorBinding : IBasicConnectorBinding
public void RemoveModel(ModelCard model) => _store.RemoveModel(model);
public void RemoveModels(List<ModelCard> models) => _store.RemoveModels(models);
public Task HighlightObjects(IReadOnlyList<string> objectIds)
{
var objects = GetObjectsFromIds(objectIds);
@@ -16,7 +16,6 @@ using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.DUI.Models.Card;
using Speckle.Connectors.DUI.Models.Card.SendFilter;
using Speckle.Connectors.DUI.Settings;
using Speckle.Connectors.Rhino.Operations.Send.Filters;
using Speckle.Converters.Common;
using Speckle.Converters.Rhino;
using Speckle.Sdk;
@@ -33,6 +32,7 @@ public sealed class RhinoSendBinding : ISendBinding
private readonly DocumentModelStore _store;
private readonly IServiceProvider _serviceProvider;
private readonly List<ISendFilter> _sendFilters;
private readonly ICancellationManager _cancellationManager;
private readonly ISendConversionCache _sendConversionCache;
private readonly IOperationProgressManager _operationProgressManager;
@@ -65,6 +65,7 @@ public sealed class RhinoSendBinding : ISendBinding
DocumentModelStore store,
IAppIdleManager idleManager,
IBrowserBridge parent,
IEnumerable<ISendFilter> sendFilters,
IServiceProvider serviceProvider,
ICancellationManager cancellationManager,
ISendConversionCache sendConversionCache,
@@ -79,6 +80,7 @@ public sealed class RhinoSendBinding : ISendBinding
_store = store;
_idleManager = idleManager;
_serviceProvider = serviceProvider;
_sendFilters = sendFilters.ToList();
_cancellationManager = cancellationManager;
_sendConversionCache = sendConversionCache;
_operationProgressManager = operationProgressManager;
@@ -188,7 +190,7 @@ public sealed class RhinoSendBinding : ISendBinding
});
RhinoDoc.LayerTableEvent += (_, args) =>
_topLevelExceptionHandler.CatchUnhandled(async () =>
_topLevelExceptionHandler.CatchUnhandled(() =>
{
if (!_store.IsDocumentInit)
{
@@ -218,7 +220,6 @@ public sealed class RhinoSendBinding : ISendBinding
}
}
_idleManager.SubscribeToIdle(nameof(RunExpirationChecks), RunExpirationChecks);
await Commands.RefreshSendFilters();
});
// Catches and stores changed material ids. These are then used in the expiry checks to invalidate all objects that have assigned any of those material ids.
@@ -276,8 +277,7 @@ public sealed class RhinoSendBinding : ISendBinding
});
}
public List<ISendFilter> GetSendFilters() =>
[new RhinoSelectionFilter() { IsDefault = true }, new RhinoLayersFilter()];
public List<ISendFilter> GetSendFilters() => _sendFilters;
public List<ICardSetting> GetSendSettings() => [];
@@ -16,7 +16,6 @@ using Speckle.Sdk.Logging;
using Speckle.Sdk.Models;
using Speckle.Sdk.Models.Collections;
using Speckle.Sdk.Models.Instances;
using DataObject = Speckle.Objects.Data.DataObject;
namespace Speckle.Connectors.Rhino.Operations.Receive;
@@ -36,8 +35,6 @@ public class RhinoHostObjectBuilder : IHostObjectBuilder
private readonly ISdkActivityFactory _activityFactory;
private readonly IThreadContext _threadContext;
private const string PROPERTY_PATH_DELIMITER = ".";
public RhinoHostObjectBuilder(
IRootToHostConverter converter,
IConverterSettingsStore<RhinoConversionSettings> converterSettings,
@@ -158,25 +155,6 @@ public class RhinoHostObjectBuilder : IHostObjectBuilder
// 1: create object attributes for baking
string name = obj["name"] as string ?? "";
using ObjectAttributes atts = new() { LayerIndex = layerIndex, Name = name };
Dictionary<string, string> userStrings = new();
Dictionary<string, object?> properties = obj is DataObject dataObj
? dataObj.properties
: obj["properties"] as Dictionary<string, object?> ?? new();
FlattenDictionaryToUserStrings(properties, userStrings, "");
foreach (var kvp in userStrings)
{
// POC: we're skipping properties that end with `.name` , `.units`, etc because this is causing a lot of noise atm.
if (
kvp.Key.EndsWith(".units")
|| kvp.Key.EndsWith(".name")
|| kvp.Key.EndsWith(".internalDefinitionName")
)
{
continue;
}
atts.SetUserString(kvp.Key, kvp.Value);
}
// 2: convert
var result = _converter.Convert(obj);
@@ -209,7 +187,7 @@ public class RhinoHostObjectBuilder : IHostObjectBuilder
if (conversionIds.Count == 0)
{
// TODO: add this condition to report object - same as in autocad
throw new SpeckleException("Object did not convert to any native geometry");
throw new SpeckleException($"Failed to convert object.");
}
// 4: log
@@ -388,26 +366,4 @@ public class RhinoHostObjectBuilder : IHostObjectBuilder
return objectIds;
}
// changes a properties dictionary to <string,string> to assign as user strings.
private void FlattenDictionaryToUserStrings(
Dictionary<string, object?> dict,
Dictionary<string, string> flattenedDict,
string keyPrefix = ""
)
{
foreach (var kvp in dict)
{
string newKey = string.IsNullOrEmpty(keyPrefix) ? kvp.Key : $"{keyPrefix}{PROPERTY_PATH_DELIMITER}{kvp.Key}";
if (kvp.Value is Dictionary<string, object?> childDict)
{
FlattenDictionaryToUserStrings(childDict, flattenedDict, newKey);
}
else
{
flattenedDict.Add(newKey, kvp.Value?.ToString() ?? "");
}
}
}
}
@@ -1,86 +0,0 @@
using Rhino;
using Rhino.DocObjects;
using Speckle.Connectors.DUI.Models.Card.SendFilter;
using Speckle.Connectors.DUI.Utils;
namespace Speckle.Connectors.Rhino.Operations.Send.Filters;
public class RhinoLayersFilter : DiscriminatedObject, ISendFilter
{
public string Id { get; set; } = "rhinoLayers";
public string Name { get; set; } = "Layers";
public string Type { get; set; } = "Select";
public string? Summary { get; set; }
public bool IsDefault { get; set; }
public List<string> SelectedObjectIds { get; set; } = [];
public Dictionary<string, string>? IdMap { get; set; }
public bool IsMultiSelectable { get; set; } = true;
public List<SendFilterSelectItem> SelectedItems { get; set; }
public List<SendFilterSelectItem> Items => GetFilterItems();
public RhinoLayersFilter() { }
public List<string> RefreshObjectIds()
{
SelectedObjectIds.Clear();
RhinoDoc doc = RhinoDoc.ActiveDoc;
if (doc == null)
{
return SelectedObjectIds;
}
foreach (var item in SelectedItems)
{
if (Guid.TryParse(item.Id, out Guid layerId))
{
Layer layer = doc.Layers.FindId(layerId);
if (layer != null)
{
var objectIds = doc.Objects.FindByLayer(layer).Select(obj => obj.Id.ToString());
SelectedObjectIds.AddRange(objectIds);
}
}
}
return SelectedObjectIds;
}
private List<SendFilterSelectItem> GetFilterItems()
{
List<SendFilterSelectItem> filterItems = new List<SendFilterSelectItem>();
RhinoDoc doc = RhinoDoc.ActiveDoc;
if (doc == null)
{
return filterItems;
}
foreach (Layer layer in doc.Layers)
{
if (!layer.IsDeleted)
{
filterItems.Add(new SendFilterSelectItem(layer.Id.ToString(), GetFullLayerPath(layer)));
}
}
return filterItems;
}
private string GetFullLayerPath(Layer layer)
{
string fullPath = layer.Name;
Guid parentIndex = layer.ParentLayerId;
while (parentIndex != Guid.Empty)
{
Layer parentLayer = RhinoDoc.ActiveDoc.Layers.FindId(parentIndex);
if (parentLayer == null)
{
break;
}
fullPath = parentLayer.Name + "/" + fullPath;
parentIndex = parentLayer.ParentLayerId;
}
return fullPath;
}
}
@@ -1,13 +0,0 @@
using Speckle.Connectors.DUI.Models.Card.SendFilter;
namespace Speckle.Connectors.Rhino.Operations.Send.Filters;
public class RhinoSelectionFilter : DirectSelectionSendFilter
{
public RhinoSelectionFilter()
{
IsDefault = true;
}
public override List<string> RefreshObjectIds() => SelectedObjectIds;
}
@@ -23,8 +23,6 @@
<Compile Include="$(MSBuildThisFileDirectory)Bindings\RhinoSelectionBinding.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\Properties\PropertiesExtractor.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\RhinoIdleManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\Filters\RhinoSelectionFilter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\Filters\RhinoLayersFilter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)RhinoEvents.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Registration\ServiceRegistration.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Extensions\BoundingBox.cs" />
@@ -325,9 +325,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -335,8 +335,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -362,7 +362,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"LibTessDotNet": {
@@ -412,18 +412,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -433,14 +433,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -406,9 +406,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -416,8 +416,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -443,7 +443,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"LibTessDotNet": {
@@ -493,18 +493,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -514,14 +514,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -60,8 +60,6 @@ public class TeklaBasicConnectorBinding : IBasicConnectorBinding
public void RemoveModel(ModelCard model) => _store.RemoveModel(model);
public void RemoveModels(List<ModelCard> models) => _store.RemoveModels(models);
public async Task HighlightModel(string modelCardId)
{
try
@@ -1,6 +1,5 @@
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Tekla.Structures;
using Tekla.Structures.Model;
namespace Speckle.Connectors.TeklaShared.Bindings;
@@ -11,7 +10,6 @@ public class TeklaSelectionBinding : ISelectionBinding
private readonly object _selectionEventHandlerLock = new object();
private readonly IAppIdleManager _idleManager;
private readonly Events _events;
private readonly Model _model;
private readonly Tekla.Structures.Model.UI.ModelObjectSelector _selector;
public string Name => "selectionBinding";
@@ -28,7 +26,6 @@ public class TeklaSelectionBinding : ISelectionBinding
Parent = parent;
_selector = selector;
_events = events;
_model = new Model();
_events.SelectionChange += OnSelectionChangeEvent;
_events.Register();
@@ -73,15 +70,10 @@ public class TeklaSelectionBinding : ISelectionBinding
objectTypes.Add(modelObject.GetType().Name);
}
// Filter out the objects that Tekla API ignores (e.g. Construction objects with "000000.." GUID)
List<string> filteredObjectIds = objectIds
.Where(id => _model.SelectModelObject(new Identifier(new Guid(id))) != null)
.ToList();
string typesString = string.Join(", ", objectTypes.Distinct());
return new SelectionInfo(
filteredObjectIds,
filteredObjectIds.Count == 0 ? "No objects selected." : $"{filteredObjectIds.Count} objects ({typesString})"
objectIds,
objectIds.Count == 0 ? "No objects selected." : $"{objectIds.Count} objects ({typesString})"
);
}
}
@@ -13,7 +13,6 @@
<ItemGroup>
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Common.MeshTriangulation\Speckle.Common.MeshTriangulation.csproj" />
</ItemGroup>
<ItemGroup>
@@ -9,7 +9,7 @@ public sealed class DisplayValueExtractor
private readonly ITypedConverter<ACG.MapPoint, SOG.Point> _pointConverter;
private readonly ITypedConverter<ACG.Multipoint, IReadOnlyList<SOG.Point>> _multiPointConverter;
private readonly ITypedConverter<ACG.Polyline, IReadOnlyList<SOG.Polyline>> _polylineConverter;
private readonly ITypedConverter<ACG.Polygon, IReadOnlyList<SOG.Region>> _polygonConverter;
private readonly ITypedConverter<ACG.Polygon, IReadOnlyList<SOG.Polyline>> _polygonConverter;
private readonly ITypedConverter<ACG.Multipatch, IReadOnlyList<SOG.Mesh>> _multipatchConverter;
private readonly ITypedConverter<ACD.Raster.Raster, SOG.Mesh> _gisRasterConverter;
@@ -17,7 +17,7 @@ public sealed class DisplayValueExtractor
ITypedConverter<ACG.MapPoint, SOG.Point> pointConverter,
ITypedConverter<ACG.Multipoint, IReadOnlyList<SOG.Point>> multiPointConverter,
ITypedConverter<ACG.Polyline, IReadOnlyList<SOG.Polyline>> polylineConverter,
ITypedConverter<ACG.Polygon, IReadOnlyList<SOG.Region>> polygonConverter,
ITypedConverter<ACG.Polygon, IReadOnlyList<SOG.Polyline>> polygonConverter,
ITypedConverter<ACG.Multipatch, IReadOnlyList<SOG.Mesh>> multipatchConverter,
ITypedConverter<ACD.Raster.Raster, SOG.Mesh> gisRasterConverter
)
@@ -1,8 +1,4 @@
using Speckle.Common.MeshTriangulation;
using Speckle.Converters.Common;
using Speckle.Converters.Common.Objects;
using Speckle.DoubleNumerics;
using Speckle.Objects;
using Speckle.Sdk.Common.Exceptions;
namespace Speckle.Converters.ArcGIS3.ToSpeckle.Raw;
@@ -11,134 +7,35 @@ namespace Speckle.Converters.ArcGIS3.ToSpeckle.Raw;
/// Converts a Polygon feature to a list of polylines from the polygon boundary and inner loops.
/// This is a placeholder conversion since we don't have a polygon class or meshing strategy for interior loops yet.
/// </summary>
public class PolygonFeatureToSpeckleConverter : ITypedConverter<ACG.Polygon, IReadOnlyList<SOG.Region>>
public class PolygonFeatureToSpeckleConverter : ITypedConverter<ACG.Polygon, IReadOnlyList<SOG.Polyline>>
{
private readonly ITypedConverter<ACG.ReadOnlySegmentCollection, SOG.Polyline> _segmentConverter;
private readonly IConverterSettingsStore<ArcGISConversionSettings> _settingsStore;
public PolygonFeatureToSpeckleConverter(
ITypedConverter<ACG.ReadOnlySegmentCollection, SOG.Polyline> segmentConverter,
IConverterSettingsStore<ArcGISConversionSettings> settingsStore
)
public PolygonFeatureToSpeckleConverter(ITypedConverter<ACG.ReadOnlySegmentCollection, SOG.Polyline> segmentConverter)
{
_segmentConverter = segmentConverter;
_settingsStore = settingsStore;
}
public IReadOnlyList<SOG.Region> Convert(ACG.Polygon target)
public IReadOnlyList<SOG.Polyline> Convert(ACG.Polygon target)
{
// https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic30235.html
int partCount = target.PartCount;
List<SOG.Polyline> parts = new(partCount);
if (partCount == 0)
{
throw new ValidationException("ArcGIS Polygon contains no parts");
}
// declare Region elements
List<SOG.Region> regions = new();
SOG.Polyline? boundary = null;
List<SOG.Polyline> innerLoops = new();
// iterate through polygon parts: can be inner or outer curves,
// can be multiple outer curves too (if multipolygon).
for (int i = 0; i < partCount; i++)
{
// get the part polyline
ACG.ReadOnlySegmentCollection segmentCollection = target.Parts[i];
SOG.Polyline polyline = _segmentConverter.Convert(segmentCollection);
if (!target.IsExteriorRing(i))
{
innerLoops.Add(polyline);
}
else
{
// save previous region (if exists)
if (boundary is not null)
{
regions.Add(CreateRegion(boundary, innerLoops));
}
// reset values to start a new region
boundary = polyline;
innerLoops = [];
}
}
// after all loops, create and add the last region to the list
if (boundary is not null)
{
regions.Add(CreateRegion(boundary, innerLoops));
// POC: we could create a mesh from exterior polyline: target.IsExteriorRing(idx)
parts.Add(polyline);
}
return regions;
}
private SOG.Region CreateRegion(SOG.Polyline boundary, List<SOG.Polyline> innerLoops)
{
// create display mesh from region loops
var allLoops = new List<SOG.Polyline>() { boundary };
allLoops.AddRange(innerLoops);
SOG.Mesh displayMesh = MeshFromLoops(allLoops);
SOG.Region newRegion =
new()
{
boundary = boundary,
innerLoops = innerLoops.Cast<ICurve>().ToList(),
hasHatchPattern = false,
displayValue = [displayMesh],
units = _settingsStore.Current.SpeckleUnits
};
return newRegion;
}
private SOG.Mesh MeshFromLoops(List<SOG.Polyline> loops)
{
// turn Polylines into Polyfaces (boundary will be the first in the list)
var polyFaces = new List<Poly3>();
foreach (var loop in loops)
{
var vertices = new List<Vector3>();
for (int i = 0; i < loop.value.Count; i += 3)
{
vertices.Add(new Vector3(loop.value[i], loop.value[i + 1], loop.value[i + 2]));
}
polyFaces.Add(new Poly3(vertices));
}
var generator = new MeshGenerator(new BaseTransformer(), new LibTessTriangulator());
var mesh3 = generator.TriangulateSurface(polyFaces);
return Mesh3ToSpeckleMesh(mesh3);
}
private SOG.Mesh Mesh3ToSpeckleMesh(Mesh3 mesh3)
{
// copied from Tekla Solid converter, possibly to be moved to Speckle.Common
var vertices = new List<double>();
var faces = new List<int>();
foreach (var v in mesh3.Vertices)
{
vertices.Add(v.X);
vertices.Add(v.Y);
vertices.Add(v.Z);
}
for (int i = 0; i < mesh3.Triangles.Count; i += 3)
{
faces.Add(3);
faces.Add(mesh3.Triangles[i]);
faces.Add(mesh3.Triangles[i + 1]);
faces.Add(mesh3.Triangles[i + 2]);
}
var mesh = new SOG.Mesh
{
vertices = vertices,
faces = faces,
units = _settingsStore.Current.SpeckleUnits
};
return mesh;
return parts;
}
}
@@ -215,26 +215,13 @@
"resolved": "4.5.1",
"contentHash": "Zh8t8oqolRaFa9vmOZfdQm/qKejdqz0J9kr7o2Fu0vPeoH3BL1EOXipKWwkWtLT1JPzjByrF19fGuFlNbmPpiw=="
},
"speckle.common.meshtriangulation": {
"type": "Project",
"dependencies": {
"LibTessDotNet": "[1.1.15, )",
"Speckle.DoubleNumerics": "[4.1.0, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"LibTessDotNet": {
"type": "CentralTransitive",
"requested": "[1.1.15, )",
"resolved": "1.1.15",
"contentHash": "KuA7N3Nv/lIeawJdQBQJR6oqWD9KETHLbWzBqapwFs+Tby+R5I4crkKujKMm5bXcSuFZ8LNtflFQVadsWCbBjg=="
},
"Microsoft.Extensions.Logging": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
@@ -261,18 +248,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -282,14 +269,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2022.0.2" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2022.0.2" />
</ItemGroup>
<ItemGroup>
@@ -258,7 +258,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"Microsoft.Extensions.Logging": {
@@ -287,18 +287,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -308,14 +308,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" />
</ItemGroup>
<ItemGroup>
@@ -258,7 +258,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"Microsoft.Extensions.Logging": {
@@ -287,18 +287,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -308,14 +308,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2024.0.0" ExcludeAssets="runtime"/>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2024.0.0" />
</ItemGroup>
<ItemGroup>
@@ -259,9 +259,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -269,8 +269,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -287,7 +287,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -331,18 +331,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
@@ -352,14 +352,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -215,9 +215,9 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.8, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )",
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui": {
@@ -225,8 +225,8 @@
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.8, )",
"Speckle.Sdk.Dependencies": "[3.1.8, )"
"Speckle.Sdk": "[3.1.1, )",
"Speckle.Sdk.Dependencies": "[3.1.1, )"
}
},
"speckle.connectors.dui.webview": {
@@ -243,7 +243,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.8, )"
"Speckle.Objects": "[3.1.1, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
@@ -287,18 +287,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "rM1t+E8NIWFCPC3ndnMAI71B9ONiPFsz6GuIIdc5kth5AggQRGArPCalJBwA33ith2WtbjWOanI+PhHmpGQgGw==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "eap7OfzVjaC7ls47uNDSJm4I/oOxBn7OzN9GrZn/HEg7lahAUsASnijHcD7aDmq/j+EeyoyBwQOKLLlJ9G/2sw==",
"dependencies": {
"Speckle.Sdk": "3.1.8"
"Speckle.Sdk": "3.1.1"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "qIYRiYHO2UkKuy8ZbjYltKCqLesIcJOcCGTEzyTCbyij5aC1x8HnwFjGMeonUCPaeipEKhI/4HidEZ0CwWvnXg==",
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "4oVDt8u9ifHDiK+gOW+YKSmA6QtHI1+FHlgM+ezG7z1Zgm1tLnu/zIo8x7F8G3sQiw8yBx7Nli6mn1Y5YuIorg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
@@ -307,14 +307,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.1.0",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.8"
"Speckle.Sdk.Dependencies": "3.1.1"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.8, )",
"resolved": "3.1.8",
"contentHash": "+MWIemub3nlPnDJ7sHl5nDGFDIIfiBU2VxqNmTGKzWNtCjsDi6KYw5zpbvXnaNcIqFoexv3TKCurjvT2ejzyQw=="
"requested": "[3.1.1, )",
"resolved": "3.1.1",
"contentHash": "7RuD2i35uRbvgNR3vY8m5CdqnYJMdI2JWlrJ8kDw+wjKQWZ9JfpjAt0fd+jSijLO0nERNl172EfAOvcPvdGCgQ=="
}
}
}
@@ -27,15 +27,12 @@
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Raw\AutocadPolycurveToHostPolyline2dRawConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Raw\AutocadPolycurveToHostPolyline3dRawConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Raw\AutocadPolycurveToHostPolylineRawConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Raw\PolycurveToHostSplineRawConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Geometry\CircleToHostConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Geometry\ArcToHostConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Geometry\CurveToHostConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Geometry\EllipseToHostConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Geometry\PolycurveToHostConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Geometry\RegionToHostConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Raw\RegionHatchToHostRawConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Raw\RegionToHostRawConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Raw\ICurveToHostRawConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Raw\ArcToHostRawConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Raw\CurveToHostRawConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Raw\IntervalToHostRawConverter.cs" />
@@ -48,7 +45,6 @@
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Raw\PointToHostRawConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Geometry\PointToHostConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\Geometry\ArcToSpeckleConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\Geometry\HatchToSpeckleConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\Geometry\RegionToSpeckleConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\Geometry\SurfaceToSpeckleConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\Geometry\Solid3dToSpeckleConverter.cs" />
@@ -82,4 +78,4 @@
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\Raw\DBSplineToSpeckleRawConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToSpeckle\Raw\VectorToSpeckleRawConverter.cs" />
</ItemGroup>
</Project>
</Project>
@@ -1,6 +1,5 @@
using Speckle.Converters.Common;
using Speckle.Converters.Common.Objects;
using Speckle.Objects;
using Speckle.Objects.Data;
using Speckle.Sdk.Common.Exceptions;
using Speckle.Sdk.Models;
@@ -10,31 +9,46 @@ namespace Speckle.Converters.AutocadShared.ToHost.Geometry;
[NameAndRankValue(typeof(DataObject), NameAndRankValueAttribute.SPECKLE_DEFAULT_RANK)]
public class DataObjectConverter : IToHostTopLevelConverter, ITypedConverter<DataObject, List<(ADB.Entity a, Base b)>>
{
private readonly ITypedConverter<ICurve, List<(ADB.Entity, Base)>> _curveConverter;
private readonly ITypedConverter<SOG.Arc, ADB.Arc> _arcConverter;
private readonly ITypedConverter<SOG.BrepX, List<(ADB.Entity a, Base b)>> _brepXConverter;
private readonly ITypedConverter<SOG.Circle, ADB.Circle> _circleConverter;
private readonly ITypedConverter<SOG.Curve, ADB.Curve> _curveConverter;
private readonly ITypedConverter<SOG.Ellipse, ADB.Ellipse> _ellipseConverter;
private readonly ITypedConverter<SOG.ExtrusionX, List<(ADB.Entity a, Base b)>> _extrusionXConverter;
private readonly ITypedConverter<SOG.Line, ADB.Line> _lineConverter;
private readonly ITypedConverter<SOG.Mesh, ADB.PolyFaceMesh> _meshConverter;
private readonly ITypedConverter<SOG.Point, ADB.DBPoint> _pointConverter;
private readonly ITypedConverter<SOG.Polycurve, List<(ADB.Entity a, Base b)>> _polycurveConverter;
private readonly ITypedConverter<SOG.Polyline, ADB.Polyline3d> _polylineConverter;
private readonly ITypedConverter<SOG.SubDX, List<(ADB.Entity a, Base b)>> _subDXConverter;
private readonly ITypedConverter<SOG.Region, ADB.Entity> _regionConverter;
public DataObjectConverter(
ITypedConverter<ICurve, List<(ADB.Entity, Base)>> curveConverter,
ITypedConverter<SOG.Arc, ADB.Arc> arcConverter,
ITypedConverter<SOG.BrepX, List<(ADB.Entity a, Base b)>> brepXConverter,
ITypedConverter<SOG.Circle, ADB.Circle> circleConverter,
ITypedConverter<SOG.Curve, ADB.Curve> curveConverter,
ITypedConverter<SOG.Ellipse, ADB.Ellipse> ellipseConverter,
ITypedConverter<SOG.ExtrusionX, List<(ADB.Entity a, Base b)>> extrusionXConverter,
ITypedConverter<SOG.Line, ADB.Line> lineConverter,
ITypedConverter<SOG.Mesh, ADB.PolyFaceMesh> meshConverter,
ITypedConverter<SOG.Point, ADB.DBPoint> pointConverter,
ITypedConverter<SOG.SubDX, List<(ADB.Entity a, Base b)>> subDXConverter,
ITypedConverter<SOG.Region, ADB.Entity> regionConverter
ITypedConverter<SOG.Polycurve, List<(ADB.Entity, Base)>> polycurveConverter,
ITypedConverter<SOG.Polyline, ADB.Polyline3d> polylineConverter,
ITypedConverter<SOG.SubDX, List<(ADB.Entity a, Base b)>> subDXConverter
)
{
_curveConverter = curveConverter;
_arcConverter = arcConverter;
_brepXConverter = brepXConverter;
_circleConverter = circleConverter;
_curveConverter = curveConverter;
_ellipseConverter = ellipseConverter;
_extrusionXConverter = extrusionXConverter;
_lineConverter = lineConverter;
_meshConverter = meshConverter;
_pointConverter = pointConverter;
_polycurveConverter = polycurveConverter;
_polylineConverter = polylineConverter;
_subDXConverter = subDXConverter;
_regionConverter = regionConverter;
}
public object Convert(Base target) => Convert((DataObject)target);
@@ -53,39 +67,54 @@ public class DataObjectConverter : IToHostTopLevelConverter, ITypedConverter<Dat
{
switch (displayObject)
{
case SOG.Arc arc:
yield return (_arcConverter.Convert(arc), arc);
break;
case SOG.BrepX brepX:
foreach (var i in _brepXConverter.Convert(brepX))
{
yield return i;
}
break;
case SOG.Circle circle:
yield return (_circleConverter.Convert(circle), circle);
break;
case SOG.Curve curve:
yield return (_curveConverter.Convert(curve), curve);
break;
case SOG.Ellipse ellipse:
yield return (_ellipseConverter.Convert(ellipse), ellipse);
break;
case SOG.ExtrusionX extrusionX:
foreach (var i in _extrusionXConverter.Convert(extrusionX))
{
yield return i;
}
break;
case SOG.Line line:
yield return (_lineConverter.Convert(line), line);
break;
case SOG.Mesh mesh:
yield return (_meshConverter.Convert(mesh), mesh);
break;
case SOG.Point point:
yield return (_pointConverter.Convert(point), point);
break;
case ICurve curve:
foreach (var result in _curveConverter.Convert(curve))
case SOG.Polycurve polycurve:
foreach (var i in _polycurveConverter.Convert(polycurve))
{
yield return result;
yield return i;
}
break;
case SOG.Polyline polyline:
yield return (_polylineConverter.Convert(polyline), polyline);
break;
case SOG.SubDX subDX:
foreach (var i in _subDXConverter.Convert(subDX))
{
yield return i;
}
break;
case SOG.Region region:
yield return (_regionConverter.Convert(region), region);
break;
default:
throw new ConversionException($"Found unsupported geometry: {displayObject.GetType()}");
@@ -11,24 +11,20 @@ namespace Speckle.Converters.AutocadShared.ToHost.Geometry;
/// Otherwise we convert it as spline (list of ADB.Entity) that switch cases according to each segment type.
/// </summary>
[NameAndRankValue(typeof(SOG.Polycurve), NameAndRankValueAttribute.SPECKLE_DEFAULT_RANK)]
public class PolycurveToHostConverter : IToHostTopLevelConverter, ITypedConverter<SOG.Polycurve, List<(Entity, Base)>>
public class PolycurveToHostConverter
: IToHostTopLevelConverter,
ITypedConverter<SOG.Polycurve, List<(Entity a, Base b)>>
{
private readonly ITypedConverter<SOG.Polycurve, ADB.Polyline> _polylineConverter;
private readonly ITypedConverter<SOG.Line, ADB.Line> _lineConverter;
private readonly ITypedConverter<SOG.Arc, ADB.Arc> _arcConverter;
private readonly ITypedConverter<SOG.Curve, ADB.Curve> _curveConverter;
private readonly ITypedConverter<SOG.Polycurve, List<(Entity, Base)>> _splineConverter;
public PolycurveToHostConverter(
ITypedConverter<SOG.Polycurve, ADB.Polyline> polylineConverter,
ITypedConverter<SOG.Line, ADB.Line> lineConverter,
ITypedConverter<SOG.Arc, ADB.Arc> arcConverter,
ITypedConverter<SOG.Curve, ADB.Curve> curveConverter
ITypedConverter<SOG.Polycurve, List<(Entity, Base)>> splineConverter
)
{
_polylineConverter = polylineConverter;
_lineConverter = lineConverter;
_arcConverter = arcConverter;
_curveConverter = curveConverter;
_splineConverter = splineConverter;
}
public object Convert(Base target) => Convert((SOG.Polycurve)target);
@@ -40,7 +36,7 @@ public class PolycurveToHostConverter : IToHostTopLevelConverter, ITypedConverte
if (convertAsSpline || !isPlanar)
{
return ConvertAsCurveSegments(target);
return _splineConverter.Convert(target);
}
else
{
@@ -94,34 +90,4 @@ public class PolycurveToHostConverter : IToHostTopLevelConverter, ITypedConverte
}
return true;
}
private List<(Entity, Base)> ConvertAsCurveSegments(SOG.Polycurve target)
{
// POC: We can improve this once we have IIndex of raw converters and we can get rid of case converters?
// POC: Should we join entities?
var list = new List<ADB.Entity>();
foreach (var segment in target.segments)
{
switch (segment)
{
case SOG.Arc arc:
list.Add(_arcConverter.Convert(arc));
break;
case SOG.Line line:
list.Add(_lineConverter.Convert(line));
break;
case SOG.Polyline polyline:
list.Add(_polylineConverter.Convert(polyline));
break;
case SOG.Curve curve:
list.Add(_curveConverter.Convert(curve));
break;
default:
break;
}
}
return list.Zip(target.segments, (a, b) => ((ADB.Entity)a, (Base)b)).ToList();
}
}
@@ -1,33 +0,0 @@
using Speckle.Converters.Common;
using Speckle.Converters.Common.Objects;
using Speckle.Sdk.Models;
namespace Speckle.Converters.Autocad.ToHost.Geometry;
[NameAndRankValue(typeof(SOG.Region), NameAndRankValueAttribute.SPECKLE_DEFAULT_RANK)]
public class RegionToHostConverter : IToHostTopLevelConverter, ITypedConverter<SOG.Region, ADB.Entity>
{
private readonly ITypedConverter<SOG.Region, ADB.Region> _regionConverter;
private readonly ITypedConverter<SOG.Region, ADB.Hatch> _hatchConverter;
public RegionToHostConverter(
ITypedConverter<SOG.Region, ADB.Region> regionConverter,
ITypedConverter<SOG.Region, ADB.Hatch> hatchConverter
)
{
_regionConverter = regionConverter;
_hatchConverter = hatchConverter;
}
public object Convert(Base target) => Convert((SOG.Region)target);
public ADB.Entity Convert(SOG.Region target)
{
// Generalizing return type as Entity, because it can be a simple Region, or a Hatch
if (target.hasHatchPattern)
{
return _hatchConverter.Convert(target);
}
return _regionConverter.Convert(target);
}
}
@@ -1,56 +0,0 @@
using Speckle.Converters.Common.Objects;
using Speckle.Objects;
using Speckle.Sdk.Common.Exceptions;
using Speckle.Sdk.Models;
namespace Speckle.Converters.AutocadShared.ToHost.Raw;
public class ICurveToHostRawConverter : ITypedConverter<ICurve, List<(ADB.Entity, Base)>>
{
private readonly ITypedConverter<SOG.Line, ADB.Line> _lineConverter;
private readonly ITypedConverter<SOG.Arc, ADB.Arc> _arcConverter;
private readonly ITypedConverter<SOG.Ellipse, ADB.Ellipse> _ellipseConverter;
private readonly ITypedConverter<SOG.Circle, ADB.Circle> _circleConverter;
private readonly ITypedConverter<SOG.Polyline, ADB.Polyline3d> _polylineConverter;
private readonly ITypedConverter<SOG.Polycurve, List<(ADB.Entity, Base)>> _polycurveConverter;
private readonly ITypedConverter<SOG.Curve, ADB.Curve> _curveConverter;
public ICurveToHostRawConverter(
ITypedConverter<SOG.Line, ADB.Line> lineConverter,
ITypedConverter<SOG.Arc, ADB.Arc> arcConverter,
ITypedConverter<SOG.Ellipse, ADB.Ellipse> ellipseConverter,
ITypedConverter<SOG.Circle, ADB.Circle> circleConverter,
ITypedConverter<SOG.Polyline, ADB.Polyline3d> polylineConverter,
ITypedConverter<SOG.Polycurve, List<(ADB.Entity, Base)>> polycurveConverter,
ITypedConverter<SOG.Curve, ADB.Curve> curveConverter
)
{
_lineConverter = lineConverter;
_arcConverter = arcConverter;
_ellipseConverter = ellipseConverter;
_circleConverter = circleConverter;
_polylineConverter = polylineConverter;
_polycurveConverter = polycurveConverter;
_curveConverter = curveConverter;
}
/// <summary>
/// Converts a given ICurve object to a list of ADB.Curve.
/// </summary>
/// <param name="target">The ICurve object to convert.</param>
/// <returns>The converted list of ADB.Curve.</returns>
/// <exception cref="NotSupportedException">Thrown when the conversion is not supported for the given type of curve.</exception>
/// <remarks>⚠️ This conversion does NOT perform scaling.</remarks>
public List<(ADB.Entity, Base)> Convert(ICurve target) =>
target switch
{
SOG.Line line => new() { (_lineConverter.Convert(line), line) },
SOG.Arc arc => new() { (_arcConverter.Convert(arc), arc) },
SOG.Circle circle => new() { (_circleConverter.Convert(circle), circle) },
SOG.Ellipse ellipse => new() { (_ellipseConverter.Convert(ellipse), ellipse) },
SOG.Polyline polyline => new() { (_polylineConverter.Convert(polyline), polyline) },
SOG.Curve curve => new() { (_curveConverter.Convert(curve), curve) },
SOG.Polycurve polycurve => _polycurveConverter.Convert(polycurve),
_ => throw new ValidationException($"Unable to convert curves of type {target.GetType().Name}")
};
}
@@ -0,0 +1,59 @@
using Autodesk.AutoCAD.DatabaseServices;
using Speckle.Converters.Common.Objects;
using Speckle.Sdk.Models;
namespace Speckle.Converters.AutocadShared.ToHost.Raw;
/// <summary>
/// Polycurve segments might appear in different ICurve types which requires to handle separately for each segment.
/// </summary>
public class PolycurveToHostSplineRawConverter : ITypedConverter<SOG.Polycurve, List<(Entity, Base)>>
{
private readonly ITypedConverter<SOG.Line, ADB.Line> _lineConverter;
private readonly ITypedConverter<SOG.Polyline, ADB.Polyline3d> _polylineConverter;
private readonly ITypedConverter<SOG.Arc, ADB.Arc> _arcConverter;
private readonly ITypedConverter<SOG.Curve, ADB.Curve> _curveConverter;
public PolycurveToHostSplineRawConverter(
ITypedConverter<SOG.Line, ADB.Line> lineConverter,
ITypedConverter<SOG.Polyline, ADB.Polyline3d> polylineConverter,
ITypedConverter<SOG.Arc, ADB.Arc> arcConverter,
ITypedConverter<SOG.Curve, ADB.Curve> curveConverter
)
{
_lineConverter = lineConverter;
_polylineConverter = polylineConverter;
_arcConverter = arcConverter;
_curveConverter = curveConverter;
}
public List<(Entity, Base)> Convert(SOG.Polycurve target)
{
// POC: We can improve this once we have IIndex of raw converters and we can get rid of case converters?
// POC: Should we join entities?
var list = new List<ADB.Entity>();
foreach (var segment in target.segments)
{
switch (segment)
{
case SOG.Arc arc:
list.Add(_arcConverter.Convert(arc));
break;
case SOG.Line line:
list.Add(_lineConverter.Convert(line));
break;
case SOG.Polyline polyline:
list.Add(_polylineConverter.Convert(polyline));
break;
case SOG.Curve curve:
list.Add(_curveConverter.Convert(curve));
break;
default:
break;
}
}
return list.Zip(target.segments, (a, b) => ((ADB.Entity)a, (Base)b)).ToList();
}
}
@@ -1,112 +0,0 @@
using Speckle.Converters.Common;
using Speckle.Converters.Common.Objects;
using Speckle.Objects;
using Speckle.Sdk.Common.Exceptions;
using Speckle.Sdk.Models;
namespace Speckle.Converters.Autocad.ToHost.Raw;
public class RegionHatchToHostRawConverter : ITypedConverter<SOG.Region, ADB.Hatch>
{
private readonly ITypedConverter<ICurve, List<(ADB.Entity, Base)>> _curveConverter;
private readonly IConverterSettingsStore<AutocadConversionSettings> _settingsStore;
public RegionHatchToHostRawConverter(
ITypedConverter<ICurve, List<(ADB.Entity, Base)>> curveConverter,
IConverterSettingsStore<AutocadConversionSettings> settingsStore
)
{
_curveConverter = curveConverter;
_settingsStore = settingsStore;
}
public ADB.Hatch Convert(SOG.Region target)
{
// Access a top-level transaction
ADB.Transaction tr = _settingsStore.Current.Document.TransactionManager.TopTransaction;
var btr = (ADB.BlockTableRecord)
tr.GetObject(_settingsStore.Current.Document.Database.CurrentSpaceId, ADB.OpenMode.ForWrite);
// initialize Hatch, append to blockTableRecord
ADB.Hatch acHatch = new();
btr.AppendEntity(acHatch);
tr.AddNewlyCreatedDBObject(acHatch, true);
// Set essential properties of the hatch object
acHatch.SetDatabaseDefaults();
acHatch.SetHatchPattern(ADB.HatchPatternType.PreDefined, "SOLID");
// Associative property must be set after the hatch object is
// appended to the block table record and before AppendLoop
acHatch.Associative = true;
// convert and assign boundary loop
ConvertAndAssignHatchLoop(btr, tr, acHatch, target.boundary, ADB.HatchLoopTypes.External);
foreach (var loop in target.innerLoops)
{
ConvertAndAssignHatchLoop(btr, tr, acHatch, loop, ADB.HatchLoopTypes.Outermost);
}
return acHatch;
}
private void ConvertAndAssignHatchLoop(
ADB.BlockTableRecord acBlkTblRec,
ADB.Transaction acTrans,
ADB.Hatch hatch,
ICurve curve,
ADB.HatchLoopTypes loopType
)
{
// convert loop, add to ObjectIdCollection
var convertedCurve = _curveConverter.Convert(curve);
CheckForNonPlanarLoops(convertedCurve);
var dbCurve = (ADB.Curve)convertedCurve[0].Item1;
// If Spline, turn into segmented polyline - this is how AutoCAD imports Hatches with Curve boundaries from Rhino
if (dbCurve is ADB.Spline spline)
{
if (spline.NurbsData.Degree == 1)
{
// for simple polylines ".ToPolylineWithPrecision" distorts the shape, so just applying a list of vertices
dbCurve = new ADB.Polyline3d(ADB.Poly3dType.SimplePoly, spline.NurbsData.GetControlPoints(), true);
}
else
{
dbCurve = spline.ToPolylineWithPrecision(10, false, false);
}
}
using ADB.ObjectIdCollection tempDBObjColl = CreateTempObjectIdCollection(acBlkTblRec, acTrans, dbCurve);
// append loop: possible Autodesk.AutoCAD.Runtime.Exception: eInvalidInput
hatch.AppendLoop(loopType, tempDBObjColl);
hatch.EvaluateHatch(true);
dbCurve.Erase();
}
private ADB.ObjectIdCollection CreateTempObjectIdCollection(
ADB.BlockTableRecord acBlkTblRec,
ADB.Transaction acTrans,
ADB.Entity loopEntity
)
{
// Add the new curve object to the block table record and the transaction
acBlkTblRec.AppendEntity(loopEntity);
acTrans.AddNewlyCreatedDBObject(loopEntity, true);
// Adds the entity to an object id array
ADB.ObjectIdCollection tempDBObjColl = new();
tempDBObjColl.Add(loopEntity.ObjectId);
return tempDBObjColl;
}
private void CheckForNonPlanarLoops(List<(ADB.Entity, Base)> convertedResult)
{
if (convertedResult.Count != 1)
{
// this will only be the case if it was a non-planar Polycurve: throw error
throw new ConversionException($"Non-planar Polycurve cannot be used as a Region loop: {convertedResult}");
}
}
}
@@ -1,89 +0,0 @@
using Speckle.Converters.Common.Objects;
using Speckle.Objects;
using Speckle.Sdk.Common.Exceptions;
using Speckle.Sdk.Models;
namespace Speckle.Converters.Autocad.ToHost.Raw;
public class RegionToHostRawConverter : ITypedConverter<SOG.Region, ADB.Region>
{
private readonly ITypedConverter<ICurve, List<(ADB.Entity, Base)>> _curveConverter;
public RegionToHostRawConverter(ITypedConverter<ICurve, List<(ADB.Entity, Base)>> curveConverter)
{
_curveConverter = curveConverter;
}
public ADB.Region Convert(SOG.Region target)
{
// Notes from docs: The curveSegments must contain only Line, Arc, Ellipse, Circle, Spline, Polyline3d, or Polyline2d objects.
// The objects in curveSegments must be opened for read and not for write. If the objects are opened, calling this function will crash AutoCAD.
// Converted boundary
List<(ADB.Entity, Base)> convertedBoundary = _curveConverter.Convert(target.boundary);
ADB.Curve nativeBoundary = ValidateCurve(convertedBoundary);
// Converted loops
var nativeLoops = new List<ADB.Curve>();
foreach (var loop in target.innerLoops)
{
List<(ADB.Entity, Base)> convertedLoop = _curveConverter.Convert(loop);
nativeLoops.Add(ValidateCurve(convertedLoop));
}
// Add boundary to the ADB.DBObjectCollection
// Calculate the outer region, method should return an array with 1 region
// https://help.autodesk.com/view/OARX/2025/ENU/?guid=GUID-684E602E-3555-4370-BCDC-1CE594676C43
ADB.DBObjectCollection boundaryDBObjColl = new();
boundaryDBObjColl.Add(nativeBoundary);
using (ADB.DBObjectCollection outerRegionColl = ADB.Region.CreateFromCurves(boundaryDBObjColl))
{
if (outerRegionColl.Count != 1)
{
throw new ConversionException(
$"Region conversion failed for {target}: unexpected number of shapes generated ({outerRegionColl.Count}). Make sure that input loops are planar, closed, non self-intersecting curves."
);
}
if (outerRegionColl[0] is ADB.Region adbRegion)
{
// Create and subtract the inner loops' regions, iterate through each
foreach (var nativeLoop in nativeLoops)
{
// Same as above: Add loop segments to the ADB.DBObjectCollection
// Calculate the inner region, method should return an array with 1 region
ADB.DBObjectCollection loopDBObjColl = new();
loopDBObjColl.Add(nativeLoop);
using (ADB.DBObjectCollection innerRegionColl = ADB.Region.CreateFromCurves(loopDBObjColl))
{
if (innerRegionColl.Count != 1)
{
throw new ConversionException(
$"Region conversion failed for {target}: unexpected number of shapes generated ({innerRegionColl.Count}). Make sure that input loops are planar, closed, non self-intersecting curves."
);
}
if (innerRegionColl[0] is ADB.Region adbInnerRegion)
{
// substract region from Boundary region
adbRegion.BooleanOperation(ADB.BooleanOperationType.BoolSubtract, adbInnerRegion);
adbInnerRegion.Dispose();
}
}
}
return adbRegion;
}
}
throw new ConversionException($"Region conversion failed: {target}");
}
private ADB.Curve ValidateCurve(List<(ADB.Entity, Base)> convertedResult)
{
if (convertedResult.Count != 1)
{
// this will only be the case if it was a non-planar Polycurve: throw error
throw new ConversionException($"Non-planar Polycurve cannot be used as a Region loop: {convertedResult}");
}
return (ADB.Curve)convertedResult[0].Item1;
}
}
@@ -1,119 +0,0 @@
using Speckle.Converters.Common;
using Speckle.Converters.Common.Objects;
using Speckle.Sdk.Common.Exceptions;
using Speckle.Sdk.Models;
namespace Speckle.Converters.Autocad.Geometry;
[NameAndRankValue(typeof(ADB.Hatch), NameAndRankValueAttribute.SPECKLE_DEFAULT_RANK)]
public class HatchToSpeckleConverter : IToSpeckleTopLevelConverter, ITypedConverter<ADB.Hatch, SOG.Region>
{
private readonly ITypedConverter<ADB.Region, SOG.Region> _regionConverter;
public HatchToSpeckleConverter(ITypedConverter<ADB.Region, SOG.Region> regionConverter)
{
_regionConverter = regionConverter;
}
public Base Convert(object target) => Convert((ADB.Hatch)target);
public SOG.Region Convert(ADB.Hatch target)
{
ADB.Region? regionToConvert = null;
for (int i = 0; i < target.NumberOfLoops; i++)
{
// Create 3d polyline from the HatchLoop
ADB.HatchLoop loop = target.GetLoopAt(i);
ADB.Curve polyline = PolylineFromLoop(loop);
ADB.DBObjectCollection objCollection = new();
objCollection.Add(polyline);
// Convert polyline into an individual Region
using (ADB.DBObjectCollection regionCollection = ADB.Region.CreateFromCurves(objCollection))
{
if (regionCollection.Count != 1)
{
throw new ConversionException(
$"Hatch conversion failed {target}: unexpected number of regions generated from 1 hatch loop"
);
}
ADB.Region loopRegion = (ADB.Region)regionCollection[0];
// Assign first loop as the main Region, other Regions will be subtracted from it
if (i == 0)
{
regionToConvert = loopRegion;
}
else
{
if (regionToConvert == null)
{
throw new ConversionException($"Hatch conversion failed: {target}");
}
// subtract region from Boundary region
double areaBefore = regionToConvert.Area;
regionToConvert.BooleanOperation(ADB.BooleanOperationType.BoolSubtract, loopRegion);
// check if the region did not change after subtraction: means the loop was a separate hatch part
if (Math.Abs(areaBefore - regionToConvert.Area) < 0.00001)
{
throw new ConversionException($"Composite hatches are not supported: {target}");
}
}
}
}
if (regionToConvert == null)
{
throw new ConversionException($"Hatch conversion failed: {target}");
}
// convert and store Regions
SOG.Region convertedRegion = _regionConverter.Convert(regionToConvert);
convertedRegion.hasHatchPattern = true;
return convertedRegion;
}
private ADB.Curve PolylineFromLoop(ADB.HatchLoop loop)
{
if (loop.IsPolyline)
{
// disposable object, wrapping into "using"
using (AG.Point3dCollection vertices = new())
{
// collect vertices and construct a polyline simultaneously, it will be clear what to use after iterating
ADB.Polyline polyline = new() { Closed = true };
int count = 0;
foreach (ADB.BulgeVertex bVertex in loop.Polyline)
{
// don't add the end point that's the same as the start point
AG.Point3d newPt = new(bVertex.Vertex.X, bVertex.Vertex.Y, 0);
if (count == 0 || vertices[0].DistanceTo(newPt) > 0.00001)
{
vertices.Add(newPt);
polyline.AddVertexAt(count, bVertex.Vertex, bVertex.Bulge, 0, 0);
count++;
}
}
// if only 2 points, that's a circle
if (vertices.Count == 2)
{
AG.Point3d centerPt =
new(
vertices[0].X + (vertices[1].X - vertices[0].X) / 2,
vertices[0].Y + (vertices[1].Y - vertices[0].Y) / 2,
0
);
return new ADB.Circle(centerPt, AG.Vector3d.ZAxis, vertices[0].DistanceTo(vertices[1]) / 2);
}
return polyline;
}
}
throw new ConversionException("Hatch loop conversion failed.");
}
}

Some files were not shown because too many files have changed in this diff Show More