CombineGeometry between an Ellipse and a Line getting no intersection

做~自己de王妃 提交于 2019-12-11 20:13:34

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/7353383/combinegeometry-between-an-ellipse-and-a-line-getting-no-intersection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!