Revision: 61544
          http://sourceforge.net/p/brlcad/code/61544
Author:   n_reed
Date:     2014-07-02 17:17:00 +0000 (Wed, 02 Jul 2014)
Log Message:
-----------
InPlane is not a predicate function, replace it with the same test we use 
elsewhere. Also, fix a case where single-point line-plane intersections were 
erroneously reported as overlap intersections. Alas, these changes don't fix 
any test conversions.

Modified Paths:
--------------
    brlcad/branches/brep-debug/src/libbrep/intersect.cpp

Modified: brlcad/branches/brep-debug/src/libbrep/intersect.cpp
===================================================================
--- brlcad/branches/brep-debug/src/libbrep/intersect.cpp        2014-07-02 
17:13:22 UTC (rev 61543)
+++ brlcad/branches/brep-debug/src/libbrep/intersect.cpp        2014-07-02 
17:17:00 UTC (rev 61544)
@@ -1695,7 +1695,7 @@
                if (line.Direction().IsPerpendicularTo(plane.Normal())) {
                    // they are parallel (or overlap)
 
-                   if (line.InPlane(plane, isect_tol)) {
+                   if (plane.DistanceTo(line.from) < isect_tol) {
                        // The line is on the surface's plane. The end-points of
                        // the overlap must be the linecurve's end-points or
                        // the intersection between the linecurve and the 
boundary
@@ -1787,6 +1787,15 @@
                        if (intersections == 0) {
                            continue;
                        }
+
+                       // if we have coincident intersection points,
+                       // treat as point intersection, not overlap
+                       if (intersections == 2 &&
+                           event.m_A[0].DistanceTo(event.m_A[1]) < isect_tol)
+                       {
+                           intersections = 1;
+                       }
+
                        if (intersections == 1) {
                            event.m_type = ON_X_EVENT::csx_point;
                            event.m_A[1] = event.m_A[0];

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


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to