BHoM / BHoM/Revit_Toolkit

Creation of FreeFormProfile fails in case of imperfections exceeding the default tolerance

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

Description

#### Description:

When extracting the profile using `BH.Revit.Engine.Core.Convert.ProfileFromRevit`, an edge case issue occurs on the call of `FreeFormProfileFromRevit` when the outline curves of the profile bear imperfections exceeding the default tolerance. This could be resolved by aligning `settings.DistanceTolerance`, but currently is impossible due to the fact that the tolerance is not passed to `BH.Engine.Spatial.Create.FreeFormProfile`:

https://github.com/BHoM/Revit_Toolkit/blob/01c8a139703bc8a87bc1c82a949fb6ff958c4557/Revit_Core_Engine/Convert/Structure/FromRevit/Profile.cs#L727

Simple refactoring of the engine method to accept the tolerance argument does not fix the problem because of the tolerance issues occurring further down the line - we made a preliminary investigation with @IsakNaslundBh and concluded that first the self-intersection check needs to be made more intelligent before passing the tolerance would make real sense.

@enarhi the above is a very similar issue to the ones you have just closed yesterday, just coming from a slightly different source. Looking forward to looking deeper into this problem in the next milestone!

#### Test files:
On [SharePoint](https://burohappold.sharepoint.com/sites/BHoM/02_Current/Forms/AllItems.aspx?RootFolder=%2Fsites%2FBHoM%2F02%5FCurrent%2F12%5FScripts%2F01%5FIssue%2FBHoM%2FRevit%5FToolkit%2F%231091%2DFreeFormProfileTolerance&FolderCTID=0x0120008122C8891F89054B8ACED0196C70DFC4).

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.