RevitLookup icon indicating copy to clipboard operation
RevitLookup copied to clipboard

Geometry visualization

Open Nice3point opened this issue 1 year ago • 5 comments

Summary of the Pull Request

What is this about:

Geometry visualization engine. Is under development

Description:

Completed:

  • Mesh изображение

  • Face изображение

  • XYZ (disabled for normal vectors) изображение

TODO:

  • Solid
  • Bounding box
  • Edge

Quality Checklist

  • [x] My code follows the style guidelines of this project
  • [ ] I have performed a self-review of my own code
  • [ ] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings

Nice3point avatar May 23 '24 23:05 Nice3point

Qodana for .NET

22 new problems were found

Inspection name Severity Problems
Invert 'if' statement to reduce nesting ◽️ Notice 6
Convert 'if' statement into 'switch' ◽️ Notice 5
Part of foreach loop can be converted into LINQ-expression but another 'GetEnumerator' method will be used ◽️ Notice 4
Member can be made static (shared) (private accessibility) ◽️ Notice 4
'if-return' statement can be rewritten as 'return' statement ◽️ Notice 2
Convert local variable or field into constant (private accessibility) ◽️ Notice 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked ☁️ View the detailed Qodana report

Detected 200 dependencies

Third-party software list

This page lists the third-party software dependencies used in RevitLookup

