<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV><BR>--- On Mon, 5/2/11, Jason Kraftcheck <kraftche@cae.wisc.edu> wrote:<BR><BR><BR>From: Jason Kraftcheck <kraftche@cae.wisc.edu><BR>Subject: Re: [cgma-dev] r4790 - cgm/trunk/itaps<BR>To: cgma-dev@mcs.anl.gov<BR>Cc: jiangtao_ma@yahoo.com<BR>Date: Monday, May 2, 2011, 2:23 PM<BR><BR><BR>Should we drop the general facet concept from Cubit and instead assume<BR>triangles?<BR><BR>What use are these functions? They just copy the data from the Cubit GMem<BR>object to DLILists. Both are CGM-specific data structures.<BR><BR><FONT color=#0000bf>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.<BR><BR></FONT>Why return a DLIList of pointers to
dynamically allocated CubitVector<BR>instances? Why not just a std::vector of CubitVectors? Or an std::vector<BR>of floats if the extra precision isn't required.<BR><BR><FONT color=#0000bf>So, without using DLIList, I'll use std::vector of CubitVectors, or doubles.<FONT face="Lucida Console"> </FONT><FONT face="times new roman, new york, times, serif">I'll change it tomorrow.(Somehow I changed the font of the words, but couldn't change it back. please bear with me.)</FONT><BR><BR></FONT>This loop (present in both functions) looks wrong:<BR><BR> for(int i = 0; i < facets.facet_list_size(); i++)<BR> {<BR> facet_list.append(list[i]);<BR> i++;<BR> }</DIV>
<DIV><BR> </DIV>
<DIV><FONT color=#0000bf>Yes, I'd remove the i++; line tomorrow. Thanks.</FONT></DIV>
<DIV><FONT color=#0000bf></FONT> </DIV>
<DIV><FONT color=#0000bf>Jane<BR></FONT>- jason <BR><BR><BR>On 05/02/2011 01:08 PM, jiangtao_ma@yahoo.com wrote:<BR>> Author: janehu<BR>> Date: 2011-05-02 13:08:11 -0500 (Mon, 02 May 2011)<BR>> New Revision: 4790<BR>> <BR>> Modified:<BR>> cgm/trunk/itaps/iGeom_CGMA.cc<BR>> Log:<BR>> Added iGeom function to pass out facet info for RefFaces and RefEdges.<BR>> <BR>> Modified: cgm/trunk/itaps/iGeom_CGMA.cc<BR>> ===================================================================<BR>> --- cgm/trunk/itaps/iGeom_CGMA.cc 2011-05-02 16:48:16 UTC (rev 4789)<BR>> +++ cgm/trunk/itaps/iGeom_CGMA.cc 2011-05-02 18:08:11 UTC (rev 4790)<BR>> @@ -22,7 +22,7 @@<BR>> */<BR>> #include "iGeom.h"<BR>> #include "InitCGMA.hpp"<BR>> -<BR>> +#include "GMem.hpp"<BR>> #include <iostream><BR>> #include
<math.h><BR>> #include "GeometryQueryTool.hpp"<BR>> @@ -278,7 +278,20 @@<BR>> DLIList<RefEntity*>& target_list,<BR>> int* err );<BR>> <BR>> +static<BR>> +CubitStatus iGeom_get_graphics(RefFace* face, <BR>> + DLIList<CubitVector*>& point_list,<BR>> + DLIList<int>& facet_list,<BR>> + unsigned short normal_tolerance = 15,<BR>> +
double distance_tolerance = 0,<BR>> + double longest_edge = 0) ;<BR>> <BR>> +static<BR>> +CubitStatus iGeom_get_graphics(RefEdge* edge,<BR>> + DLIList<CubitVector*>& point_list,<BR>> + DLIList<int>& facet_list,<BR>> + double tolerance = 0.0 ) ;<BR>> +<BR>> static CubitStatus init_cgm( const std::string& engine )<BR>>
{<BR>> CubitStatus status;<BR>> @@ -7049,3 +7062,66 @@<BR>> <BR>> RETURN(iBase_SUCCESS);<BR>> }<BR>> +<BR>> +static<BR>> +CubitStatus iGeom_get_graphics(RefFace* face,<BR>> + DLIList<CubitVector*>& point_list,<BR>> + DLIList<int>& facet_list,<BR>> + unsigned short normal_tolerance ,<BR>> + double distance_tolerance ,<BR>> +
double longest_edge ) <BR>> +{<BR>> + GMem facets;<BR>> + CubitStatus resl = face->get_graphics(facets, normal_tolerance, <BR>> + distance_tolerance, longest_edge);<BR>> + if(resl == CUBIT_FAILURE) <BR><BR><BR>-- <BR>"A foolish consistency is the hobgoblin of little minds" - Ralph Waldo Emerson<BR><BR></DIV></td></tr></table>