Revision: 52515
          http://brlcad.svn.sourceforge.net/brlcad/?rev=52515&view=rev
Author:   starseeker
Date:     2012-09-21 19:10:55 +0000 (Fri, 21 Sep 2012)
Log Message:
-----------
Try building inner loops.  Not generating totally valid breps yet.

Modified Paths:
--------------
    brlcad/trunk/src/librt/test_botpatches.cpp

Modified: brlcad/trunk/src/librt/test_botpatches.cpp
===================================================================
--- brlcad/trunk/src/librt/test_botpatches.cpp  2012-09-21 18:53:26 UTC (rev 
52514)
+++ brlcad/trunk/src/librt/test_botpatches.cpp  2012-09-21 19:10:55 UTC (rev 
52515)
@@ -1030,12 +1030,11 @@
 
 // Do pullbacks to generate trimming curves in 2D, use them to create BrepTrim 
and BrepLoop structures for
 // outer and inner trimming loops
-
 void build_loop(size_t patch_id, size_t loop_index, ON_BrepLoop::TYPE 
loop_type, std::map<size_t, std::vector<size_t> > *loops, struct Manifold_Info 
*info) {
 
     ON_BrepFace& face = info->brep->m_F[patch_id];
     // Start with outer loop
-    ON_BrepLoop& loop = info->brep->NewLoop(ON_BrepLoop::outer, face);
+    ON_BrepLoop& loop = info->brep->NewLoop(loop_type, face);
     // build surface tree
     brlcad::SurfaceTree* st = new brlcad::SurfaceTree(&face, false);
 
@@ -1164,6 +1163,10 @@
        }
 
        build_loop((*p_it).first, outer_loop, ON_BrepLoop::outer, &loops, info);
+        // If there are any inner loops, build them too
+       for (std::set<size_t>::iterator il_it = inner_loops.begin(); il_it != 
inner_loops.end(); il_it++) {
+           build_loop((*p_it).first, (*il_it), ON_BrepLoop::inner, &loops, 
info);
+       }
     }
 }
 
@@ -1193,6 +1196,7 @@
        data.push_back(ON_3dVector(V3ARGS(&bot->vertices[(*f_it)*3])));
     }
 
+#if 0
     // Edges are important for patch merging - tighten them by adding more edge
     // points than just the vertex points.  Probably the right thing to do 
here is
     // to use points from the 3D NURBS edge curves instead of the bot edges, 
but
@@ -1215,6 +1219,7 @@
            }
        }
     }
+#endif
 }
 
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to