From 591a30dab030a90218f37a0c4a8c4474663c7155 Mon Sep 17 00:00:00 2001 From: Remigiusz Fiedler Date: Wed, 16 Sep 2009 22:12:23 +0000 Subject: bugfix for LineIntersectLine() - was imperfect calculation for points marking shortest distance for non-crossing lines in 3d --- source/blender/blenlib/intern/arithb.c | 2 +- source/blender/python/generic/Mathutils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c index 339a7250295..b7f56e6ca1c 100644 --- a/source/blender/blenlib/intern/arithb.c +++ b/source/blender/blenlib/intern/arithb.c @@ -4715,7 +4715,7 @@ int LineIntersectLine(float v1[3], float v2[3], float v3[3], float v4[3], float VecSubf(c, v3t, v1); VecSubf(a, v2, v1); - VecSubf(b, v4t, v3); + VecSubf(b, v4t, v3t); Crossf(ab, a, b); Crossf(cb, c, b); diff --git a/source/blender/python/generic/Mathutils.c b/source/blender/python/generic/Mathutils.c index d354aea6614..431f1987383 100644 --- a/source/blender/python/generic/Mathutils.c +++ b/source/blender/python/generic/Mathutils.c @@ -912,7 +912,7 @@ static PyObject *M_Mathutils_LineIntersect( PyObject * self, PyObject * args ) PyErr_SetString( PyExc_TypeError, "expected 4 vector types\n" ); return NULL; } - if( vec1->size != vec2->size || vec1->size != vec3->size || vec1->size != vec2->size) { + if( vec1->size != vec2->size || vec1->size != vec3->size || vec3->size != vec2->size) { PyErr_SetString( PyExc_TypeError,"vectors must be of the same size\n" ); return NULL; } -- cgit v1.2.3