[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3708] contrib/py/scripts/addons/ mesh_edgetools.py: Fixed an over-aggressive quad planarity detection error value ( was well within floating point error but should be slightly greater).

Paul Marshall portsidepaul at hotmail.com
Tue Sep 4 15:20:45 CEST 2012


Revision: 3708
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3708
Author:   brikbot
Date:     2012-09-04 13:20:44 +0000 (Tue, 04 Sep 2012)
Log Message:
-----------
Fixed an over-aggressive quad planarity detection error value (was well within floating point error but should be slightly greater).

Modified Paths:
--------------
    contrib/py/scripts/addons/mesh_edgetools.py

Modified: contrib/py/scripts/addons/mesh_edgetools.py
===================================================================
--- contrib/py/scripts/addons/mesh_edgetools.py	2012-09-04 01:51:11 UTC (rev 3707)
+++ contrib/py/scripts/addons/mesh_edgetools.py	2012-09-04 13:20:44 UTC (rev 3708)
@@ -33,7 +33,7 @@
 #
 # Paul "BrikBot" Marshall
 # Created: January 28, 2012
-# Last Modified: June 10, 2012
+# Last Modified: August 25, 2012
 # Homepage (blog): http://post.darkarsenic.com/
 #                       //blog.darkarsenic.com/
 #
@@ -141,9 +141,11 @@
 # is_face_planar
 #
 # Tests a face to see if it is planar.
-def is_face_planar(face, error = 0.000002):
+def is_face_planar(face, error = 0.0005):
     for v in face.verts:
         d = distance_point_to_plane(v.co, face.verts[0].co, face.normal)
+        if bpy.app.debug:
+            print("Distance: " + str(d))
         if d < -error or d > error:
             return False
     return True



More information about the Bf-extensions-cvs mailing list