Revision: 73174
          http://sourceforge.net/p/brlcad/code/73174
Author:   starseeker
Date:     2019-05-24 14:53:11 +0000 (Fri, 24 May 2019)
Log Message:
-----------
Report the face with the issue.  Looks like the surface point generation needs 
to be more aware of what's going on on the edges so it can be sure to generate 
enough points for the tessellation to not end up incorporating three edge 
points into a face.

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

Modified: brlcad/trunk/src/libbrep/cdt.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt.cpp    2019-05-24 14:41:08 UTC (rev 73173)
+++ brlcad/trunk/src/libbrep/cdt.cpp    2019-05-24 14:53:11 UTC (rev 73174)
@@ -49,7 +49,7 @@
        struct ON_Brep_CDT_State *s_cdt,
        std::vector<p2t::Triangle*> *tris,
        std::set<p2t::Triangle*> *tris_degen,
-       int face_index) 
+       int face_index)
 {
     std::map<p2t::Point *, ON_3dPoint *> *pointmap = 
s_cdt->tri_to_on3_maps[face_index];
     std::map<p2t::Point *, ON_3dPoint *> *normalmap = 
s_cdt->tri_to_on3_norm_maps[face_index];
@@ -66,7 +66,7 @@
            ON_3dPoint *onorm = (*normalmap)[p];
            if (tdir.Length() > 0 && ON_DotProduct(*onorm, tdir) < 0) {
                ON_3dPoint tri_cent = (*(*pointmap)[t->GetPoint(0)] + 
*(*pointmap)[t->GetPoint(1)] + *(*pointmap)[t->GetPoint(2)])/3;
-               bu_log("Normal in wrong direction:\n");
+               bu_log("Face %d: normal in wrong direction:\n", face_index);
                bu_log("Tri p1: %f %f %f\n", (*pointmap)[t->GetPoint(0)]->x, 
(*pointmap)[t->GetPoint(0)]->y, (*pointmap)[t->GetPoint(0)]->z);
                bu_log("Tri p2: %f %f %f\n", (*pointmap)[t->GetPoint(1)]->x, 
(*pointmap)[t->GetPoint(1)]->y, (*pointmap)[t->GetPoint(1)]->z);
                bu_log("Tri p3: %f %f %f\n", (*pointmap)[t->GetPoint(2)]->x, 
(*pointmap)[t->GetPoint(2)]->y, (*pointmap)[t->GetPoint(2)]->z);

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