Skip to content

Conversation

clairekuang
Copy link
Member

@clairekuang clairekuang commented Aug 21, 2024

Adds material quantities to all revit objects. Smaple commit: https://app.speckle.systems/projects/93200a735d/models/1b29238359@ae1b38c9aa

This is done by mirroring behavior in V2, by:

  • converting material quantities per element
  • converting and caching material per material quantity

Also fixes a bug from display value extractor for lighting fixtures that was preventing commits from being sent.

However, for post-september release we should seriously consider sending MaterialProxies instead of attached the material to every material quantity. Need to validate how this affect data workflows in powerbi, viewer, and excel.

Copy link

linear bot commented Aug 21, 2024

Copy link

codecov bot commented Aug 21, 2024

Codecov Report

Attention: Patch coverage is 0% with 104 lines in your changes missing coverage. Please review.

Project coverage is 8.28%. Comparing base (ace7bdf) to head (1a07440).
Report is 1 commits behind head on dev.

Files Patch % Lines
...hared/ToSpeckle/Raw/MaterialConversionToSpeckle.cs 0.00% 45 Missing ⚠️
...hared/ToSpeckle/Raw/MaterialQuantitiesToSpeckle.cs 0.00% 42 Missing ⚠️
...verters.RevitShared/RevitRootToSpeckleConverter.cs 0.00% 9 Missing ⚠️
.../Raw/Geometry/MeshByMaterialDictionaryToSpeckle.cs 0.00% 6 Missing ⚠️
...RevitShared/Helpers/RevitMaterialCacheSingleton.cs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             dev    #184      +/-   ##
========================================
- Coverage   8.44%   8.28%   -0.16%     
========================================
  Files        238     239       +1     
  Lines       4597    4685      +88     
  Branches     516     534      +18     
========================================
  Hits         388     388              
- Misses      4192    4280      +88     
  Partials      17      17              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

clairekuang and others added 8 commits August 23, 2024 17:37
* combines material and render material conversion and removes bad logic

* simplifies caching logic

* minor notes
we can bring 'em back if we validate the need for them.
…objects-regardless' of https://github.com/specklesystems/speckle-sharp-connectors into claire/cnx-188-extract-material-quantities-out-for-all-objects-regardless
didimitrie
didimitrie previously approved these changes Aug 26, 2024
_materialCacheSingleton = materialCacheSingleton;
}

public RevitMaterial Convert(DB.Material target)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I somehow feel we need to cleanup a bit what's happening - the trigger is we're shuffling in visual display stuff

@didimitrie didimitrie enabled auto-merge (squash) August 26, 2024 15:57
Copy link
Member

@oguzhankoral oguzhankoral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minors

Comment on lines 69 to 70
private readonly RevitMaterialCacheSingleton _materialCacheSingleton;
private readonly DisplayValueExtractor _displayValueExtractor;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like these dudes shouldn't be injected at all

Comment on lines 23 to 27
/// <summary>
///
/// </summary>
/// <param name="target"></param>
/// <returns></returns>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice doc
jokes aside, it might be good to explain why it is list of dict as key string as value object?

@didimitrie didimitrie merged commit 14a429f into dev Aug 26, 2024
4 checks passed
@didimitrie didimitrie deleted the claire/cnx-188-extract-material-quantities-out-for-all-objects-regardless branch August 26, 2024 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants