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

Jason Kraftcheck kraftche at cae.wisc.edu
Mon May 2 13:23:25 CDT 2011


Should we drop the general facet concept from Cubit and instead assume
triangles?

What use are these functions?  They just copy the data from the Cubit GMem
object to DLILists.  Both are CGM-specific data structures.

Why return a DLIList of pointers to dynamically allocated CubitVector
instances?  Why not just a std::vector of CubitVectors?  Or an std::vector
of floats if the extra precision isn't required.

This loop (present in both functions) looks wrong:

  for(int i = 0; i < facets.facet_list_size(); i++)
  {
    facet_list.append(list[i]);
    i++;
  }

- jason


On 05/02/2011 01:08 PM, jiangtao_ma at yahoo.com wrote:
> Author: janehu
> Date: 2011-05-02 13:08:11 -0500 (Mon, 02 May 2011)
> New Revision: 4790
> 
> Modified:
>    cgm/trunk/itaps/iGeom_CGMA.cc
> Log:
> Added iGeom function to pass out facet info for RefFaces and RefEdges.
> 
> Modified: cgm/trunk/itaps/iGeom_CGMA.cc
> ===================================================================
> --- cgm/trunk/itaps/iGeom_CGMA.cc	2011-05-02 16:48:16 UTC (rev 4789)
> +++ cgm/trunk/itaps/iGeom_CGMA.cc	2011-05-02 18:08:11 UTC (rev 4790)
> @@ -22,7 +22,7 @@
>   */
>  #include "iGeom.h"
>  #include "InitCGMA.hpp"
> -
> +#include "GMem.hpp"
>  #include <iostream>
>  #include <math.h>
>  #include "GeometryQueryTool.hpp"
> @@ -278,7 +278,20 @@
>                              DLIList<RefEntity*>& target_list,
>                              int* err );
>  
> +static
> +CubitStatus iGeom_get_graphics(RefFace* face, 
> +                               DLIList<CubitVector*>& point_list,
> +                               DLIList<int>& facet_list,
> +                               unsigned short normal_tolerance = 15,
> +                               double distance_tolerance = 0,
> +                               double longest_edge = 0) ;
>  
> +static
> +CubitStatus iGeom_get_graphics(RefEdge* edge,
> +                               DLIList<CubitVector*>& point_list,
> +                               DLIList<int>& facet_list,
> +                               double tolerance = 0.0 ) ;
> +
>  static CubitStatus init_cgm( const std::string& engine )
>  {
>    CubitStatus status;
> @@ -7049,3 +7062,66 @@
>    
>    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 ) 
> +{
> +  GMem facets;
> +  CubitStatus resl = face->get_graphics(facets,  normal_tolerance, 
> +                                        distance_tolerance, longest_edge);
> +  if(resl == CUBIT_FAILURE) 


-- 
"A foolish consistency is the hobgoblin of little minds" - Ralph Waldo Emerson



More information about the cgma-dev mailing list