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

DUI3-326: Add civil3d 2024 converter #3548

Merged
merged 13 commits into from
Jul 4, 2024

Conversation

clairekuang
Copy link
Member

@clairekuang clairekuang commented Jul 1, 2024

Adds the Civil3d 2024 converter.

This pr includes required changes to container registration in order to support converter injection into a connector vertical.
These changes should be reflected in the other DUI3 converter DI projects before this pr is merged.

First pipe sent to speckle from Civil3d: https://app.speckle.systems/projects/b53a53697a/models/719612f9da

Description & motivation

Changes:

  • sdk container registration
  • missing autocad conversions
  • civil3d 2024 converter

To-do before merge:

  • Fix container registration for all other DUI3 converter DI projects

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.

Only reason requesting change on static class, but not sure it was a hack for multiple converter registration?
Q: why we removed ITypedConversions and extracted them? In order to use them on Civil3D too?


namespace Speckle.Connectors.Autocad.DependencyInjection;

public static class SharedRegistration
Copy link
Member

Choose a reason for hiding this comment

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

Why this class need to be static?

Copy link
Member

Choose a reason for hiding this comment

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

registration is usually static and local to the module

@@ -5,7 +5,7 @@
using Speckle.Converters.Common;
using Speckle.Converters.Common.DependencyInjection;

namespace Speckle.Converters.Autocad20243.DependencyInjection;
namespace Speckle.Converters.Autocad2024.DependencyInjection;
Copy link
Member

Choose a reason for hiding this comment

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

Do we have anything related autocad 2024 yet?

Copy link
Member

Choose a reason for hiding this comment

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

I think it's a tester for when we do.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes the autocad 2024 converter is required for civil3d 2024


namespace Speckle.Converters.Autocad.ToSpeckle.Raw;

public class DBCurveToSpeckleRawConverter : ITypedConverter<ADB.Curve, Objects.ICurve>, ITypedConverter<ADB.Curve, Base>
Copy link
Member

Choose a reason for hiding this comment

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

What is the behavior if we inherit 2 different interface?

Copy link
Member

Choose a reason for hiding this comment

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

shouldn't be any different than just 1

@clairekuang
Copy link
Member Author

Q: why we removed ITypedConversions and extracted them? In order to use them on Civil3D too?

There is no difference between having a converter implement both ITopLevelConverter and ITypedConverter, or to separate out the typed converter class to be called from the top level converter. I thought the second option is cleaner, so we can see at a glance all our typed converters.

@clairekuang clairekuang merged commit 4561d18 into dui3/alpha Jul 4, 2024
33 checks passed
@clairekuang clairekuang deleted the DUI3-326-Add-Civil3d-2023-Converter branch July 4, 2024 10:55
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