在Ellipse和Line之间合并几何不会得到交集 [英] CombineGeometry between an Ellipse and a Line getting no intersection
问题描述
由于最终我想查看任意路径几何是否相交。我想我必须找到一种方法来为某些区域填充路径,如果没有解决方案来使用路径吗? 解决方案 div>
出于某种原因,我猜测线几何不被视为几何,也许只是某种笔触?无论如何,您需要在您的路径上执行 GetWidenedPathGeometry
,它会为您提供由笔画形状定义的几何图形。
So I tested this code (intersection between two ellipses, look at the accepted answer), but if I change one of the ellipses to a line geometry (or path geometry representing a line) and it gives me no intersection. Does any one know why? Does combine geometry work on area of the geometry, and since lines have no area, it gives no intersection?
Since eventually I would want to see if the arbitrary path geometries intersect. I guess I would have to find a way to "pad" the path with some area, if there is no solution to just using a path?
For some reason I guess line geometry is not considered as a geometry, maybe just some sort of a stroke? Anyway, you need to do GetWidenedPathGeometry
on your path and it would give you a geometry defined by the shape of the stroke.
这篇关于在Ellipse和Line之间合并几何不会得到交集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!