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-71 receive bindings and receive geometry #3542

Conversation

connorivy
Copy link
Contributor

@connorivy connorivy commented Jun 27, 2024

Description & motivation

Changes:

Connectors / Revit

  • Added receive binding (pretty much copied from Rhino)
  • Modified service registrations for new types
    • Added default traversal function. @JR-Morgan, is this correct for dui3?
  • Registered a run on thread method that uses the Revit Async package
    • Running on main thread alone is not sufficient
  • Added simple host object "builder" that just opens a transaction, traverses, receives, and then commits the transaction
  • Copied transaction manager from dui2 connector

Converter / Revit

  • added import method next to export method on referencePointConverter (and interface)
  • Changed name of 'RevitRootToHostConverter' which implements 'IRootToSpeckleConverter' to accurately reflect the implemented interface (aka replaced ToHost with ToSpeckle)
  • Added toHost scaling service to mirror toSpeckle scaling service

Converter / Revit / ToHost

  • implemented ITypedConverter interface for several types of geometries
  • added a modelCurve topLevel converter to be able to actually use the typedConverters

Converter / Revit / ToSpeckle

  • I moved a bunch of files into this 'toSpeckle' folder to mirror the folder structure of Rhino

Converter / Rhino

  • Weird random change in a rhino file. I'm thinking this is just something weird going on with git. Need to ask @adamhathcock if this is a legit change

To-do before merge:

Screenshots:

Validation of changes:

receiving works for model lines of various types

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

References

builder.AddScoped<ReceiveOperation>();
builder.AddScoped<IHostObjectBuilder, RevitHostObjectBuilder>();
builder.AddScoped<TransactionManager>();
builder.AddSingleton(DefaultTraversal.CreateTraversalFunc());
Copy link
Member

Choose a reason for hiding this comment

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

Yep perfect. This new and improved DefaultTraversal is exactly what we should be using (injecting as you have here) from now on.
Tldr, this one should behave functionally equivalent to the old one, while no longer being dependent on the old CanConvertFunction.

@adamhathcock
Copy link
Member

The PR is definitely wrong somehow as it has a lot of commits from me in it but should be covered with a merge. Let me know if you need help redoing/rebasing the branch?

@connorivy
Copy link
Contributor Author

closing this pr in favor of a new one that doesn't have a bunch of Adam's commits in it #3542

@connorivy connorivy closed this Jun 28, 2024
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