Revision: 64348
          http://sourceforge.net/p/brlcad/code/64348
Author:   starseeker
Date:     2015-03-09 14:13:11 +0000 (Mon, 09 Mar 2015)
Log Message:
-----------
Use the original planes for the distance check.

Modified Paths:
--------------
    brlcad/trunk/src/libbrep/shape_recognition.h
    brlcad/trunk/src/libbrep/shape_recognition_cylinder.cpp

Modified: brlcad/trunk/src/libbrep/shape_recognition.h
===================================================================
--- brlcad/trunk/src/libbrep/shape_recognition.h        2015-03-09 13:49:24 UTC 
(rev 64347)
+++ brlcad/trunk/src/libbrep/shape_recognition.h        2015-03-09 14:13:11 UTC 
(rev 64348)
@@ -12,7 +12,7 @@
 #define BREP_ELLIPSOIDAL_TOL 0.05
 #define BREP_TOROIDAL_TOL 0.05
 
-#define pout(p)  p.x << "," << p.y << "," << p.z
+#define pout(p)  p.x << " " << p.y << " " << p.z
 
 typedef enum {
     CURVE_POINT = 0,

Modified: brlcad/trunk/src/libbrep/shape_recognition_cylinder.cpp
===================================================================
--- brlcad/trunk/src/libbrep/shape_recognition_cylinder.cpp     2015-03-09 
13:49:24 UTC (rev 64347)
+++ brlcad/trunk/src/libbrep/shape_recognition_cylinder.cpp     2015-03-09 
14:13:11 UTC (rev 64348)
@@ -1091,8 +1091,8 @@
                        ON_SimpleArray<const ON_BrepVertex *> top_pnts(2);
                        for (s_it = corner_verts.begin(); s_it != 
corner_verts.end(); s_it++) {
                            ON_3dPoint p = data->brep->m_V[*s_it].Point();
-                           double d1 = fabs(cap1.DistanceTo(p));
-                           double d2 = fabs(cap2.DistanceTo(p));
+                           double d1 = fabs(cyl_planes[0].DistanceTo(p));
+                           double d2 = fabs(cyl_planes[1].DistanceTo(p));
                            //std::cout << "d1: " << d1 << "\n";
                            //std::cout << "d2: " << d2 << "\n";
                            if (d1 < d2) {

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


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to