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

PlanarFace to PlanarSurface conversion assigns the same curve loop twice #1499

Closed vietle-bh closed 1 month ago

vietle-bh commented 1 month ago

Description:

I noticed that the conversion of some surfaces to Bhom assigned the same curve loop as both the external boundary and one of the internal openings. Looks like each time we call face.ExternalCurveLoop(), Revit gives a different set of objects, so the below Where(x => x != externalLoop query will give incorrect result:

https://github.com/BHoM/Revit_Toolkit/blob/4ff3d21861c83bf37a1d2c7aea05fb5cd18e95cd/Revit_Core_Engine/Convert/Geometry/FromRevit/Surface.cs#L50

image

Steps to reproduce:

Expected behaviour:

Test file(s):