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

fix(civil): adds top level cogopoint converter #476

Merged
merged 4 commits into from
Jan 10, 2025

Conversation

clairekuang
Copy link
Member

@clairekuang clairekuang commented Jan 8, 2025

Cogopoints were not properly supported because the full type name of the class is Autodesk.**Civil**.DatabaseServices.CogoPoint, but the inheritance is Autodesk.**Autocad**.DatabaseServices.Entity.
This means that the top level civil converter is not registering a converter correctly, since cogopoints inherit from autocad entities not civil entities and we have no top level entity converter in autocad.

This pr fixes the issue by introducing a top level CogoPoint converter in civil and converting it as a DataObject just like all other civil objects. Includes the point name, number, and northing props.

sample model: https://latest.speckle.systems/projects/2295cb26a0/models/46f44d5e4e

note @adamhathcock is making a fix for this on the sdk side to register converters based on the full type name. This was previously resulting in wrong exceptions, eg in this case the Civil Entity converter was successfully registered even though it shouldn't have been, because the inherited base type name (Entity) exists in both civil and autocad namespaces

Copy link

linear bot commented Jan 8, 2025

Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 9.17%. Comparing base (94104c2) to head (2d0a2f0).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@          Coverage Diff          @@
##             dev    #476   +/-   ##
=====================================
  Coverage   9.17%   9.17%           
=====================================
  Files        228     228           
  Lines       4295    4295           
  Branches     542     542           
=====================================
  Hits         394     394           
  Misses      3885    3885           
  Partials      16      16           

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

@adamhathcock
Copy link
Member

Related: #475

@adamhathcock adamhathcock enabled auto-merge (squash) January 10, 2025 14:16
@adamhathcock adamhathcock merged commit 1d910bf into dev Jan 10, 2025
3 checks passed
@adamhathcock adamhathcock deleted the claire/cnx-988-cogo-points-not-converted branch January 10, 2025 14:22
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.

2 participants