Revision: 56182
http://sourceforge.net/p/brlcad/code/56182
Author: phoenixyjll
Date: 2013-07-23 04:12:12 +0000 (Tue, 23 Jul 2013)
Log Message:
-----------
Deal with closed domains for the overlap curve segments.
Modified Paths:
--------------
brlcad/trunk/src/libbrep/intersect.cpp
Modified: brlcad/trunk/src/libbrep/intersect.cpp
===================================================================
--- brlcad/trunk/src/libbrep/intersect.cpp 2013-07-22 23:08:55 UTC (rev
56181)
+++ brlcad/trunk/src/libbrep/intersect.cpp 2013-07-23 04:12:12 UTC (rev
56182)
@@ -2358,6 +2358,19 @@
overlaps.Append(sub_curve(boundary,
x_event[k].m_a[0], x_event[k].m_a[1]));
overlap1.Append(new ON_LineCurve(iso_pt1, iso_pt2));
overlap2.Append(overlap2d[k]);
+ if (j == 0 && surf1->IsClosed(dir)) {
+ // something like close_domain().
+ // If the domain is closed, the iso-curve on the
+ // first knot and the last knot is the same, so
+ // we don't need to compute the intersections
twice.
+
overlaps.Append((*overlaps.Last())->Duplicate());
+ iso_pt1.x = i%2 ? knots[knotcnt] :
x_event[k].m_a[0];
+ iso_pt1.y = i%2 ? x_event[k].m_a[0] :
knots[knotcnt];
+ iso_pt2.x = i%2 ? knots[knotcnt] :
x_event[k].m_a[1];
+ iso_pt2.y = i%2 ? x_event[k].m_a[1] :
knots[knotcnt];
+ overlap1.Append(new ON_LineCurve(iso_pt1,
iso_pt2));
+ overlap2.Append(overlap2d[k]->Duplicate());
+ }
// We set overlap2d[k] to NULL, is case that the
curve
// is delete by the destructor of overlap2d. (See
~ON_CurveArray())
overlap2d[k] = NULL;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits