2011-06-07 50 views
0

的交集大小我有含封閉複雜的二維幾何形狀的一些時髦的XML文件(這表示所有的財產)。我想將這些XML幾何圖形讀入PathGeometry/PathFigures。獲取兩個幾何

如何獲取其中兩個PathGeometries之間的切割面?
而且是有辦法讓切割面的大小(例如,相對於幾何形狀之一的全尺寸)。

還是應該我寧願用的東西,而不是其他的PathGeometry來獲得橫截面?

+0

可以幫助你:HTTP://stackoverflow.com/questions/1526352/how-to-intersect-two-polygons – Magnus 2011-06-07 14:02:04

回答

2

簡單比我想象:

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