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

Geometry_Engine: Add missing methods for ellipse #2999

Merged

Conversation

IsakNaslundBh
Copy link
Contributor

@IsakNaslundBh IsakNaslundBh commented Jan 25, 2023

Issues addressed by this PR

Closes #314

Adding all of the (relatively) low hanging methods mentioned in the issue.

Intentionally skipping:

  • MeshIntersection - which we do not generally support for most curve types
  • SplitAtPoint - requires either Nurbs implementation for split or EllipticalArc class to be added.

For both of those cases I think the issue is fine to be closed and for those two cases to be handled separately.

Test files

Test file testing through general cases, and also attempting to find as many edge cases that I could think of.
Testing through ellipses of a wide range of aspect ratios and size.

Only real failure noted in the script is for some plane intersections for ellipse with ridiculous aspect ratio of 1 : 10 000 000, which is still close to correct. This failure seem to simply be a numerical tolerance issue, that I attempted to fix as much as possible, but could not figure out to get it better. Basically, the maths are correct, but for some of these extreme cases, the method might give slightly erroneous results for the intersection methods. Overall, though, they are working much better than the built in rhino versions.

EDIT fixed the plane intersection - should be fine now

https://burohappold.sharepoint.com/:f:/s/BHoM/EkzmvWVps5FOnYoqdle_gBMBCwtmchnT5Qp6iWCbWFTivg?e=CCgMBX

Changelog

Additional comments

Have unit tests ready to be pushed based on all the tests preformed in the testfile. Will need to update existing test datasets, so holding of pushing until review is done, to make sure I only have to push them up once.

@IsakNaslundBh IsakNaslundBh self-assigned this Jan 25, 2023
@IsakNaslundBh IsakNaslundBh added the type:feature New capability or enhancement label Jan 25, 2023
@IsakNaslundBh IsakNaslundBh marked this pull request as ready for review January 27, 2023 09:33
pawelbaran
pawelbaran previously approved these changes Feb 3, 2023
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.

...and approval with text to make @BHoMBot happy 😉

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 6, 2023

@IsakNaslundBh 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

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check compliance
@BHoMBot check unit-tests
@BHoMBot check required

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 6, 2023

@IsakNaslundBh 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 unit-tests
  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check core
  • check null-handling
  • check serialisation
  • check versioning
  • check installer

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 6, 2023

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

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 6, 2023

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

Tests passing locally, but failing on remote. The test data should be extensive enough even with the 5 entries failing on remote removed
@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check unit-tests

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 6, 2023

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

  • check unit-tests

There are 19 requests in the queue ahead of you.

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check compliance
@BHoMBot check required

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 6, 2023

@IsakNaslundBh 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 code-compliance
  • check documentation-compliance
  • check project-compliance
  • check core
  • check null-handling
  • check serialisation
  • check versioning
  • check installer

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 6, 2023

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

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 6, 2023

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

@IsakNaslundBh
Copy link
Contributor Author

Requesting dispensation for the null handling as the only method failing is a method returning a boolean, where both true and false can be valid returns, and expected valued, even for a crash. Reference this old issue: BHoM/admin#7

The only safe way to handle currently, until we support nullable primitives formally, is to just let it crash.

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 6, 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.

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 6, 2023

FAO: @FraserGreenroyd
@IsakNaslundBh is seeking dispensation on this Pull Request to skip a required check. Please can you provide authorisation for the check to be skipped, or provide assistance as appropriate.

The check they wish to have dispensation on is null-handling.

If you are providing dispensation on this occasion, please reply with:

@BHoMBot this is a DevOps instruction. I am authorising dispensation to be granted on check ref. 11130365886

@FraserGreenroyd
Copy link
Contributor

@BHoMBot this is a DevOps instruction. I am authorising dispensation to be granted on check ref. 11130365886

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 6, 2023

@FraserGreenroyd I have now provided a passing check on reference 11130365886 as requested.

Copy link
Contributor

@FraserGreenroyd FraserGreenroyd left a comment

Choose a reason for hiding this comment

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

Only changes since @pawelbaran approval have been to unit tests - approving on the basis that @pawelbaran approval is still valid.

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check ready-to-merge

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 6, 2023

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

  • check ready-to-merge

@IsakNaslundBh
Copy link
Contributor Author

Thanks @FraserGreenroyd :)

@IsakNaslundBh IsakNaslundBh merged commit 0cf33fe into develop Feb 6, 2023
@IsakNaslundBh IsakNaslundBh deleted the Geometry_Engine-#314-AddMissingMethodsForEllipse branch February 6, 2023 10:36
@bhombot-ci bhombot-ci bot mentioned this pull request Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New capability or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Geometry_Engine: Ellipse methods not existing
3 participants