Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Fix M13 union classification for touching box cases
Yuechen Libd7a69d4b0c6
diff --git a/Aetheris.Kernel.Core/Brep/Boolean/BrepBoolean.cs b/Aetheris.Kernel.Core/Brep/Boolean/BrepBoolean.csindex ed6da8ee..352cda76 100644--- a/Aetheris.Kernel.Core/Brep/Boolean/BrepBoolean.cs+++ b/Aetheris.Kernel.Core/Brep/Boolean/BrepBoolean.cs@@ -190,18 +190,18 @@ public static class BrepBooleanreturn new BooleanClassificationData(intersections, IsComputed: true, FragmentCount: 1, SingleBoxResult: right, UnsupportedReason: null);}- if (intersections.OverlapBox is null)- {- return new BooleanClassificationData(intersections, IsComputed: true, FragmentCount: 0, SingleBoxResult: null, UnsupportedReason: $"Boolean {operation}: disjoint box union is multi-body and not supported in M13.");- }-var bounds = AxisAlignedBoxExtents.Bounding(left, right);if (AxisAlignedBoxExtents.UnionIsSingleBox(left, right, bounds, tolerance)){return new BooleanClassificationData(intersections, IsComputed: true, FragmentCount: 1, SingleBoxResult: bounds, UnsupportedReason: null);}- return new BooleanClassificationData(intersections, IsComputed: true, FragmentCount: 0, SingleBoxResult: null, UnsupportedReason: $"Boolean {operation}: overlapping box union is not a single box in M13 (for example L-shaped unions)." );+ if (AxisAlignedBoxExtents.Intersection(left, right) is null)+ {+ return new BooleanClassificationData(intersections, IsComputed: true, FragmentCount: 0, SingleBoxResult: null, UnsupportedReason: $"Boolean {operation}: disjoint box union is multi-body and not supported in M13.");+ }++ return new BooleanClassificationData(intersections, IsComputed: true, FragmentCount: 0, SingleBoxResult: null, UnsupportedReason: $"Boolean {operation}: box union is not a single box in M13 (for example L-shaped unions)." );}if (!left.OverlapsWithPositiveVolume(right, tolerance))