Don't even try to display points with nan or infinity

This commit is contained in:
Grant Sanderson
2018-08-30 14:23:26 -07:00
parent e0d6bd5449
commit 8a1f121207

View File

@ -341,6 +341,8 @@ class Camera(object):
points = self.transform_points_pre_display(
vmob, vmob.points
)
if np.any(np.isnan(points)) or np.any(points == np.inf):
points = np.zeros((1, 3))
ctx.new_sub_path()
ctx.move_to(*points[0][:2])
for triplet in zip(points[1::3], points[2::3], points[3::3]):