[cgma-dev] Fwd: [PATCH] API and linking changes for OpenCascade-6.5.0

Jiangtao Hu jiangtao_ma at yahoo.com
Wed Apr 13 10:33:07 CDT 2011


Hi, Jed

Thanks for working on OCC6.3 to OCC6.5 migration issue, your patches have been applied to build CGM on OCC6.5. As to your question, since Opencascade doesn't support compatibility of OCC6.3 and OCC6.5, CGM won't be able to support it either. Which means your patches are necessary for migrating CGM from OCC6.3 kernel to OCC6.5 kernel.

Jane
--- On Thu, 3/31/11, Jason Kraftcheck <kraftche at cae.wisc.edu> wrote:

From: Jason Kraftcheck <kraftche at cae.wisc.edu>
Subject: Fwd: [cgma-dev] [PATCH] API and linking changes for OpenCascade-6.5.0
To: "Jiangtao Hu" <jiangtao_ma at yahoo.com>
Date: Thursday, March 31, 2011, 3:07 PM



-------- Original Message --------
Subject: [cgma-dev] [PATCH] API and linking changes for OpenCascade-6.5.0
Date: Sat, 26 Mar 2011 10:15:26 +0300
From: Jed Brown <jed at 59A2.org>
To: cgma-dev at mcs.anl.gov
CC: Jed Brown <jed at 59A2.org>

Perhaps these should not be applied directly, but I don't know how you
want to handle checking versions and backward compatibility.
---
 configure.ac                      |    2 +-
 geom/OCC/OCCAttribSet.cpp         |   11 +++++------
 geom/OCC/OCCQueryEngine.cpp       |    1 -
 geom/OCC/OCCShapeAttributeSet.cpp |    7 +++----
 4 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8994977..1e8a6a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -354,7 +354,7 @@ HAVE_OCC_DEF=
 if test "x$occ_DIR" != "xno"; then
   OCC_CORE_LIBS="-lTKMesh -lTKTopAlgo -lTKGeomAlgo -lTKBRep -lTKGeomBase
-lTKG3d -lTKG2d -lTKMath -lTKernel"
   OCC_GEOM_LIBS="-lTKHLR -lTKOffset -lTKShHealing -lTKFillet -lTKFeat
-lTKBool -lTKBO -lTKPrim"
-  OCC_LCAF_LIBS="-lTKBinL -lTKLCAF -lTKCDF"
+  OCC_LCAF_LIBS="-lTKBinL -lTKLCAF -lTKCDF -lTKCAF"
   OCC_LIBS="$OCC_LCAF_LIBS $OCC_GEOM_LIBS $OCC_CORE_LIBS"
   CUBIT_OCC_LIB="-lcubit_OCC"
   OCC_STEP_LIBS="-lTKSTEP -lTKSTEP209 -lTKSTEPAttr -lTKSTEPBase -lTKXSBase"
diff --git a/geom/OCC/OCCAttribSet.cpp b/geom/OCC/OCCAttribSet.cpp
index 36c5c84..b39b8cd 100644
--- a/geom/OCC/OCCAttribSet.cpp
+++ b/geom/OCC/OCCAttribSet.cpp
@@ -15,17 +15,16 @@
 #include "OCCQueryEngine.hpp"
 #include "CubitSimpleAttrib.hpp"
 #include "CubitFileIOWrapper.hpp"
-#include "Handle_TDataStd_Shape.hxx"
 #include "TCollection_ExtendedString.hxx"
 #include "Handle_TDataStd_Name.hxx"
 #include "Handle_TDataStd_ExtStringArray.hxx"
 #include "Handle_TDataStd_RealArray.hxx"
 #include "Handle_TDataStd_IntegerArray.hxx"
+#include "TDataXtd_Shape.hxx"
 #include "TDataStd_Name.hxx"
 #include "TDataStd_ExtStringArray.hxx"
 #include "TDataStd_RealArray.hxx"
 #include "TDataStd_IntegerArray.hxx"
-#include "TDataStd_Shape.hxx"
 #include "TopoDS_Shape.hxx"
 #include "TDF_ChildIterator.hxx"
 #include <vector>
