Revision: 73840
          http://sourceforge.net/p/brlcad/code/73840
Author:   starseeker
Date:     2019-09-05 23:17:13 +0000 (Thu, 05 Sep 2019)
Log Message:
-----------
Use calc_trim_vnorm, but something about the m_bRev handling is out of kilter 
somehow...

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

Modified: brlcad/trunk/src/libbrep/cdt.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt.cpp    2019-09-05 20:32:45 UTC (rev 73839)
+++ brlcad/trunk/src/libbrep/cdt.cpp    2019-09-05 23:17:13 UTC (rev 73840)
@@ -1327,8 +1327,10 @@
                            // 3D points are globally unique, but normals are 
not - the same edge point may
                            // have different normals from two faces at a sharp 
edge.  Calculate the
                            // face normal for this point on this surface.
-                           ON_3dPoint tmp1;
-                           surface_EvNormal(trim->SurfaceOf(), cp.x, cp.y, 
tmp1, norm);
+                           norm = calc_trim_vnorm(*trim->Vertex(0), trim);
+                           if (face.m_bRev) {
+                               norm = -1 * norm;
+                           }
                        } else {
                            // Surface sampling will need some information 
about singularities
                            s_cdt->strim_pnts[face_index][trim->m_trim_index] = 
op3d;
@@ -1362,8 +1364,10 @@
                            // 3D points are globally unique, but normals are 
not - the same edge point may
                            // have different normals from two faces at a sharp 
edge.  Calculate the
                            // face normal for this point on this surface.
-                           ON_3dPoint tmp1;
-                           surface_EvNormal(trim->SurfaceOf(), cp.x, cp.y, 
tmp1, norm);
+                           norm = calc_trim_vnorm(*trim->Vertex(1), trim);
+                           if (face.m_bRev) {
+                               norm = -1 * norm;
+                           }
                        } else {
                            // Surface sampling will need some information 
about singularities
                            s_cdt->strim_pnts[face_index][trim->m_trim_index] = 
cp3d;

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