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

Jiangtao Hu jiangtao_ma at yahoo.com
Mon May 2 15:47:30 CDT 2011


--- On Mon, 5/2/11, Jason Kraftcheck <kraftche at cae.wisc.edu> wrote:


From: Jason Kraftcheck <kraftche at cae.wisc.edu>
Subject: Re: [cgma-dev] r4790 - cgm/trunk/itaps
To: cgma-dev at mcs.anl.gov
Cc: jiangtao_ma at yahoo.com
Date: Monday, May 2, 2011, 2:23 PM


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.

Maybe I didn't understand Tim's requirement: he said GMem should not be exposed to the user through iGeom, and asked to give out just the points coordinates and connectivity. But I didn't think of that DLILists should be considered the same as GMem.

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.

So, without using DLIList, I'll use std::vector of CubitVectors, or doubles. I'll change it tomorrow.(Somehow I changed the font of the words, but couldn't change it back. please bear with me.)

This loop (present in both functions) looks wrong:

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

 
Yes, I'd remove the i++; line tomorrow. Thanks.
 
Jane
- 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/cgma-dev/attachments/20110502/502f3ea0/attachment-0001.htm>


More information about the cgma-dev mailing list