@@ -40,9 +39,9 @@ void OCCAttribSet::FindShape(TopoDS_Shape& shape,
     //find the same shape attribute first
     aLabel = it1.Value();

-    Handle_TDataStd_Shape attr_shape;
+    Handle_TDataXtd_Shape attr_shape;
     TopoDS_Shape old_shape;
-    if(aLabel.FindAttribute(TDataStd_Shape::GetID(), attr_shape))
+    if(aLabel.FindAttribute(TDataXtd_Shape::GetID(), attr_shape))
       old_shape = attr_shape->Get(aLabel);
     if(old_shape.IsPartner(shape))
     {
@@ -64,10 +63,10 @@ void OCCAttribSet::append_attribute( CubitSimpleAttrib*
csa, TopoDS_Shape& shape
   if(!found)
   {
     aLabel = OCCQueryEngine::instance()->mainLabel.NewChild();
-    Handle_TDataStd_Shape attr_shape = TDataStd_Shape::Set(aLabel, shape);
+    Handle_TDataXtd_Shape attr_shape = TDataXtd_Shape::Set(aLabel, shape);
     //myLabel.AddAttribute(attr_shape);
     //test if the attribute has been attached
-    assert(aLabel.IsAttribute(TDataStd_Shape::GetID()));
+    assert(aLabel.IsAttribute(TDataXtd_Shape::GetID()));
   }

   //2. add type attribute , below attributes are added on child lable of
myLabel
diff --git a/geom/OCC/OCCQueryEngine.cpp b/geom/OCC/OCCQueryEngine.cpp
index 6be36a3..ed5c6fc 100644
--- a/geom/OCC/OCCQueryEngine.cpp
+++ b/geom/OCC/OCCQueryEngine.cpp
@@ -107,7 +107,6 @@
 #include <BndLib_AddSurface.hxx>
 #include <Precision.hxx>
 #include <BRepAdaptor_Surface.hxx>
-#include <TDataStd_Shape.hxx>
 #include <TDF_ChildIterator.hxx>
 #include <BinTools_ShapeSet.hxx>
 #include "Standard_Boolean.hxx"
diff --git a/geom/OCC/OCCShapeAttributeSet.cpp
b/geom/OCC/OCCShapeAttributeSet.cpp
index ee87c61..95e3e05 100644
--- a/geom/OCC/OCCShapeAttributeSet.cpp
+++ b/geom/OCC/OCCShapeAttributeSet.cpp
@@ -22,7 +22,6 @@
 #include <Handle_BRep_GCurve.hxx>
 #include <BRep_Tool.hxx>
 #include <TDF_ChildIterator.hxx>
-#include <Handle_TDataStd_Shape.hxx>
 #include <TopTools_LocationSet.hxx>
 #include <TopTools_IndexedMapOfShape.hxx>
 #include <TopoDS_Iterator.hxx>
@@ -42,7 +41,7 @@
 #include <BRep_PointOnSurface.hxx>
 //#include <BRep_ListIteratorOfListOfPointRepresentation.hxx>
 #include <TDF_Label.hxx>
-#include <TDataStd_Shape.hxx>
+#include <TDataXtd_Shape.hxx>
 #include <Handle_TDataStd_Name.hxx>
 #include <TDataStd_Name.hxx>
 #include <Handle_TDataStd_ExtStringArray.hxx>
@@ -507,9 +506,9 @@ void  OCCShapeAttributeSet::WriteAttribute(const
TopoDS_Shape& S,
     //find the same shape attribute first
     myLabel = it1.Value();

-    Handle_TDataStd_Shape attr_shape;
+    Handle_TDataXtd_Shape attr_shape;
     TopoDS_Shape exsiting_shape;
-    if(TDataStd_Shape::Find(myLabel, attr_shape))
+    if(TDataXtd_Shape::Find(myLabel, attr_shape))
       exsiting_shape = attr_shape->Get(myLabel);

     if(!exsiting_shape.IsNull())
-- 
1.7.4.1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/cgma-dev/attachments/20110413/4298321f/attachment.htm>


More information about the cgma-dev mailing list