[cgma-dev] r6055 - cgm/trunk/geom

janehu at mcs.anl.gov janehu at mcs.anl.gov
Sat Aug 17 15:07:01 CDT 2013


Author: janehu
Date: 2013-08-17 15:07:00 -0500 (Sat, 17 Aug 2013)
New Revision: 6055

Modified:
   cgm/trunk/geom/GeometryQueryTool.cpp
Log:
Return CUBIT_FAILURE for get_graphics with body as input and make sure return value is correct for the other call of get_graphics with surface input. Doesn't affect testcases.

Modified: cgm/trunk/geom/GeometryQueryTool.cpp
===================================================================
--- cgm/trunk/geom/GeometryQueryTool.cpp	2013-08-10 16:54:02 UTC (rev 6054)
+++ cgm/trunk/geom/GeometryQueryTool.cpp	2013-08-17 20:07:00 UTC (rev 6055)
@@ -7645,11 +7645,15 @@
   std::vector<TopologyBridge*> vertex_edge_to_point_vector;
   std::vector<std::pair<TopologyBridge*, std::pair<int,int> > > facetedges_on_curve;
 
-  surf_ptr->get_geometry_query_engine()->
+  CubitStatus rsl = surf_ptr->get_geometry_query_engine()->
     get_graphics(surf_ptr, gmem, vertex_edge_to_point_vector, facetedges_on_curve,
     normal_tolerance, distance_tolerance, max_edge_length );
 
   ref_vertex_edge_to_point_vector.resize( vertex_edge_to_point_vector.size(), NULL );
+
+  if(rsl == CUBIT_FAILURE)
+    return rsl;
+
   RefEntity *ref_ent = NULL;
   int size = vertex_edge_to_point_vector.size();
   for( int i=0; i<size; i++ )
@@ -7720,8 +7724,10 @@
   std::vector<Surface*> surfaces_to_facet_vector;
   std::vector<TopologyBridge*> tmp_facet_point_ownership_vector;
   std::vector<std::pair<TopologyBridge*, std::pair<int,int> > > facetedges_on_curve;
-  gqe->get_graphics( body_sm, g_mem, surfaces_to_facet_vector, tmp_facet_point_ownership_vector,
+  CubitStatus rsl = gqe->get_graphics( body_sm, g_mem, surfaces_to_facet_vector, tmp_facet_point_ownership_vector,
     facetedges_on_curve, normal_tolerance, distance_tolerance, max_edge_length );
+  if(rsl == CUBIT_FAILURE)
+    return rsl;
 
   //map Surfaces to MRefFaces
   Surface *current_surf = NULL;



More information about the cgma-dev mailing list