Revision: 73923
          http://sourceforge.net/p/brlcad/code/73923
Author:   starseeker
Date:     2019-09-13 18:48:53 +0000 (Fri, 13 Sep 2019)
Log Message:
-----------
Cute... turning on the additional refinements for NIST2 catches a point 
sneaking outside one of the faces and making a few invalid edges, right in the 
crack between to rtree3d boxes.  Fix is pretty straightforward (box the 
verteices) but will take a bit of work.

Modified Paths:
--------------
    brlcad/trunk/src/libbrep/cdt.cpp
    brlcad/trunk/src/libbrep/cdt_edge.cpp

Modified: brlcad/trunk/src/libbrep/cdt.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt.cpp    2019-09-12 23:21:09 UTC (rev 73922)
+++ brlcad/trunk/src/libbrep/cdt.cpp    2019-09-13 18:48:53 UTC (rev 73923)
@@ -34,6 +34,11 @@
 #define BREP_PLANAR_TOL 0.05
 #define MAX_TRIANGULATION_ATTEMPTS 5
 
+// TODO - get rid of all BN_TOL_DIST-only tolerances - if the object is
+// very small, that distance is too big (e.g. for linearity testing).
+
+// TODO get a profiler on this to see where we're slowest...
+
 #if 0
 int debug_ecnt;
 
@@ -520,7 +525,7 @@
        // are close to other edges.
        refine_close_edges(s_cdt);
 
-#if 0
+#if 1
        // On to tolerance based splitting.  Process the non-linear edges first 
-
        // we will need information from them to handle the linear edges
        tol_curved_edges_split(s_cdt);
@@ -570,7 +575,7 @@
        // Calculate 2D neighbor distances for polyedges
        //cpolyedge_nearest_dists(s_cdt);
 
-#if 1
+#if 0
        for (int index = 0; index < brep->m_F.Count(); index++) {
            struct bu_vls fname = BU_VLS_INIT_ZERO;
            bu_vls_sprintf(&fname, "%d-rtree_outer_polygon_2d.plot3", index);
@@ -580,7 +585,6 @@
            plot_rtree_2d2(s_cdt->face_rtrees_2d[index], bu_vls_cstr(&fname));
            bu_vls_sprintf(&fname, "%d-rtree_outer_polygon_3d.plot3", index);
            fmesh->polygon_plot_3d(&fmesh->outer_loop, bu_vls_cstr(&fname));
-           // TODO - NIST2 259 3D rtree is clearly wrong
            bu_vls_sprintf(&fname, "%d-rtree_3d.plot3", index);
            plot_rtree_3d(s_cdt->face_rtrees_3d[index], bu_vls_cstr(&fname));
        }

Modified: brlcad/trunk/src/libbrep/cdt_edge.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt_edge.cpp       2019-09-12 23:21:09 UTC (rev 
73922)
+++ brlcad/trunk/src/libbrep/cdt_edge.cpp       2019-09-13 18:48:53 UTC (rev 
73923)
@@ -235,6 +235,10 @@
     s_cdt->face_rtrees_2d[trim.Face()->m_face_index].Remove(p1, p2, (void 
*)pe);
 }
 
+// TODO - we need to bump the boxes out to also cover the area near the vertex
+// points themselves, or else make a vertex box based on the local edge 
distances.
+// Have an example in NIST2 where a point "slipped in" between two edge boxes, 
so we
+// clearly need to filter out that volume.
 void
 rtree_bbox_3d(struct ON_Brep_CDT_State *s_cdt, cdt_mesh::cpolyedge_t *pe)
 {
@@ -1546,7 +1550,7 @@
 
     for (int face_index = 0; face_index < brep->m_F.Count(); face_index++) {
        ON_BrepFace &face = s_cdt->brep->m_F[face_index];
-       std::cout << "Face " << face_index << " of " << brep->m_F.Count() << " 
close edge check...\n";
+       std::cout << "Face " << face_index << " of " << brep->m_F.Count()-1 << 
" close edge check...\n";
 
        std::vector<cdt_mesh::cpolyedge_t *> ws = cdt_face_polyedges(s_cdt, 
face_index);
 

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



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to