Skip to content

Commit

Permalink
Tolerace error in Revit when units are mm
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrocortesark committed Dec 12, 2024
1 parent 944ea82 commit 2ae272d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ protected override void TrySolveInstance(IGH_DataAccess DA)
var floorTypes = collector
.OfCategory(ARDB.BuiltInCategory.OST_Floors)
.WhereElementIsElementType()
.Where(t => t.get_Parameter(ARDB.BuiltInParameter.FLOOR_ATTR_DEFAULT_THICKNESS_PARAM).AsDouble() == panel.Thickness)
.Where(t => Rhino.RhinoMath.EpsilonEquals(
t.get_Parameter(ARDB.BuiltInParameter.FLOOR_ATTR_DEFAULT_THICKNESS_PARAM).AsDouble(),
panel.Thickness,
tol.DefaultTolerance))
.Select(t => t)
.Cast<ARDB.FloorType>()
.ToList();
Expand Down Expand Up @@ -212,7 +215,7 @@ protected override void TrySolveInstance(IGH_DataAccess DA)
.WhereElementIsElementType()
.Select(t => t)
.Cast<ARDB.WallType>()
.Where(t => t.Width == analyticalPanel.Thickness)
.Where(t => Rhino.RhinoMath.EpsilonEquals(t.Width, analyticalPanel.Thickness, tol.DefaultTolerance))
.ToList();

if (wallTypes.Count == 0)
Expand Down

0 comments on commit 2ae272d

Please sign in to comment.