[cgma-dev] [PATCH] API and linking changes for OpenCascade-6.5.0
Jed Brown
jed at 59A2.org
Sat Mar 26 02:15:26 CDT 2011
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
More information about the cgma-dev
mailing list