[cgma-dev] r4884 - in cgm/trunk: geom/OCC test

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Thu May 26 13:29:36 CDT 2011


Author: janehu
Date: 2011-05-26 13:29:34 -0500 (Thu, 26 May 2011)
New Revision: 4884

Modified:
   cgm/trunk/geom/OCC/OCCModifyEngine.cpp
   cgm/trunk/geom/OCC/OCCSurface.cpp
   cgm/trunk/test/Makefile.am
   cgm/trunk/test/modify.cpp
Log:
Made changes regarding webcut using sweep curve method that is a possible bug that Yu Wenhui asked. Passed make distcheck. Testcase is in modify.cpp

Modified: cgm/trunk/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCModifyEngine.cpp	2011-05-26 13:49:07 UTC (rev 4883)
+++ cgm/trunk/geom/OCC/OCCModifyEngine.cpp	2011-05-26 18:29:34 UTC (rev 4884)
@@ -4442,19 +4442,17 @@
           }
         }
       }
-      else //sheet body 
-      {
-        TopoDS_Face* topoface = occ_surface->get_TopoDS_Face();
-        TopAbs_Orientation ori = topoface->Orientation();
-        topoface->Orientation(ori == TopAbs_FORWARD ? TopAbs_REVERSED :
+    }        
+    if(!occ_shell || occ_shell->is_sheet()) //sheet body 
+    {
+      TopoDS_Face* topoface = occ_surface->get_TopoDS_Face();
+      TopAbs_Orientation ori = topoface->Orientation();
+      topoface->Orientation(ori == TopAbs_FORWARD ? TopAbs_REVERSED :
                                                     TopAbs_FORWARD);
-        occ_surface->set_TopoDS_Face(*topoface);
-        surface_list.append(occ_surface);
-      }
+      occ_surface->set_TopoDS_Face(*topoface);
+      surface_list.append(occ_surface);
       PRINT_INFO( "Modified volume\n" );
     }
-    else
-      PRINT_WARNING( "Volume was not modified\n" );
   }
   face_list = surface_list;
   return CUBIT_SUCCESS;
@@ -4639,22 +4637,12 @@
 CubitStatus OCCModifyEngine::get_sweepable_toposhape(OCCCurve*& curve,
                                               TopoDS_Shape& toposhape)const
 {
-  DLIList<OCCLoop*> loops;
-  loops =  curve->loops();
-  if( loops.size()) //not a free curve
-  {
-    //copy the curve
-    Curve* c_curve = make_Curve(curve);
-    if(c_curve)
-     curve = CAST_TO(c_curve, OCCCurve);
-    else
-    {
-      PRINT_ERROR("Can't copy the curve for sweep.\n");
-      return CUBIT_FAILURE;
-    }
-  }
   TopoDS_Edge *edge = curve->get_TopoDS_Edge( );


More information about the cgma-dev mailing list