【问题标题】:Get intersection size of two geometries获取两个几何的交集大小
【发布时间】:2011-09-10 02:22:50
【问题描述】:

我有一些时髦的 xml 文件,其中包含封闭的复杂 2d 几何形式(这些代表拥有的财产)。我想将这些 xml 几何图形读入 PathGeometry / PathFigures。

如何获得这两个 PathGeometry 之间的切割面?
有没有办法获得切割表面的尺寸(例如,相对于其中一个几何形状的全尺寸)。

或者我应该使用其他东西而不是 PathGeometry 来获取横截面?

【问题讨论】:

标签: c# wpf geometry


【解决方案1】:

比我想象的要简单:

PathGeometry firstGeometry;
PathGeometry secondGeometry;
PathGeometry intersectionGeometry = PathGeometry.Combine(firstGeometry, secondGeometry, GeometryCombineMode.Intersect, null);

【讨论】:

    猜你喜欢
    • 2016-02-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多