公差に関係している可能性があります...またはジオメトリ交差アルゴリズムの内部にある可能性があります....おそらく、何らかの方法で値をスケーリングしています...使用する値に依存して、交差チェックが発生する可能性があります予期せぬ結果が得られる場合 (例: ポイントが 90、80 の場合)。
2 つのジオメトリがどのように交差するかについての詳細を示すために、コードを少し拡張しました。うまくいけば、原因を特定するために操作できるようになります。
var rect = new Rect(new Point(0, 0), new Point(100, 100));
RectangleGeometry geometry1 = new RectangleGeometry(rect);
var rect2 = new Rect(new Point(0, 0), new Size(10, 10));
RectangleGeometry geometry2 = new RectangleGeometry(rect2);
var rect3 = new Rect(new Point(90, 90), new Size(10, 10));
RectangleGeometry geometry3 = new RectangleGeometry(rect3);
var rect4 = new Rect(new Point(90, 80), new Size(10, 10));
RectangleGeometry geometry4 = new RectangleGeometry(rect4);
var rect4fits = new Rect(new Point(90, 80), new Size(9, 10));
RectangleGeometry geometry4fits = new RectangleGeometry(rect4fits);
double tolerance = 0.25; // same as standard flattening tolerance
ToleranceType tolerancetype = ToleranceType.Relative;
var bcontains2 = geometry1.FillContains(geometry2);
var bcontainsdetail2 = geometry1.FillContains(geometry2, tolerance, tolerancetype);
var detail2 = geometry1.FillContainsWithDetail(geometry2);
var detailtolerance2 = geometry1.FillContainsWithDetail(geometry2, tolerance, tolerancetype);
var bcontains3 = geometry1.FillContains(geometry3);
var bcontainsdetail3 = geometry1.FillContains(geometry3, tolerance, tolerancetype);
var detail3 = geometry1.FillContainsWithDetail(geometry3);
var detailtolerance3 = geometry1.FillContainsWithDetail(geometry3, tolerance, tolerancetype);
var bcontains4 = geometry1.FillContains(geometry4);
var bcontainsdetail4 = geometry1.FillContains(geometry4, tolerance, tolerancetype);
var detail4 = geometry1.FillContainsWithDetail(geometry4);
var detailtolerance4 = geometry1.FillContainsWithDetail(geometry4, tolerance, tolerancetype);
var bcontains4fits = geometry1.FillContains(geometry4fits);
var bcontainsdetail4fits = geometry1.FillContains(geometry4fits, tolerance, tolerancetype);
var detail4fits = geometry1.FillContainsWithDetail(geometry4fits);
var detailtolerance4fits = geometry1.FillContainsWithDetail(geometry4fits, tolerance, tolerancetype);