Revision: 56462
          http://sourceforge.net/p/brlcad/code/56462
Author:   phoenixyjll
Date:     2013-08-02 13:15:30 +0000 (Fri, 02 Aug 2013)
Log Message:
-----------
When i < 2 and >= 2, the iso-curve is on surface A and surface B respectively.

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

Modified: brlcad/trunk/src/libbrep/intersect.cpp
===================================================================
--- brlcad/trunk/src/libbrep/intersect.cpp      2013-08-02 09:22:05 UTC (rev 
56461)
+++ brlcad/trunk/src/libbrep/intersect.cpp      2013-08-02 13:15:30 UTC (rev 
56462)
@@ -2657,8 +2657,13 @@
                            // One side of it is shared and the other side is 
non-shared.
                            OverlapSegment *seg = new OverlapSegment;
                            seg->m_curve3d = sub_curve(boundary, 
x_event[k].m_a[0], x_event[k].m_a[1]);
-                           seg->m_curveA = new ON_LineCurve(iso_pt1, iso_pt2);
-                           seg->m_curveB = overlap2d[k];
+                           if (i < 2) {
+                               seg->m_curveA = new ON_LineCurve(iso_pt1, 
iso_pt2);
+                               seg->m_curveB = overlap2d[k];
+                           } else {
+                               seg->m_curveB = new ON_LineCurve(iso_pt1, 
iso_pt2);
+                               seg->m_curveA = overlap2d[k];
+                           }
                            seg->m_dir = dir;
                            seg->m_fix = b_knots[j];
                            overlaps.Append(seg);
@@ -2667,20 +2672,25 @@
                                // 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.
+                               seg = new OverlapSegment;
                                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];
                                seg->m_curve3d = 
(*overlaps.Last())->m_curve3d->Duplicate();
-                               seg->m_curveA = new ON_LineCurve(iso_pt1, 
iso_pt2);
-                               seg->m_curveB = overlap2d[k]->Duplicate();
-                               // seg.m_dir = dir;
+                               if (i < 2) {
+                                   seg->m_curveA = new ON_LineCurve(iso_pt1, 
iso_pt2);
+                                   seg->m_curveB = overlap2d[k]->Duplicate();
+                               } else {
+                                   seg->m_curveB = new ON_LineCurve(iso_pt1, 
iso_pt2);
+                                   seg->m_curveA = overlap2d[k]->Duplicate();
+                               }
+                               seg->m_dir = dir;
                                seg->m_fix = knots[knotcnt];
                                overlaps.Append(seg);
                            }
                            // We set overlap2d[k] to NULL, is case that the 
curve
                            // is delete by the destructor of overlap2d. (See 
~ON_CurveArray())
-                           // Also the curves in seg. (See ~OverlapSegment())
                            overlap2d[k] = NULL;
                        }
                    }

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


------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to