Skip to content

Architecture_Engine: Geometry() query for BuildersWork.Opening refactored to return Point #2705

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

Merged
merged 1 commit into from
Nov 30, 2021

Conversation

pawelbaran
Copy link
Member

Issues addressed by this PR

Closes #2704

Test files

It is a simple property return, so no tests should be needed.

Changelog

Additional comments

This is a breaking change (different return type compared to the original version of the method) - this cannot be avoided taken the nature of the bug (Geometry() has to return Point for all types that implement IElement0D interface). Luckily, I do not think this type has been heavily used so far (if at all), taken it does not provide any interop features atm.

@IsakNaslundBh please shout if you are concerned about it and you have ideas how to lower the risk I introduce with this change.

@pawelbaran pawelbaran added the type:bug Error or unexpected behaviour label Nov 19, 2021
@pawelbaran pawelbaran self-assigned this Nov 19, 2021
@IsakNaslundBh
Copy link
Contributor

@IsakNaslundBh please shout if you are concerned about it and you have ideas how to lower the risk I introduce with this change.

Not overly concerned by a change as long as you have checked through all use cases of the class. More wondering then about why an opening is an IElement0D in the first place?

@pawelbaran
Copy link
Member Author

More wondering then about why an opening is an IElement0D in the first place?

Thanks @IsakNaslundBh. That is the question I was asking myself when working on the original oM PR: BHoM/BHoM#1258. The main rationale behind implementing IElement0D interface was that Opening is based on Cartesian coordinate system, so the most simplistic (and sufficient for now) approach is to treat it as point-based.

One could argue that it could also be 1D (taken its depth into account) or 2D (as windows/doors etc.). However, in the cases I can foresee now, there is no need for more than a point location from the code perspective, while turning Opening into IElement2D would lead to issues related with extraction of the shape and dimensions (which is usually what you need on Push).

@IsakNaslundBh
Copy link
Contributor

More wondering then about why an opening is an IElement0D in the first place?

Thanks @IsakNaslundBh. That is the question I was asking myself when working on the original oM PR: BHoM/BHoM#1258. The main rationale behind implementing IElement0D interface was that Opening is based on Cartesian coordinate system, so the most simplistic (and sufficient for now) approach is to treat it as point-based.

One could argue that it could also be 1D (taken its depth into account) or 2D (as windows/doors etc.). However, in the cases I can foresee now, there is no need for more than a point location from the code perspective, while turning Opening into IElement2D would lead to issues related with extraction of the shape and dimensions (which is usually what you need on Push).

Yeah, thinking a bit more about it myself, it is quite analogous to the Bar class (a curve element with a swept profile) so can sort of understand the ifs and whys of it.

Then, I think the change is fine if you have checked through that it does not break anything (as mentioned before) and if it can be tested by someone who has used the class.

@pawelbaran
Copy link
Member Author

Then, I think the change is fine if you have checked through that it does not break anything (as mentioned before) and if it can be tested by someone who has used the class.

Yeah, agreed - will make sure this gets verified before merging. This PR is a link in a larger chain of PRs to be raised today (still polishing the code), so more info, test files etc. will be added. Thanks!

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 23, 2021

@pawelbaran 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 @pawelbaran on Revit_Toolkit

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 23, 2021

@pawelbaran 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 @pawelbaran on Revit_Toolkit

1 similar comment
@bhombot-ci
Copy link

bhombot-ci bot commented Nov 23, 2021

@pawelbaran 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 @pawelbaran on Revit_Toolkit

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 23, 2021

@pawelbaran 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 @pawelbaran on Revit_Toolkit

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 23, 2021

@pawelbaran 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 @pawelbaran on Revit_Toolkit

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 23, 2021

@pawelbaran 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 @pawelbaran on Revit_Toolkit

michal-pekacki
michal-pekacki previously approved these changes Nov 26, 2021
Copy link
Contributor

@michal-pekacki michal-pekacki left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@pawelbaran
Copy link
Member Author

@BHoMBot check compliance
@BHoMBot check null-handling

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 26, 2021

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

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

There are 11 requests in the queue ahead of you.

@pawelbaran
Copy link
Member Author

@BHoMBot check core
@BHoMBot check serialisation

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 29, 2021

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

  • core
  • serialisation

There are 27 requests in the queue ahead of you.

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 29, 2021

@pawelbaran 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 @pawelbaran on Revit_Toolkit

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 29, 2021

@pawelbaran 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 @pawelbaran on Revit_Toolkit

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check required

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 30, 2021

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

  • code-compliance
  • documentation-compliance
  • project-compliance
  • core
  • null-handling
  • serialisation
  • installer
  • versioning

There are 2 requests in the queue ahead of you.

Copy link
Contributor

@michal-pekacki michal-pekacki left a comment

Choose a reason for hiding this comment

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

LGTM

@pawelbaran
Copy link
Member Author

@BHoMBot check copyright-compliance
@BHoMBot check dataset-compliance

1 similar comment
@pawelbaran
Copy link
Member Author

@BHoMBot check copyright-compliance
@BHoMBot check dataset-compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 30, 2021

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

  • copyright-compliance
  • dataset-compliance

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check ready-to-merge

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 30, 2021

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

  • ready-to-merge

There are 2 requests in the queue ahead of you.

@FraserGreenroyd FraserGreenroyd merged commit 8061d35 into main Nov 30, 2021
@FraserGreenroyd FraserGreenroyd deleted the Revit_Toolkit-#1012-OpeningConverts branch November 30, 2021 14:24
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.

Architecture_Engine: Geometry() query for BuildersWork.Opening does not return a Point
4 participants