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

wilsonp at engr.wisc.edu wilsonp at engr.wisc.edu
Thu Jun 2 01:32:00 CDT 2011


Author: wilsonp
Date: 2011-06-02 01:31:55 -0500 (Thu, 02 Jun 2011)
New Revision: 4918

Modified:
   cgm/trunk/itaps/iGeom.h
   cgm/trunk/itaps/iGeom_CGMA.cc
Log:
Add documentation to interface for getFacets method.

Assign values to return variables that indicate size of allocated space.

Passes make check - although there are not yet any tests for this method anyway!


Modified: cgm/trunk/itaps/iGeom.h
===================================================================
--- cgm/trunk/itaps/iGeom.h	2011-06-02 02:45:44 UTC (rev 4917)
+++ cgm/trunk/itaps/iGeom.h	2011-06-02 06:31:55 UTC (rev 4918)
@@ -3921,6 +3921,20 @@
                     iBase_EntitySetHandle* result_entity_set, 
                     int *err );
 
+    /**\brief  Return facet information from solid modeling engine
+     *
+     * Return facet information from solid modeling engine
+     * \param instance iGeom instance handle
+     * \param entity_handle Entity being queried
+     * \param dist_tolerance Tolerance guidance for faceting engine
+     * \param **points List of vertices in faceting of curve or surface
+     * \param *points_allocated Number of points in faceting
+     * \param *points_size Size of points array (should be 3*points_allocated?)
+     * \param **facets List of facets in faceting of surface
+     * \param *facets_allocated Number of facets in surface faceting
+     * \param *facets_size Size of facets array (should be 3*facets_allocated?)
+     * \param *err Pointer to error type returned from function
+     */
   void iGeom_getFacets(iGeom_Instance instance,
                        iBase_EntityHandle entity,
                        double dist_tolerance,

Modified: cgm/trunk/itaps/iGeom_CGMA.cc
===================================================================
--- cgm/trunk/itaps/iGeom_CGMA.cc	2011-06-02 02:45:44 UTC (rev 4917)
+++ cgm/trunk/itaps/iGeom_CGMA.cc	2011-06-02 06:31:55 UTC (rev 4918)
@@ -7106,6 +7106,8 @@
         y += step;
         z += step; 
       } 
+      *points_allocated = p_count;
+      *points_size = p_count * 3;
     }
     if(f_count)
     {
@@ -7123,6 +7125,8 @@
          *(connectivity + 2) = list[i*4 + 3];
          connectivity += 3;
       }
+      *facets_allocated = f_count/4;
+      *facets_size = f_count*3/4;
     } 
     RETURN(iBase_SUCCESS); 
   }





More information about the cgma-dev mailing list