BHoM / BHoM/Revit_Toolkit

Potential bug in bounds of a bounding box

Open
#1,446 0 comments 0 reactions 1 assignee Claimed by @michal-pekacki View on GitHub
type:bug
Dominant language
C#
Stars
35
Forks
16
Avg merge
7d 29m
Merged PRs (30d)
2

Description

#### Description:

From the conversation with @michal-pekacki:
- it looks like `BoundsOfTransformed` contains a bug, [these lines](https://github.com/BHoM/Revit_Toolkit/blob/990954397d2b4f523376ab927bea603184234c54/Revit_Core_Engine/Query/BoundsOfTransformed.cs#L46C13-L53C14) should already operate on 8 points instead of 2 (transforming min/max will yield a wrong bounding box, we need to transform all 8 corners) - `Query.CornerPoints` can be helpful
- also the method can be simplified: take all 8 corners, then transform by local transform of bbox, then by the extra transform param, finally get bounds of transformed points
- `transform` input could be made optional and method renamed to simply `Bounds` to align with existing methods
- let's make sure we have tests for it 😉

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.