Sympy线段相交顺序

时间:2018-10-15 04:59:40

标签: python-3.x sympy intersection

我有以下代码,执行后会返回一个空列表。但是,当我反转b中的第一点和第二点时,我得到正确的输出。

输入:

from sympy import Segment3D, Point3D
a = Segment3D(Point3D(315250, -96200, 107500), Point3D(315250, -96200, 114500))
b = Segment3D(Point3D(315250, -96200, 107500), Point3D(315250, -96200, 105500))
a.intersection(b)

输出:

[]

输入

from sympy import Segment3D, Point3D
a = Segment3D(Point3D(315250, -96200, 107500), Point3D(315250, -96200, 114500))
b = Segment3D(Point3D(315250, -96200, 105500),Point3D(315250, -96200, 107500))
a.intersection(b)

输出:

[Point3D(315250, -96200, 107500)]

这是一个错误吗?我该如何解决?

0 个答案:

没有答案