[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47389] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp: Made an attempt to fix an instability issue in stroke rendering due to a failure

Tamito Kajiyama rd6t-kjym at asahi-net.or.jp
Mon Jun 4 00:53:16 CEST 2012


Revision: 47389
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47389
Author:   kjym3
Date:     2012-06-03 22:53:12 +0000 (Sun, 03 Jun 2012)
Log Message:
-----------
Made an attempt to fix an instability issue in stroke rendering due to a failure
of Normal2DF0D with smooth FEdges.  The fix is to avoid generating new FEdgeSmooth
instances whose length is shorter than epsilon.

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp	2012-06-03 21:34:17 UTC (rev 47388)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp	2012-06-03 22:53:12 UTC (rev 47389)
@@ -174,6 +174,8 @@
   fl!=flend;
   ++fl){
     fe = BuildSmoothFEdge(feprevious, (*fl));
+    if (feprevious && fe == feprevious)
+      continue;
     fe->setViewEdge(newVEdge);
     if(!fefirst)
       fefirst = fe;
@@ -469,6 +471,9 @@
   Vec3r B2(woeb->GetbVertex()->GetVertex());
   Vec3r B(B1+tb*(B2-B1));
 
+  if (feprevious && (B - va->point3D()).norm() < 1e-6)
+	return feprevious;
+
   vb = MakeSVertex(B, false);
   // Set normal:
   Vec3r NB1(ifl.fl->getFace()->GetVertexNormal(woeb->GetaVertex()));




More information about the Bf-blender-cvs mailing list