[cgma-dev] r2686 - cgm/trunk/geom/OCC

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Fri Mar 6 10:48:56 CST 2009


Author: janehu
Date: 2009-03-06 10:48:55 -0600 (Fri, 06 Mar 2009)
New Revision: 2686

Modified:
   cgm/trunk/geom/OCC/OCCModifyEngine.cpp
Log:
Setting periodic flag for curves meeting ends to make a combined curve; using the start/end points for the new combined curves, instead of sharing existing vertices with the old curves.

Modified: cgm/trunk/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCModifyEngine.cpp	2009-03-06 16:28:41 UTC (rev 2685)
+++ cgm/trunk/geom/OCC/OCCModifyEngine.cpp	2009-03-06 16:48:55 UTC (rev 2686)
@@ -5424,12 +5424,15 @@
   gp_Pnt last = comp_curve.Value(last_u);
   CubitVector first_v(first.X(), first.Y(), first.Z());
   CubitVector last_v(last.X(), last.Y(), last.Z());
+  if(first_v.about_equal(last_v))
+    comp_curve.SetPeriodic(Standard_True);
+
   DLIList<CubitVector> v_list;
   v_list.append(first_v);
   v_list.append(last_v);
   v_list.reset();
 
-  DLIList<TopoDS_Vertex*> V_list;
+  DLIList<gp_Pnt*> V_list;
   for(int j = 0; j < 2; j++)
   {
     DLIList<TopologyBridge*> children;
@@ -5445,7 +5448,8 @@
       CubitVector xyz = vertex->coordinates();
       if(xyz.about_equal(v))
       {
-        V_list.append( vertex->get_TopoDS_Vertex());
+        gp_Pnt p ( v.x(), v.y(), v.z());
+        V_list.append(&p);
         break;
       }
     }



More information about the cgma-dev mailing list