From 89b5728edb18e364285fcdd98555978abbfa50ff Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 10 Jan 2024 13:21:53 -0500 Subject: [PATCH] filter wall candidates in 2d --- LayoutFunctions/LayoutFunctionCommon/LayoutStrategies.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LayoutFunctions/LayoutFunctionCommon/LayoutStrategies.cs b/LayoutFunctions/LayoutFunctionCommon/LayoutStrategies.cs index 40049b75..537684fa 100644 --- a/LayoutFunctions/LayoutFunctionCommon/LayoutStrategies.cs +++ b/LayoutFunctions/LayoutFunctionCommon/LayoutStrategies.cs @@ -259,7 +259,7 @@ public static SpaceConfiguration LimitConfigsToId(SpaceConfigura for (int i = wallCandidateOptions.Count - 1; i >= 0; i--) { var (OrientationGuideEdge, _) = wallCandidateOptions[i]; - if (OrientationGuideEdge.Line.Mid().DistanceTo(roomOrientationEdge.Mid()) > 0.01) + if (OrientationGuideEdge.Line.Mid().Project(Plane.XY).DistanceTo(roomOrientationEdge.Mid().Project(Plane.XY)) > 0.01) { wallCandidateOptions.RemoveAt(i); }