[cgma-dev] r2791 - cgm/trunk/geom/OCC
jiangtao_ma at yahoo.com
jiangtao_ma at yahoo.com
Wed Apr 1 15:17:00 CDT 2009
Author: janehu
Date: 2009-04-01 15:16:59 -0500 (Wed, 01 Apr 2009)
New Revision: 2791
Modified:
cgm/trunk/geom/OCC/OCCShapeAttributeSet.cpp
Log:
Fix for brep files without attribute reading.
Modified: cgm/trunk/geom/OCC/OCCShapeAttributeSet.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCShapeAttributeSet.cpp 2009-04-01 18:38:48 UTC (rev 2790)
+++ cgm/trunk/geom/OCC/OCCShapeAttributeSet.cpp 2009-04-01 20:16:59 UTC (rev 2791)
@@ -1714,7 +1714,7 @@
const int nbshapes,
TDF_Label* label )const
{
- std::string buffer;
+ std::string buffer, buffer_attr;
IS >> buffer;
if (buffer[0] == '*')
S = TopoDS_Shape();
@@ -1753,8 +1753,10 @@
for ( i = 1; i <= nbShapes; i++)
{
TopoDS_Shape Sh = myShapes(i);
- IS >> buffer;
- if(buffer[0] == '*') //empty attributes for this shape
+ IS >> buffer_attr;
+ if(buffer_attr[0] != '*' && buffer_attr[0] != 'C')
+ break;
+ if(buffer_attr[0] == '*') //empty attributes for this shape
continue;
ReadAttribute(Sh, IS,*label);
}
More information about the cgma-dev
mailing list