Revision: 55796
          http://sourceforge.net/p/brlcad/code/55796
Author:   phoenixyjll
Date:     2013-06-18 08:48:54 +0000 (Tue, 18 Jun 2013)
Log Message:
-----------
The input u_domain and v_domain should be considered.

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

Modified: brlcad/trunk/src/libbrep/intersect.cpp
===================================================================
--- brlcad/trunk/src/libbrep/intersect.cpp      2013-06-18 08:40:42 UTC (rev 
55795)
+++ brlcad/trunk/src/libbrep/intersect.cpp      2013-06-18 08:48:54 UTC (rev 
55796)
@@ -257,7 +257,7 @@
        tolerance = PCI_DEFAULT_TOLERANCE;
 
     Subcurve root;
-    if (curveB_domain == NULL) {
+    if (curveB_domain == NULL || *curveB_domain == curveB.Domain()) {
        root.m_curve = curveB.Duplicate();
        root.m_t = curveB.Domain();
     }
@@ -378,7 +378,9 @@
     ON_3dPoint closest_point_3d = surfaceB.PointAt(closest_point_uv.x, 
closest_point_uv.y);
     bu_log("%lf %lf %lf\n", pointA.x, pointA.y, pointA.z);
     bu_log("%lf %lf %lf\n", closest_point_3d.x, closest_point_3d.y, 
closest_point_3d.z);
-    if (pointA.DistanceTo(closest_point_3d) <= tolerance) {
+    if (pointA.DistanceTo(closest_point_3d) <= tolerance
+       && u_domain.Includes(closest_point_uv.x)
+       && v_domain.Includes(closest_point_uv.y)) {
        ON_PX_EVENT Event;
        Event.m_type = ON_PX_EVENT::psx_point;
        Event.m_A = pointA;

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


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to