开发者

Get intersection size of two geometries

开发者 https://www.devze.com 2023-03-11 10:23 出处:网络
I\'ve got some funky xml files containing closed complex 2d geometric forms (these represent owned property). I want to read these xml geometries into PathGeometry / PathFigures.

I've got some funky xml files containing closed complex 2d geometric forms (these represent owned property). I want to read these xml geometries into PathGeometry / PathFigures.

How do I get the cut surface between two of these PathGeometries?

And is there a way to get the size of the cut surface (e.g. in relation to the full size of one of the geometries).

O开发者_C百科r should I rather use something else instead of PathGeometry to get the cross section?


Simpler than I would have thought:

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

精彩评论

暂无评论...
验证码 换一张
取 消