Skip to content
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

Jedd/cxpla 55 add required keyword for more geometry types #220

Merged

Conversation

JR-Morgan
Copy link
Member

@JR-Morgan JR-Morgan commented Sep 5, 2024

Connectors updates for specklesystems/speckle-sharp-sdk#101 changes

Changes several conversion functions to comply with using respecting the required keyword.
importantly, I've made it so we are now setting units on several Revit and ArcGIS (still todo) conversions where previously we were defaulting to Meters erroneously.

Copy link

linear bot commented Sep 5, 2024

@JR-Morgan JR-Morgan requested review from AlanRynne and removed request for KatKatKateryna September 10, 2024 12:25
* fix arcgis units

* usings

* correct units

---------

Co-authored-by: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com>
@JR-Morgan JR-Morgan marked this pull request as ready for review September 10, 2024 15:15
@JR-Morgan
Copy link
Member Author

JR-Morgan commented Sep 10, 2024

ready for review, but until specklesystems/speckle-sharp-sdk#101 is made this can't be merged

Copy link
Member

@AlanRynne AlanRynne left a comment

Choose a reason for hiding this comment

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

Just 2 super minor things! 🙌🏼

@@ -26,7 +26,8 @@ public IReadOnlyList<Base> Convert(ACG.Multipatch target)
{
List<Base> converted = new();
// placeholder, needs to be declared in order to be used in the Ring patch type
SGIS.PolygonGeometry3d polygonGeom = new() { };
SGIS.PolygonGeometry3d polygonGeom =
new() { units = _contextStack.Current.Document.ActiveCRSoffsetRotation.SpeckleUnitString };
Copy link
Member

Choose a reason for hiding this comment

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

Is this SpeckleUnitString computed for every call?

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like it's being set once, calculated from ACG.SpatialReference, this Document is our own ArcGISDocument class (I presume because we need reference to both the Arcgis Project, Map and CRSoffsetRotation

This will need some cleanup with the record context changes that you and @adamhathcock have worked on. For now I'm tempted to leave as is.

Copy link

codecov bot commented Sep 13, 2024

Codecov Report

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

Project coverage is 7.32%. Comparing base (466ac5e) to head (f2d5aee).
Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
...red/ToHost/Raw/Geometry/PolylineConverterToHost.cs 0.00% 18 Missing ⚠️
...tShared/ToSpeckle/Raw/ColumnConversionToSpeckle.cs 0.00% 11 Missing ⚠️
...opLevel/ExtrusionRoofToSpeckleTopLevelConverter.cs 0.00% 10 Missing ⚠️
...peckle/Raw/Geometry/MeshListConversionToSpeckle.cs 0.00% 7 Missing ⚠️
...peckle/TopLevel/FloorTopLevelConverterToSpeckle.cs 0.00% 6 Missing ⚠️
...hinoShared/ToSpeckle/Raw/MeshToSpeckleConverter.cs 0.00% 6 Missing ⚠️
...ToSpeckle/Raw/Geometry/VectorToSpeckleConverter.cs 0.00% 5 Missing ⚠️
...hinoShared/ToSpeckle/Raw/LineToSpeckleConverter.cs 0.00% 4 Missing ⚠️
...e/TopLevel/TopographyTopLevelConverterToSpeckle.cs 0.00% 2 Missing ⚠️
...nnectors.Utils/Instances/InstanceObjectsManager.cs 0.00% 2 Missing ⚠️
... and 1 more
Additional details and impacted files
@@           Coverage Diff            @@
##             dev    #220      +/-   ##
========================================
- Coverage   7.40%   7.32%   -0.08%     
========================================
  Files        242     242              
  Lines       4661    4708      +47     
  Branches     548     548              
========================================
  Hits         345     345              
- Misses      4301    4348      +47     
  Partials      15      15              

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

@JR-Morgan JR-Morgan enabled auto-merge (squash) September 13, 2024 15:14
@JR-Morgan JR-Morgan merged commit eb8f8de into dev Sep 16, 2024
5 checks passed
@JR-Morgan JR-Morgan deleted the jedd/cxpla-55-add-required-keyword-for-more-geometry-types branch September 16, 2024 09:09
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