[Bf-python] FaceNormals
models at paposo.com
models at paposo.com
Sat Oct 18 18:26:47 CEST 2003
I get some funny numbers with this script but I think it's got to do with
python's conversion of floating point numbers.
import Blender
cube = Blender.Object.Get("Cube")
mesh = cube.getData()
for x in range(6):
print mesh.faces[x].normal
output:
[0.0,0.0,-1.0]
[0.0,0.0,1.0]
[1.0,-2.8312206268310547e-007,4.4703416079983072e-008]
[-2.8312206268310547e-007,-1.0,-1.0430819941120717e-007]
[-1.0,2.2351743211856956e-007,-1.3411043653377419e-007]
[2.384185791015625e-007,1.0,2.0861625671386719e-007]
which would otherwise be:
[0.0, 0.0, -1.0]
[0.0, 0.0, 1.0]
[1.0, 0.0, 0.0]
[0.0, -1.0, 0.0]
[-1.0, 0.0, 0.0]
[0.0, 1.0, 0.0]
I guess this could be detrimental if you need some accuracy.
More information about the Bf-python
mailing list