Dependency Version Licenses
Azure.Core 1.36.0 MIT
Azure.Identity 1.10.4 MIT
Azure.Security.KeyVault.Certificates 4.5.1 MIT
Azure.Security.KeyVault.Keys 4.5.0 MIT
Azure.Security.KeyVault.Secrets 4.5.0 MIT
BenchmarkDotNet.Annotations 0.13.12 MIT
BenchmarkDotNet 0.13.12 MIT
Bogus 34.0.2 MIT
CommandLineParser 2.9.1 MIT
CommunityToolkit.Mvvm 8.2.2 MIT
Gee.External.Capstone 2.3.0 MIT
Glob 1.1.9 MIT
Iced 1.17.0 MIT
JetBrains.Annotations 2023.3.0 MIT
Microsoft.ApplicationInsights 2.21.0 MIT
Microsoft.Bcl.AsyncInterfaces 1.1.0 MIT
Microsoft.Bcl.AsyncInterfaces 1.1.1 MIT
Microsoft.Bcl.AsyncInterfaces 8.0.0 MIT
Microsoft.Build.Framework 17.8.3 MIT
Microsoft.Build.Locator 1.6.10 MIT
Microsoft.Build.Tasks.Core 17.8.3 MIT
Microsoft.Build.Utilities.Core 17.8.3 MIT
Microsoft.Build 17.8.3 MIT
Microsoft.CodeAnalysis.Analyzers 3.3.3 MIT
Microsoft.CodeAnalysis.CSharp 4.1.0 MIT
Microsoft.CodeAnalysis.Common 4.1.0 MIT
Microsoft.Diagnostics.NETCore.Client 0.2.251802 MIT
Microsoft.Diagnostics.Runtime 2.2.332302 MS-NET-LIBRARY
Microsoft.Diagnostics.Tracing.TraceEvent 3.0.2 MIT
Microsoft.DotNet.PlatformAbstractions 3.1.6 MIT
Microsoft.Extensions.Configuration.Abstractions 2.1.1 Apache-2.0
Microsoft.Extensions.Configuration.Abstractions 8.0.0 MIT
Microsoft.Extensions.Configuration.Binder 2.1.1 Apache-2.0
Microsoft.Extensions.Configuration.Binder 8.0.0 MIT
Microsoft.Extensions.Configuration.CommandLine 8.0.0 MIT
Microsoft.Extensions.Configuration.EnvironmentVariables 8.0.0 MIT
Microsoft.Extensions.Configuration.FileExtensions 8.0.0 MIT
Microsoft.Extensions.Configuration.Json 8.0.0 MIT
Microsoft.Extensions.Configuration.UserSecrets 8.0.0 MIT
Microsoft.Extensions.Configuration 2.1.1 Apache-2.0
Microsoft.Extensions.Configuration 8.0.0 MIT
Microsoft.Extensions.DependencyInjection.Abstractions 2.1.1 Apache-2.0
Microsoft.Extensions.DependencyInjection.Abstractions 8.0.0 MIT
Microsoft.Extensions.DependencyInjection 8.0.0 MIT
Microsoft.Extensions.DependencyModel 8.0.0 MIT
Microsoft.Extensions.Diagnostics.Abstractions 8.0.0 MIT
Microsoft.Extensions.Diagnostics 8.0.0 MIT
Microsoft.Extensions.FileProviders.Abstractions 8.0.0 MIT
Microsoft.Extensions.FileProviders.Physical 8.0.0 MIT
Microsoft.Extensions.FileSystemGlobbing 8.0.0 MIT
Microsoft.Extensions.Hosting.Abstractions 8.0.0 MIT
Microsoft.Extensions.Hosting 8.0.0 MIT
Microsoft.Extensions.Logging.Abstractions 2.1.1 Apache-2.0
Microsoft.Extensions.Logging.Abstractions 8.0.0 MIT
Microsoft.Extensions.Logging.Configuration 8.0.0 MIT
Microsoft.Extensions.Logging.Console 8.0.0 MIT
Microsoft.Extensions.Logging.Debug 8.0.0 MIT
Microsoft.Extensions.Logging.EventLog 8.0.0 MIT
Microsoft.Extensions.Logging.EventSource 8.0.0 MIT
Microsoft.Extensions.Logging 2.1.1 Apache-2.0
Microsoft.Extensions.Logging 8.0.0 MIT
Microsoft.Extensions.Options.ConfigurationExtensions 8.0.0 MIT
Microsoft.Extensions.Options 2.1.1 Apache-2.0
Microsoft.Extensions.Options 8.0.0 MIT
Microsoft.Extensions.Primitives 2.1.1 Apache-2.0
Microsoft.Extensions.Primitives 8.0.0 MIT
Microsoft.Identity.Client.Extensions.Msal 4.56.0 MIT
Microsoft.Identity.Client 4.56.0 MIT
Microsoft.IdentityModel.Abstractions 6.22.0 MIT
Microsoft.NET.StringTools 17.8.3 MIT
Microsoft.NETCore.Platforms 5.0.0 MIT
Microsoft.NETCore.Targets 1.1.0 MS-NET-LIBRARY-2019-06
Microsoft.Win32.Registry 5.0.0 MIT
Microsoft.Win32.SystemEvents 7.0.0 MIT
Newtonsoft.Json 13.0.3 MIT
Nice3point.Revit.Api.AdWindows 2021.1.50 MIT
Nice3point.Revit.Api.RevitAPI 2021.1.50 MIT
Nice3point.Revit.Api.RevitAPIUI 2021.1.50 MIT
Nice3point.Revit.Api.UIFramework 2021.1.50 MIT
Nice3point.Revit.Api.UIFrameworkServices 2021.1.50 MIT
Nice3point.Revit.Build.Tasks 2.0.0 MIT
Nice3point.Revit.Extensions 2021.3.0 MIT
Nice3point.Revit.Toolkit 2021.2.0 MIT
NuGet.Common 6.7.0 Apache-2.0
NuGet.Configuration 6.7.0 Apache-2.0
NuGet.Frameworks 6.7.0 Apache-2.0
NuGet.Packaging 6.7.0 Apache-2.0
NuGet.Versioning 6.7.0 Apache-2.0
Nuke.Build.Shared 8.0.0 MIT
Nuke.Build 8.0.0 MIT
Nuke.Common 8.0.0 MIT
Nuke.ProjectModel 8.0.0 MIT
Nuke.SolutionModel 8.0.0 MIT
Nuke.Tooling 8.0.0 MIT
Nuke.Utilities.IO.Compression 8.0.0 MIT
Nuke.Utilities.IO.Globbing 8.0.0 MIT
Nuke.Utilities.Net 8.0.0 MIT
Nuke.Utilities.Text.Json 8.0.0 MIT
Nuke.Utilities.Text.Yaml 8.0.0 MIT
Nuke.Utilities 8.0.0 MIT
Octokit 9.0.0 MIT
Perfolizer 0.2.1 MIT
Serilog.Extensions.Hosting 8.0.0 Apache-2.0
Serilog.Extensions.Logging 8.0.0 Apache-2.0
Serilog.Formatting.Compact.Reader 3.0.0 Apache-2.0
Serilog.Formatting.Compact 2.0.0 Apache-2.0
Serilog.Sinks.Autodesk.Revit 2.0.0 MIT
Serilog.Sinks.Console 5.0.0 Apache-2.0
Serilog.Sinks.Console 5.0.1 Apache-2.0
Serilog.Sinks.Debug 2.0.0 Apache-2.0
Serilog.Sinks.File 5.0.0 Apache-2.0
Serilog 3.1.1 Apache-2.0
SharpZipLib 1.4.2 MIT
System.Buffers 4.5.1 MIT
System.CodeDom 7.0.0 MIT
System.Collections.Concurrent 4.3.0 MS-NET-LIBRARY-2019-06
System.Collections.Immutable 5.0.0 MIT
System.Collections.Immutable 7.0.0 MIT
System.Collections 4.3.0 MS-NET-LIBRARY-2019-06
System.ComponentModel.Annotations 5.0.0 MIT
System.Configuration.ConfigurationManager 7.0.0 MIT
System.Diagnostics.Debug 4.3.0 MS-NET-LIBRARY-2019-06
System.Diagnostics.DiagnosticSource 6.0.1 MIT
System.Diagnostics.DiagnosticSource 8.0.0 MIT
System.Diagnostics.EventLog 7.0.0 MIT
System.Diagnostics.Tracing 4.3.0 MS-NET-LIBRARY-2019-06
System.Drawing.Common 7.0.0 MIT
System.Formats.Asn1 7.0.0 MIT
System.Globalization.Calendars 4.3.0 MS-NET-LIBRARY-2019-06
System.Globalization.Extensions 4.3.0 MS-NET-LIBRARY-2019-06
System.Globalization 4.3.0 MS-NET-LIBRARY-2019-06
System.IO.FileSystem.AccessControl 5.0.0 MIT
System.IO.FileSystem.Primitives 4.3.0 MS-NET-LIBRARY-2019-06
System.IO.FileSystem 4.3.0 MS-NET-LIBRARY-2019-06
System.IO 4.3.0 MS-NET-LIBRARY-2019-06
System.Linq 4.3.0 MS-NET-LIBRARY-2019-06
System.Management 5.0.0 MIT
System.Memory.Data 1.0.2 MIT
System.Memory 4.5.4 MIT
System.Memory 4.5.5 MIT
System.Net.Http 4.3.4 MS-NET-LIBRARY-2019-06
System.Net.Primitives 4.3.0 MS-NET-LIBRARY-2019-06
System.Numerics.Vectors 4.5.0 MIT
System.Reflection.Emit.Lightweight 4.7.0 MIT
System.Reflection.Emit 4.7.0 MIT
System.Reflection.Metadata 5.0.0 MIT
System.Reflection.Metadata 7.0.0 MIT
System.Reflection.MetadataLoadContext 7.0.0 MIT
System.Reflection.Primitives 4.3.0 MS-NET-LIBRARY-2019-06
System.Reflection 4.3.0 MS-NET-LIBRARY-2019-06
System.Resources.Extensions 7.0.0 MIT
System.Resources.ResourceManager 4.3.0 MS-NET-LIBRARY-2019-06
System.Runtime.CompilerServices.Unsafe 5.0.0 MIT
System.Runtime.CompilerServices.Unsafe 6.0.0 MIT
System.Runtime.Extensions 4.3.0 MS-NET-LIBRARY-2019-06
System.Runtime.Handles 4.3.0 MS-NET-LIBRARY-2019-06
System.Runtime.InteropServices.RuntimeInformation 4.0.0 MS-NET-LIBRARY-2019-06
System.Runtime.InteropServices 4.3.0 MS-NET-LIBRARY-2019-06
System.Runtime.Numerics 4.3.0 MS-NET-LIBRARY-2019-06
System.Runtime 4.3.0 MS-NET-LIBRARY-2019-06
System.Security.AccessControl 5.0.0 MIT
System.Security.Cryptography.Algorithms 4.3.0 MS-NET-LIBRARY-2019-06
System.Security.Cryptography.Cng 4.3.0 MS-NET-LIBRARY-2019-06
System.Security.Cryptography.Csp 4.3.0 MS-NET-LIBRARY-2019-06
System.Security.Cryptography.Encoding 4.3.0 MS-NET-LIBRARY-2019-06
System.Security.Cryptography.OpenSsl 4.3.0 MS-NET-LIBRARY-2019-06
System.Security.Cryptography.Pkcs 7.0.2 MIT
System.Security.Cryptography.Primitives 4.3.0 MS-NET-LIBRARY-2019-06
System.Security.Cryptography.ProtectedData 7.0.0 MIT
System.Security.Cryptography.X509Certificates 4.3.0 MS-NET-LIBRARY-2019-06
System.Security.Cryptography.Xml 7.0.1 MIT
System.Security.Permissions 7.0.0 MIT
System.Security.Principal.Windows 5.0.0 MIT
System.Text.Encoding.CodePages 4.5.1 MIT
System.Text.Encoding 4.3.0 MS-NET-LIBRARY-2019-06
System.Text.Encodings.Web 8.0.0 MIT
System.Text.Json 8.0.0 MIT
System.Threading.Tasks.Dataflow 7.0.0 MIT
System.Threading.Tasks.Extensions 4.5.4 MIT
System.Threading.Tasks 4.3.0 MS-NET-LIBRARY-2019-06
System.Threading 4.3.0 MS-NET-LIBRARY-2019-06
System.ValueTuple 4.5.0 MIT
System.Windows.Extensions 7.0.0 MIT
WixSharp.bin 1.25.3 MIT
YamlDotNet 13.7.1 MIT
runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.native.System.Net.Http 4.3.0 MS-NET-LIBRARY-2019-06
runtime.native.System.Security.Cryptography.Apple 4.3.0 MS-NET-LIBRARY-2019-06
runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.native.System 4.3.0 MS-NET-LIBRARY-2019-06
runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple 4.3.0 MS-NET-LIBRARY-2019-06
runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
Contact Qodana team

