Revision: 73920
          http://sourceforge.net/p/brlcad/code/73920
Author:   starseeker
Date:     2019-09-12 21:30:15 +0000 (Thu, 12 Sep 2019)
Log Message:
-----------
not going the cdt early/often route

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

Modified: brlcad/trunk/src/libbrep/cdt.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt.cpp    2019-09-12 21:28:49 UTC (rev 73919)
+++ brlcad/trunk/src/libbrep/cdt.cpp    2019-09-12 21:30:15 UTC (rev 73920)
@@ -521,82 +521,7 @@
        // are close to other edges.
        //refine_close_edges(s_cdt);
 
-
 #if 0
-       // Check the CDT meshing - at this point, we should be able to produce
-       // a valid triangulation for all faces.  If not, refine the larger
-       // curved edges until we can.
-       //
-       // TODO - the below won't work in general, since without surface points
-       // we can't guarantee validity.  Instead, check the expanded 2D RTree 
bboxes
-       // for overlaps from edges other than the two edges connected to the 
current edge.
-       // Keep splitting any edges with such overlaps until the UV polygon
-       // curve bboxes are NOT self interfering except with their two 
neighbors.
-       //
-       // Ideally we'll reuse the RTree and just Remove and Insert new nodes 
as we
-       // refine, but we need to test Remove in the RTree.h code to make sure 
it does
-       // what is expected - there's a TODO note in there.
-       //
-       // A good test case is NIST2 face 493
-       for (int index = 0; index < brep->m_F.Count(); index++) {
-           ON_BrepFace &face = s_cdt->brep->m_F[index];
-           cdt_mesh::cdt_mesh_t *fmesh = &s_cdt->fmeshes[face.m_face_index];
-           // List singularities
-           for (size_t i = 0; i < fmesh->pnts.size(); i++) {
-               ON_3dPoint *p3d = fmesh->pnts[i];
-               if (s_cdt->singular_vert_to_norms->find(p3d) != 
s_cdt->singular_vert_to_norms->end()) {
-                   fmesh->sv.insert(fmesh->p2ind[p3d]);
-               }
-           }
-
-           // List edges
-           fmesh->brep_edges.clear();
-           loop_edges(fmesh, &fmesh->outer_loop);
-           std::map<int, cdt_mesh::cpolygon_t*>::iterator i_it;
-           for (i_it = fmesh->inner_loops.begin(); i_it != 
fmesh->inner_loops.end(); i_it++) {
-               loop_edges(fmesh, i_it->second);
-           }
-
-           bool success = (fmesh->cdt() && fmesh->repair() && fmesh->valid(0));
-
-           if (!success) {
-
-               // Start iterating
-               int cnt = 0;
-               while (!fmesh->valid(0)) {
-                   //std::cout << "Face " << face.m_face_index << " , 
iteration " << cnt << ": base mesh CDT invalid\n";
-#if 0
-                   struct bu_vls fname = BU_VLS_INIT_ZERO;
-                   bu_vls_sprintf(&fname, "iteration-%d-tris.p3", cnt);
-                   fmesh->tris_plot(bu_vls_cstr(&fname));
-                   bu_vls_free(&fname);
-#endif
-
-                   fmesh->reset();
-                   //split_long_edges(s_cdt, index);
-
-                   // Replace old edge list with new edges
-                   fmesh->brep_edges.clear();
-                   loop_edges(fmesh, &fmesh->outer_loop);
-                   for (i_it = fmesh->inner_loops.begin(); i_it != 
fmesh->inner_loops.end(); i_it++) {
-                       loop_edges(fmesh, i_it->second);
-                   }
-                   fmesh->boundary_edges_update();
-
-                   fmesh->cdt();
-                   fmesh->repair();
-
-                   cnt++;
-               }
-           }
-
-           // Unless we're doing NO additional refinement, this is not our 
final mesh
-           fmesh->reset();
-
-       }
-#endif
-
-#if 0
        // 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);

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