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 null exception on pulling Nurbs bars #1324

Merged

Conversation

vietle-bh
Copy link
Contributor

Issues addressed by this PR

Closes #1323

Added a check on location curve type to prevent a null reference.

Test files

Requires Revit 2022.
SharePoint folder

Pull any Revit beam that is based on a Nurbs curve. Any ID below will do:
1208663, 1208973, 1209221, 1209288, 1209467, 1209792, 1209794, 1209824, 1209826, 1209828, 1209830, 1209832, 1209834, 1209836, 1209876, 1209878, 1209880, 1209882, 1209884, 1209886, 1209888, 1209930, 1209932, 1209934, 1209936, 1209938, 1209940, 1209942, 1209982, 1209984, 1209986, 1209988, 1209990, 1209992, 1209994, 1210036, 1210038, 1210040, 1210042, 1210044, 1210046, 1210048, 1211097, 1211099, 1211101, 1211103, 1211105, 1211117, 1211119, 1211121, 1211125, 1211127, 1211129, 1211131, 1211133, 1211135, 1211137, 1211139, 1211141, 1211143, 1211145, 1211147, 1211149, 1211153, 1211155, 1211157, 1211159, 1211161, 1211163, 1211165, 1211167, 1211169, 1211171, 1211173, 1211175, 1211177, 1211179, 1211181, 1211183, 1211185, 1211187, 1211189, 1215099, 1215101, 1215103, 1215105, 1215107, 1215119, 1215121, 1215123, 1215127, 1215129, 1215131, 1215133, 1215135, 1215137, 1215139, 1215141, 1215143, 1215145, 1215147, 1215149, 1215151, 1215155, 1215157, 1215159, 1215161, 1215163, 1215165, 1215167, 1215169, 1215171, 1215173, 1215175, 1215177, 1215179, 1215181, 1215183, 1215185, 1215187, 1215189, 1215191,

Changelog

Fix null exception on pulling Nurbs bars

@vietle-bh vietle-bh added the type:bug Error or unexpected behaviour label Mar 15, 2023
@vietle-bh vietle-bh self-assigned this Mar 15, 2023
@vietle-bh vietle-bh requested a review from pawelbaran March 15, 2023 11:22
@vietle-bh
Copy link
Contributor Author

@BHoMBot check compliance
@BHoMBot check core
@BHoMBot check null-handling
@BHoMBot check serialisation

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 15, 2023

@vietle-bh to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance
  • check core
  • check null-handling
  • check serialisation

There are 2 requests in the queue ahead of you.

@pawelbaran
Copy link
Member

Isn't this PR exactly the same as #1289, which we closed with an aim to be fixed on the engine side? @IsakNaslundBh, do you think we could expect an implementation of CollapseToPolyline(NurbsCurve) in any foreseeable future?

@vietle-bh
Copy link
Contributor Author

Isn't this PR exactly the same as #1289, which we closed with an aim to be fixed on the engine side? @IsakNaslundBh, do you think we could expect an implementation of CollapseToPolyline(NurbsCurve) in any foreseeable future?

I realised this was the same PR shortly after submitting it!
If we won't support Nurbs curves soon, it'll still be good to handle the error messages with this PR. Errors show up in at least 3 GH scripts for testing pulls from Revit. If we just ignore them, we may fail to catch other unrelated errors in the same test.

@pawelbaran
Copy link
Member

Yeah, agreed - @IsakNaslundBh, could you please shed a bit of light on whether we should expect CollapseToPolyline for nurbs? If not, we will get this one merged I believe

@vietle-bh
Copy link
Contributor Author

@BHoMBot check versioning
@BHoMBot check installer

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 17, 2023

@vietle-bh to confirm, the following actions are now queued:

  • check versioning
  • check installer

There are 1 requests in the queue ahead of you.

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 18, 2023

The check installer has already been run previously and recorded as a successful check. This check has not been run again at this time.

@pawelbaran
Copy link
Member

@BHoMBot check versioning

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 20, 2023

@pawelbaran to confirm, the following actions are now queued:

  • check versioning

Copy link
Member

@pawelbaran pawelbaran left a comment

Choose a reason for hiding this comment

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

Confirmed with @IsakNaslundBh that CollapseToPolyline for nurbs curves should rather not be expected soon, so it is desirable to merge this PR - we just need to remember to remove this if once the geometry method gets implemented.

@pawelbaran
Copy link
Member

@BHoMBot check ready-to-merge

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 20, 2023

@pawelbaran to confirm, the following actions are now queued:

  • check ready-to-merge

@pawelbaran pawelbaran merged commit 5844bc7 into develop Mar 20, 2023
@pawelbaran pawelbaran deleted the Revit_Core_Engine-#1323-FixNullExceptionOnPullingNurbsBars branch March 20, 2023 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error or unexpected behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Null exception on pulling Nurbs bars
2 participants