[cgma-dev] r4798 - cgm/trunk/itaps

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Tue May 3 12:44:23 CDT 2011


Author: janehu
Date: 2011-05-03 12:44:21 -0500 (Tue, 03 May 2011)
New Revision: 4798

Modified:
   cgm/trunk/itaps/iGeom.h
   cgm/trunk/itaps/iGeom_CGMA.cc
Log:
Added function iGeom_getFacets in iGeom interface. Removed previous two functions for getting graphics info on ref_entities. Passed the test in this dir.

Modified: cgm/trunk/itaps/iGeom.h
===================================================================
--- cgm/trunk/itaps/iGeom.h	2011-05-03 17:17:50 UTC (rev 4797)
+++ cgm/trunk/itaps/iGeom.h	2011-05-03 17:44:21 UTC (rev 4798)
@@ -3921,6 +3921,13 @@
                     iBase_EntitySetHandle* result_entity_set, 
                     int *err );
 
+  void iGeom_getFacets(iGeom_Instance instance,
+                       iBase_EntityHandle entity,
+                       double dist_tolerance,
+                       double **points, int *points_allocated, int *points_size,
+                       int **facets, int *facets_allocated, int *facets_size,
+                       int *err);
+
 #ifdef __cplusplus
 } // extern "C"
 #endif

Modified: cgm/trunk/itaps/iGeom_CGMA.cc
===================================================================
--- cgm/trunk/itaps/iGeom_CGMA.cc	2011-05-03 17:17:50 UTC (rev 4797)
+++ cgm/trunk/itaps/iGeom_CGMA.cc	2011-05-03 17:44:21 UTC (rev 4798)
@@ -7063,65 +7063,69 @@
   RETURN(iBase_SUCCESS);
 }
 
-static
-CubitStatus iGeom_get_graphics(RefFace* face,
-                               DLIList<CubitVector*>& point_list,
-                               DLIList<int>& facet_list,
-                               unsigned short normal_tolerance ,
-                               double distance_tolerance ,
-                               double longest_edge ) 
+void iGeom_getFacets(iGeom_Instance instance,
+                     iBase_EntityHandle entity,
+                     double dist_tolerance,
+                     double **points, int *points_allocated, int *points_size,
+                     int **facets, int *facets_allocated, int *facets_size,
+                     int *err)
 {
-  GMem facets;
-  CubitStatus resl = face->get_graphics(facets,  normal_tolerance, 
-                                        distance_tolerance, longest_edge);
-  if(resl == CUBIT_FAILURE) 
-    return   resl;
+  GMem gMem;
+  CubitStatus resl = CUBIT_SUCCESS;
+  RefFace *ref_face = dynamic_cast<RefFace*>(ENTITY_HANDLE(entity));
+  if(ref_face)
+    resl = ref_face->get_graphics(gMem,  15, dist_tolerance);


More information about the cgma-dev mailing list