[cgma-dev] r5056 - cgm/trunk/geom/OCC
jiangtao_ma at yahoo.com
jiangtao_ma at yahoo.com
Thu Jul 14 11:55:20 CDT 2011
Author: janehu
Date: 2011-07-14 11:55:19 -0500 (Thu, 14 Jul 2011)
New Revision: 5056
Modified:
cgm/trunk/geom/OCC/OCCAttribSet.cpp
cgm/trunk/geom/OCC/OCCQueryEngine.cpp
cgm/trunk/geom/OCC/OCCShapeAttributeSet.cpp
Log:
Fixed the bug when using the imported file to export, the single lump body attribute is missing. Testcase update for this in attribute_to_file.cpp. Passed make check.
Modified: cgm/trunk/geom/OCC/OCCAttribSet.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCAttribSet.cpp 2011-07-13 19:53:02 UTC (rev 5055)
+++ cgm/trunk/geom/OCC/OCCAttribSet.cpp 2011-07-14 16:55:19 UTC (rev 5056)
@@ -321,6 +321,9 @@
{
//find the same type attribute first
TDF_Label child = it1.Value();
+ if (child.NbAttributes() == 0)
+ continue;
+
num_children ++;
if(!csa)
Modified: cgm/trunk/geom/OCC/OCCQueryEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCQueryEngine.cpp 2011-07-13 19:53:02 UTC (rev 5055)
+++ cgm/trunk/geom/OCC/OCCQueryEngine.cpp 2011-07-14 16:55:19 UTC (rev 5056)
@@ -18,6 +18,14 @@
//#include <Standard_SStream.hxx>
//#include <Standard_String.hxx>
//#include <stringbuf>
+#if OCC_VERSION_MINOR < 5
+ #include "TDataStd_Shape.hxx"
+ typedef TDataStd_Shape TDataXtd_Shape;
+ typedef Handle_TDataStd_Shape Handle_TDataXtd_Shape;
+#else
+ #include "TDataXtd_Shape.hxx"
+#endif
+
#include "BRep_Tool.hxx"
#include "gp_Pnt.hxx"
#include "gp_Ax1.hxx"
@@ -1891,6 +1899,13 @@
if( OccToCGM->find(current_id) == OccToCGM->end() )
{
OCCMap->UnBind(bare_shape);
+ std::map<int, TDF_Label>::iterator it =
+ Shape_Label_Map->find(current_id);
+ if(it != Shape_Label_Map->end())
+ {
+ TDF_Label aLabel = (*it).second;
+ Handle_TDataXtd_Shape attr_shape = TDataXtd_Shape::Set(aLabel, sh);
+ }
shape_found = true;
}
}
Modified: cgm/trunk/geom/OCC/OCCShapeAttributeSet.cpp
===================================================================
More information about the cgma-dev
mailing list