Contact us at [email protected]

  • Or via our issue tracker: https://jb.gg/qodana-issue
  • Or share your feedback: https://jb.gg/qodana-discussions

github-actions[bot] avatar May 23 '24 23:05 github-actions[bot]

wow! brilliant!

jeremytammik avatar May 24 '24 06:05 jeremytammik

by the way, for 2D geometry like room boundaries etc., are you aware of my GeoSnoop utility? https://thebuildingcoder.typepad.com/blog/2014/04/determining-the-size-and-location-of-viewports-on-a-sheet.html

jeremytammik avatar May 24 '24 06:05 jeremytammik

@jeremytammik thanks Jeremy for sharing the link, yes I have heard of it and seen it in some articles. In the current implementation I am using DirectContext3D to render 3d geometry, this will give a lot of possibilities to create independent geometry with many customisations

Nice3point avatar May 24 '24 08:05 Nice3point

wow, yes, absolutely, that will be ever so much more powerful.

jeremytammik avatar May 24 '24 09:05 jeremytammik

The geometry rendering looks finished. It remains to write documentation and brush up all little details. Release is planned for next week

Nice3point avatar May 27 '24 23:05 Nice3point

If you have any suggestions or comments on what you see in the screenshots in the PR, write it here

Nice3point avatar May 27 '24 23:05 Nice3point

