Revision: 74887
          http://sourceforge.net/p/brlcad/code/74887
Author:   brlcad
Date:     2020-02-11 08:15:26 +0000 (Tue, 11 Feb 2020)
Log Message:
-----------
fix mismatched declaration constness on get_closest_point(), make face a const 
ref too.

Modified Paths:
--------------
    brlcad/trunk/include/brep/pullback.h
    brlcad/trunk/src/libbrep/opennurbs_ext.cpp

Modified: brlcad/trunk/include/brep/pullback.h
===================================================================
--- brlcad/trunk/include/brep/pullback.h        2020-02-10 20:25:49 UTC (rev 
74886)
+++ brlcad/trunk/include/brep/pullback.h        2020-02-11 08:15:26 UTC (rev 
74887)
@@ -92,10 +92,10 @@
      *   -- minimum occurs when the gradient is zero, i.e.
      *     \f[ \nabla f(u, v) = |\vec{S}(u, v)-\vec{p}|^2 = 0 \f]
      */
-    BREP_EXPORT bool get_closest_point(ON_2dPoint &outpt,
-                                      ON_BrepFace *face,
-                                      const ON_3dPoint &point,
-                                      SurfaceTree *tree = NULL,
+    BREP_EXPORT bool get_closest_point(ON_2dPoint& outpt,
+                                      const ON_BrepFace& face,
+                                      const ON_3dPoint& point,
+                                      const SurfaceTree* tree = NULL,
                                       double tolerance = 
BREP_FCP_ROOT_EPSILON);
 
     /**

Modified: brlcad/trunk/src/libbrep/opennurbs_ext.cpp
===================================================================
--- brlcad/trunk/src/libbrep/opennurbs_ext.cpp  2020-02-10 20:25:49 UTC (rev 
74886)
+++ brlcad/trunk/src/libbrep/opennurbs_ext.cpp  2020-02-11 08:15:26 UTC (rev 
74887)
@@ -1965,7 +1965,7 @@
 
 bool
 get_closest_point(ON_2dPoint& outpt,
-                 const ON_BrepFace* face,
+                 const ON_BrepFace& face,
                  const ON_3dPoint& point,
                  const SurfaceTree* tree,
                  double tolerance)
@@ -1977,7 +1977,7 @@
     pt2d_t curr_grad = {0.0, 0.0};
     pt2d_t new_uv = {0.0, 0.0};
     GCPData data;
-    data.surf = face->SurfaceOf();
+    data.surf = face.SurfaceOf();
     data.pt = point;
 
     TRACE("get_closest_point: " << PT(point));
@@ -1985,7 +1985,7 @@
     // get initial estimate
     const SurfaceTree* a_tree = tree;
     if (a_tree == NULL) {
-       a_tree = new SurfaceTree(face);
+       a_tree = new SurfaceTree(&face);
        delete_tree = true;
     }
     ON_Interval u, v;

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



_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to