Revision: 55867
http://sourceforge.net/p/brlcad/code/55867
Author: phoenixyjll
Date: 2013-06-27 07:04:18 +0000 (Thu, 27 Jun 2013)
Log Message:
-----------
Add another test for overlaps.
Modified Paths:
--------------
brlcad/trunk/src/libbrep/test_curve_intersect.cpp
Modified: brlcad/trunk/src/libbrep/test_curve_intersect.cpp
===================================================================
--- brlcad/trunk/src/libbrep/test_curve_intersect.cpp 2013-06-27 05:32:46 UTC
(rev 55866)
+++ brlcad/trunk/src/libbrep/test_curve_intersect.cpp 2013-06-27 07:04:18 UTC
(rev 55867)
@@ -64,6 +64,7 @@
// curve-curve intersection
bu_log("*** Curve-curve intersection ***\n");
+ bu_log("Test 1:\n");
// circle A is a circle fixed at the origin
ON_Circle circleA = ON_Circle(plane, origin, radius);
ON_NurbsCurve *curveA = ON_NurbsCurve::New();
@@ -89,6 +90,26 @@
}
delete curveA;
+ bu_log("Test 2:\n");
+ // Test the merge correctness of overlap events.
+ ON_3dPointArray ptarrayA, ptarrayB;
+ ptarrayA.Append(ON_3dPoint(0.0, -1.0, 0.0));
+ ptarrayA.Append(ON_3dPoint(0.0, 1.0, 0.0));
+ ptarrayA.Append(ON_3dPoint(-1.0, 0.0, 0.0));
+ ptarrayA.Append(ON_3dPoint(1.0, 0.0, 0.0));
+ ptarrayB.Append(ON_3dPoint(0.0, -2.0, 0.0));
+ ptarrayB.Append(ON_3dPoint(0.0, 0.0, 0.0));
+ ptarrayB.Append(ON_3dPoint(2.0, 0.0, 0.0));
+ ON_PolylineCurve polyA(ptarrayA), polyB(ptarrayB);
+ curveA = ON_NurbsCurve::New();
+ ON_NurbsCurve *curveB = ON_NurbsCurve::New();
+ polyA.GetNurbForm(*curveA);
+ polyB.GetNurbForm(*curveB);
+ test_cci(curveA, curveB);
+ bu_log("%lf %lf %lf %lf\n", curveA->Domain().Min(),
curveA->Domain().Max(), curveB->Domain().Min(), curveB->Domain().Max());
+ delete curveA;
+ delete curveB;
+
// curve-surface intersections to be implemented.
bu_log("All finished.\n");
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