In the XYZ visualisation, is there a way to distinguish between X, Y and Z axes?

jeremytammik avatar May 28 '24 06:05 jeremytammik

is thjere a way to control the length of the little vectors showing mesh triangle orientation? in the mesh, can one see the orientation of each triangle, i.e., the order of its three vertices (clockwise, anticlockwise)?

jeremytammik avatar May 28 '24 06:05 jeremytammik

this is brilliant work. it wil have a very significant positive impact on the usefulness of RevitLookup! thank you!

jeremytammik avatar May 28 '24 06:05 jeremytammik

In the XYZ visualisation, is there a way to distinguish between X, Y and Z axes?

The only difference now is that they always point in the directions XYZ.BasisX, XYZ.BasisY, XYZ.BasisZ. DirectContext3D doesn't allow us to add text, any other ideas how we can highlight them?

is thjere a way to control the length of the little vectors showing mesh triangle orientation? in the mesh, can one see the orientation of each triangle, i.e., the order of its three vertices (clockwise, anticlockwise)?

Interesting, might think about it, do you suppose it would be useful?

Nice3point avatar May 28 '24 07:05 Nice3point

any other ideas how we can highlight them?

some coordinate system visualisations use three colours, e.g., RGB.

do you suppose it would be useful?

only as little. when there are very many close together and they overlap a lot. low priority, though, IMHO.

jeremytammik avatar May 28 '24 07:05 jeremytammik

Great suggestion about the colour. Clockwise, anticlockwise direction we can just finalise in the next releases

Nice3point avatar May 28 '24 07:05 Nice3point

Added documentation, Wiki section will be updated after release.

@jeremytammik If you notice typos, please write if you have time of course

Nice3point avatar Jun 01 '24 18:06 Nice3point

I belive that visulize by RGB is good idea, I did similar idea to visulize coordinate system before by color 👍 CoordinateSystem Display

chuongmep avatar Jun 02 '24 05:06 chuongmep

the description and images in your comment look good and clear, clearly explaining the purpose and us. i edited the first sentence, adding analysis and understanding of the BIM, and added 'aligned to cardinal axes' for bounding boxes. in XYZ visualization, i wonder whether one should add a note of Transform and or coordinate system. would they apply to the XYZ visualisation as well?

jeremytammik avatar Jun 02 '24 13:06 jeremytammik

exactly, it is necessary to specify that we apply Transform to all BoundingBoxes. About XYZ, they are displayed as they are, according to their value. but visualisation of normal points with length 1 is disabled

Nice3point avatar Jun 02 '24 18:06 Nice3point

blog post is now live: https://thebuildingcoder.typepad.com/blog/2024/06/revitlookup-geometry-visualisation.html

jeremytammik avatar Jun 13 '24 10:06 jeremytammik

Awesome, that looks juicy 🎉

Nice3point avatar Jun 13 '24 11:06 Nice3point