BHoM / Revit_Toolkit

A set of tools enabling exchange of information between BHoM and Revit.
GNU Lesser General Public License v3.0
27 stars 13 forks source link

Extract the logic for finding a face's main CurveLoop #1496

Closed vietle-bh closed 1 month ago

vietle-bh commented 1 month ago

Description:

The conversion from a Revit face to a BHoM one in https://github.com/BHoM/Revit_Toolkit/blob/develop/Revit_Core_Engine/Convert/Geometry/FromRevit/Surface.cs involves finding the main external curve loop of that face. I have a tool that wants to use this extraction logic without calling FromRevit(this PlanarFace face) because List<ICurve> internalBoundaries = crvLoops.Where(x => x != externalLoop).Select(x => x.FromRevit() as ICurve).ToList(); can be slow on large datasets.

Let's move this external loop extraction logic to its own method.