[Bf-python] Incorrect checking for zero length vector

Frank Schafer frank.schafer at t-systems.cz
Fri Oct 7 08:25:48 CEST 2005


Hi,
IMHO you should simply catch this exception, because (again IMHO) it
MAKES sense that Mathutils complains to calculate angles between vectors
of zero length.

Regards
Frank


On Fri, 2005-10-07 at 09:57 +1000, Campbell Barton wrote:
> Found that AngleBetweenVecs raises an error when checking for a zero 
> length Vector
> 
> # Heres my test from the interactive console.
> print Mathutils.AngleBetweenVecs(Mathutils.Vector(10.0, 0 , 0), 
> Mathutils.Vector(0,1,0))
> exceptions.AttributeError:  Mathutils.AngleBetweenVecs(): zero-length 
> vectors not acceptable
> 
> - Cam
> 



More information about the Bf-python mailing list