-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(revit): add density to material quantities #558
feat(revit): add density to material quantities #558
Conversation
…al-properties-to-materials
…dd-structural-and-thermal-properties-to-materials
…al-properties-to-materials
- scaling internal units can't be so complicated? - to discuss :(
- Simplification to just extract density from structural asset (if present) - Just one property extraction => no need to create material proxy - Scaled from internal units to match scaling to model units which occurs on other material quantities
…dd-structural-and-thermal-properties-to-materials
…dd-structural-and-thermal-properties-to-materials
…dd-structural-and-thermal-properties-to-materials
…dd-structural-and-thermal-properties-to-materials
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #558 +/- ##
==========================================
- Coverage 18.79% 18.58% -0.22%
==========================================
Files 240 241 +1
Lines 4883 4939 +56
Branches 579 586 +7
==========================================
Hits 918 918
- Misses 3934 3990 +56
Partials 31 31 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, including a nice fix for the units for Area and Volume.
From my limited knowledge of Revit materials the next comment might not make sence so correct me if I'm wrong:
Would it make sense to check "if (_converterSettings.Current.Document.GetElement(matId) is DB.Material material)" even before assigning Area and Volume? It seems for that step ".GetElement(matId)" is already expected to be a Material
…al-properties-to-materials
That's a good question. This was taken over from earlier definition. From what I know, the |
Description
User Value
Material Quantities can be used to calculate object mass; however, in order to compute mass, users need to have
density
made available to them.Changes:
StructuralMaterialAssetExtractor.cs
to handle extraction ofdensity
fromStructuralAsset
area
andvolume
are scaled from internal units to model units, the same is done fordensity
to avoid confusiondensity
perStructuralAsset
cached locally in theMaterialQuantitiesToSpeckle.cs
density
ONLY, no need to createMaterialProxy
as initially thought. Should the extracted parameters grow, this must be re-evaluated / refactored!density
will simply not be appended to the object. This isn't seen as a failure case.Screenshots:
Before:
After:
Validation of changes:
Tested on various structural and architectural models for Revit versions 2022-2024:
Checklist: