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: Support closed planar curve types #2841

Merged
merged 18 commits into from
Sep 29, 2022

Conversation

IsakNaslundBh
Copy link
Contributor

@IsakNaslundBh IsakNaslundBh commented May 23, 2022

NOTE: Depends on

BHoM/BHoM#1393

Issues addressed by this PR

Closes #2803

Adds support for the new Polygon and BoundaryCurve curves.

Change the signature of some of the more heavy methods to accept IPolyline and IPolyCurve instead of Polyline and PolyCurve, to enable passing Polygons and BoundaryCurves to them instead.

Update Centroid method for lists of curves to avoid calling BooleanUnion if it can be avoided.

Test files

https://burohappold.sharepoint.com/:f:/s/BHoM/EkuLDyGrA2FHi4MlPS1N-WMBCcfi8sdjzIigKDsL1FuHOA?e=XAFq1E

Changelog

Additional comments

@IsakNaslundBh IsakNaslundBh self-assigned this May 23, 2022
@IsakNaslundBh IsakNaslundBh added the type:feature New capability or enhancement label May 23, 2022
Following changes done to avoid unneccesary calls to BooleanUnion, as that changes the curve type to PolyCurve, meaning and performance gain from using BoundaryCurve is lost.

Logic used for outer and inner curves is:
- If one curve, just use centroid and area from it
- If more than one curve, cluster (dbscan) by overlapping boundingboxes. For each cluster, then if single curve, just use it, if multiple curve, use boolean union, and then loop through the curve.
@alelom alelom self-requested a review May 27, 2022 08:53
@IsakNaslundBh IsakNaslundBh marked this pull request as ready for review May 27, 2022 08:56
@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check documentation-compliance

@bhombot-ci
Copy link

bhombot-ci bot commented May 27, 2022

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

  • documentation-compliance

There are 121 requests in the queue ahead of you.

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check documentation-compliance

@bhombot-ci
Copy link

bhombot-ci bot commented May 27, 2022

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

  • documentation-compliance

There are 117 requests in the queue ahead of you.

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check documentation-compliance

@bhombot-ci
Copy link

bhombot-ci bot commented May 27, 2022

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

  • documentation-compliance

There are 116 requests in the queue ahead of you.

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check compliance
@BHoMBot check null-handling

@bhombot-ci
Copy link

bhombot-ci bot commented May 27, 2022

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

  • code-compliance
  • documentation-compliance
  • project-compliance
  • branch-compliance
  • dataset-compliance
  • copyright-compliance
  • null-handling

There are 116 requests in the queue ahead of you.

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check null-handling

@bhombot-ci
Copy link

bhombot-ci bot commented May 30, 2022

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

  • null-handling

There are 110 requests in the queue ahead of you.

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check unit-tests

@bhombot-ci
Copy link

bhombot-ci bot commented Aug 3, 2022

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

  • check unit-tests

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check unit-tests

@bhombot-ci
Copy link

bhombot-ci bot commented Aug 3, 2022

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

  • check unit-tests

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check unit-tests

@bhombot-ci
Copy link

bhombot-ci bot commented Aug 3, 2022

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

  • check unit-tests

There are 1 requests in the queue ahead of you.

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check unit-tests

@bhombot-ci
Copy link

bhombot-ci bot commented Aug 3, 2022

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

  • check unit-tests

There are 2 requests in the queue ahead of you.

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check unit-tests

@bhombot-ci
Copy link

bhombot-ci bot commented Aug 3, 2022

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

  • check unit-tests

There are 6 requests in the queue ahead of you.

@alelom alelom self-requested a review September 26, 2022 10:15
Copy link
Member

@alelom alelom left a comment

Choose a reason for hiding this comment

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

Approving based on:

  1. Latest code changes
  2. Test scripts.

I am getting the same results of my previous review and I am satisfied with the answers provided in #2841 (comment), in particular on the precision "fail". The visualisation issue is still there but I am convinced it must be something on my end and not related to this PR.

@bhombot-ci
Copy link

bhombot-ci bot commented Sep 28, 2022

@IsakNaslundBh just to let you know, I have provided a check-versioning result to this Pull Request as it was detected to be linked to other Pull Requests in a series. The comment which triggered this check came from @FraserGreenroyd on BHoM

@bhombot-ci
Copy link

bhombot-ci bot commented Sep 28, 2022

@IsakNaslundBh just to let you know, I have provided a check-installer result to this Pull Request as it was detected to be linked to other Pull Requests in a series. The comment which triggered this check came from @FraserGreenroyd on BHoM

@bhombot-ci
Copy link

bhombot-ci bot commented Sep 28, 2022

@IsakNaslundBh just to let you know, I have provided a check-installer result to this Pull Request as it was detected to be linked to other Pull Requests in a series. The comment which triggered this check came from @FraserGreenroyd on OpenStreetMap_Toolkit

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check code-compliance
@BHoMBot check copyright-compliance
@BHoMBot check core
@BHoMBot check dataset-compliance
@BHoMBot check documentation-compliance
@BHoMBot check null-handling
@BHoMBot check project-compliance
@BHoMBot check ready-to-merge
@BHoMBot check serialisation
@BHoMBot check unit-tests

@bhombot-ci
Copy link

bhombot-ci bot commented Sep 29, 2022

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

  • check code-compliance
  • check copyright-compliance
  • check core
  • check dataset-compliance
  • check documentation-compliance
  • check null-handling
  • check project-compliance
  • check ready-to-merge
  • check serialisation
  • check unit-tests

@IsakNaslundBh
Copy link
Contributor Author

IsakNaslundBh commented Sep 29, 2022

The descriptions missed and flagged by the documentation compliance have intentionally been left out due to #2840 . Descriptions to be added when the method is fixed. Will dispense the check for this PR, which has been agreed in call with @FraserGreenroyd .

@bhombot-ci
Copy link

bhombot-ci bot commented Sep 29, 2022

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 documentation-compliance.

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. 8612058397

@IsakNaslundBh
Copy link
Contributor Author

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

1 similar comment
@IsakNaslundBh
Copy link
Contributor Author

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

@bhombot-ci
Copy link

bhombot-ci bot commented Sep 29, 2022

@IsakNaslundBh I have now provided a passing check on reference 8612058397 as requested.

@IsakNaslundBh IsakNaslundBh merged commit 52945b4 into main Sep 29, 2022
@IsakNaslundBh IsakNaslundBh deleted the Geometry_oM-#1392-AddSupportClosedPlanarCurveTypes branch September 29, 2022 10:24
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: Add more control over what checks to run initially on methods
3 participants