[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2584] branches/geodesic_domes/vefm_259 .py: one typing error removed and some small changes wit zero-vectors done
Peter K.H. Gragert
pkhgragert at gmail.com
Fri Nov 4 11:33:51 CET 2011
Revision: 2584
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2584
Author: pkhg
Date: 2011-11-04 10:33:51 +0000 (Fri, 04 Nov 2011)
Log Message:
-----------
one typing error removed and some small changes wit zero-vectors done
Modified Paths:
--------------
branches/geodesic_domes/vefm_259.py
Modified: branches/geodesic_domes/vefm_259.py
===================================================================
--- branches/geodesic_domes/vefm_259.py 2011-11-04 10:33:04 UTC (rev 2583)
+++ branches/geodesic_domes/vefm_259.py 2011-11-04 10:33:51 UTC (rev 2584)
@@ -79,7 +79,8 @@
self.normal = average(target).centroid()
self.normal.findlength()
if self.length == 0:
- print("******ERROR*** lenght zero in findnormal")
+ print("******ERROR*** lenght zero in findnormal, j = (0,1,0) replcaced")
+ self.normal = vertex((0,1,0))
self.normal.normalize()
def clockwise(self): #PKHG self is a vertex
@@ -237,7 +238,7 @@
v2.findlength()
if v1.length == 0 or v2.length == 0:
print("\nPKHG warning, =========== at least one zero vector 0.0 used")
- return pi * 0.25 #45 degrees??? #PKHG???TODO
+ return 0#PKHT_TEST04nov pi * 0.25 #45 degrees??? #PKHG???TODO
# dot=(v1.x*v2.x)+(v1.y*v2.y)+(v1.z*v2.z)
dot = v1.vector.dot(v2.vector)
costheta = dot/(v1.length*v2.length)
@@ -1089,7 +1090,7 @@
for apex in base.verts:
apex.findnormal()
side = edge(apex.edges[0].a,apex.edges[0].b)
- apex.unit = side.vect
+ apex.unit = side.vect #PKHG is Vector: b -a
apex.unit.normalize()
apex.cross = crossp(apex.normal,apex.unit).docrossproduct()
apex.unit = crossp(apex.cross,apex.normal).docrossproduct()
@@ -1099,7 +1100,7 @@
centre = apex
for point in template.verts:
# ay = apex.normal * point.z * self.height
- ay = apex.normal * point.vertor.z * self.height
+ ay = apex.normal * point.vector.z * self.height
# ce = apex.cross * point.y * self.width
ce = apex.cross * point.vector.y * self.width
# be = apex.unit * point.x * self.shrink
More information about the Bf-extensions-cvs
mailing list