椭圆和直线之间的组合几何没有相交
所以我测试了这个代码(两个椭圆之间的交点,看看接受的答案),但如果我将其中一个椭圆更改为线几何图形(或代表线的路径几何图形),它不会给我交集。有谁知道为什么吗?组合几何体是否对几何体的面积起作用,并且由于线没有面积,因此它没有交点?
因为最终我想看看任意路径几何图形是否相交。我想我必须找到一种方法来“填充”路径与某些区域,如果没有解决方案只使用路径?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
出于某种原因,我猜线条几何不被视为几何,也许只是某种笔画?不管怎样,你需要在你的路径上执行
GetWidenedPathGeometry
,它会给你一个由笔画形状定义的几何图形。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.